LG TV Command
#1
this is a python script for a command line LG remote.

Please note I did not write the code, the original code can be found here

http://harizanov.com/2013/12/control-lg-...pberry-pi/

The only thing I did was edit some small parts as the original code did not work with my TV.

General cmd usage python3 lg.py 25 (this will turn the volume down on the tv)

python3 lg.py 1 (this will turn the TV off)

You Will Need

LG TV(Preferably one of the 2012 models
Python3 installed on Windows or Linux
A Brain
Optional

Android Phone
SSH installed on the server and a way to log into the client
Tasker for Android
Remote Launcher for android and server
Why would I need this

I am about to give you a small example
This is what I use this script for

I have installed Remote launcher on both my server and my Android phone

I set a launcher to launch the following

Change Input(47)
Enter(20)
I then set tasker to do the following task

My TV is usually on AV(I am not going to explain why) tasker then sends the command open app Remote Launcher in command I put start:Change Input it does this 3 times(make it wait 3sec after the first command as to give the menu time to open) so that VGA is selected(This is my server PC) it then send the Enter key to select VGA. Tasker will then start the XBMC Remote. In noob terms I start the app and my TV switches to XBMC and my phone starts the remote. I am not going to a in depth description you can google or send me an email if you have questions.



another example is to make a XBMC menu button that says live TV and get the script to change the input to AV

Download
http://www.slipsystem.co.za/downloads/lg-tv-script
Reply
#2
I know this is a dead thread, but nice job.

I'm considering buying an LG OLED. One thing I also want is to change inputs between Kodi, my TV set top box, and a game console. When you initiate the input change, how long does it take?  In the years since you posted, have you figured out a way to change inputs directly? Such as a specific code selects HDMI1...
Reply
#3
hey yes, this thread is long dead.

I unfortunately never found a solution to change change these inputs directly. the closest I came was sending the input command and then sending the left or right button then OK command. sending the commands where immediate but I had to wait for the screen to initialise. so I landed up using.


input
wait 3 seconds
right 
wait 1 second
ok
Reply

Logout Mark Read Team Forum Stats Members Help
LG TV Command0