Modification of @Samlalor, LG TV Discovery 2012+ Power Save & DTH Controller:
In case someone needs to control LG smart TV of years 2012, 2013 prior to webOS. These TVs cannot be reset to ON since the network is inactive at OFF state.
I have modified the smartapp to detect the TV and create the Virtual Controller device.
Modified the DTH to activate the energy saving function on the TV with the screen turned off and without sound (TV 42" 12 watt. and in TV 29" 9 watt. of consumption).
In this way you can turn off the screen and restore it from smartThings in addition to turning off the TV.
DTH of virtual controller functions:
- Turn TV off (with “Off” Key)
- Activate energy saving: mute On and screen Off. (with “Pause” key)
- Deactivate energy saving: mute Off and screen On. (with “Play” key)
- Every 5 minutes it refreshes the current status of the TV, On or Off (with “Off” Key)
- Smartthings detects the dth as a multimedia player and the 3 states, Playing, Paused, stopped (Off) can be used to control the TV from automations and scenes.
- Use of mute and unmute regardless of the energy save function. The TV does not send the current state of the sound. The DTH sends the command to change the current state, just like the remote control.
- If the TV is turned On or Off from the remote control, smartthing updates its current status every 5 minutes or manually by pressing the On-Off button.
- As the new smartthings app uses the tiles without paying attention to the labels and icons of the DTH code, the status information in the main tile is not always displayed correctly except for “stopped”. The icon and the animation if it is always correct and the status information for use in automations as well.
I have put a link of a video to see how it works on TV and smartthings:
- INSTRUCTIONS TO INSTALL:
- -Create and publish samrtapp and Controller DTH in IDE.
- -Open The App, click on “Discovery” to found TV.
- -If Show ‘Select LG TV(0 found)’ click next until ‘Select LG TV(1 found)’, then ‘Tap to set’ to select IP TV"
- -Select the TV app found, just find 1. click on “done”, then key code appears on the TV screen, take note of it.
- -(Every 15 seconds refresch TV found and clean the previous selection)
- -Write an App Name to control One TV device. Controller will be created with same name.
- -Click on “TV Key” and write the copied TV pairing key.
- Click “Done”. Smart app and controller will be created.
- IMPORTANT: Must be configure in your router the Fix IP for your TV or you must write the TV IP in th device configuration even 12Hours normally