Hi all !
Have you a troubles with the particular Simplink-CEC protocol on LG-TV ?
Have you a problem with LG-TV power-off ?
You can try the simple RS232C connection... so... what do you need ?
(1)
As first you need the RS232 serial cable - with basic pinouts, called as "null modem - without handshaking".
I used the standart pair cable designed for the audio technology (stereo). Veins for the left and right channels are used as the Rx and Tx lines. Shielding of both channels are combined into one GND. Need to use the "spinning" pair (Twister-Pair) is irrelevant because it is a short distance - cable length is 30 cm only.
You can look here or here for the example.
Connector pinouts:
(null modem cable, without hardware handshaking)
STB TV GND 5 -- 5 GND Tx 3 -> 2 Rx Rx 2 <- 3 Tx
(2)
Testing the connection over RS232 between your LG-TV and your satellite box (Shell command in Telnet):
echo "ka 01 00" > /dev/ttyS0 # shut-down TV echo "ka 01 01" > /dev/ttyS0 # shut-on TV
(3)
When the connection does not working, you need change the connection speed maybe... so, try the following command:
stty -F /dev/ttyS0 ispeed 9600 ospeed 9600
(4)
If TV-shutdowning is already working.....
OpenATV 5.3 / 6.0:
- edit the Python source code in downloaded file Standby.py from Github-server
- so, download the actual encrypted Standby.py file from Github server (Enigma2 folder) and change the source code:
..........search and add following lines to the section "def __init__(self, session)" (under "class Standby2(Screen)") : # ############## tv power on open("/dev/ttyS0","rb+").write("ka 01 01\n") print "[Standby] LGTV turn on - ttyS0 send: ka 01 01" # ############## ..........search and add following lines to the section "def __onClose(self)" (under "class Standby2(Screen)") : # ############## tv power down open("/dev/ttyS0","rb+").write("ka 01 00\n") print "[Standby] LGTV turn off - ttyS0 send: ka 01 00" # ##############
- WARNING ! you must follow the TABs in current format of the script ! Python syntax is TAB-sensitive ! you must follow the right TABs (paragraph, identation) in the source code of Standby.py !
- when source code is done, upload the file over FTP to your satellite box:
/usr/lib/enigma2/python/Screens/Standby.py
- set the execute rights on this file and reboot the satellite box (after rebooting Python script source code {.py} will automatic compiled to executable Python script {.pyo} ) :
chmod 775 /usr/lib/enigma2/python/Screens/Standby.py reboot
OpenPLi 4.0:
- there exists a Bash-script-calling code over the Standby.pyo original file
- so, all what do you need is making the new Bash scripts !
- example of standby_enter.sh bash-script file:
#!/bin/sh echo "ka 01 00" > /dev/ttyS0 # prikaz pre vypnutie LG TV prostrednictvom RS232 rozhrania
- example of standby_enter.sh bash-script file:
#!/bin/sh echo "ka 01 01" > /dev/ttyS0 # prikaz pre zapnutie LG TV prostrednictvom RS232 rozhrania
- create the directory if does not exist (/script/ folder) + create the new files (you can copy both files over FTP connection too):
/usr/script/standby_enter.sh
/usr/script/standby_leave.sh
- take the execute rights to both of them and reboot the satellite box:
chmod 775 /usr/script/standby_*.sh reboot
(5)
The shutdown of your LG-TV over Standby mode does not work on first start ! So, try shutdown of your box for the first time... do it the second time... and from now it does still working always ;-)
Used sources:
[1] LG TV Hack – Kimyabu
[2] https://www.lg.com/u...c-ba-rs232c.pdf
Good Luck !