[PORT] LG Smart TV Discovery 2012+

Also, look at my post here:

It's a bit weird that your app would show switch as "off" if you powered on from HE. The "switch" attribute doesn't actually depend on whether the TV is on or off. It's changed to "on" as soon you power on from HE.

Also, I'd recommend using the "power" attribute in your rule. That is the true signal of whether the TV is on or off. Also, like I said in the last post, there would be some delay (Device Reconnect Delay) between the TV turning on and the power attribute changing to "on".

That delay is likely because of a race condition between turning off the TV and turning it back on. Look at my post here:

I fixed it in my driver code that I posted above. I've been using it for 1.5 years and haven't had power on misses:

Thanks for the tips. Can you please expand on the "power" attribute?

I turned on the "Quick Start+" option. Copied your driver code, changes the Device Reconnect Delay to 30s, but still no success. the C9 turns off but when I try to turn it on the "On" button on the HE stays pushed and the TV is not turning on.

the logs say that the TV is on
infoon(): Executing 'Power On'
infoLG WebOS TV is on [digital]

But the TV does does not turn on :confused:

My code doesn't have this line. Are you sure you're using my code?

Do you see this line in the log?
"Sending Magic Packet to:"

If not, you probably haven't set your MAC address in the settings. You need to do that before you can send "on" commands via WakeOnLan. You can get your MAC address from the TV settings (About).

There are 2 attributes that deal with the "on/off" state of the TV. There's the switch attribute and the power attribute.

Switch attribute: When the TV is turned on/off via HE, the "switch" changes to "on" or "off" instantly. It's not just based on the physical TV. It changes based on what you clicked in HE. It also changes when the "power" attribute changes.

Power attribute: This is what reflects what HE thinks the current physical state of the TV is.
"On" state: In my code, I rely on the current Input not being null to determine that the TV is on. So every time the current Input changes to a value that isn't null, then it's determined that the TV is on. Also, channelName reflects the current Input. If channelName is "off", then current Input was null. Now when the TV is turned on, it takes some time for HE to connect to it and for it to then receive the current Input value. That's why "on" isn't instant.
"Off" state: My TV sends a null value for current Input and process ID (you can't see this) as soon as it's been turned off. This is why off is instant.

Sorry, I believe that now I've copied your code correctly.

Yes. I'm getting 2 lines
2022-01-06 23:59:39.844 [info] Sending Magic Packet to: wake on lan MAC ADDRESS

2022-01-06 23:59:39.841 [debug] Sending Magic Packet to: MAC ADDRESS

Still can't make the tv turn on :confused:
Will it be helpful if I'll copy here the logs of when I try to turn tv off/on via HE?

Yes, please turn info and debug logging on. I suspect the issue is your MAC address isn't set correctly. It's only needed for WakeOnLan so you'd only notice it when trying to turn on the tv via HE.

You can find your correct MAC address on the TV by going to Settings, Connection, Wired/Wi-Fi Connection, Advanced Wi-Fi Settings (if using Wi-Fi). Make sure that's the same MAC address entered in the TV's preferences in HE (can ignore the colons).

Just to be sure, you replaced your actual mac address in this log with "MAC ADDRESS"? Correct?

Yeah yeah, sorry :slight_smile: I deleted the actual address and wrote "MAC ADDRESS".
I checked again the MAC address on the tv settings and it's the same as on the HE. Maybe it's better to also switch of the wired connection? I currently have both wired and wifi on.

is there a preferred method to post a log or just a simple copy paste?

Copy and paste but use the preformatted text.

Is your TV connected via ethernet? If it is, that's the MAC address you should be using. You have 2 MAC addresses (one for Wired and the other for Wi-Fi). I use ethernet but just tried turning connecting to the Wi-Fi on my TV and using the MAC address of the wired connection still works fine so don't think you need to disconnect any connection.

I added to the HE the IP and MAC address of the wired connection of the tv. Still no success.
The log is almost 700 lines.

How do I change it to a preformatted text?
Also is it safe to share all log details?
Sorry, I'm a newbie :slight_smile:

Only share about 50 lines after
on(): Executing 'Power On.

Make sure you remove any sensitive info (Mac address etc). Just want to see what websocket does after you try to turn the tv on.

The preformatted text symbol looks like </>. Highlight the text you want to preformat and click that symbol. You'll get something like the below:

Testing preformatted text.
Cheers

It's a bit more than 50 lines. I changed all sensitive info with XX

dev:2892022-01-07 01:35:40.372 debugparse: {"type":"response","id":"status_2","payload":{"returnValue":true,"time":{"year":2022,"month":1,"day":7,"hour":1,"minute":35,"second":31}}}
dev:2892022-01-07 01:35:40.351 infoLG WebOS TV channelName is PC
dev:2892022-01-07 01:35:40.349 infoLG WebOS TV is on [physical]
dev:2892022-01-07 01:35:40.346 debughandler_getForegroundAppInfo: got: [appId:com.webos.app.hdmi2, subscribed:true, returnValue:true, windowId:, processId:]
dev:2892022-01-07 01:35:40.344 debugparse: {"type":"response","id":"getForegroundAppInfo","payload":{"appId":"com.webos.app.hdmi2","subscribed":true,"returnValue":true,"windowId":"","processId":""}}
dev:2892022-01-07 01:35:40.332 infoLG WebOS TV volume is 0
dev:2892022-01-07 01:35:40.330 debughandler_audio_getStatus: got: [returnValue:true, volumeMax:100, ringtonewithvibration:true, scenario:mastervolume_ext_speaker_arc, hac:false, subscribed:true, volume:0, action:requested, supportvolume:false, ringer switch:true, slider:false, active:false, mute:false]
dev:2892022-01-07 01:35:40.327 debugparse: {"type":"response","id":"audio_getStatus","payload":{"returnValue":true,"volumeMax":100,"ringtonewithvibration":true,"scenario":"mastervolume_ext_speaker_arc","hac":false,"subscribed":true,"volume":0,"action":"requested","supportvolume":false,"ringer switch":true,"slider":false,"active":false,"mute":false}}
dev:2892022-01-07 01:35:40.307 debugsendCommand: {"type":"subscribe","id":"status_2","uri":"ssap://com.webos.service.tv.time/getCurrentTime"}
dev:2892022-01-07 01:35:40.305 debugsendWebosCommand sending json: {"id":"getForegroundAppInfo","type":"subscribe","uri":"ssap://com.webos.applicationManager/getForegroundAppInfo"}
dev:2892022-01-07 01:35:40.302 debugSending: {"id":"getForegroundAppInfo","type":"subscribe","uri":"ssap://com.webos.applicationManager/getForegroundAppInfo"} storing callback: getForegroundAppInfo
dev:2892022-01-07 01:35:40.299 debugsendWebosCommand sending json: {"id":"audio_getStatus","type":"subscribe","uri":"ssap://audio/getStatus"}
dev:2892022-01-07 01:35:40.296 debugSending: {"id":"audio_getStatus","type":"subscribe","uri":"ssap://audio/getStatus"} storing callback: audio_getStatus
dev:2892022-01-07 01:35:40.236 debugparseWebsocketResult: received registered client-key: 7f1651bfaa1700963baefc205d112d06
dev:2892022-01-07 01:35:40.234 debugwebosRegister: got json: [type:registered, id:command_1, payload:[client-key:7f1651bfaa1700963baefc205d112d06]]
dev:2892022-01-07 01:35:40.231 debugparse: callback for json.id: command_1
dev:2892022-01-07 01:35:40.229 debugparse: {"type":"registered","id":"command_1","payload":{"client-key":"7f1651bfaa1700963baefc205d112d06"}}
dev:2892022-01-07 01:35:40.216 debugsendWebosCommand sending json: {"id":"command_1","type":"register","payload":{"pairingType":"PROMPT","forcePairing":false,"client-key":"7f1651bfaa1700963baefc205d112d06","manifest":{"appVersion":"1.1","signed":{"localizedVendorNames":{"":"LG Electronics"},"appId":"com.lge.test","created":"20140509","permissions":["TEST_SECURE","CONTROL_INPUT_TEXT","CONTROL_MOUSE_AND_KEYBOARD","READ_INSTALLED_APPS","READ_LGE_SDX","READ_NOTIFICATIONS","SEARCH","WRITE_SETTINGS","WRITE_NOTIFICATION_ALERT","CONTROL_POWER","READ_CURRENT_CHANNEL","READ_RUNNING_APPS","READ_UPDATE_INFO","UPDATE_FROM_REMOTE_APP","READ_LGE_TV_INPUT_EVENTS","READ_TV_CURRENT_TIME"],"localizedAppNames":{"":"LG Remote App","ko-KR":"\ub9ac\ubaa8\ucee8 \uc571","zxx-XX":"\u041b\u0413 R\u044d\u043cot\u044d A\u041f\u041f"},"vendorId":"com.lge","serial":"2f930e2d2cfe083771f68e4fe7bb07"},"permissions":["LAUNCH","LAUNCH_WEBAPP","APP_TO_APP","CLOSE","TEST_OPEN","TEST_PROTECTED","CONTROL_AUDIO","CONTROL_DISPLAY","CONTROL_INPUT_JOYSTICK","CONTROL_INPUT_MEDIA_RECORDING","CONTROL_INPUT_MEDIA_PLAYBACK","CONTROL_INPUT_TV","CONTROL_POWER","READ_APP_STATUS","READ_CURRENT_CHANNEL","READ_INPUT_DEVICE_LIST","READ_NETWORK_STATE","READ_RUNNING_APPS","READ_TV_CHANNEL_LIST","WRITE_NOTIFICATION_TOAST","READ_POWER_STATE","READ_COUNTRY_INFO"],"manifestVersion":1,"signatures":[{"signatureVersion":1,"signature":"eyJhbGdvcml0aG0iOiJSU0EtU0hBMjU2Iiwia2V5SWQiOiJ0ZXN0LXNpZ25pbmctY2VydCIsInNpZ25hdHVyZVZlcnNpb24iOjF9.hrVRgjCwXVvE2OOSpDZ58hR+59aFNwYDyjQgKk3auukd7pcegmE2CzPCa0bJ0ZsRAcKkCTJrWo5iDzNhMBWRyaMOv5zWSrthlf7G128qvIlpMT0YNY+n/FaOHE73uLrS/g7swl3/qH/BGFG2Hu4RlL48eb3lLKqTt2xKHdCs6Cd4RMfJPYnzgvI4BNrFUKsjkcu+WD4OO2A27Pq1n50cMchmcaXadJhGrOqH5YmHdOCj5NSHzJYrsW0HPlpuAx/ECMeIZYDh6RMqaFM2DXzdKX9NmmyqzJ3o/0lkk/N97gfVRLW5hA29yeAwaCViZNCP8iC9aO0q9fQojoa7NQnAtw=="}]}}}
dev:2892022-01-07 01:35:40.200 debugSending: {"id":"command_1","type":"register","payload":{"pairingType":"PROMPT","forcePairing":false,"client-key":"7f1651bfaa1700963baefc205d112d06","manifest":{"appVersion":"1.1","signed":{"localizedVendorNames":{"":"LG Electronics"},"appId":"com.lge.test","created":"20140509","permissions":["TEST_SECURE","CONTROL_INPUT_TEXT","CONTROL_MOUSE_AND_KEYBOARD","READ_INSTALLED_APPS","READ_LGE_SDX","READ_NOTIFICATIONS","SEARCH","WRITE_SETTINGS","WRITE_NOTIFICATION_ALERT","CONTROL_POWER","READ_CURRENT_CHANNEL","READ_RUNNING_APPS","READ_UPDATE_INFO","UPDATE_FROM_REMOTE_APP","READ_LGE_TV_INPUT_EVENTS","READ_TV_CURRENT_TIME"],"localizedAppNames":{"":"LG Remote App","ko-KR":"\ub9ac\ubaa8\ucee8 \uc571","zxx-XX":"\u041b\u0413 R\u044d\u043cot\u044d A\u041f\u041f"},"vendorId":"com.lge","serial":"2f930e2d2cfe083771f68e4fe7bb07"},"permissions":["LAUNCH","LAUNCH_WEBAPP","APP_TO_APP","CLOSE","TEST_OPEN","TEST_PROTECTED","CONTROL_AUDIO","CONTROL_DISPLAY","CONTROL_INPUT_JOYSTICK","CONTROL_INPUT_MEDIA_RECORDING","CONTROL_INPUT_MEDIA_PLAYBACK","CONTROL_INPUT_TV","CONTROL_POWER","READ_APP_STATUS","READ_CURRENT_CHANNEL","READ_INPUT_DEVICE_LIST","READ_NETWORK_STATE","READ_RUNNING_APPS","READ_TV_CHANNEL_LIST","WRITE_NOTIFICATION_TOAST","READ_POWER_STATE","READ_COUNTRY_INFO"],"manifestVersion":1,"signatures":[{"signatureVersion":1,"signature":"eyJhbGdvcml0aG0iOiJSU0EtU0hBMjU2Iiwia2V5SWQiOiJ0ZXN0LXNpZ25pbmctY2VydCIsInNpZ25hdHVyZVZlcnNpb24iOjF9.hrVRgjCwXVvE2OOSpDZ58hR+59aFNwYDyjQgKk3auukd7pcegmE2CzPCa0bJ0ZsRAcKkCTJrWo5iDzNhMBWRyaMOv5zWSrthlf7G128qvIlpMT0YNY+n/FaOHE73uLrS/g7swl3/qH/BGFG2Hu4RlL48eb3lLKqTt2xKHdCs6Cd4RMfJPYnzgvI4BNrFUKsjkcu+WD4OO2A27Pq1n50cMchmcaXadJhGrOqH5YmHdOCj5NSHzJYrsW0HPlpuAx/ECMeIZYDh6RMqaFM2DXzdKX9NmmyqzJ3o/0lkk/N97gfVRLW5hA29yeAwaCViZNCP8iC9aO0q9fQojoa7NQnAtw=="}]}}} storing callback: command_1
dev:2892022-01-07 01:35:40.184 infowebosRegister(): pairing key: 7f1651bfaa1700963baefc205d112d06
dev:2892022-01-07 01:35:40.181 infowebsocket is open
dev:2892022-01-07 01:35:40.179 debugwebSocketStatus: State: [initialize]   Reported Status: [status: open]
dev:2892022-01-07 01:35:40.126 debugConnecting websocket to: "ws://XX:XX:XX:XX:XX:XX:3000/"
dev:2892022-01-07 01:35:40.111 debugLG Smart TV Driver - initialize - settings:['logLevel':'info', 'logDescText':true, 'televisionIp':'XX:XX:XX:XX:XX:XX', 'televisionMac':'XX:XX:XX:XX:XX:XX', 'pairingKey':'7f1651bfaa1700963baefc205d112d06', 'logInfoEnable':true, 'logEnable':true, 'txtEnable':true, 'retryDelay':'30']
dev:2892022-01-07 01:35:40.088 infoLG Smart TV Driver - initialize - ip: XX:XX:XX:XX:XX:XX  mac: XX:XX:XX:XX:XX:XX  key: 7f1651bfaa1700963baefc205d112d06 debug: null logText: null
dev:2892022-01-07 01:35:35.064 infowebsocket reconnect - delay = 5
dev:2892022-01-07 01:35:35.059 debugWebSocket connection closing.
dev:2892022-01-07 01:35:35.057 debugwebSocketStatus: State: [open]   Reported Status: [status: closing]
dev:2892022-01-07 01:35:35.054 debugparse: {"type":"response","id":"status_2","payload":{"returnValue":true,"time":{"year":2022,"month":1,"day":7,"hour":1,"minute":35,"second":25}}}
dev:2892022-01-07 01:35:35.042 infoReceived POWER DOWN notification.
dev:2892022-01-07 01:35:34.932 debughandler_getForegroundAppInfo: got: [appId:, subscribed:true, returnValue:true, windowId:, processId:]
dev:2892022-01-07 01:35:34.930 debugparse: {"type":"response","id":"getForegroundAppInfo","payload":{"appId":"","subscribed":true,"returnValue":true,"windowId":"","processId":""}}
dev:2892022-01-07 01:35:34.918 infoLG WebOS TV volume is 0
dev:2892022-01-07 01:35:34.915 debughandler_audio_getStatus: got: [returnValue:true, volumeMax:100, ringtonewithvibration:true, scenario:mastervolume_ext_speaker_arc, hac:false, subscribed:true, volume:0, action:requested, supportvolume:false, ringer switch:true, slider:false, active:false, mute:false]
dev:2892022-01-07 01:35:34.913 debugparse: {"type":"response","id":"audio_getStatus","payload":{"returnValue":true,"volumeMax":100,"ringtonewithvibration":true,"scenario":"mastervolume_ext_speaker_arc","hac":false,"subscribed":true,"volume":0,"action":"requested","supportvolume":false,"ringer switch":true,"slider":false,"active":false,"mute":false}}
dev:2892022-01-07 01:35:34.893 debugsendCommand: {"type":"subscribe","id":"status_2","uri":"ssap://com.webos.service.tv.time/getCurrentTime"}
dev:2892022-01-07 01:35:34.890 debugsendWebosCommand sending json: {"id":"getForegroundAppInfo","type":"subscribe","uri":"ssap://com.webos.applicationManager/getForegroundAppInfo"}
dev:2892022-01-07 01:35:34.887 debugSending: {"id":"getForegroundAppInfo","type":"subscribe","uri":"ssap://com.webos.applicationManager/getForegroundAppInfo"} storing callback: getForegroundAppInfo
dev:2892022-01-07 01:35:34.884 debugsendWebosCommand sending json: {"id":"audio_getStatus","type":"subscribe","uri":"ssap://audio/getStatus"}
dev:2892022-01-07 01:35:34.882 debugSending: {"id":"audio_getStatus","type":"subscribe","uri":"ssap://audio/getStatus"} storing callback: audio_getStatus
dev:2892022-01-07 01:35:34.825 debugparseWebsocketResult: received registered client-key: 7f1651bfaa1700963baefc205d112d06
dev:2892022-01-07 01:35:34.822 debugwebosRegister: got json: [type:registered, id:command_1, payload:[client-key:7f1651bfaa1700963baefc205d112d06]]
dev:2892022-01-07 01:35:34.820 debugparse: callback for json.id: command_1
dev:2892022-01-07 01:35:34.817 debugparse: {"type":"registered","id":"command_1","payload":{"client-key":"7f1651bfaa1700963baefc205d112d06"}}
dev:2892022-01-07 01:35:34.804 debugsendWebosCommand sending json: {"id":"command_1","type":"register","payload":{"pairingType":"PROMPT","forcePairing":false,"client-key":"7f1651bfaa1700963baefc205d112d06","manifest":{"appVersion":"1.1","signed":{"localizedVendorNames":{"":"LG Electronics"},"appId":"com.lge.test","created":"20140509","permissions":["TEST_SECURE","CONTROL_INPUT_TEXT","CONTROL_MOUSE_AND_KEYBOARD","READ_INSTALLED_APPS","READ_LGE_SDX","READ_NOTIFICATIONS","SEARCH","WRITE_SETTINGS","WRITE_NOTIFICATION_ALERT","CONTROL_POWER","READ_CURRENT_CHANNEL","READ_RUNNING_APPS","READ_UPDATE_INFO","UPDATE_FROM_REMOTE_APP","READ_LGE_TV_INPUT_EVENTS","READ_TV_CURRENT_TIME"],"localizedAppNames":{"":"LG Remote App","ko-KR":"\ub9ac\ubaa8\ucee8 \uc571","zxx-XX":"\u041b\u0413 R\u044d\u043cot\u044d A\u041f\u041f"},"vendorId":"com.lge","serial":"2f930e2d2cfe083771f68e4fe7bb07"},"permissions":["LAUNCH","LAUNCH_WEBAPP","APP_TO_APP","CLOSE","TEST_OPEN","TEST_PROTECTED","CONTROL_AUDIO","CONTROL_DISPLAY","CONTROL_INPUT_JOYSTICK","CONTROL_INPUT_MEDIA_RECORDING","CONTROL_INPUT_MEDIA_PLAYBACK","CONTROL_INPUT_TV","CONTROL_POWER","READ_APP_STATUS","READ_CURRENT_CHANNEL","READ_INPUT_DEVICE_LIST","READ_NETWORK_STATE","READ_RUNNING_APPS","READ_TV_CHANNEL_LIST","WRITE_NOTIFICATION_TOAST","READ_POWER_STATE","READ_COUNTRY_INFO"],"manifestVersion":1,"signatures":[{"signatureVersion":1,"signature":"eyJhbGdvcml0aG0iOiJSU0EtU0hBMjU2Iiwia2V5SWQiOiJ0ZXN0LXNpZ25pbmctY2VydCIsInNpZ25hdHVyZVZlcnNpb24iOjF9.hrVRgjCwXVvE2OOSpDZ58hR+59aFNwYDyjQgKk3auukd7pcegmE2CzPCa0bJ0ZsRAcKkCTJrWo5iDzNhMBWRyaMOv5zWSrthlf7G128qvIlpMT0YNY+n/FaOHE73uLrS/g7swl3/qH/BGFG2Hu4RlL48eb3lLKqTt2xKHdCs6Cd4RMfJPYnzgvI4BNrFUKsjkcu+WD4OO2A27Pq1n50cMchmcaXadJhGrOqH5YmHdOCj5NSHzJYrsW0HPlpuAx/ECMeIZYDh6RMqaFM2DXzdKX9NmmyqzJ3o/0lkk/N97gfVRLW5hA29yeAwaCViZNCP8iC9aO0q9fQojoa7NQnAtw=="}]}}}
dev:2892022-01-07 01:35:34.789 debugSending: {"id":"command_1","type":"register","payload":{"pairingType":"PROMPT","forcePairing":false,"client-key":"7f1651bfaa1700963baefc205d112d06","manifest":{"appVersion":"1.1","signed":{"localizedVendorNames":{"":"LG Electronics"},"appId":"com.lge.test","created":"20140509","permissions":["TEST_SECURE","CONTROL_INPUT_TEXT","CONTROL_MOUSE_AND_KEYBOARD","READ_INSTALLED_APPS","READ_LGE_SDX","READ_NOTIFICATIONS","SEARCH","WRITE_SETTINGS","WRITE_NOTIFICATION_ALERT","CONTROL_POWER","READ_CURRENT_CHANNEL","READ_RUNNING_APPS","READ_UPDATE_INFO","UPDATE_FROM_REMOTE_APP","READ_LGE_TV_INPUT_EVENTS","READ_TV_CURRENT_TIME"],"localizedAppNames":{"":"LG Remote App","ko-KR":"\ub9ac\ubaa8\ucee8 \uc571","zxx-XX":"\u041b\u0413 R\u044d\u043cot\u044d A\u041f\u041f"},"vendorId":"com.lge","serial":"2f930e2d2cfe083771f68e4fe7bb07"},"permissions":["LAUNCH","LAUNCH_WEBAPP","APP_TO_APP","CLOSE","TEST_OPEN","TEST_PROTECTED","CONTROL_AUDIO","CONTROL_DISPLAY","CONTROL_INPUT_JOYSTICK","CONTROL_INPUT_MEDIA_RECORDING","CONTROL_INPUT_MEDIA_PLAYBACK","CONTROL_INPUT_TV","CONTROL_POWER","READ_APP_STATUS","READ_CURRENT_CHANNEL","READ_INPUT_DEVICE_LIST","READ_NETWORK_STATE","READ_RUNNING_APPS","READ_TV_CHANNEL_LIST","WRITE_NOTIFICATION_TOAST","READ_POWER_STATE","READ_COUNTRY_INFO"],"manifestVersion":1,"signatures":[{"signatureVersion":1,"signature":"eyJhbGdvcml0aG0iOiJSU0EtU0hBMjU2Iiwia2V5SWQiOiJ0ZXN0LXNpZ25pbmctY2VydCIsInNpZ25hdHVyZVZlcnNpb24iOjF9.hrVRgjCwXVvE2OOSpDZ58hR+59aFNwYDyjQgKk3auukd7pcegmE2CzPCa0bJ0ZsRAcKkCTJrWo5iDzNhMBWRyaMOv5zWSrthlf7G128qvIlpMT0YNY+n/FaOHE73uLrS/g7swl3/qH/BGFG2Hu4RlL48eb3lLKqTt2xKHdCs6Cd4RMfJPYnzgvI4BNrFUKsjkcu+WD4OO2A27Pq1n50cMchmcaXadJhGrOqH5YmHdOCj5NSHzJYrsW0HPlpuAx/ECMeIZYDh6RMqaFM2DXzdKX9NmmyqzJ3o/0lkk/N97gfVRLW5hA29yeAwaCViZNCP8iC9aO0q9fQojoa7NQnAtw=="}]}}} storing callback: command_1
dev:2892022-01-07 01:35:34.771 infowebosRegister(): pairing key: 7f1651bfaa1700963baefc205d112d06
dev:2892022-01-07 01:35:34.768 infowebsocket is open
dev:2892022-01-07 01:35:34.766 debugwebSocketStatus: State: [initialize]   Reported Status: [status: open]
dev:2892022-01-07 01:35:34.714 debugConnecting websocket to: "ws://XX:XX:XX:XX:XX:XX/"
dev:2892022-01-07 01:35:34.699 debugLG Smart TV Driver - initialize - settings:['logLevel':'info', 'logDescText':true, 'televisionIp':'XX:XX:XX:XX:XX:XX', 'televisionMac':'XX:XX:XX:XX:XX:XX', 'pairingKey':'7f1651bfaa1700963baefc205d112d06', 'logInfoEnable':true, 'logEnable':true, 'txtEnable':true, 'retryDelay':'30']
dev:2892022-01-07 01:35:34.695 infoLG Smart TV Driver - initialize - ip: XX:XX:XX:XX:XX:XX  mac: XX:XX:XX:XX:XX:XX  key: 7f1651bfaa1700963baefc205d112d06 debug: null logText: null
dev:2892022-01-07 01:35:29.674 infowebsocket reconnect - delay = 5
dev:2892022-01-07 01:35:29.667 debugWebSocket connection closing.
dev:2892022-01-07 01:35:29.664 debugwebSocketStatus: State: [open]   Reported Status: [status: closing]
dev:2892022-01-07 01:35:29.661 debugparse: {"type":"response","id":"status_2","payload":{"returnValue":true,"time":{"year":2022,"month":1,"day":7,"hour":1,"minute":35,"second":20}}}
dev:2892022-01-07 01:35:29.651 infoReceived POWER DOWN notification.
dev:2892022-01-07 01:35:29.543 debughandler_getForegroundAppInfo: got: [appId:, subscribed:true, returnValue:true, windowId:, processId:]
dev:2892022-01-07 01:35:29.540 debugparse: {"type":"response","id":"getForegroundAppInfo","payload":{"appId":"","subscribed":true,"returnValue":true,"windowId":"","processId":""}}
dev:2892022-01-07 01:35:29.528 infoLG WebOS TV volume is 0
dev:2892022-01-07 01:35:29.526 debughandler_audio_getStatus: got: [returnValue:true, volumeMax:100, ringtonewithvibration:true, scenario:mastervolume_ext_speaker_arc, hac:false, subscribed:true, volume:0, action:requested, supportvolume:false, ringer switch:true, slider:false, active:false, mute:false]
dev:2892022-01-07 01:35:29.523 debugparse: {"type":"response","id":"audio_getStatus","payload":{"returnValue":true,"volumeMax":100,"ringtonewithvibration":true,"scenario":"mastervolume_ext_speaker_arc","hac":false,"subscribed":true,"volume":0,"action":"requested","supportvolume":false,"ringer switch":true,"slider":false,"active":false,"mute":false}}
dev:2892022-01-07 01:35:29.504 debugsendCommand: {"type":"subscribe","id":"status_2","uri":"ssap://com.webos.service.tv.time/getCurrentTime"}
dev:2892022-01-07 01:35:29.501 debugsendWebosCommand sending json: {"id":"getForegroundAppInfo","type":"subscribe","uri":"ssap://com.webos.applicationManager/getForegroundAppInfo"}
dev:2892022-01-07 01:35:29.499 debugSending: {"id":"getForegroundAppInfo","type":"subscribe","uri":"ssap://com.webos.applicationManager/getForegroundAppInfo"} storing callback: getForegroundAppInfo
dev:2892022-01-07 01:35:29.496 debugsendWebosCommand sending json: {"id":"audio_getStatus","type":"subscribe","uri":"ssap://audio/getStatus"}
dev:2892022-01-07 01:35:29.493 debugSending: {"id":"audio_getStatus","type":"subscribe","uri":"ssap://audio/getStatus"} storing callback: audio_getStatus
dev:2892022-01-07 01:35:29.435 debugparseWebsocketResult: received registered client-key: 7f1651bfaa1700963baefc205d112d06
dev:2892022-01-07 01:35:29.433 debugwebosRegister: got json: [type:registered, id:command_1, payload:[client-key:7f1651bfaa1700963baefc205d112d06]]
dev:2892022-01-07 01:35:29.430 debugparse: callback for json.id: command_1
dev:2892022-01-07 01:35:29.428 debugparse: {"type":"registered","id":"command_1","payload":{"client-key":"7f1651bfaa1700963baefc205d112d06"}}
dev:2892022-01-07 01:35:29.415 debugsendWebosCommand sending json: {"id":"command_1","type":"register","payload":{"pairingType":"PROMPT","forcePairing":false,"client-key":"7f1651bfaa1700963baefc205d112d06","manifest":{"appVersion":"1.1","signed":{"localizedVendorNames":{"":"LG Electronics"},"appId":"com.lge.test","created":"20140509","permissions":["TEST_SECURE","CONTROL_INPUT_TEXT","CONTROL_MOUSE_AND_KEYBOARD","READ_INSTALLED_APPS","READ_LGE_SDX","READ_NOTIFICATIONS","SEARCH","WRITE_SETTINGS","WRITE_NOTIFICATION_ALERT","CONTROL_POWER","READ_CURRENT_CHANNEL","READ_RUNNING_APPS","READ_UPDATE_INFO","UPDATE_FROM_REMOTE_APP","READ_LGE_TV_INPUT_EVENTS","READ_TV_CURRENT_TIME"],"localizedAppNames":{"":"LG Remote App","ko-KR":"\ub9ac\ubaa8\ucee8 \uc571","zxx-XX":"\u041b\u0413 R\u044d\u043cot\u044d A\u041f\u041f"},"vendorId":"com.lge","serial":"2f930e2d2cfe083771f68e4fe7bb07"},"permissions":["LAUNCH","LAUNCH_WEBAPP","APP_TO_APP","CLOSE","TEST_OPEN","TEST_PROTECTED","CONTROL_AUDIO","CONTROL_DISPLAY","CONTROL_INPUT_JOYSTICK","CONTROL_INPUT_MEDIA_RECORDING","CONTROL_INPUT_MEDIA_PLAYBACK","CONTROL_INPUT_TV","CONTROL_POWER","READ_APP_STATUS","READ_CURRENT_CHANNEL","READ_INPUT_DEVICE_LIST","READ_NETWORK_STATE","READ_RUNNING_APPS","READ_TV_CHANNEL_LIST","WRITE_NOTIFICATION_TOAST","READ_POWER_STATE","READ_COUNTRY_INFO"],"manifestVersion":1,"signatures":[{"signatureVersion":1,"signature":"eyJhbGdvcml0aG0iOiJSU0EtU0hBMjU2Iiwia2V5SWQiOiJ0ZXN0LXNpZ25pbmctY2VydCIsInNpZ25hdHVyZVZlcnNpb24iOjF9.hrVRgjCwXVvE2OOSpDZ58hR+59aFNwYDyjQgKk3auukd7pcegmE2CzPCa0bJ0ZsRAcKkCTJrWo5iDzNhMBWRyaMOv5zWSrthlf7G128qvIlpMT0YNY+n/FaOHE73uLrS/g7swl3/qH/BGFG2Hu4RlL48eb3lLKqTt2xKHdCs6Cd4RMfJPYnzgvI4BNrFUKsjkcu+WD4OO2A27Pq1n50cMchmcaXadJhGrOqH5YmHdOCj5NSHzJYrsW0HPlpuAx/ECMeIZYDh6RMqaFM2DXzdKX9NmmyqzJ3o/0lkk/N97gfVRLW5hA29yeAwaCViZNCP8iC9aO0q9fQojoa7NQnAtw=="}]}}}
dev:2892022-01-07 01:35:29.384 debugSending: {"id":"command_1","type":"register","payload":{"pairingType":"PROMPT","forcePairing":false,"client-key":"7f1651bfaa1700963baefc205d112d06","manifest":{"appVersion":"1.1","signed":{"localizedVendorNames":{"":"LG Electronics"},"appId":"com.lge.test","created":"20140509","permissions":["TEST_SECURE","CONTROL_INPUT_TEXT","CONTROL_MOUSE_AND_KEYBOARD","READ_INSTALLED_APPS","READ_LGE_SDX","READ_NOTIFICATIONS","SEARCH","WRITE_SETTINGS","WRITE_NOTIFICATION_ALERT","CONTROL_POWER","READ_CURRENT_CHANNEL","READ_RUNNING_APPS","READ_UPDATE_INFO","UPDATE_FROM_REMOTE_APP","READ_LGE_TV_INPUT_EVENTS","READ_TV_CURRENT_TIME"],"localizedAppNames":{"":"LG Remote App","ko-KR":"\ub9ac\ubaa8\ucee8 \uc571","zxx-XX":"\u041b\u0413 R\u044d\u043cot\u044d A\u041f\u041f"},"vendorId":"com.lge","serial":"2f930e2d2cfe083771f68e4fe7bb07"},"permissions":["LAUNCH","LAUNCH_WEBAPP","APP_TO_APP","CLOSE","TEST_OPEN","TEST_PROTECTED","CONTROL_AUDIO","CONTROL_DISPLAY","CONTROL_INPUT_JOYSTICK","CONTROL_INPUT_MEDIA_RECORDING","CONTROL_INPUT_MEDIA_PLAYBACK","CONTROL_INPUT_TV","CONTROL_POWER","READ_APP_STATUS","READ_CURRENT_CHANNEL","READ_INPUT_DEVICE_LIST","READ_NETWORK_STATE","READ_RUNNING_APPS","READ_TV_CHANNEL_LIST","WRITE_NOTIFICATION_TOAST","READ_POWER_STATE","READ_COUNTRY_INFO"],"manifestVersion":1,"signatures":[{"signatureVersion":1,"signature":"eyJhbGdvcml0aG0iOiJSU0EtU0hBMjU2Iiwia2V5SWQiOiJ0ZXN0LXNpZ25pbmctY2VydCIsInNpZ25hdHVyZVZlcnNpb24iOjF9.hrVRgjCwXVvE2OOSpDZ58hR+59aFNwYDyjQgKk3auukd7pcegmE2CzPCa0bJ0ZsRAcKkCTJrWo5iDzNhMBWRyaMOv5zWSrthlf7G128qvIlpMT0YNY+n/FaOHE73uLrS/g7swl3/qH/BGFG2Hu4RlL48eb3lLKqTt2xKHdCs6Cd4RMfJPYnzgvI4BNrFUKsjkcu+WD4OO2A27Pq1n50cMchmcaXadJhGrOqH5YmHdOCj5NSHzJYrsW0HPlpuAx/ECMeIZYDh6RMqaFM2DXzdKX9NmmyqzJ3o/0lkk/N97gfVRLW5hA29yeAwaCViZNCP8iC9aO0q9fQojoa7NQnAtw=="}]}}} storing callback: command_1
dev:2892022-01-07 01:35:29.366 infowebosRegister(): pairing key: 7f1651bfaa1700963baefc205d112d06
dev:2892022-01-07 01:35:29.363 infowebsocket is open
dev:2892022-01-07 01:35:29.361 debugwebSocketStatus: State: [initialize]   Reported Status: [status: open]
dev:2892022-01-07 01:35:29.306 debugConnecting websocket to: "ws://XX:XX:XX:XX:XX:XX/"
dev:2892022-01-07 01:35:29.291 debugLG Smart TV Driver - initialize - settings:['logLevel':'info', 'logDescText':true, 'televisionIp':'XX:XX:XX:XX:XX:XX', 'televisionMac':'XX:XX:XX:XX:XX:XX', 'pairingKey':'7f1651bfaa1700963baefc205d112d06', 'logInfoEnable':true, 'logEnable':true, 'txtEnable':true, 'retryDelay':'30']
dev:2892022-01-07 01:35:29.288 infoLG Smart TV Driver - initialize - ip: XX:XX:XX:XX:XX:XX  mac: XX:XX:XX:XX:XX:XX  key: 7f1651bfaa1700963baefc205d112d06 debug: null logText: null
dev:2892022-01-07 01:35:24.265 infowebsocket reconnect - delay = 5
dev:2892022-01-07 01:35:24.261 debugWebSocket connection closing.
dev:2892022-01-07 01:35:24.259 debugwebSocketStatus: State: [open]   Reported Status: [status: closing]
dev:2892022-01-07 01:35:24.256 debugparse: {"type":"response","id":"status_2","payload":{"returnValue":true,"time":{"year":2022,"month":1,"day":7,"hour":1,"minute":35,"second":15}}}
dev:2892022-01-07 01:35:24.243 infoReceived POWER DOWN notification.
dev:2892022-01-07 01:35:24.136 infoLG WebOS TV is off [physical]
dev:2892022-01-07 01:35:24.134 debughandler_getForegroundAppInfo: got: [appId:, subscribed:true, returnValue:true, windowId:, processId:]
dev:2892022-01-07 01:35:24.131 debugparse: {"type":"response","id":"getForegroundAppInfo","payload":{"appId":"","subscribed":true,"returnValue":true,"windowId":"","processId":""}}
dev:2892022-01-07 01:35:24.121 infoLG WebOS TV volume is 0
dev:2892022-01-07 01:35:24.118 debughandler_audio_getStatus: got: [returnValue:true, volumeMax:100, ringtonewithvibration:true, scenario:mastervolume_ext_speaker_arc, hac:false, subscribed:true, volume:0, action:requested, supportvolume:false, ringer switch:true, slider:false, active:false, mute:false]
dev:2892022-01-07 01:35:24.115 debugparse: {"type":"response","id":"audio_getStatus","payload":{"returnValue":true,"volumeMax":100,"ringtonewithvibration":true,"scenario":"mastervolume_ext_speaker_arc","hac":false,"subscribed":true,"volume":0,"action":"requested","supportvolume":false,"ringer switch":true,"slider":false,"active":false,"mute":false}}
dev:2892022-01-07 01:35:24.095 debugsendCommand: {"type":"subscribe","id":"status_2","uri":"ssap://com.webos.service.tv.time/getCurrentTime"}
dev:2892022-01-07 01:35:24.092 debugsendWebosCommand sending json: {"id":"getForegroundAppInfo","type":"subscribe","uri":"ssap://com.webos.applicationManager/getForegroundAppInfo"}
dev:2892022-01-07 01:35:24.090 debugSending: {"id":"getForegroundAppInfo","type":"subscribe","uri":"ssap://com.webos.applicationManager/getForegroundAppInfo"} storing callback: getForegroundAppInfo
dev:2892022-01-07 01:35:24.087 debugsendWebosCommand sending json: {"id":"audio_getStatus","type":"subscribe","uri":"ssap://audio/getStatus"}
dev:2892022-01-07 01:35:24.084 debugSending: {"id":"audio_getStatus","type":"subscribe","uri":"ssap://audio/getStatus"} storing callback: audio_getStatus
dev:2892022-01-07 01:35:24.028 debugparseWebsocketResult: received registered client-key: 7f1651bfaa1700963baefc205d112d06
dev:2892022-01-07 01:35:24.025 debugwebosRegister: got json: [type:registered, id:command_1, payload:[client-key:7f1651bfaa1700963baefc205d112d06]]
dev:2892022-01-07 01:35:24.022 debugparse: callback for json.id: command_1
dev:2892022-01-07 01:35:24.020 debugparse: {"type":"registered","id":"command_1","payload":{"client-key":"7f1651bfaa1700963baefc205d112d06"}}
dev:2892022-01-07 01:35:24.007 debugsendWebosCommand sending json: {"id":"command_1","type":"register","payload":{"pairingType":"PROMPT","forcePairing":false,"client-key":"7f1651bfaa1700963baefc205d112d06","manifest":{"appVersion":"1.1","signed":{"localizedVendorNames":{"":"LG Electronics"},"appId":"com.lge.test","created":"20140509","permissions":["TEST_SECURE","CONTROL_INPUT_TEXT","CONTROL_MOUSE_AND_KEYBOARD","READ_INSTALLED_APPS","READ_LGE_SDX","READ_NOTIFICATIONS","SEARCH","WRITE_SETTINGS","WRITE_NOTIFICATION_ALERT","CONTROL_POWER","READ_CURRENT_CHANNEL","READ_RUNNING_APPS","READ_UPDATE_INFO","UPDATE_FROM_REMOTE_APP","READ_LGE_TV_INPUT_EVENTS","READ_TV_CURRENT_TIME"],"localizedAppNames":{"":"LG Remote App","ko-KR":"\ub9ac\ubaa8\ucee8 \uc571","zxx-XX":"\u041b\u0413 R\u044d\u043cot\u044d A\u041f\u041f"},"vendorId":"com.lge","serial":"2f930e2d2cfe083771f68e4fe7bb07"},"permissions":["LAUNCH","LAUNCH_WEBAPP","APP_TO_APP","CLOSE","TEST_OPEN","TEST_PROTECTED","CONTROL_AUDIO","CONTROL_DISPLAY","CONTROL_INPUT_JOYSTICK","CONTROL_INPUT_MEDIA_RECORDING","CONTROL_INPUT_MEDIA_PLAYBACK","CONTROL_INPUT_TV","CONTROL_POWER","READ_APP_STATUS","READ_CURRENT_CHANNEL","READ_INPUT_DEVICE_LIST","READ_NETWORK_STATE","READ_RUNNING_APPS","READ_TV_CHANNEL_LIST","WRITE_NOTIFICATION_TOAST","READ_POWER_STATE","READ_COUNTRY_INFO"],"manifestVersion":1,"signatures":[{"signatureVersion":1,"signature":"eyJhbGdvcml0aG0iOiJSU0EtU0hBMjU2Iiwia2V5SWQiOiJ0ZXN0LXNpZ25pbmctY2VydCIsInNpZ25hdHVyZVZlcnNpb24iOjF9.hrVRgjCwXVvE2OOSpDZ58hR+59aFNwYDyjQgKk3auukd7pcegmE2CzPCa0bJ0ZsRAcKkCTJrWo5iDzNhMBWRyaMOv5zWSrthlf7G128qvIlpMT0YNY+n/FaOHE73uLrS/g7swl3/qH/BGFG2Hu4RlL48eb3lLKqTt2xKHdCs6Cd4RMfJPYnzgvI4BNrFUKsjkcu+WD4OO2A27Pq1n50cMchmcaXadJhGrOqH5YmHdOCj5NSHzJYrsW0HPlpuAx/ECMeIZYDh6RMqaFM2DXzdKX9NmmyqzJ3o/0lkk/N97gfVRLW5hA29yeAwaCViZNCP8iC9aO0q9fQojoa7NQnAtw=="}]}}}
dev:2892022-01-07 01:35:23.991 debugSending: {"id":"command_1","type":"register","payload":{"pairingType":"PROMPT","forcePairing":false,"client-key":"7f1651bfaa1700963baefc205d112d06","manifest":{"appVersion":"1.1","signed":{"localizedVendorNames":{"":"LG Electronics"},"appId":"com.lge.test","created":"20140509","permissions":["TEST_SECURE","CONTROL_INPUT_TEXT","CONTROL_MOUSE_AND_KEYBOARD","READ_INSTALLED_APPS","READ_LGE_SDX","READ_NOTIFICATIONS","SEARCH","WRITE_SETTINGS","WRITE_NOTIFICATION_ALERT","CONTROL_POWER","READ_CURRENT_CHANNEL","READ_RUNNING_APPS","READ_UPDATE_INFO","UPDATE_FROM_REMOTE_APP","READ_LGE_TV_INPUT_EVENTS","READ_TV_CURRENT_TIME"],"localizedAppNames":{"":"LG Remote App","ko-KR":"\ub9ac\ubaa8\ucee8 \uc571","zxx-XX":"\u041b\u0413 R\u044d\u043cot\u044d A\u041f\u041f"},"vendorId":"com.lge","serial":"2f930e2d2cfe083771f68e4fe7bb07"},"permissions":["LAUNCH","LAUNCH_WEBAPP","APP_TO_APP","CLOSE","TEST_OPEN","TEST_PROTECTED","CONTROL_AUDIO","CONTROL_DISPLAY","CONTROL_INPUT_JOYSTICK","CONTROL_INPUT_MEDIA_RECORDING","CONTROL_INPUT_MEDIA_PLAYBACK","CONTROL_INPUT_TV","CONTROL_POWER","READ_APP_STATUS","READ_CURRENT_CHANNEL","READ_INPUT_DEVICE_LIST","READ_NETWORK_STATE","READ_RUNNING_APPS","READ_TV_CHANNEL_LIST","WRITE_NOTIFICATION_TOAST","READ_POWER_STATE","READ_COUNTRY_INFO"],"manifestVersion":1,"signatures":[{"signatureVersion":1,"signature":"eyJhbGdvcml0aG0iOiJSU0EtU0hBMjU2Iiwia2V5SWQiOiJ0ZXN0LXNpZ25pbmctY2VydCIsInNpZ25hdHVyZVZlcnNpb24iOjF9.hrVRgjCwXVvE2OOSpDZ58hR+59aFNwYDyjQgKk3auukd7pcegmE2CzPCa0bJ0ZsRAcKkCTJrWo5iDzNhMBWRyaMOv5zWSrthlf7G128qvIlpMT0YNY+n/FaOHE73uLrS/g7swl3/qH/BGFG2Hu4RlL48eb3lLKqTt2xKHdCs6Cd4RMfJPYnzgvI4BNrFUKsjkcu+WD4OO2A27Pq1n50cMchmcaXadJhGrOqH5YmHdOCj5NSHzJYrsW0HPlpuAx/ECMeIZYDh6RMqaFM2DXzdKX9NmmyqzJ3o/0lkk/N97gfVRLW5hA29yeAwaCViZNCP8iC9aO0q9fQojoa7NQnAtw=="}]}}} storing callback: command_1
dev:2892022-01-07 01:35:23.959 infowebosRegister(): pairing key: 7f1651bfaa1700963baefc205d112d06
dev:2892022-01-07 01:35:23.956 infowebsocket is open
dev:2892022-01-07 01:35:23.953 debugwebSocketStatus: State: [initialize]   Reported Status: [status: open]
dev:2892022-01-07 01:35:23.899 debugConnecting websocket to: "ws://XX:XX:XX:XX:XX:XX:3000/"
dev:2892022-01-07 01:35:23.885 debugLG Smart TV Driver - initialize - settings:['logLevel':'info', 'logDescText':true, 'televisionIp':'XX:XX:XX:XX:XX:XX', 'televisionMac':'XX:XX:XX:XX:XX:XX', 'pairingKey':'7f1651bfaa1700963baefc205d112d06', 'logInfoEnable':true, 'logEnable':true, 'txtEnable':true, 'retryDelay':'30']
dev:2892022-01-07 01:35:23.881 infoLG Smart TV Driver - initialize - ip: XX:XX:XX:XX:XX:XX  mac: XX:XX:XX:XX:XX:XX  key: 7f1651bfaa1700963baefc205d112d06 debug: null logText: null
dev:2892022-01-07 01:35:21.738 infoSending Magic Packet to: wake on lan XX:XX:XX:XX:XX:XX
dev:2892022-01-07 01:35:21.735 debugSending Magic Packet to: XX:XX:XX:XX:XX:XX
dev:2892022-01-07 01:35:21.733 infoLG WebOS TV is on [digital]
dev:2892022-01-07 01:35:21.729 infoon(): Executing 'Power On'

So from your logs, it definitely looks like it's turning the TV on successfully. The websocket opens and it connects to the TV. However, about 3 seconds later, it thinks the TV is turning itself off even though it appears the websocket stays open. Then, same thing happens 3 other times before at 01:35:40 (20s in), it recognizes the TV as on and stays on.

Few questions:

  1. Are you saying your TV doesn't turn on at all? Or does your TV actually come on and stay on through this period? Or does it come on and go off but eventually stay on 15s in?
  2. Which input are you turning your TV on to? Any input should be fine but I'm surprised appID is null when the TV has just turned on. Mine's never that way.
  3. Did you at some point change the input on the TV to the PC input (HDMI2)?
  1. So my test to turn the tv off/on via HE goes like this: Turning off the tv via HE on my HTPC. then Go to HE on my phone and pressing the on button there. When I press the on button on the LG device, the button stays pushed and is not released. I see it in dark gray.

On the tv front - I have a red light indicator on the tv to see when it's off, but when I try to turn it on via HE, the red light stays. That means that the tv is still physically off.

  1. My tv is connected (On HDMI 2) to an av receiver. Maybe that's why you see it as null
  2. Yes. It's connected to my HTPC, so it's in PC mode

What button is this? Is it a switch?

So are you saying the TV never turned on (even 20s in)? From the logs, HE sees the TV as turned on and even gets the input (that's how I know HDMI2 is your PC input). It shouldn't be able to get that info if the TV stays off. Maybe the TV powered itself off shortly after that though and before the red light blinked to indicate turning on.

Some TVs do keep the websocket open even while the TV is turned off. Maybe that's what's happening in your case. But once it sent back an input, that should indicate that the TV is on. No idea why it'd take 20s to turn on though. Mine is instant

It's the "on" button on the LG device

After a few seconds, when I see that the tv is not turning on, I turn the tv on via the LG remote. Maybe that's what you're seeing in the logs?
Just now I tried giving it a minute to turn on and it didn't.

Loving this driver. I've found lots of useful things I can do with it!

One thing stumps me though... How do I force a switch to a particular Livetv channel in Rule Machine? I've looked in custom actions and using either actuator or switch and can't see anything that looks like it will do that. Can someone help?

This driver has been rapidly reporting the same power state/switch states, sometimes cycling between ON and OFF, seemingly at random days/times. So much so that hubitat will flag it as generating excessive events. No one was home during the most recently series of state changes. I'm using all static IPs,

I'm using the switch state change in a rule, and for whatever reason it's even more rapidly generating switch change events (below).

v0.3.0

Name	Value	Unit	Description Text	Source	Type	Date
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 01:33:12.528 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 01:32:09.423 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 01:31:06.319 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 01:30:03.056 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 01:28:59.952 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 01:27:56.847 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 01:26:53.743 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 01:25:50.640 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 01:24:47.537 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 01:23:44.432 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 01:22:41.327 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 01:21:38.224 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 01:20:35.119 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 01:19:31.983 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 01:18:28.879 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 01:17:25.775 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 01:16:22.672 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 01:15:19.567 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 01:14:16.463 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 01:13:13.360 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 01:12:10.255 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 01:11:07.151 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 01:10:04.047 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 01:09:00.944 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 01:07:57.839 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 01:06:54.735 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 01:05:51.632 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 01:04:48.528 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 01:03:45.424 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 01:02:42.288 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 01:01:39.183 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 01:00:36.080 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 12:59:32.976 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 12:58:29.871 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 12:57:26.767 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 12:56:23.663 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 12:55:20.559 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 12:54:17.455 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 12:53:14.352 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 12:52:11.247 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 12:51:08.144 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 12:50:05.039 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 12:49:01.904 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 12:47:58.800 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 12:46:55.695 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 12:45:52.591 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 12:44:49.488 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 12:43:46.383 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 12:42:43.280 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 12:41:40.176 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 12:40:37.072 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 12:39:33.967 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 12:38:30.863 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 12:37:27.759 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 12:36:24.655 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 12:35:21.551 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 12:34:18.447 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 12:33:15.346 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 12:32:12.240 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 12:31:09.136 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 12:30:06.031 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 12:29:02.928 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 12:27:59.824 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 12:26:56.719 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 12:25:53.615 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 12:24:50.512 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 12:23:47.408 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 12:22:44.240 PM EDT
input	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 12:21:41.136 PM EDT
power	off		LG WebOS TV - 192.168.0.15 is off	DEVICE	physical	2022-08-24 03:55:12.032 AM EDT
switch	off		LG WebOS TV - 192.168.0.15 is off	DEVICE	physical	2022-08-24 03:55:12.032 AM EDT
switch	on		LG WebOS TV - 192.168.0.15 is on	DEVICE	physical	2022-08-24 03:55:11.915 AM EDT
power	on		LG WebOS TV - 192.168.0.15 is on	DEVICE	physical	2022-08-24 03:55:11.915 AM EDT
power	off		LG WebOS TV - 192.168.0.15 is off	DEVICE	physical	2022-08-24 03:55:10.731 AM EDT
switch	off		LG WebOS TV - 192.168.0.15 is off	DEVICE	physical	2022-08-24 03:55:10.731 AM EDT
switch	on		LG WebOS TV - 192.168.0.15 is on	DEVICE	physical	2022-08-24 03:55:10.615 AM EDT
power	on		LG WebOS TV - 192.168.0.15 is on	DEVICE	physical	2022-08-24 03:55:10.615 AM EDT
power	off		LG WebOS TV - 192.168.0.15 is off	DEVICE	physical	2022-08-24 03:55:08.424 AM EDT
switch	off		LG WebOS TV - 192.168.0.15 is off	DEVICE	physical	2022-08-24 03:55:08.423 AM EDT
switch	on		LG WebOS TV - 192.168.0.15 is on	DEVICE	physical	2022-08-24 03:55:08.284 AM EDT
power	on		LG WebOS TV - 192.168.0.15 is on	DEVICE	physical	2022-08-24 03:55:08.284 AM EDT
power	off		LG WebOS TV - 192.168.0.15 is off	DEVICE	physical	2022-08-24 03:55:06.110 AM EDT
switch	off		LG WebOS TV - 192.168.0.15 is off	DEVICE	physical	2022-08-24 03:55:06.110 AM EDT
power	on		LG WebOS TV - 192.168.0.15 is on	DEVICE	physical	2022-08-24 03:55:06.002 AM EDT
switch	on		LG WebOS TV - 192.168.0.15 is on	DEVICE	physical	2022-08-24 03:55:06.002 AM EDT
power	off		LG WebOS TV - 192.168.0.15 is off	DEVICE	physical	2022-08-24 03:55:04.818 AM EDT
switch	off		LG WebOS TV - 192.168.0.15 is off	DEVICE	physical	2022-08-24 03:55:04.817 AM EDT
power	on		LG WebOS TV - 192.168.0.15 is on	DEVICE	physical	2022-08-24 03:55:04.705 AM EDT
switch	on		LG WebOS TV - 192.168.0.15 is on	DEVICE	physical	2022-08-24 03:55:04.704 AM EDT
power	off		LG WebOS TV - 192.168.0.15 is off	DEVICE	physical	2022-08-24 03:55:02.599 AM EDT
switch	off		LG WebOS TV - 192.168.0.15 is off	DEVICE	physical	2022-08-24 03:55:02.599 AM EDT
power	on		LG WebOS TV - 192.168.0.15 is on	DEVICE	physical	2022-08-24 03:55:02.420 AM EDT
switch	on		LG WebOS TV - 192.168.0.15 is on	DEVICE	physical	2022-08-24 03:55:02.419 AM EDT
switch	off		LG WebOS TV - 192.168.0.15 is off	DEVICE	physical	2022-08-24 03:55:00.241 AM EDT
power	off		LG WebOS TV - 192.168.0.15 is off	DEVICE	physical	2022-08-24 03:55:00.241 AM EDT
power	on		LG WebOS TV - 192.168.0.15 is on	DEVICE	physical	2022-08-24 03:55:00.111 AM EDT
switch	on		LG WebOS TV - 192.168.0.15 is on	DEVICE	physical	2022-08-24 03:55:00.111 AM EDT
power	off		LG WebOS TV - 192.168.0.15 is off	DEVICE	physical	2022-08-24 03:54:57.924 AM EDT
switch	off		LG WebOS TV - 192.168.0.15 is off	DEVICE	physical	2022-08-24 03:54:57.923 AM EDT
switch	on		LG WebOS TV - 192.168.0.15 is on	DEVICE	physical	2022-08-24 03:54:57.801 AM EDT
power	on		LG WebOS TV - 192.168.0.15 is on	DEVICE	physical	2022-08-24 03:54:57.801 AM EDT
power	off		LG WebOS TV - 192.168.0.15 is off	DEVICE	physical	2022-08-24 03:54:55.706 AM EDT
switch	off		LG WebOS TV - 192.168.0.15 is off	DEVICE	physical	2022-08-24 03:54:55.706 AM EDT
power	on		LG WebOS TV - 192.168.0.15 is on	DEVICE	physical	2022-08-24 03:54:55.490 AM EDT
switch	on		LG WebOS TV - 192.168.0.15 is on	DEVICE	physical	2022-08-24 03:54:55.489 AM EDT
power	off		LG WebOS TV - 192.168.0.15 is off	DEVICE	physical	2022-08-24 03:54:53.302 AM EDT
switch	off		LG WebOS TV - 192.168.0.15 is off	DEVICE	physical	2022-08-24 03:54:53.301 AM EDT
switch	on		LG WebOS TV - 192.168.0.15 is on	DEVICE	physical	2022-08-24 03:54:53.022 AM EDT
power	on		LG WebOS TV - 192.168.0.15 is on	DEVICE	physical	2022-08-24 03:54:53.022 AM EDT
channelName	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 03:47:50.911 AM EDT
channelDesc	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-24 03:47:50.911 AM EDT
volume	41		LG WebOS TV - 192.168.0.15 volume is 41	DEVICE		2022-08-24 03:32:59.608 AM EDT
volume	40		LG WebOS TV - 192.168.0.15 volume is 40	DEVICE		2022-08-24 03:32:49.585 AM EDT
volume	39		LG WebOS TV - 192.168.0.15 volume is 39	DEVICE		2022-08-24 03:24:57.087 AM EDT
volume	38		LG WebOS TV - 192.168.0.15 volume is 38	DEVICE		2022-08-24 03:22:37.152 AM EDT
volume	39		LG WebOS TV - 192.168.0.15 volume is 39	DEVICE		2022-08-24 03:21:39.879 AM EDT
volume	40		LG WebOS TV - 192.168.0.15 volume is 40	DEVICE		2022-08-24 03:21:39.393 AM EDT
volume	41		LG WebOS TV - 192.168.0.15 volume is 41	DEVICE		2022-08-24 03:07:32.828 AM EDT
volume	40		LG WebOS TV - 192.168.0.15 volume is 40	DEVICE		2022-08-24 03:07:32.483 AM EDT
volume	39		LG WebOS TV - 192.168.0.15 volume is 39	DEVICE		2022-08-24 03:07:32.263 AM EDT
volume	38		LG WebOS TV - 192.168.0.15 volume is 38	DEVICE		2022-08-24 03:07:31.811 AM EDT
volume	37		LG WebOS TV - 192.168.0.15 volume is 37	DEVICE		2022-08-24 03:07:31.618 AM EDT
volume	36		LG WebOS TV - 192.168.0.15 volume is 36	DEVICE		2022-08-24 03:07:31.403 AM EDT
volume	35		LG WebOS TV - 192.168.0.15 volume is 35	DEVICE		2022-08-24 03:07:31.144 AM EDT
volume	34		LG WebOS TV - 192.168.0.15 volume is 34	DEVICE		2022-08-24 03:07:30.886 AM EDT
volume	33		LG WebOS TV - 192.168.0.15 volume is 33	DEVICE		2022-08-24 03:07:30.541 AM EDT
volume	32		LG WebOS TV - 192.168.0.15 volume is 32	DEVICE		2022-08-24 03:07:30.019 AM EDT
volume	31		LG WebOS TV - 192.168.0.15 volume is 31	DEVICE		2022-08-24 03:07:29.891 AM EDT
volume	30		LG WebOS TV - 192.168.0.15 volume is 30	DEVICE		2022-08-24 03:07:29.848 AM EDT
volume	29		LG WebOS TV - 192.168.0.15 volume is 29	DEVICE		2022-08-24 03:07:29.816 AM EDT
volume	28		LG WebOS TV - 192.168.0.15 volume is 28	DEVICE		2022-08-24 03:07:29.761 AM EDT
channelName	HDMI2		LG WebOS TV - 192.168.0.15 channelName is HDMI2	DEVICE		2022-08-23 09:28:26.980 PM EDT
channelDesc	[none]			DEVICE		2022-08-23 09:28:26.980 PM EDT
channelName	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-23 01:29:49.973 AM EDT
channelDesc	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-23 01:29:49.973 AM EDT
channelDesc	[none]			DEVICE		2022-08-22 10:23:25.932 PM EDT
channelName	HDMI2		LG WebOS TV - 192.168.0.15 channelName is HDMI2	DEVICE		2022-08-22 10:23:25.931 PM EDT
channelName	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-22 01:48:14.609 AM EDT
channelDesc	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-22 01:48:14.609 AM EDT
channelDesc	[none]			DEVICE		2022-08-21 10:08:06.243 PM EDT
channelName	HDMI2		LG WebOS TV - 192.168.0.15 channelName is HDMI2	DEVICE		2022-08-21 10:08:06.242 PM EDT
channelName	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-21 08:01:09.166 PM EDT
channelDesc	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-21 08:01:09.165 PM EDT
channelDesc	[none]			DEVICE		2022-08-21 07:01:11.928 PM EDT
channelName	HDMI2		LG WebOS TV - 192.168.0.15 channelName is HDMI2	DEVICE		2022-08-21 07:01:11.928 PM EDT
channelName	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-21 02:44:41.450 AM EDT
channelDesc	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-21 02:44:41.449 AM EDT
channelDesc	[none]			DEVICE		2022-08-20 11:08:02.408 PM EDT
channelName	HDMI2		LG WebOS TV - 192.168.0.15 channelName is HDMI2	DEVICE		2022-08-20 11:08:02.407 PM EDT
channelDesc	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-19 11:01:12.850 PM EDT
channelName	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-19 11:01:12.850 PM EDT
channelName	HDMI2		LG WebOS TV - 192.168.0.15 channelName is HDMI2	DEVICE		2022-08-19 09:21:04.165 PM EDT
channelDesc	[none]			DEVICE		2022-08-19 09:21:04.165 PM EDT
channelName	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-19 02:56:04.656 AM EDT
channelDesc	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-19 02:56:04.655 AM EDT
channelDesc	[none]			DEVICE		2022-08-19 01:16:29.659 AM EDT
channelName	HDMI2		LG WebOS TV - 192.168.0.15 channelName is HDMI2	DEVICE		2022-08-19 01:16:29.658 AM EDT
channelName	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-17 09:06:49.852 PM EDT
channelDesc	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-17 09:06:49.851 PM EDT
channelDesc	[none]			DEVICE		2022-08-17 08:25:52.977 PM EDT
channelName	HDMI2		LG WebOS TV - 192.168.0.15 channelName is HDMI2	DEVICE		2022-08-17 08:25:52.976 PM EDT
channelDesc	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-16 11:24:03.554 PM EDT
channelName	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-16 11:24:03.554 PM EDT
channelDesc	[none]			DEVICE		2022-08-16 09:29:11.163 PM EDT
channelName	HDMI2		LG WebOS TV - 192.168.0.15 channelName is HDMI2	DEVICE		2022-08-16 09:29:11.162 PM EDT
channelName	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-15 09:11:42.680 PM EDT
channelDesc	[off]		LG WebOS TV - 192.168.0.15 is off	DEVICE		2022-08-15 09:11:42.679 PM EDT
channelDesc	[none]			DEVICE		2022-08-15 08:04:27.554 PM EDT
channelName	HDMI2		LG WebOS TV - 192.168.0.15 channelName is HDMI2	DEVICE		2022-08-15 08:04:27.553 PM EDT