Kodi Community Forum

Full Version: Toggle LG TV Power addon
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I just released a simple addon script which toggles the power of an LG TV. This uses cec-client and the kodi.script.turnofflgtv addon.

It's useful to bind to a remote control "power" button, to turn the TV on when it's off, or off when it's on. It uses CEC to get the TV power status, and turn the TV on, and the Kodi.Script.TurnOffTV addon to turn the TV off. This is necessary for LG TVs, as they don't support CEC to turn off, so the CECToggleState command won't work for it. I assigned this script to the power button on my remote by adding this line to the keymap.xml:

I just put it up on github at https://github.com/nickjwhite/Kodi.Scrip...eLGTVPower

This is the first addon I've written, so any feedback would be very welcome.