[PORT] LG Smart TV Discovery 2012+

Yeah I have something similar. (Are you missing an ENDIF btw?) The problem I have is sometimes when I turn the TV on physically the device driver just never realizes it.

Yes, sometimes it misses the "on" event, but it mostly works. And thanks for catching that! Added the ENDIF!

1 Like

Hey sorry, don't come here too often any longer so didn't see your response.

I think I explained it somewhere in this thread above but the app has to do a poll to determine when the TV is on. Basically, webconnect has to reconnect before the TV is on. The timing of that poll is customizable. In the preferences, the poll is called "Device Reconnect Delay". I've set mine to 30s.

So what that means is that it could take a max of 30s after the TV is on before the app notices that. That might be what you're experiencing.

Also, you'd want to turn "Quick Start+" on. That's what allows it reconnect quickly.

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