I try to turn my LG TV and I cannot get the input channel selection working.
The rule looks like this:
rule "Turn TV on"
when
Item LG_TV changed from OFF to ON
then
logWarn("tv", "AT_Office_Power_Entertainment.sendCommand(ON): " + AT_Office_Power_Entertainment.state.toString )
if (AT_Office_Power_Entertainment.state == OFF) {
logWarn("tv", "AT_Office_Power_Entertainment.sendCommand(ON)")
AT_Office_Power_Entertainment.sendCommand(ON)
}
Thread::sleep(15000)
logWarn("tv", "TV.sendCommand(ON)")
LG_TV0_WOL.sendCommand(ON)
Thread::sleep(5000)
logWarn("tv", "TV.sendCommand(com.webos.app.hdmi3)")
LG_TV0_Application.sendCommand("com.webos.app.hdmi3")
end
I added some sleeps to give the devices some time to boot into their standby mode.
The WakeOnLAN works, the TV starts and shows the input channel that was selected before turning it off (livetv for testing).
When sending the command to the appLauncher with the parameter “com.webos.app.hdmi3” I receive an error “error requesting application list: connection lost”:
2019-02-08 11:58:06.656 [WARN ] [rg.eclipse.smarthome.model.script.tv] - AT_Office_Power_Entertainment.sendCommand(ON): OFF
2019-02-08 11:58:06.670 [WARN ] [rg.eclipse.smarthome.model.script.tv] - AT_Office_Power_Entertainment.sendCommand(ON)
2019-02-08 11:58:21.686 [WARN ] [rg.eclipse.smarthome.model.script.tv] - TV.sendCommand(ON)
2019-02-08 11:58:21.701 [INFO ] [nhab.binding.wol.internal.WolBinding] - Wake-on-LAN packet sent [broadcastIp=192.168.178.255, macaddress=785dc84db832]
2019-02-08 11:58:26.699 [WARN ] [rg.eclipse.smarthome.model.script.tv] - TV.sendCommand(com.webos.app.hdmi3)
2019-02-08 11:58:26.790 [WARN ] [lgwebos.internal.LauncherApplication] - error requesting application list: connection lost.
What could be the reason for this connection lost or how could I make the thing more resilient against short-lived connection drops?