Page 1 of 1
Python Script on Windows
Posted: Tuesday 02 May 2017 17:53
by ilpier
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
Re: Python Script on Windows
Posted: Tuesday 02 May 2017 17:55
by zak45
Hi,
python work well on my W10 PC.
Re: Python Script on Windows
Posted: Tuesday 02 May 2017 18:00
by ilpier
But i don't find an "how-to" for use this script in domoticz!Can you help me?
Re: Python Script on Windows
Posted: Tuesday 02 May 2017 18:09
by zak45
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!
Re: Python Script on Windows
Posted: Wednesday 03 May 2017 15:09
by ilpier
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?

- CommandLG.JPG (42.27 KiB) Viewed 2534 times
Re: Python Script on Windows
Posted: Wednesday 03 May 2017 17:28
by zak45
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
Re: Python Script on Windows
Posted: Wednesday 03 May 2017 23:09
by ilpier
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
Re: Python Script on Windows
Posted: Wednesday 03 May 2017 23:46
by zak45
yep... with script.. I would say ... limit is your imagination

you just need to learn a little bit on that!
ioperamini
Posted: Tuesday 24 October 2017 7:23
by Sheffield42
Download smarter With Opera Mini, you could download numerous
Opera Mini APK provided rather a lot of rewards for the surfing globe.
Re: Python Script on Windows
Posted: Friday 29 December 2017 12:43
by Kelliher846
Designers have in fact brought this unbelievable application service for you.
musicallyloginonline.com go into the Musically community.