Python Script on Windows
Moderator: leecollings
-
- Posts: 31
- Joined: Friday 24 February 2017 12:01
- Target OS: Windows
- Domoticz version:
- Contact:
Python Script on Windows
Hello to everyone, i have domoticz installed on a Windows 10 PC and i would use the script to control an LG 2012 TV.
Can I use this Python script on a pc windows?
https://www.domoticz.com/wiki/LG_2012_smart_tv
Can I use this Python script on a pc windows?
https://www.domoticz.com/wiki/LG_2012_smart_tv
-
- Posts: 952
- Joined: Sunday 22 January 2017 11:37
- Target OS: Windows
- Domoticz version: V2024.4
- Contact:
Re: Python Script on Windows
Hi,
python work well on my W10 PC.
python work well on my W10 PC.
-
- Posts: 31
- Joined: Friday 24 February 2017 12:01
- Target OS: Windows
- Domoticz version:
- Contact:
Re: Python Script on Windows
But i don't find an "how-to" for use this script in domoticz!Can you help me?
-
- Posts: 952
- Joined: Sunday 22 January 2017 11:37
- Target OS: Windows
- Domoticz version: V2024.4
- Contact:
Re: Python Script on Windows
sorry, do not have LG TV, but this look like command line script; Just follow wiki. After configured, you should be able to send the command via this way:
python your_script.py xxx
where xxx is the code you want to send.
Of course, all of that could be put on cmd file and executed on Domoticz via LUA script or put on the on/off action of a device etc ...
Hope this help a little!
python your_script.py xxx
where xxx is the code you want to send.
Of course, all of that could be put on cmd file and executed on Domoticz via LUA script or put on the on/off action of a device etc ...
Hope this help a little!
-
- Posts: 31
- Joined: Friday 24 February 2017 12:01
- Target OS: Windows
- Domoticz version:
- Contact:
Re: Python Script on Windows
thx Zak45 but i have more question!
i've put .py witch copy/past of code in (https://www.domoticz.com/wiki/LG_2012_smart_tv) in c:\domoticz\scripts\lgtvcommand.py
now i have to create a dummy switch for On command with the final "xxx" code for on?
i've put .py witch copy/past of code in (https://www.domoticz.com/wiki/LG_2012_smart_tv) in c:\domoticz\scripts\lgtvcommand.py
now i have to create a dummy switch for On command with the final "xxx" code for on?
-
- Posts: 952
- Joined: Sunday 22 January 2017 11:37
- Target OS: Windows
- Domoticz version: V2024.4
- Contact:
Re: Python Script on Windows
I would do it in this way:
create c:/domoticz/scripts/lgtvcommand.cmd with this on it:
cmd /c python c:/domoticz/scripts/lgtvcommand.py %1
on the On action:
script://c:/domoticz/scripts/lgtvcommand.cmd xxx
create c:/domoticz/scripts/lgtvcommand.cmd with this on it:
cmd /c python c:/domoticz/scripts/lgtvcommand.py %1
on the On action:
script://c:/domoticz/scripts/lgtvcommand.cmd xxx
-
- Posts: 31
- Joined: Friday 24 February 2017 12:01
- Target OS: Windows
- Domoticz version:
- Contact:
Re: Python Script on Windows
Thx Zak!
cmd don't work but with .bat all work fine!
Unfortunately I found that the power off TV does not turn on! while all the other commands, once tv turned on, work. Can I put more than one command in the same switch? For example, to set a different source I should send "input" + 3 times " Right arrow "+" send "
It's possible?
Inviato dal mio iPhone utilizzando Tapatalk
cmd don't work but with .bat all work fine!
Unfortunately I found that the power off TV does not turn on! while all the other commands, once tv turned on, work. Can I put more than one command in the same switch? For example, to set a different source I should send "input" + 3 times " Right arrow "+" send "
It's possible?
Inviato dal mio iPhone utilizzando Tapatalk
-
- Posts: 952
- Joined: Sunday 22 January 2017 11:37
- Target OS: Windows
- Domoticz version: V2024.4
- Contact:
Re: Python Script on Windows
yep... with script.. I would say ... limit is your imagination 
you just need to learn a little bit on that!

you just need to learn a little bit on that!
-
- Posts: 3
- Joined: Monday 23 October 2017 7:33
- Target OS: Windows
- Domoticz version:
- Contact:
ioperamini
Download smarter With Opera Mini, you could download numerous Opera Mini APK provided rather a lot of rewards for the surfing globe.
-
- Posts: 1
- Joined: Friday 29 December 2017 12:41
- Target OS: Windows
- Domoticz version:
- Contact:
Re: Python Script on Windows
Designers have in fact brought this unbelievable application service for you. musicallyloginonline.com go into the Musically community.
Who is online
Users browsing this forum: No registered users and 1 guest