[PORT] LG Smart TV Discovery 2012+

Thanks asj but the problem is I can't find in RM the way to reach those functions....

@almehomemedia, I have used RM with this device without any problem. Tell me more about your use-case, and I'm pretty sure I can help you.

In general, use RM's "run custom action" to send an actuator or switch action to the TV device....or, if you're using a TV state in a conditional, use "Custom Attribute."

1 Like

Go it... so the only way to reach the functions is creating a RM for each one right?
I was able to see the functions on RM using Custom Action...... thanks mluck !!.

I'm not sure what you mean by "creating a RM for each one". You definitely DON'T need a distinct rule for each device or function. And sometimes, depending on the action or condition, RM lets you select multiple devices at once.

But again, it all depends on the specifics of your use-case. If you want to share your use-case, I'm happy to help with RM. I'm got all my LGs working nicely with HE automations.

Ok, let me be more clear...
Suppose I would like to control the funtions ON, OFF and Channel selection on My LG for instance.
Those will be 4 action right? (ON, OFF, Channel+, Channel-)

To have 4 buttons on my dashboard to achieve that I understand I have to add 4 virtual buttons witch execute rules in RM 4 RM (one per action)

Yes that's right. You can have a single button that toggles on and off, but otherwise yes, each action is a tile in dashboard.

I have an interesting situation going on. When I go into the universal control app to configure my input OR update an app, for a second after exiting the app, my TV sends a webos message where everything is null. As such, this driver thinks the TV is off. A few millis later (after the next input or app has been launched), another webos message is sent which sets the TV back on.

When my TV turns off, I have a rule to activity Logitech Harmony Off which essentially turns off everything and keeps the Harmony in sync. For my rule, I use a cancel delayed action within 5s (so the Logitech Harmony Off won't get activated if the TV turns back on within 5s of being turned off).

Now, I'm having a situation where Hubitat is missing the "on" power and switch events because they happen so soon (about 300 microseconds interval) after the "off" power and switch events. The device page knows TV is back on. However, no event gets logged. What then happens is my rule doesn't get triggered again so the delayed action doesn't get canceled and the rule then turns the TV off!

Any idea how I can fix this? Ideally, it'd be great if the false-offs were ignored or if the off event only gets sent if the TV has been off for x seconds...

Thanks

@asj So I'm getting something that's really weird. When my I turn off my TV after it's been on for a while, in HE, the TV oscillates between off and on every 2 seconds for about 10 minutes before finally saying it's off. All while it's oscillating back and forth in HE, the TV stays physically powered off (and also appears powered off in HomeAssistant).

Looking at the logs, it looks like the WebSocket connection constantly oscillates between "closing" and "open". It seems as though even though the Websocket tries to close, it doesn't succeed in closing for another 10 minutes so every time the driver tries to reconnect 2s later, it's successful and turns back on. Then a few seconds later, it receives a POWER DOWN notification and the websocket tries to close again without success. 2 seconds after that, the driver reconnects and the cycle continues for 10mins.

Not sure if this is an issue with the TV, the driver or HE but it's really weird. HA doesn't have this issue though but it might be because it's implemented in a different way. Also, it's weird that this only occurs if the TV has been on for a while (a few hours).

Name Value Unit Description Text Source Type Date
switch off LG TV is off DEVICE physical 2020-07-02 01:37:25.345 AM EDT
power off LG TV is off DEVICE physical 2020-07-02 01:37:25.345 AM EDT
power on LG TV is on DEVICE physical 2020-07-02 01:37:24.865 AM EDT
switch on LG TV is on DEVICE physical 2020-07-02 01:37:24.865 AM EDT
power off LG TV is off DEVICE physical 2020-07-02 01:37:22.469 AM EDT
switch off LG TV is off DEVICE physical 2020-07-02 01:37:22.451 AM EDT
power on LG TV is on DEVICE physical 2020-07-02 01:37:21.660 AM EDT
switch on LG TV is on DEVICE physical 2020-07-02 01:37:21.656 AM EDT
switch off LG TV is off DEVICE physical 2020-07-02 01:37:19.155 AM EDT
power off LG TV is off DEVICE physical 2020-07-02 01:37:19.155 AM EDT
switch on LG TV is on DEVICE physical 2020-07-02 01:37:18.697 AM EDT
power on LG TV is on DEVICE physical 2020-07-02 01:37:18.697 AM EDT
power off LG TV is off DEVICE physical 2020-07-02 01:37:16.297 AM EDT
switch off LG TV is off DEVICE physical 2020-07-02 01:37:16.296 AM EDT
power on LG TV is on DEVICE physical 2020-07-02 01:37:15.735 AM EDT
switch on LG TV is on DEVICE physical 2020-07-02 01:37:15.727 AM EDT
power off LG TV is off DEVICE physical 2020-07-02 01:37:13.260 AM EDT
switch off LG TV is off DEVICE physical 2020-07-02 01:37:13.259 AM EDT
power on LG TV is on DEVICE physical 2020-07-02 01:37:12.569 AM EDT
switch on LG TV is on DEVICE physical 2020-07-02 01:37:12.568 AM EDT
power off LG TV is off DEVICE physical 2020-07-02 01:37:10.140 AM EDT
switch off LG TV is off DEVICE physical 2020-07-02 01:37:10.139 AM EDT
power on LG TV is on DEVICE physical 2020-07-02 01:37:09.667 AM EDT
switch on LG TV is on DEVICE physical 2020-07-02 01:37:09.666 AM EDT
power off LG TV is off DEVICE physical 2020-07-02 01:37:07.316 AM EDT
switch off LG TV is off DEVICE physical 2020-07-02 01:37:07.315 AM EDT
power on LG TV is on DEVICE physical 2020-07-02 01:37:06.889 AM EDT
switch on LG TV is on DEVICE physical 2020-07-02 01:37:06.887 AM EDT
power off LG TV is off DEVICE physical 2020-07-02 01:37:04.526 AM EDT
switch off LG TV is off DEVICE physical 2020-07-02 01:37:04.525 AM EDT
power on LG TV is on DEVICE physical 2020-07-02 01:37:04.148 AM EDT
switch on LG TV is on DEVICE physical 2020-07-02 01:37:04.147 AM EDT
power off LG TV is off DEVICE physical 2020-07-02 01:37:01.791 AM EDT
switch off LG TV is off DEVICE physical 2020-07-02 01:37:01.790 AM EDT
power on LG TV is on DEVICE physical 2020-07-02 01:37:01.426 AM EDT
switch on LG TV is on DEVICE physical 2020-07-02 01:37:01.425 AM EDT
power off LG TV is off DEVICE physical 2020-07-02 01:36:59.124 AM EDT
switch off LG TV is off DEVICE physical 2020-07-02 01:36:59.121 AM EDT
power on LG TV is on DEVICE physical 2020-07-02 01:36:58.749 AM EDT
switch on LG TV is on DEVICE physical 2020-07-02 01:36:58.749 AM EDT
power off LG TV is off DEVICE physical 2020-07-02 01:36:56.361 AM EDT
switch off LG TV is off DEVICE physical 2020-07-02 01:36:56.350 AM EDT
[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:18.487 am [debug](http://192.168.1.222/device/edit/1732)Sending: {"id":"getForegroundAppInfo","type":"subscribe","uri":"ssap://com.webos.applicationManager/getForegroundAppInfo"} storing callback: getForegroundAppInfo

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:18.485 am [debug](http://192.168.1.222/device/edit/1732)sendWebosCommand sending json: {"id":"audio_getStatus","type":"subscribe","uri":"ssap://audio/getStatus"}

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:18.473 am [debug](http://192.168.1.222/device/edit/1732)Sending: {"id":"audio_getStatus","type":"subscribe","uri":"ssap://audio/getStatus"} storing callback: audio_getStatus

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:18.351 am [info](http://192.168.1.222/device/edit/1732)rResp on event

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:18.350 am [info](http://192.168.1.222/device/edit/1732)testing 2

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:18.257 am [debug](http://192.168.1.222/device/edit/1732)parseWebsocketResult: received registered client-key: 35a9d02a33cb3999127c86404811ba40

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:18.252 am [debug](http://192.168.1.222/device/edit/1732)webosRegister: got json: [type:registered, id:command_1, payload:[client-key:35a9d02a33cb3999127c86404811ba40]]

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:18.246 am [debug](http://192.168.1.222/device/edit/1732)parse: callback for json.id: command_1

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:18.240 am [debug](http://192.168.1.222/device/edit/1732)parse: {"type":"registered","id":"command_1","payload":{"client-key":"35a9d02a33cb3999127c86404811ba40"}}

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:18.169 am [debug](http://192.168.1.222/device/edit/1732)sendWebosCommand sending json: {"id":"command_1","type":"register","payload":{"pairingType":"PROMPT","forcePairing":false,"client-key":"35a9d02a33cb3999127c86404811ba40","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:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:18.142 am [debug](http://192.168.1.222/device/edit/1732)Sending: {"id":"command_1","type":"register","payload":{"pairingType":"PROMPT","forcePairing":false,"client-key":"35a9d02a33cb3999127c86404811ba40","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:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:18.140 am [info](http://192.168.1.222/device/edit/1732)webosRegister(): pairing key: 35a9d02a33cb3999127c86404811ba40

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:18.137 am [info](http://192.168.1.222/device/edit/1732)LG TV is on [physical]

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:18.136 am [info](http://192.168.1.222/device/edit/1732)websocket is open

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:18.134 am [debug](http://192.168.1.222/device/edit/1732)webSocketStatus: State: [initialize] Reported Status: [status: open]

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:18.076 am [debug](http://192.168.1.222/device/edit/1732)Connecting websocket to: "ws://192.168.1.35:3000/"

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:18.051 am [debug](http://192.168.1.222/device/edit/1732)LG Smart TV Driver - initialize - settings:['televisionIp':'192.168.1.35', 'televisionMac':'A823FEE3EED2', 'pairingKey':'35a9d02a33cb3999127c86404811ba40', 'retryDelay':'30', 'logEnable':true, 'logInfoEnable':true, 'txtEnable':true, 'televisionType':'WEBOS']

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:18.047 am [info](http://192.168.1.222/device/edit/1732)LG Smart TV Driver - initialize - ip: 192.168.1.35 mac: A823FEE3EED2 key: 35a9d02a33cb3999127c86404811ba40 debug: null logText: null

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:15.983 am [debug](http://192.168.1.222/device/edit/1732)parse: {"type":"response","id":"status_2","payload":{"returnValue":true,"time":{"year":2020,"month":7,"day":2,"hour":1,"minute":31,"second":13}}}

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:15.935 am [info](http://192.168.1.222/device/edit/1732)websocket reconnect - delay = 2

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:15.902 am [debug](http://192.168.1.222/device/edit/1732)WebSocket connection closing.

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:15.895 am [debug](http://192.168.1.222/device/edit/1732)handler_getChannelProgramInfo: got: [returnValue:false, errorCode:-1000, errorText:acb returns empty acbs for getForegroundAppInfo: undefined]

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:15.892 am [debug](http://192.168.1.222/device/edit/1732)parse: {"type":"error","id":"getChannelProgramInfo","error":"500 Application error","payload":{"returnValue":false,"errorCode":-1000,"errorText":"acb returns empty acbs for getForegroundAppInfo: undefined"}}

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:15.888 am [debug](http://192.168.1.222/device/edit/1732)webSocketStatus: State: [open] Reported Status: [status: closing]

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:15.842 am [info](http://192.168.1.222/device/edit/1732)Received POWER DOWN notification.

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:15.703 am [info](http://192.168.1.222/device/edit/1732)LG TV is off [physical]

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:15.696 am [debug](http://192.168.1.222/device/edit/1732)handler_getForegroundAppInfo: got: [appId:, subscribed:true, returnValue:true, windowId:, processId:]

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:15.693 am [debug](http://192.168.1.222/device/edit/1732)parse: {"type":"response","id":"getForegroundAppInfo","payload":{"appId":"","subscribed":true,"returnValue":true,"windowId":"","processId":""}}

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:15.622 am [debug](http://192.168.1.222/device/edit/1732)sendCommand: {"type":"subscribe","id":"status_2","uri":"ssap://com.webos.service.tv.time/getCurrentTime"}

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:15.616 am [info](http://192.168.1.222/device/edit/1732)LG TV volume is 20

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:15.614 am [debug](http://192.168.1.222/device/edit/1732)handler_audio_getStatus: got: [returnValue:true, volumeMax:100, ringtonewithvibration:true, scenario:mastervolume_tv_speaker_ext, hac:false, subscribed:true, volume:20, action:requested, supportvolume:true, ringer switch:true, slider:false, active:false, mute:false]

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:15.614 am [debug](http://192.168.1.222/device/edit/1732)sendWebosCommand sending json: {"id":"getChannelProgramInfo","type":"subscribe","uri":"ssap://tv/getChannelProgramInfo"}

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:15.611 am [debug](http://192.168.1.222/device/edit/1732)parse: {"type":"response","id":"audio_getStatus","payload":{"returnValue":true,"volumeMax":100,"ringtonewithvibration":true,"scenario":"mastervolume_tv_speaker_ext","hac":false,"subscribed":true,"volume":20,"action":"requested","supportvolume":true,"ringer switch":true,"slider":false,"active":false,"mute":false}}

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:15.606 am [debug](http://192.168.1.222/device/edit/1732)Sending: {"id":"getChannelProgramInfo","type":"subscribe","uri":"ssap://tv/getChannelProgramInfo"} storing callback: getChannelProgramInfo

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:15.586 am [debug](http://192.168.1.222/device/edit/1732)sendWebosCommand sending json: {"id":"getForegroundAppInfo","type":"subscribe","uri":"ssap://com.webos.applicationManager/getForegroundAppInfo"}

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:15.584 am [debug](http://192.168.1.222/device/edit/1732)Sending: {"id":"getForegroundAppInfo","type":"subscribe","uri":"ssap://com.webos.applicationManager/getForegroundAppInfo"} storing callback: getForegroundAppInfo

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:15.582 am [debug](http://192.168.1.222/device/edit/1732)sendWebosCommand sending json: {"id":"audio_getStatus","type":"subscribe","uri":"ssap://audio/getStatus"}

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:15.580 am [debug](http://192.168.1.222/device/edit/1732)Sending: {"id":"audio_getStatus","type":"subscribe","uri":"ssap://audio/getStatus"} storing callback: audio_getStatus

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:15.478 am [info](http://192.168.1.222/device/edit/1732)rResp on event

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:15.476 am [info](http://192.168.1.222/device/edit/1732)testing 2

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:15.409 am [debug](http://192.168.1.222/device/edit/1732)parseWebsocketResult: received registered client-key: 35a9d02a33cb3999127c86404811ba40

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:15.404 am [debug](http://192.168.1.222/device/edit/1732)webosRegister: got json: [type:registered, id:command_1, payload:[client-key:35a9d02a33cb3999127c86404811ba40]]

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:15.399 am [debug](http://192.168.1.222/device/edit/1732)parse: callback for json.id: command_1

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:15.392 am [debug](http://192.168.1.222/device/edit/1732)parse: {"type":"registered","id":"command_1","payload":{"client-key":"35a9d02a33cb3999127c86404811ba40"}}

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:15.300 am [debug](http://192.168.1.222/device/edit/1732)sendWebosCommand sending json: {"id":"command_1","type":"register","payload":{"pairingType":"PROMPT","forcePairing":false,"client-key":"35a9d02a33cb3999127c86404811ba40","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:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:15.279 am [debug](http://192.168.1.222/device/edit/1732)Sending: {"id":"command_1","type":"register","payload":{"pairingType":"PROMPT","forcePairing":false,"client-key":"35a9d02a33cb3999127c86404811ba40","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:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:15.277 am [info](http://192.168.1.222/device/edit/1732)webosRegister(): pairing key: 35a9d02a33cb3999127c86404811ba40

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:15.274 am [info](http://192.168.1.222/device/edit/1732)LG TV is on [physical]

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:15.273 am [info](http://192.168.1.222/device/edit/1732)websocket is open

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:15.271 am [debug](http://192.168.1.222/device/edit/1732)webSocketStatus: State: [initialize] Reported Status: [status: open]

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:15.215 am [debug](http://192.168.1.222/device/edit/1732)Connecting websocket to: "ws://192.168.1.35:3000/"

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:15.193 am [debug](http://192.168.1.222/device/edit/1732)LG Smart TV Driver - initialize - settings:['televisionIp':'192.168.1.35', 'televisionMac':'A823FEE3EED2', 'pairingKey':'35a9d02a33cb3999127c86404811ba40', 'retryDelay':'30', 'logEnable':true, 'logInfoEnable':true, 'txtEnable':true, 'televisionType':'WEBOS']

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:15.189 am [info](http://192.168.1.222/device/edit/1732)LG Smart TV Driver - initialize - ip: 192.168.1.35 mac: A823FEE3EED2 key: 35a9d02a33cb3999127c86404811ba40 debug: null logText: null

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:13.150 am [info](http://192.168.1.222/device/edit/1732)websocket reconnect - delay = 2

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:13.112 am [debug](http://192.168.1.222/device/edit/1732)parse: {"type":"response","id":"status_2","payload":{"returnValue":true,"time":{"year":2020,"month":7,"day":2,"hour":1,"minute":31,"second":10}}}

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:13.078 am [debug](http://192.168.1.222/device/edit/1732)WebSocket connection closing.

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:13.061 am [debug](http://192.168.1.222/device/edit/1732)webSocketStatus: State: [open] Reported Status: [status: closing]

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:13.050 am [debug](http://192.168.1.222/device/edit/1732)handler_getChannelProgramInfo: got: [returnValue:false, errorCode:-1000, errorText:acb returns empty acbs for getForegroundAppInfo: undefined]

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:13.047 am [debug](http://192.168.1.222/device/edit/1732)parse: {"type":"error","id":"getChannelProgramInfo","error":"500 Application error","payload":{"returnValue":false,"errorCode":-1000,"errorText":"acb returns empty acbs for getForegroundAppInfo: undefined"}}

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:13.009 am [info](http://192.168.1.222/device/edit/1732)Received POWER DOWN notification.

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:12.886 am [info](http://192.168.1.222/device/edit/1732)LG TV is off [physical]

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:12.869 am [debug](http://192.168.1.222/device/edit/1732)handler_getForegroundAppInfo: got: [appId:, subscribed:true, returnValue:true, windowId:, processId:]

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:12.867 am [debug](http://192.168.1.222/device/edit/1732)parse: {"type":"response","id":"getForegroundAppInfo","payload":{"appId":"","subscribed":true,"returnValue":true,"windowId":"","processId":""}}

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:12.758 am [info](http://192.168.1.222/device/edit/1732)LG TV volume is 20

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:12.757 am [debug](http://192.168.1.222/device/edit/1732)sendCommand: {"type":"subscribe","id":"status_2","uri":"ssap://com.webos.service.tv.time/getCurrentTime"}

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:12.756 am [debug](http://192.168.1.222/device/edit/1732)handler_audio_getStatus: got: [returnValue:true, volumeMax:100, ringtonewithvibration:true, scenario:mastervolume_tv_speaker_ext, hac:false, subscribed:true, volume:20, action:requested, supportvolume:true, ringer switch:true, slider:false, active:false, mute:false]

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:12.751 am [debug](http://192.168.1.222/device/edit/1732)parse: {"type":"response","id":"audio_getStatus","payload":{"returnValue":true,"volumeMax":100,"ringtonewithvibration":true,"scenario":"mastervolume_tv_speaker_ext","hac":false,"subscribed":true,"volume":20,"action":"requested","supportvolume":true,"ringer switch":true,"slider":false,"active":false,"mute":false}}

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:12.748 am [debug](http://192.168.1.222/device/edit/1732)sendWebosCommand sending json: {"id":"getChannelProgramInfo","type":"subscribe","uri":"ssap://tv/getChannelProgramInfo"}

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:12.740 am [debug](http://192.168.1.222/device/edit/1732)Sending: {"id":"getChannelProgramInfo","type":"subscribe","uri":"ssap://tv/getChannelProgramInfo"} storing callback: getChannelProgramInfo

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:12.731 am [debug](http://192.168.1.222/device/edit/1732)sendWebosCommand sending json: {"id":"getForegroundAppInfo","type":"subscribe","uri":"ssap://com.webos.applicationManager/getForegroundAppInfo"}

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:12.723 am [debug](http://192.168.1.222/device/edit/1732)Sending: {"id":"getForegroundAppInfo","type":"subscribe","uri":"ssap://com.webos.applicationManager/getForegroundAppInfo"} storing callback: getForegroundAppInfo

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:12.716 am [debug](http://192.168.1.222/device/edit/1732)sendWebosCommand sending json: {"id":"audio_getStatus","type":"subscribe","uri":"ssap://audio/getStatus"}

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:12.700 am [debug](http://192.168.1.222/device/edit/1732)Sending: {"id":"audio_getStatus","type":"subscribe","uri":"ssap://audio/getStatus"} storing callback: audio_getStatus

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:12.547 am [info](http://192.168.1.222/device/edit/1732)rResp on event

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:12.544 am [info](http://192.168.1.222/device/edit/1732)testing 2

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:12.429 am [debug](http://192.168.1.222/device/edit/1732)parseWebsocketResult: received registered client-key: 35a9d02a33cb3999127c86404811ba40

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:12.427 am [debug](http://192.168.1.222/device/edit/1732)webosRegister: got json: [type:registered, id:command_1, payload:[client-key:35a9d02a33cb3999127c86404811ba40]]

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:12.425 am [debug](http://192.168.1.222/device/edit/1732)parse: callback for json.id: command_1

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:12.422 am [debug](http://192.168.1.222/device/edit/1732)parse: {"type":"registered","id":"command_1","payload":{"client-key":"35a9d02a33cb3999127c86404811ba40"}}

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:12.328 am [debug](http://192.168.1.222/device/edit/1732)sendWebosCommand sending json: {"id":"command_1","type":"register","payload":{"pairingType":"PROMPT","forcePairing":false,"client-key":"35a9d02a33cb3999127c86404811ba40","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:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:12.307 am [debug](http://192.168.1.222/device/edit/1732)Sending: {"id":"command_1","type":"register","payload":{"pairingType":"PROMPT","forcePairing":false,"client-key":"35a9d02a33cb3999127c86404811ba40","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:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:12.305 am [info](http://192.168.1.222/device/edit/1732)webosRegister(): pairing key: 35a9d02a33cb3999127c86404811ba40

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:12.300 am [info](http://192.168.1.222/device/edit/1732)LG TV is on [physical]

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:12.299 am [info](http://192.168.1.222/device/edit/1732)websocket is open

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:12.297 am [debug](http://192.168.1.222/device/edit/1732)webSocketStatus: State: [initialize] Reported Status: [status: open]

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:12.238 am [debug](http://192.168.1.222/device/edit/1732)Connecting websocket to: "ws://192.168.1.35:3000/"

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:12.209 am [debug](http://192.168.1.222/device/edit/1732)LG Smart TV Driver - initialize - settings:['televisionIp':'192.168.1.35', 'televisionMac':'A823FEE3EED2', 'pairingKey':'35a9d02a33cb3999127c86404811ba40', 'retryDelay':'30', 'logEnable':true, 'logInfoEnable':true, 'txtEnable':true, 'televisionType':'WEBOS']

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:12.200 am [info](http://192.168.1.222/device/edit/1732)LG Smart TV Driver - initialize - ip: 192.168.1.35 mac: A823FEE3EED2 key: 35a9d02a33cb3999127c86404811ba40 debug: null logText: null

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:10.283 am [debug](http://192.168.1.222/device/edit/1732)parse: {"type":"response","id":"status_2","payload":{"returnValue":true,"time":{"year":2020,"month":7,"day":2,"hour":1,"minute":31,"second":7}}}

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:10.152 am [info](http://192.168.1.222/device/edit/1732)websocket reconnect - delay = 2

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:10.113 am [debug](http://192.168.1.222/device/edit/1732)handler_getChannelProgramInfo: got: [returnValue:false, errorCode:-1000, errorText:acb returns empty acbs for getForegroundAppInfo: undefined]

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:10.110 am [debug](http://192.168.1.222/device/edit/1732)parse: {"type":"error","id":"getChannelProgramInfo","error":"500 Application error","payload":{"returnValue":false,"errorCode":-1000,"errorText":"acb returns empty acbs for getForegroundAppInfo: undefined"}}

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:10.099 am [debug](http://192.168.1.222/device/edit/1732)WebSocket connection closing.

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:10.097 am [debug](http://192.168.1.222/device/edit/1732)webSocketStatus: State: [open] Reported Status: [status: closing]

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:10.037 am [info](http://192.168.1.222/device/edit/1732)Received POWER DOWN notification.

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:09.931 am [info](http://192.168.1.222/device/edit/1732)LG TV is off [physical]

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:09.907 am [debug](http://192.168.1.222/device/edit/1732)handler_getForegroundAppInfo: got: [appId:, subscribed:true, returnValue:true, windowId:, processId:]

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:09.905 am [debug](http://192.168.1.222/device/edit/1732)parse: {"type":"response","id":"getForegroundAppInfo","payload":{"appId":"","subscribed":true,"returnValue":true,"windowId":"","processId":""}}

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:09.781 am [info](http://192.168.1.222/device/edit/1732)LG TV volume is 20

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:09.778 am [debug](http://192.168.1.222/device/edit/1732)handler_audio_getStatus: got: [returnValue:true, volumeMax:100, ringtonewithvibration:true, scenario:mastervolume_tv_speaker_ext, hac:false, subscribed:true, volume:20, action:requested, supportvolume:true, ringer switch:true, slider:false, active:false, mute:false]

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:09.770 am [debug](http://192.168.1.222/device/edit/1732)parse: {"type":"response","id":"audio_getStatus","payload":{"returnValue":true,"volumeMax":100,"ringtonewithvibration":true,"scenario":"mastervolume_tv_speaker_ext","hac":false,"subscribed":true,"volume":20,"action":"requested","supportvolume":true,"ringer switch":true,"slider":false,"active":false,"mute":false}}

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:09.718 am [debug](http://192.168.1.222/device/edit/1732)sendCommand: {"type":"subscribe","id":"status_2","uri":"ssap://com.webos.service.tv.time/getCurrentTime"}

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:09.693 am [debug](http://192.168.1.222/device/edit/1732)sendWebosCommand sending json: {"id":"getChannelProgramInfo","type":"subscribe","uri":"ssap://tv/getChannelProgramInfo"}

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:09.676 am [debug](http://192.168.1.222/device/edit/1732)Sending: {"id":"getChannelProgramInfo","type":"subscribe","uri":"ssap://tv/getChannelProgramInfo"} storing callback: getChannelProgramInfo

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:09.674 am [debug](http://192.168.1.222/device/edit/1732)sendWebosCommand sending json: {"id":"getForegroundAppInfo","type":"subscribe","uri":"ssap://com.webos.applicationManager/getForegroundAppInfo"}

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:09.670 am [debug](http://192.168.1.222/device/edit/1732)Sending: {"id":"getForegroundAppInfo","type":"subscribe","uri":"ssap://com.webos.applicationManager/getForegroundAppInfo"} storing callback: getForegroundAppInfo

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:09.653 am [debug](http://192.168.1.222/device/edit/1732)sendWebosCommand sending json: {"id":"audio_getStatus","type":"subscribe","uri":"ssap://audio/getStatus"}

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:09.645 am [debug](http://192.168.1.222/device/edit/1732)Sending: {"id":"audio_getStatus","type":"subscribe","uri":"ssap://audio/getStatus"} storing callback: audio_getStatus

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:09.373 am [info](http://192.168.1.222/device/edit/1732)rResp on event

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:09.372 am [info](http://192.168.1.222/device/edit/1732)testing 2

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:09.136 am [debug](http://192.168.1.222/device/edit/1732)parseWebsocketResult: received registered client-key: 35a9d02a33cb3999127c86404811ba40

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:09.133 am [debug](http://192.168.1.222/device/edit/1732)webosRegister: got json: [type:registered, id:command_1, payload:[client-key:35a9d02a33cb3999127c86404811ba40]]

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:09.056 am [debug](http://192.168.1.222/device/edit/1732)parse: callback for json.id: command_1

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:09.036 am [debug](http://192.168.1.222/device/edit/1732)parse: {"type":"registered","id":"command_1","payload":{"client-key":"35a9d02a33cb3999127c86404811ba40"}}

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:08.876 am [debug](http://192.168.1.222/device/edit/1732)sendWebosCommand sending json: {"id":"command_1","type":"register","payload":{"pairingType":"PROMPT","forcePairing":false,"client-key":"35a9d02a33cb3999127c86404811ba40","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:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:08.676 am [debug](http://192.168.1.222/device/edit/1732)Sending: {"id":"command_1","type":"register","payload":{"pairingType":"PROMPT","forcePairing":false,"client-key":"35a9d02a33cb3999127c86404811ba40","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:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:08.663 am [info](http://192.168.1.222/device/edit/1732)webosRegister(): pairing key: 35a9d02a33cb3999127c86404811ba40

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:08.643 am [info](http://192.168.1.222/device/edit/1732)LG TV is on [physical]

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:08.638 am [info](http://192.168.1.222/device/edit/1732)websocket is open

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:08.632 am [debug](http://192.168.1.222/device/edit/1732)webSocketStatus: State: [initialize] Reported Status: [status: open]

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:08.361 am [debug](http://192.168.1.222/device/edit/1732)Connecting websocket to: "ws://192.168.1.35:3000/"

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:08.208 am [debug](http://192.168.1.222/device/edit/1732)LG Smart TV Driver - initialize - settings:['televisionIp':'192.168.1.35', 'televisionMac':'A823FEE3EED2', 'pairingKey':'35a9d02a33cb3999127c86404811ba40', 'retryDelay':'30', 'logEnable':true, 'logInfoEnable':true, 'txtEnable':true, 'televisionType':'WEBOS']

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:08.189 am [info](http://192.168.1.222/device/edit/1732)LG Smart TV Driver - initialize - ip: 192.168.1.35 mac: A823FEE3EED2 key: 35a9d02a33cb3999127c86404811ba40 debug: null logText: null

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:05.748 am [info](http://192.168.1.222/device/edit/1732)websocket reconnect - delay = 2

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:05.699 am [debug](http://192.168.1.222/device/edit/1732)WebSocket connection closing.

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:05.697 am [debug](http://192.168.1.222/device/edit/1732)webSocketStatus: State: [open] Reported Status: [status: closing]

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:05.595 am [info](http://192.168.1.222/device/edit/1732)Received POWER DOWN notification.

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:05.546 am [info](http://192.168.1.222/device/edit/1732)LG TV is off [physical]

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:05.539 am [debug](http://192.168.1.222/device/edit/1732)handler_getForegroundAppInfo: got: [subscribed:true, appId:, returnValue:true, windowId:, processId:]

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:05.536 am [debug](http://192.168.1.222/device/edit/1732)parse: {"type":"response","id":"getForegroundAppInfo","payload":{"subscribed":true,"appId":"","returnValue":true,"windowId":"","processId":""}}

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:05.118 am [info](http://192.168.1.222/device/edit/1732)LG TV volume is 20

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:05.115 am [debug](http://192.168.1.222/device/edit/1732)handler_audio_getStatus: got: [changed:[scenario, volume], returnValue:true, volumeMax:100, scenario:mastervolume_tv_speaker_ext, volume:20, action:changed, supportvolume:true, active:false, mute:false]

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:05.111 am [debug](http://192.168.1.222/device/edit/1732)parse: {"type":"response","id":"audio_getStatus","payload":{"changed":["scenario","volume"],"returnValue":true,"volumeMax":100,"scenario":"mastervolume_tv_speaker_ext","volume":20,"action":"changed","supportvolume":true,"active":false,"mute":false}}

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:04.836 am [info](http://192.168.1.222/device/edit/1732)LG TV volume is -1

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:04.788 am [debug](http://192.168.1.222/device/edit/1732)handler_audio_getStatus: got: [changed:[scenario, volume], returnValue:true, volumeMax:100, scenario:mastervolume_ext_speaker_optical, volume:-1, action:changed, supportvolume:false, active:false, mute:false]

[dev:1732](http://192.168.1.222/logs/past#dev1732)2020-07-02 01:31:04.783 am [debug](http://192.168.1.222/device/edit/1732)parse: {"type":"response","id":"audio_getStatus","payload":{"changed":["scenario","volume"],"returnValue":true,"volumeMax":100,"scenario":"mastervolume_ext_speaker_optical","volume":-1,"action":"changed","supportvolume":false,"active":false,"mute":false}}

I think I figured out this issue. The websocket subscription to getChannelProgramInfo kept erroring out which was preventing the subscription from closing. I've now disabled anything to get Channel Program Info so hopefully that fixes this.

Sorry, I've been a bit absent as of late.

Huh, the TV was off...so it shouldn't be called? Hmm, If it works let me know, send me a diff and I'll look through why it'a causing issues.

Sadly didn't work. No idea why it's happening. Didn't happen on my old TV (LG C8). Might just be a problem on my current TV (LG C9). Wonder why Home Assistant sees it as off even though the websocket connection didn't close completely

So it appears some TVs keep the websocket open for a bit longer (or take a while longer to close the websocket). I looked at some Home Assistant code and saw they were only sending the state change (power on event) when the appID isn't null (instead of when the websocket gets connected to). I changed the code to do that so hopefully, even though the HE would keep connecting and disconnecting to the websocket, the TV's state would stay "off" until there actually is an input on the TV.

@yototogblo Huh, that's a good idea. Frustrating, though understandable, that we see different behavior with different TV software. Would really be great if LG just published a basic spec for what we should use.

Using appId makes sense though, if there's no app running...surely the TV isn't on. Right? :slight_smile:

And we don't really care about a socket connecting/disconnecting. It's pretty light weight...and while it feels "dumb" computers are really good at doing a lot of dumb things. :smiley:

1 Like

Curious if anybody has successfully displayed an HE dashboard on their LG TV (without a separate PC or RPi) just by using the embedded web browser?

I can navigate to the dashboard’s web page, but the tiles aren’t rendered or laid out properly. About to throw in the towel — any ideas?

I haven’t had luck with hubitat but I’ve had some luck with sharptools.

1 Like

Eh, I give up on putting my HE dashboards on my smart TVs. Not that big of a deal anywho.

This app has worked really well for awhile now -- allows us to control TV behavior through and with hubitat. That said, two questions have surfaced. Wondering if anyone knows how to crack either of these scenarios....

  1. You can pull up a webpage by having your desired website be the home page when switching to the "Web Browser" input. What I don't know is whether we can access a couple different web pages somehow, just like you can currently access different inputs or apps. For example, could the web browser could show up more than once in the WebOS app listing, each with its own home page? Or could I access bookmarks other than the home page from the device driver somehow. Any ideas?

  2. Any way to switch to and from the antenna TV input? For me, it doesn't show up on the available input list. I can isolate it to a specific channel name ( com.webos.app.livetv), but I don't know how to access that channel name from the device details page, let alone RM with a custom action.

Thanks in advance!

@asj, any thoughts on the above?

I'm new to hubitat... Not sure how to allocate commands to tiles (this is regarding the LG driver that wasreleased). For example, how would I send the command that open Netflix, through a tile.
Thanks to anyone that can help in advance!

Lewis, welcome to the community! Lots of helpful people around here and always multiple ways to skin the cat. Here's what I do:

  1. assign a virtual button device to the tile(s). That way, when you touch/click the tile, you are creating a button-push event.
  2. then, I use rule-machine with a trigger of the button-push event and an action telling my LG driver to switch inputs to Netflix.

I have a whole remote control that works this way (see below). And so, my button device is like a virtual 25-button device.

Let me know if it's not clear how to create a virtual button and assign it to the tile. Or if you need help with the rule machine triggers and actions. It takes a little getting used to, but once you get the hang of it, it's pretty powerful and easy.

1 Like

Thank-you for this integration!! I may have encountered a problem, or perhaps user error: I am using the RM4 to change the externalInput value. When the string for the input includes spaces and a backslash character, the commanded input change does not happen. If I try sending the command with the same string directly from the device controls, the input changes successfully.

My work-around: I renamed the input on the TV to something without spaces and without a backslash. Now, the rule action is successfully using the new input name to change the input.

-Duane

Anybody understand the difference between Switch and Power in this driver? Every so often if on and off behavior are too close, I get unexpected behavior with my LG TV and I'm wondering if it has to do with how I'm using Switch versus Power. Appreciate any insights....