NEWS
lgtv Adapter zur Steuerung von LG WebOS SmartTVs
-
Also der Code, wenn man States.turnoff clickt oder States.power auf false setzt sieht gleich aus.
Wenn du auf den Button in den objects klickst, funktioniert das dann auch nicht?
Was geändert wurde, ist der type von Boolean zu Button. Gibt das dann Probleme mit der vis? -
@dirkhe ich schalte bei mir da was über script,deswegen hab ich es in den Objekten getestet.
-
Ok, sollte dann aber auch mit stateoff gehen.
-
so kurze Info von mir.. läuft..
-
Bei mir scheint das noch nicht so richtig zuverlässig zu laufen. Teilweise ist der Adapter komplett hängen geblieben.
Hier mal ein log von gestern / heute, in dem man die Reaktion nach dem Ausschalten des TVs sieht. In diesem Fall hat er sich beim Wiedereinschalten heute auch wieder mit dem TV verbunden.
2020-03-05 20:42:24.084 - [34mdebug[39m: lgtv.0 (8566) Connecting to WebOS TV: ws://192.168.178.106:3000 2020-03-05 20:42:29.084 - [34mdebug[39m: lgtv.0 (8566) TV is off 2020-03-05 20:42:29.085 - [34mdebug[39m: lgtv.0 (8566) Connecting to WebOS TV: ws://192.168.178.106:3000 2020-03-05 20:42:34.085 - [34mdebug[39m: lgtv.0 (8566) TV is off -> TV ein 2020-03-05 20:42:34.088 - [34mdebug[39m: lgtv.0 (8566) Connecting to WebOS TV: ws://192.168.178.106:3000 2020-03-05 20:42:34.440 - [34mdebug[39m: lgtv.0 (8566) WebOS TV Connected 2020-03-05 20:42:34.788 - [34mdebug[39m: lgtv.0 (8566) DEBUGGING getForegroundAppInfo: {"appId":"netflix","subscribed":true,"returnValue":true,"windowId":"","processId":""} 2020-03-05 20:42:34.790 - [34mdebug[39m: lgtv.0 (8566) cur app is netflix 2020-03-05 20:42:34.793 - [34mdebug[39m: lgtv.0 (8566) renew connection in one minute for stable subscriptions... 2020-03-05 20:42:34.827 - [34mdebug[39m: lgtv.0 (8566) audio/getVolume: {"returnValue":true,"volumeMax":100,"ringtonewithvibration":true,"scenario":"mastervolume_tv_speaker_ext","muted":false,"hac":false,"subscribed":true,"volume":4,"action":"requested","supportvolume":true,"ringer switch":true,"slider":false,"active":false,"changed":["muted","volume"]} 2020-03-05 20:42:34.829 - [34mdebug[39m: lgtv.0 (8566) Service list: {"returnValue":true,"services":[{"name":"api","version":1},{"name":"audio","version":1},{"name":"config","version":1},{"name":"externalpq","version":1},{"name":"media.controls","version":1},{"name":"media.viewer","version":1},{"name":"pairing","version":1},{"name":"settings","version":1},{"name":"system","version":1},{"name":"system.launcher","version":1},{"name":"system.notifications","version":1},{"name":"timer","version":1},{"name":"tv","version":1},{"name":"user","version":1},{"name":"webapp","version":2}]} 2020-03-05 20:42:34.992 - [34mdebug[39m: lgtv.0 (8566) getCurrentSWInformation: {"returnValue":true,"product_name":"webOSTV 4.0","model_name":"HE_DTV_W18H_AFADABAA","sw_type":"FIRMWARE","major_ver":"05","minor_ver":"10.40","country":"DE","country_group":"EU","device_id":"a8:23:fe:c4:2b:17","auth_flag":"N","ignore_disable":"N","eco_info":"01","config_key":"00","language_code":"de-DE"} 2020-03-05 20:42:35.775 - [34mdebug[39m: lgtv.0 (8566) getSystemInfo: {"returnValue":true,"features":{"3d":false,"dvr":true},"receiverType":"dvb","modelName":"OLED55B8LLA","programMode":"true"} 2020-03-05 20:42:35.781 - [34mdebug[39m: lgtv.0 (8566) audio/getSoundOutput: {"soundOutput":"tv_external_speaker","subscribed":true} 2020-03-05 20:42:35.821 - [34mdebug[39m: lgtv.0 (8566) tv/getCurrentChannel: {"returnValue":false,"errorCode":-1000,"errorText":"internal error"} 2020-03-05 20:43:34.812 - [34mdebug[39m: lgtv.0 (8566) Connection closed: 1000 2020-03-05 20:43:35.294 - [34mdebug[39m: lgtv.0 (8566) Connecting to WebOS TV: ws://192.168.178.106:3000 2020-03-05 20:43:35.417 - [34mdebug[39m: lgtv.0 (8566) WebOS TV Connected 2020-03-05 20:43:35.776 - [34mdebug[39m: lgtv.0 (8566) DEBUGGING getForegroundAppInfo: {"appId":"netflix","subscribed":true,"returnValue":true,"windowId":"","processId":""} 2020-03-05 20:43:35.776 - [34mdebug[39m: lgtv.0 (8566) cur app is netflix 2020-03-05 20:43:35.777 - [34mdebug[39m: lgtv.0 (8566) audio/getVolume: {"returnValue":true,"volumeMax":100,"ringtonewithvibration":true,"scenario":"mastervolume_tv_speaker_ext","muted":false,"hac":false,"subscribed":true,"volume":4,"action":"requested","supportvolume":true,"ringer switch":true,"slider":false,"active":false,"changed":["muted","volume"]} 2020-03-05 20:43:35.778 - [34mdebug[39m: lgtv.0 (8566) getCurrentSWInformation: {"returnValue":true,"product_name":"webOSTV 4.0","model_name":"HE_DTV_W18H_AFADABAA","sw_type":"FIRMWARE","major_ver":"05","minor_ver":"10.40","country":"DE","country_group":"EU","device_id":"a8:23:fe:c4:2b:17","auth_flag":"N","ignore_disable":"N","eco_info":"01","config_key":"00","language_code":"de-DE"} 2020-03-05 20:43:35.779 - [34mdebug[39m: lgtv.0 (8566) Service list: {"returnValue":true,"services":[{"name":"api","version":1},{"name":"audio","version":1},{"name":"config","version":1},{"name":"externalpq","version":1},{"name":"media.controls","version":1},{"name":"media.viewer","version":1},{"name":"pairing","version":1},{"name":"settings","version":1},{"name":"system","version":1},{"name":"system.launcher","version":1},{"name":"system.notifications","version":1},{"name":"timer","version":1},{"name":"tv","version":1},{"name":"user","version":1},{"name":"webapp","version":2}]} 2020-03-05 20:43:35.782 - [34mdebug[39m: lgtv.0 (8566) audio/getSoundOutput: {"soundOutput":"tv_external_speaker","subscribed":true} 2020-03-05 20:43:35.784 - [34mdebug[39m: lgtv.0 (8566) getSystemInfo: {"returnValue":true,"features":{"3d":false,"dvr":true},"receiverType":"dvb","modelName":"OLED55B8LLA","programMode":"true"} 2020-03-05 20:43:35.802 - [34mdebug[39m: lgtv.0 (8566) tv/getCurrentChannel: {"returnValue":false,"errorCode":-1000,"errorText":"internal error"} 2020-03-05 20:44:34.838 - [34mdebug[39m: lgtv.0 (8566) check TV connection: ok 2020-03-05 21:37:34.862 - [34mdebug[39m: lgtv.0 (8566) check TV connection: ok -> TV aus 2020-03-05 21:38:49.811 - [34mdebug[39m: lgtv.0 (8566) ERROR! Response from TV: Error: timeout 2020-03-05 21:38:49.811 - [34mdebug[39m: lgtv.0 (8566) check TV connection: Error: timeout 2020-03-05 21:38:49.811 - [34mdebug[39m: lgtv.0 (8566) TV is off 2020-03-05 21:54:02.188 - [34mdebug[39m: lgtv.0 (8566) Error on connecting or sending command to WebOS TV: Error: read EHOSTUNREACH 2020-03-05 21:54:02.188 - [34mdebug[39m: lgtv.0 (8566) Connection closed: 1006 2020-03-05 21:54:07.188 - [34mdebug[39m: lgtv.0 (8566) Connecting to WebOS TV: ws://192.168.178.106:3000 2020-03-05 21:54:10.196 - [34mdebug[39m: lgtv.0 (8566) Error on connecting or sending command to WebOS TV: Error: connect EHOSTUNREACH 192.168.178.106:3000 2020-03-05 21:54:10.721 - [32minfo[39m: javascript.0 (20600) script.js.VirtualDevices.BWM: function BWM_Praesenz - Licht aus - Praesenz direkt auf false. BWM: javascript.0.virtualDevice.BWM.Schlafzimmer.Eingang 2020-03-05 21:54:12.189 - [34mdebug[39m: lgtv.0 (8566) TV is off 2020-03-05 21:54:15.196 - [34mdebug[39m: lgtv.0 (8566) Connecting to WebOS TV: ws://192.168.178.106:3000 2020-03-05 21:54:17.188 - [34mdebug[39m: lgtv.0 (8566) TV is off ... Adapter gelb, weiter alle 8s Verbindungsversuch -> TV am nächsten Tag ein 2020-03-06 20:07:15.175 - [34mdebug[39m: lgtv.0 (8566) Connecting to WebOS TV: ws://192.168.178.106:3000 2020-03-06 20:07:15.177 - [34mdebug[39m: lgtv.0 (8566) Error on connecting or sending command to WebOS TV: Error: connect ECONNREFUSED 192.168.178.106:3000 2020-03-06 20:07:17.165 - [34mdebug[39m: lgtv.0 (8566) TV is off 2020-03-06 20:07:20.178 - [34mdebug[39m: lgtv.0 (8566) Connecting to WebOS TV: ws://192.168.178.106:3000 2020-03-06 20:07:25.176 - [34mdebug[39m: lgtv.0 (8566) TV is off 2020-03-06 20:07:25.183 - [34mdebug[39m: lgtv.0 (8566) Connecting to WebOS TV: ws://192.168.178.106:3000 2020-03-06 20:07:30.180 - [34mdebug[39m: lgtv.0 (8566) TV is off 2020-03-06 20:07:30.185 - [34mdebug[39m: lgtv.0 (8566) Connecting to WebOS TV: ws://192.168.178.106:3000 2020-03-06 20:07:30.654 - [34mdebug[39m: lgtv.0 (8566) WebOS TV Connected 2020-03-06 20:07:31.104 - [34mdebug[39m: lgtv.0 (8566) DEBUGGING getForegroundAppInfo: {"appId":"com.webos.app.hdmi1","subscribed":true,"returnValue":true,"windowId":"","processId":""} 2020-03-06 20:07:31.105 - [34mdebug[39m: lgtv.0 (8566) cur app is com.webos.app.hdmi1 2020-03-06 20:07:31.105 - [34mdebug[39m: lgtv.0 (8566) audio/getVolume: {"returnValue":true,"volumeMax":100,"ringtonewithvibration":true,"scenario":"mastervolume_tv_speaker_ext","muted":false,"hac":false,"subscribed":true,"volume":4,"action":"requested","supportvolume":true,"ringer switch":true,"slider":false,"active":false,"changed":["muted","volume"]} 2020-03-06 20:07:31.108 - [34mdebug[39m: lgtv.0 (8566) Service list: {"returnValue":true,"services":[{"name":"api","version":1},{"name":"audio","version":1},{"name":"config","version":1},{"name":"externalpq","version":1},{"name":"media.controls","version":1},{"name":"media.viewer","version":1},{"name":"pairing","version":1},{"name":"settings","version":1},{"name":"system","version":1},{"name":"system.launcher","version":1},{"name":"system.notifications","version":1},{"name":"timer","version":1},{"name":"tv","version":1},{"name":"user","version":1},{"name":"webapp","version":2}]} 2020-03-06 20:07:31.109 - [34mdebug[39m: lgtv.0 (8566) renew connection in one minute for stable subscriptions... 2020-03-06 20:07:31.145 - [34mdebug[39m: lgtv.0 (8566) getCurrentSWInformation: {"returnValue":true,"product_name":"webOSTV 4.0","model_name":"HE_DTV_W18H_AFADABAA","sw_type":"FIRMWARE","major_ver":"05","minor_ver":"10.40","country":"DE","country_group":"EU","device_id":"a8:23:fe:c4:2b:17","auth_flag":"N","ignore_disable":"N","eco_info":"01","config_key":"00","language_code":"de-DE"} 2020-03-06 20:07:31.970 - [34mdebug[39m: lgtv.0 (8566) getSystemInfo: {"returnValue":true,"features":{"3d":false,"dvr":true},"receiverType":"dvb","modelName":"OLED55B8LLA","programMode":"true"} 2020-03-06 20:07:31.979 - [34mdebug[39m: lgtv.0 (8566) audio/getSoundOutput: {"soundOutput":"tv_external_speaker","subscribed":true} 2020-03-06 20:07:32.048 - [34mdebug[39m: lgtv.0 (8566) tv/getCurrentChannel: {"returnValue":false,"errorCode":-1000,"errorText":"internal error"} -> TV aus 2020-03-06 20:08:31.612 - [34mdebug[39m: lgtv.0 (8566) Connecting to WebOS TV: ws://192.168.178.106:3000 2020-03-06 20:08:41.613 - [34mdebug[39m: lgtv.0 (8566) TV is off 2020-03-06 20:10:38.892 - [34mdebug[39m: lgtv.0 (8566) Error on connecting or sending command to WebOS TV: Error: connect ETIMEDOUT 192.168.178.106:3000 2020-03-06 20:10:43.893 - [34mdebug[39m: lgtv.0 (8566) Connecting to WebOS TV: ws://192.168.178.106:3000 2020-03-06 20:10:53.894 - [34mdebug[39m: lgtv.0 (8566) TV is off 2020-03-06 20:12:56.116 - [34mdebug[39m: lgtv.0 (8566) Connecting to WebOS TV: ws://192.168.178.106:3000 2020-03-06 20:12:59.122 - [34mdebug[39m: lgtv.0 (8566) Error on connecting or sending command to WebOS TV: Error: connect EHOSTUNREACH 192.168.178.106:3000 2020-03-06 20:13:04.122 - [34mdebug[39m: lgtv.0 (8566) Connecting to WebOS TV: ws://192.168.178.106:3000 2020-03-06 20:13:06.116 - [34mdebug[39m: lgtv.0 (8566) TV is off 2020-03-06 20:13:12.129 - [34mdebug[39m: lgtv.0 (8566) Connecting to WebOS TV: ws://192.168.178.106:3000 2020-03-06 20:13:14.122 - [34mdebug[39m: lgtv.0 (8566) TV is off ... Adapter gelb, weiter alle 8s Verbindungsversuch
-
Sieht doch vorbildlich aus. Es sieht so aus, als wenn dein tv wirklich aus, also er auch nicht mehr Netz erreichbar ist. Nimmst du ihn komplett vom Strom?
Wenn der tv nicht mehr per WLAN oder LAN erreichbar ist, versucht er es halt alle x Sekunden erneut, was soll er sonst auch machen? -
@dirkhe
Der TV hängt dauerhaft am Strom und ist per Kabel mit dem LAN verbunden. QuickStart+ ist deaktiviert, das Aufwecken des TVs per Smartphone aktiviert.Irgendwas scheint mir noch unzuverlässig zu funktionieren. Die alte Version des Adapters, die dauerhaft gepollt hat, lief bei mir dauerhaft problemlos, aber ich denke, das ist auch klar.
Gestern hat der Adapter beim Ausschalten des TVs anders reagiert und dann heute das Einschalten des TVs wieder nicht mehr mitbekommen:
TV aus am Vorabend: 2020-03-06 22:02:13.349 - [34mdebug[39m: lgtv.0 (8566) check TV connection: ok 2020-03-06 22:03:13.363 - [34mdebug[39m: lgtv.0 (8566) check TV connection: ok 2020-03-06 22:04:11.377 - [34mdebug[39m: lgtv.0 (8566) DEBUGGING getForegroundAppInfo: {"subscribed":true,"appId":"","returnValue":true,"windowId":"","processId":""} 2020-03-06 22:04:11.878 - [34mdebug[39m: lgtv.0 (8566) TV is off -> Adapter bleibt grün, TV wird korrekt als Aus angezeigt TV ein am nächsten Tag -> Keine Reaktion durch Adapter. TV wird weiter als Aus angezeigt. Neustart des Adapters: 2020-03-07 17:33:00.946 - info: host.iobroker stopInstance system.adapter.lgtv.0 (force=false, process=true) 2020-03-07 17:33:00.949 - info: host.iobroker stopInstance system.adapter.lgtv.0 send kill signal 2020-03-07 17:33:00.952 - info: lgtv.0 (8566) Got terminate signal TERMINATE_YOURSELF 2020-03-07 17:33:00.955 - debug: lgtv.0 (8566) TV is off 2020-03-07 17:33:00.955 - info: lgtv.0 (8566) terminating 2020-03-07 17:33:00.956 - info: lgtv.0 (8566) Terminated (START_IMMEDIATELY_AFTER_STOP): Without reason 2020-03-07 17:33:00.957 - debug: lgtv.0 (8566) Error on connecting or sending command to WebOS TV: Error: read ECONNRESET 2020-03-07 17:33:00.958 - debug: lgtv.0 (8566) Connection closed: 1006 2020-03-07 17:33:01.495 - info: host.iobroker instance system.adapter.lgtv.0 terminated with code 156 (156) 2020-03-07 17:33:03.470 - info: host.iobroker instance system.adapter.lgtv.0 started with pid 14084 2020-03-07 17:33:04.243 - debug: lgtv.0 (14084) Redis Objects: Use Redis connection: 127.0.0.1:9001 2020-03-07 17:33:04.274 - debug: lgtv.0 (14084) Objects client ready ... initialize now 2020-03-07 17:33:04.278 - debug: lgtv.0 (14084) Objects create System PubSub Client 2020-03-07 17:33:04.279 - debug: lgtv.0 (14084) Objects create User PubSub Client 2020-03-07 17:33:04.279 - debug: lgtv.0 (14084) Objects client initialize lua scripts 2020-03-07 17:33:04.294 - debug: lgtv.0 (14084) Objects connected to redis: 127.0.0.1:9001 2020-03-07 17:33:04.299 - debug: lgtv.0 (14084) objectDB connected 2020-03-07 17:33:04.302 - debug: lgtv.0 (14084) Redis States: Use Redis connection: 172.18.0.2:6379 2020-03-07 17:33:04.307 - debug: lgtv.0 (14084) States create User PubSub Client 2020-03-07 17:33:04.310 - debug: lgtv.0 (14084) States create System PubSub Client 2020-03-07 17:33:04.317 - debug: lgtv.0 (14084) States connected to redis: 172.18.0.2:6379 2020-03-07 17:33:04.318 - debug: lgtv.0 (14084) statesDB connected 2020-03-07 17:33:07.574 - info: lgtv.0 (14084) starting. Version 1.1.5 in /opt/iobroker/node_modules/iobroker.lgtv, node: v10.18.0 2020-03-07 17:33:07.596 - info: lgtv.0 (14084) Ready. Configured WebOS TV IP: 192.168.178.106 2020-03-07 17:33:07.598 - debug: lgtv.0 (14084) adapter.config = {"ip":"192.168.178.106","timeout":"15000","interval":"60000","mac":"","power":false} 2020-03-07 17:33:07.637 - debug: lgtv.0 (14084) Connecting to WebOS TV: ws://192.168.178.106:3000 2020-03-07 17:33:07.811 - debug: lgtv.0 (14084) WebOS TV Connected 2020-03-07 17:33:08.215 - debug: lgtv.0 (14084) DEBUGGING getForegroundAppInfo: {"appId":"com.webos.app.hdmi1","subscribed":true,"returnValue":true,"windowId":"","processId":""} 2020-03-07 17:33:08.216 - debug: lgtv.0 (14084) cur app is com.webos.app.hdmi1 2020-03-07 17:33:08.218 - debug: lgtv.0 (14084) audio/getVolume: {"returnValue":true,"volumeMax":100,"ringtonewithvibration":true,"scenario":"mastervolume_tv_speaker_ext","muted":false,"hac":false,"subscribed":true,"volume":10,"action":"requested","supportvolume":true,"ringer switch":true,"slider":false,"active":false,"changed":["muted","volume"]} 2020-03-07 17:33:08.225 - debug: lgtv.0 (14084) Service list: {"returnValue":true,"services":[{"name":"api","version":1},{"name":"audio","version":1},{"name":"config","version":1},{"name":"externalpq","version":1},{"name":"media.controls","version":1},{"name":"media.viewer","version":1},{"name":"pairing","version":1},{"name":"settings","version":1},{"name":"system","version":1},{"name":"system.launcher","version":1},{"name":"system.notifications","version":1},{"name":"timer","version":1},{"name":"tv","version":1},{"name":"user","version":1},{"name":"webapp","version":2}]} 2020-03-07 17:33:08.227 - debug: lgtv.0 (14084) getCurrentSWInformation: {"returnValue":true,"product_name":"webOSTV 4.0","model_name":"HE_DTV_W18H_AFADABAA","sw_type":"FIRMWARE","major_ver":"05","minor_ver":"10.40","country":"DE","country_group":"EU","device_id":"a8:23:fe:c4:2b:17","auth_flag":"N","ignore_disable":"N","eco_info":"01","config_key":"00","language_code":"de-DE"} 2020-03-07 17:33:08.253 - debug: lgtv.0 (14084) renew connection in one minute for stable subscriptions... 2020-03-07 17:33:08.773 - debug: lgtv.0 (14084) audio/getSoundOutput: {"soundOutput":"tv_external_speaker","subscribed":true} 2020-03-07 17:33:08.775 - debug: lgtv.0 (14084) getSystemInfo: {"returnValue":true,"features":{"3d":false,"dvr":true},"receiverType":"dvb","modelName":"OLED55B8LLA","programMode":"true"} 2020-03-07 17:33:08.824 - debug: lgtv.0 (14084) tv/getCurrentChannel: {"returnValue":false,"errorCode":-1000,"errorText":"internal error"} 2020-03-07 17:34:08.291 - debug: lgtv.0 (14084) Connection closed: 1000 2020-03-07 17:34:08.757 - debug: lgtv.0 (14084) Connecting to WebOS TV: ws://192.168.178.106:3000 2020-03-07 17:34:08.846 - debug: lgtv.0 (14084) WebOS TV Connected 2020-03-07 17:34:09.036 - debug: lgtv.0 (14084) DEBUGGING getForegroundAppInfo: {"appId":"com.webos.app.hdmi1","subscribed":true,"returnValue":true,"windowId":"","processId":""} 2020-03-07 17:34:09.036 - debug: lgtv.0 (14084) cur app is com.webos.app.hdmi1 2020-03-07 17:34:09.041 - debug: lgtv.0 (14084) audio/getVolume: {"returnValue":true,"volumeMax":100,"ringtonewithvibration":true,"scenario":"mastervolume_tv_speaker_ext","muted":false,"hac":false,"subscribed":true,"volume":10,"action":"requested","supportvolume":true,"ringer switch":true,"slider":false,"active":false,"changed":["muted","volume"]} 2020-03-07 17:34:09.048 - debug: lgtv.0 (14084) Service list: {"returnValue":true,"services":[{"name":"api","version":1},{"name":"audio","version":1},{"name":"config","version":1},{"name":"externalpq","version":1},{"name":"media.controls","version":1},{"name":"media.viewer","version":1},{"name":"pairing","version":1},{"name":"settings","version":1},{"name":"system","version":1},{"name":"system.launcher","version":1},{"name":"system.notifications","version":1},{"name":"timer","version":1},{"name":"tv","version":1},{"name":"user","version":1},{"name":"webapp","version":2}]} 2020-03-07 17:34:09.054 - debug: lgtv.0 (14084) getCurrentSWInformation: {"returnValue":true,"product_name":"webOSTV 4.0","model_name":"HE_DTV_W18H_AFADABAA","sw_type":"FIRMWARE","major_ver":"05","minor_ver":"10.40","country":"DE","country_group":"EU","device_id":"a8:23:fe:c4:2b:17","auth_flag":"N","ignore_disable":"N","eco_info":"01","config_key":"00","language_code":"de-DE"} 2020-03-07 17:34:09.059 - debug: lgtv.0 (14084) getSystemInfo: {"returnValue":true,"features":{"3d":false,"dvr":true},"receiverType":"dvb","modelName":"OLED55B8LLA","programMode":"true"} 2020-03-07 17:34:09.066 - debug: lgtv.0 (14084) audio/getSoundOutput: {"soundOutput":"tv_external_speaker","subscribed":true} 2020-03-07 17:34:09.069 - debug: lgtv.0 (14084) tv/getCurrentChannel: {"returnValue":false,"errorCode":-1000,"errorText":"internal error"} 2020-03-07 17:34:14.903 - info: javascript.0 (20600) script.js.VirtualDevices.BWM: function BWM_Praesenz - Bewegung - Praesenz auf true. BWM: javascript.0.virtualDevice.BWM.Kueche.Eingang 2020-03-07 17:34:59.705 - info: javascript.0 (20600) script.js.Skripts_Beleuchtung.Steuerung_Beleuchtung_Kopieren: Praesenz Ende. Pruefe ob gesperrt.. BWM: javascript.0.virtualDevice.BWM.Bad.Eingang 2020-03-07 17:34:59.705 - info: javascript.0 (20600) script.js.Skripts_Beleuchtung.Steuerung_Beleuchtung_Kopieren: Praesenz Ende und nicht gesperrt. Pruefe ob noch anderer BWM der Gruppe Praesenz meldet.. BWM: javascript.0.virtualDevice.BWM.Bad.Eingang 2020-03-07 17:34:59.705 - info: javascript.0 (20600) script.js.Skripts_Beleuchtung.Steuerung_Beleuchtung_Kopieren: Keine Prasenz mehr und Licht ist noch ein. Dimme Licht herab und dann aus. BWM: javascript.0.virtualDevice.BWM.Bad.Eingang 2020-03-07 17:35:08.293 - debug: lgtv.0 (14084) check TV connection: ok TV wieder aus: 2020-03-07 17:37:23.279 - debug: lgtv.0 (14084) ERROR! Response from TV: Error: timeout 2020-03-07 17:37:23.280 - debug: lgtv.0 (14084) check TV connection: Error: timeout 2020-03-07 17:37:23.281 - debug: lgtv.0 (14084) TV is off -> Adapter bleibt grün, TV wird korrekt als Aus angezeigt TV nochmal ein -> Adapter bemerkt wiedereinschalten und zeigt TV Status auch wieder korrekt als Ein an 2020-03-07 17:43:21.901 - debug: lgtv.0 (14084) Error on connecting or sending command to WebOS TV: Error: read ECONNRESET 2020-03-07 17:43:21.902 - debug: lgtv.0 (14084) Connection closed: 1006 2020-03-07 17:43:26.903 - debug: lgtv.0 (14084) Connecting to WebOS TV: ws://192.168.178.106:3000 2020-03-07 17:43:27.042 - debug: lgtv.0 (14084) WebOS TV Connected 2020-03-07 17:43:27.330 - debug: lgtv.0 (14084) DEBUGGING getForegroundAppInfo: {"appId":"com.webos.app.hdmi1","subscribed":true,"returnValue":true,"windowId":"","processId":""} 2020-03-07 17:43:27.330 - debug: lgtv.0 (14084) cur app is com.webos.app.hdmi1 2020-03-07 17:43:27.332 - debug: lgtv.0 (14084) audio/getVolume: {"returnValue":true,"volumeMax":100,"ringtonewithvibration":true,"scenario":"mastervolume_tv_speaker_ext","muted":false,"hac":false,"subscribed":true,"volume":10,"action":"requested","supportvolume":true,"ringer switch":true,"slider":false,"active":false,"changed":["muted","volume"]} 2020-03-07 17:43:27.334 - debug: lgtv.0 (14084) Service list: {"returnValue":true,"services":[{"name":"api","version":1},{"name":"audio","version":1},{"name":"config","version":1},{"name":"externalpq","version":1},{"name":"media.controls","version":1},{"name":"media.viewer","version":1},{"name":"pairing","version":1},{"name":"settings","version":1},{"name":"system","version":1},{"name":"system.launcher","version":1},{"name":"system.notifications","version":1},{"name":"timer","version":1},{"name":"tv","version":1},{"name":"user","version":1},{"name":"webapp","version":2}]} 2020-03-07 17:43:27.340 - debug: lgtv.0 (14084) renew connection in one minute for stable subscriptions... 2020-03-07 17:43:27.465 - debug: lgtv.0 (14084) getCurrentSWInformation: {"returnValue":true,"product_name":"webOSTV 4.0","model_name":"HE_DTV_W18H_AFADABAA","sw_type":"FIRMWARE","major_ver":"05","minor_ver":"10.40","country":"DE","country_group":"EU","device_id":"a8:23:fe:c4:2b:17","auth_flag":"N","ignore_disable":"N","eco_info":"01","config_key":"00","language_code":"de-DE"} 2020-03-07 17:43:28.253 - debug: lgtv.0 (14084) getSystemInfo: {"returnValue":true,"features":{"3d":false,"dvr":true},"receiverType":"dvb","modelName":"OLED55B8LLA","programMode":"true"} 2020-03-07 17:43:28.262 - debug: lgtv.0 (14084) audio/getSoundOutput: {"soundOutput":"tv_external_speaker","subscribed":true} 2020-03-07 17:43:28.301 - debug: lgtv.0 (14084) tv/getCurrentChannel: {"returnValue":false,"errorCode":-1000,"errorText":"internal error"}
-
@Seraphis Hmmm, das Problem ist, dass der TV nicht mehr erreichbar ist per LAN, wenn er aus ist. Meistens läuft der websocket auf einen timeout.
Also ich kann mir denken, wodran es liegt.
Alsonormalerweise sendet der TV die appID, wenn sisich ändert. Wenn der TV aus ist, ist die Leer.
Also es gibt manche TV's, die senden das aber erst wieder beim Anschalten, daher hatte ich da was reingebaut, dass er minütlich checkt.
Um das nicht bei jedem User einzustellen, habe ich da eine Auto Erkennung eingebaut, der das ganze bei jedem Adapterstart erstmal aktiviert und wenn er dann korrekt eine Ausmeldung bekommt, wieder deaktiviert. Dein TV scheint das zumindest nich t zu machen, aber am 6.3 um 22.04. hat er das einmal gemacht und ab da wurde das zusätzliche checken abgeschaltet.
Für mich wäre jetzt wichtig, ob im log nach 22.04 wirklich gar nichts mehr geloggt wurde. Könntest du da bitte nochmal genau gucken, damit ich mir ggf. eine andere Strategie überlegen kann? -
@dirkhe
Hab die logfiles eben durchsucht, keine Reaktion mehr vom Adapter nach 22:04:11 Uhr am 06.03. bis ich ihn dann am 07.03. um 17:33 Uhr neugestartet habe.Anderer Gedanke:
Das Gerät ist ein OLED-TV (LG OLED55B8LLA). Alle paar Betriebsstunden führen die OLED-TVs nach dem Ausschalten ein Programm zum refresh des Panels durch (Geisterbilder-Problematik bei OLED-Panels). Der TV ist dabei gefühlt noch "so halb" eingeschaltet, auch das Relais im TV hört man erst dann ausschalten, wenn dieser Vorgang nach ein paar Minuten abgeschlossen ist.
Werde heute abend mal darauf achten, ob er das durchführt und wie der Adapter beim Ausschalten reagiert -
@Seraphis ok, aber ich denke, dass hilft uns nicht, denn er meldet sich nicht von allenine, das macht er nur, wenn der websocket korrekt implementiert ist und die connection nicht abgebrochen wird.
ich hatte auch nochmal geschaut, aber im Moment fällt mir nichts ein.
Ich denke, ich werde dass dann mal in der config ein und ausschaltbar machen. -
So,ich habe hier https://github.com/dirkhe/ioBroker.lgtv eine neue Version, wo man das Polling einschalten kann. Da gibt es auch ein Hilfstext, der aber auf das original Repository verweist, wo der Text aber noch nicht steht. Bei mir steht de dann schon ,bzw. es geht um folgenden Text:
Polling
Some TVs disconnect from the web socket when the TV is turned off and do not report this to the adapter correctly. Then additional polling is required. You can define the time in settings. If the value is empty, the adapter tries to detect this automatically: On adapter restart the polling (every 60 sec) is active until the first correct TV off event is detected.@Seraphis Also du müsstest dann einfach mal 60000 ms Eintragen und schauen, ob dann alles gut ist
-
@dirkhe
Das unterschiedliche Verhalten beim Ausschalten scheint wirklich daher zu kommen, dass er sich nicht immer sofort komplett Ausschaltet. Gestern abend wieder das Refresh-Programm für ca. 5 Minuten nach Aus per Fernbedienung. Beim Betätigen der Taste auf der Fernbedienung hat dies der TV direkt dem Adapter gemeldet (leere appID) und der Status des TVs in iobroker hat sich direkt auf "Aus" geändert:2020-03-07 22:43:43.092 - [34mdebug[39m: lgtv.0 (14084) check TV connection: ok 2020-03-07 22:44:36.127 - [34mdebug[39m: lgtv.0 (14084) DEBUGGING getForegroundAppInfo: {"subscribed":true,"appId":"","returnValue":true,"windowId":"","processId":""} 2020-03-07 22:44:36.629 - [34mdebug[39m: lgtv.0 (14084) TV is off
Hier ein Log das eben mit der neuen Version des Adapters entstanden ist. In der Konfig habe ich die 60000 eingetragen.
Adapter start, TV noch aus: 2020-03-08 09:02:28.013 - debug: lgtv.0 (15427) Redis Objects: Use Redis connection: 127.0.0.1:9001 2020-03-08 09:02:28.046 - debug: lgtv.0 (15427) Objects client ready ... initialize now 2020-03-08 09:02:28.050 - debug: lgtv.0 (15427) Objects create System PubSub Client 2020-03-08 09:02:28.050 - debug: lgtv.0 (15427) Objects create User PubSub Client 2020-03-08 09:02:28.051 - debug: lgtv.0 (15427) Objects client initialize lua scripts 2020-03-08 09:02:28.065 - debug: lgtv.0 (15427) Objects connected to redis: 127.0.0.1:9001 2020-03-08 09:02:28.070 - debug: lgtv.0 (15427) objectDB connected 2020-03-08 09:02:28.072 - debug: lgtv.0 (15427) Redis States: Use Redis connection: 172.18.0.2:6379 2020-03-08 09:02:28.077 - debug: lgtv.0 (15427) States create User PubSub Client 2020-03-08 09:02:28.079 - debug: lgtv.0 (15427) States create System PubSub Client 2020-03-08 09:02:28.085 - debug: lgtv.0 (15427) States connected to redis: 172.18.0.2:6379 2020-03-08 09:02:28.086 - debug: lgtv.0 (15427) statesDB connected 2020-03-08 09:02:31.566 - info: lgtv.0 (15427) starting. Version 1.1.6-RC01 in /opt/iobroker/node_modules/iobroker.lgtv, node: v10.18.0 2020-03-08 09:02:31.586 - info: lgtv.0 (15427) Ready. Configured WebOS TV IP: 192.168.178.106 2020-03-08 09:02:31.587 - debug: lgtv.0 (15427) adapter.config = {"ip":"192.168.178.106","timeout":"15000","interval":"60000","mac":"","power":false,"healthIntervall":"60000"} 2020-03-08 09:02:31.617 - debug: lgtv.0 (15427) Connecting to WebOS TV: ws://192.168.178.106:3000 2020-03-08 09:02:34.634 - debug: lgtv.0 (15427) Error on connecting or sending command to WebOS TV: Error: connect EHOSTUNREACH 192.168.178.106:3000 2020-03-08 09:02:39.635 - debug: lgtv.0 (15427) Connecting to WebOS TV: ws://192.168.178.106:3000 2020-03-08 09:02:41.618 - debug: lgtv.0 (15427) TV is off 2020-03-08 09:02:47.644 - debug: lgtv.0 (15427) Connecting to WebOS TV: ws://192.168.178.106:3000 2020-03-08 09:02:49.635 - debug: lgtv.0 (15427) TV is off 2020-03-08 09:02:55.652 - debug: lgtv.0 (15427) Connecting to WebOS TV: ws://192.168.178.106:3000 2020-03-08 09:02:57.644 - debug: lgtv.0 (15427) TV is off 2020-03-08 09:03:03.660 - debug: lgtv.0 (15427) Connecting to WebOS TV: ws://192.168.178.106:3000 2020-03-08 09:03:05.652 - debug: lgtv.0 (15427) TV is off 2020-03-08 09:03:11.668 - debug: lgtv.0 (15427) Connecting to WebOS TV: ws://192.168.178.106:3000 2020-03-08 09:03:13.660 - debug: lgtv.0 (15427) TV is off 2020-03-08 09:03:19.677 - debug: lgtv.0 (15427) Connecting to WebOS TV: ws://192.168.178.106:3000 2020-03-08 09:03:21.668 - debug: lgtv.0 (15427) TV is off TV ein: 2020-03-08 09:03:27.684 - debug: lgtv.0 (15427) Connecting to WebOS TV: ws://192.168.178.106:3000 2020-03-08 09:03:29.677 - debug: lgtv.0 (15427) TV is off 2020-03-08 09:03:35.692 - debug: lgtv.0 (15427) Connecting to WebOS TV: ws://192.168.178.106:3000 2020-03-08 09:03:35.694 - debug: lgtv.0 (15427) Error on connecting or sending command to WebOS TV: Error: connect ECONNREFUSED 192.168.178.106:3000 2020-03-08 09:03:37.684 - debug: lgtv.0 (15427) TV is off 2020-03-08 09:03:40.694 - debug: lgtv.0 (15427) Connecting to WebOS TV: ws://192.168.178.106:3000 2020-03-08 09:03:45.692 - debug: lgtv.0 (15427) TV is off 2020-03-08 09:03:45.696 - debug: lgtv.0 (15427) Connecting to WebOS TV: ws://192.168.178.106:3000 2020-03-08 09:03:50.694 - debug: lgtv.0 (15427) TV is off 2020-03-08 09:03:50.698 - debug: lgtv.0 (15427) Connecting to WebOS TV: ws://192.168.178.106:3000 2020-03-08 09:03:55.696 - debug: lgtv.0 (15427) TV is off 2020-03-08 09:03:55.701 - debug: lgtv.0 (15427) Connecting to WebOS TV: ws://192.168.178.106:3000 2020-03-08 09:03:55.837 - debug: lgtv.0 (15427) WebOS TV Connected 2020-03-08 09:03:56.144 - debug: lgtv.0 (15427) DEBUGGING getForegroundAppInfo: {"appId":"com.webos.app.hdmi1","subscribed":true,"returnValue":true,"windowId":"","processId":""} 2020-03-08 09:03:56.144 - debug: lgtv.0 (15427) cur app is com.webos.app.hdmi1 2020-03-08 09:03:56.149 - debug: lgtv.0 (15427) audio/getVolume: {"returnValue":true,"volumeMax":100,"ringtonewithvibration":true,"scenario":"mastervolume_tv_speaker_ext","muted":false,"hac":false,"subscribed":true,"volume":3,"action":"requested","supportvolume":true,"ringer switch":true,"slider":false,"active":false,"changed":["muted","volume"]} 2020-03-08 09:03:56.154 - debug: lgtv.0 (15427) Service list: {"returnValue":true,"services":[{"name":"api","version":1},{"name":"audio","version":1},{"name":"config","version":1},{"name":"externalpq","version":1},{"name":"media.controls","version":1},{"name":"media.viewer","version":1},{"name":"pairing","version":1},{"name":"settings","version":1},{"name":"system","version":1},{"name":"system.launcher","version":1},{"name":"system.notifications","version":1},{"name":"timer","version":1},{"name":"tv","version":1},{"name":"user","version":1},{"name":"webapp","version":2}]} 2020-03-08 09:03:56.159 - debug: lgtv.0 (15427) renew connection in one minute for stable subscriptions... 2020-03-08 09:03:56.172 - debug: lgtv.0 (15427) getCurrentSWInformation: {"returnValue":true,"product_name":"webOSTV 4.0","model_name":"HE_DTV_W18H_AFADABAA","sw_type":"FIRMWARE","major_ver":"05","minor_ver":"10.40","country":"DE","country_group":"EU","device_id":"a8:23:fe:c4:2b:17","auth_flag":"N","ignore_disable":"N","eco_info":"01","config_key":"00","language_code":"de-DE"} 2020-03-08 09:03:56.819 - debug: lgtv.0 (15427) getSystemInfo: {"returnValue":true,"features":{"3d":false,"dvr":true},"receiverType":"dvb","modelName":"OLED55B8LLA","programMode":"true"} 2020-03-08 09:03:56.821 - debug: lgtv.0 (15427) audio/getSoundOutput: {"soundOutput":"tv_external_speaker","subscribed":true} 2020-03-08 09:03:56.868 - debug: lgtv.0 (15427) tv/getCurrentChannel: {"returnValue":false,"errorCode":-1000,"errorText":"internal error"} Nichts geändert 2020-03-08 09:04:56.180 - debug: lgtv.0 (15427) Connection closed: 1000 2020-03-08 09:04:56.661 - debug: lgtv.0 (15427) Connecting to WebOS TV: ws://192.168.178.106:3000 2020-03-08 09:04:56.736 - debug: lgtv.0 (15427) WebOS TV Connected 2020-03-08 09:04:56.920 - debug: lgtv.0 (15427) DEBUGGING getForegroundAppInfo: {"appId":"com.webos.app.hdmi1","subscribed":true,"returnValue":true,"windowId":"","processId":""} 2020-03-08 09:04:56.921 - debug: lgtv.0 (15427) cur app is com.webos.app.hdmi1 2020-03-08 09:04:56.922 - debug: lgtv.0 (15427) audio/getVolume: {"returnValue":true,"volumeMax":100,"ringtonewithvibration":true,"scenario":"mastervolume_tv_speaker_ext","muted":false,"hac":false,"subscribed":true,"volume":3,"action":"requested","supportvolume":true,"ringer switch":true,"slider":false,"active":false,"changed":["muted","volume"]} 2020-03-08 09:04:56.927 - debug: lgtv.0 (15427) Service list: {"returnValue":true,"services":[{"name":"api","version":1},{"name":"audio","version":1},{"name":"config","version":1},{"name":"externalpq","version":1},{"name":"media.controls","version":1},{"name":"media.viewer","version":1},{"name":"pairing","version":1},{"name":"settings","version":1},{"name":"system","version":1},{"name":"system.launcher","version":1},{"name":"system.notifications","version":1},{"name":"timer","version":1},{"name":"tv","version":1},{"name":"user","version":1},{"name":"webapp","version":2}]} 2020-03-08 09:04:56.930 - debug: lgtv.0 (15427) getCurrentSWInformation: {"returnValue":true,"product_name":"webOSTV 4.0","model_name":"HE_DTV_W18H_AFADABAA","sw_type":"FIRMWARE","major_ver":"05","minor_ver":"10.40","country":"DE","country_group":"EU","device_id":"a8:23:fe:c4:2b:17","auth_flag":"N","ignore_disable":"N","eco_info":"01","config_key":"00","language_code":"de-DE"} 2020-03-08 09:04:56.936 - debug: lgtv.0 (15427) getSystemInfo: {"returnValue":true,"features":{"3d":false,"dvr":true},"receiverType":"dvb","modelName":"OLED55B8LLA","programMode":"true"} 2020-03-08 09:04:56.941 - debug: lgtv.0 (15427) audio/getSoundOutput: {"soundOutput":"tv_external_speaker","subscribed":true} 2020-03-08 09:04:56.945 - debug: lgtv.0 (15427) tv/getCurrentChannel: {"returnValue":false,"errorCode":-1000,"errorText":"internal error"} 2020-03-08 09:05:56.214 - debug: lgtv.0 (15427) check TV connection: ok TV aus: 2020-03-08 09:07:11.161 - debug: lgtv.0 (15427) ERROR! Response from TV: Error: timeout 2020-03-08 09:07:11.162 - debug: lgtv.0 (15427) check TV connection: Error: timeout 2020-03-08 09:07:11.162 - debug: lgtv.0 (15427) TV is off Keine weiteren Einträge mehr im Log, Adapter bleibt grün. TV wieder ein: 2020-03-08 09:15:26.944 - debug: lgtv.0 (15427) system.adapter.admin.0: logging false 2020-03-08 09:15:30.522 - debug: lgtv.0 (15427) system.adapter.admin.0: logging true 2020-03-08 09:15:54.749 - debug: lgtv.0 (15427) Error on connecting or sending command to WebOS TV: Error: read ECONNRESET 2020-03-08 09:15:54.751 - debug: lgtv.0 (15427) Connection closed: 1006 2020-03-08 09:15:59.752 - debug: lgtv.0 (15427) Connecting to WebOS TV: ws://192.168.178.106:3000 2020-03-08 09:16:04.752 - debug: lgtv.0 (15427) TV is off 2020-03-08 09:16:04.755 - debug: lgtv.0 (15427) Connecting to WebOS TV: ws://192.168.178.106:3000 2020-03-08 09:16:09.753 - debug: lgtv.0 (15427) TV is off 2020-03-08 09:16:09.758 - debug: lgtv.0 (15427) Connecting to WebOS TV: ws://192.168.178.106:3000 2020-03-08 09:16:14.755 - debug: lgtv.0 (15427) TV is off 2020-03-08 09:16:14.761 - debug: lgtv.0 (15427) Connecting to WebOS TV: ws://192.168.178.106:3000 2020-03-08 09:16:14.884 - debug: lgtv.0 (15427) WebOS TV Connected 2020-03-08 09:16:15.288 - debug: lgtv.0 (15427) DEBUGGING getForegroundAppInfo: {"appId":"com.webos.app.hdmi1","subscribed":true,"returnValue":true,"windowId":"","processId":""} 2020-03-08 09:16:15.288 - debug: lgtv.0 (15427) cur app is com.webos.app.hdmi1 2020-03-08 09:16:15.293 - debug: lgtv.0 (15427) audio/getVolume: {"returnValue":true,"volumeMax":100,"ringtonewithvibration":true,"scenario":"mastervolume_tv_speaker_ext","muted":false,"hac":false,"subscribed":true,"volume":3,"action":"requested","supportvolume":true,"ringer switch":true,"slider":false,"active":false,"changed":["muted","volume"]} 2020-03-08 09:16:15.299 - debug: lgtv.0 (15427) Service list: {"returnValue":true,"services":[{"name":"api","version":1},{"name":"audio","version":1},{"name":"config","version":1},{"name":"externalpq","version":1},{"name":"media.controls","version":1},{"name":"media.viewer","version":1},{"name":"pairing","version":1},{"name":"settings","version":1},{"name":"system","version":1},{"name":"system.launcher","version":1},{"name":"system.notifications","version":1},{"name":"timer","version":1},{"name":"tv","version":1},{"name":"user","version":1},{"name":"webapp","version":2}]} 2020-03-08 09:16:15.305 - debug: lgtv.0 (15427) getCurrentSWInformation: {"returnValue":true,"product_name":"webOSTV 4.0","model_name":"HE_DTV_W18H_AFADABAA","sw_type":"FIRMWARE","major_ver":"05","minor_ver":"10.40","country":"DE","country_group":"EU","device_id":"a8:23:fe:c4:2b:17","auth_flag":"N","ignore_disable":"N","eco_info":"01","config_key":"00","language_code":"de-DE"} 2020-03-08 09:16:15.306 - debug: lgtv.0 (15427) renew connection in one minute for stable subscriptions... 2020-03-08 09:16:15.936 - debug: lgtv.0 (15427) getSystemInfo: {"returnValue":true,"features":{"3d":false,"dvr":true},"receiverType":"dvb","modelName":"OLED55B8LLA","programMode":"true"} 2020-03-08 09:16:15.943 - debug: lgtv.0 (15427) audio/getSoundOutput: {"soundOutput":"tv_external_speaker","subscribed":true} 2020-03-08 09:16:15.982 - debug: lgtv.0 (15427) tv/getCurrentChannel: {"returnValue":false,"errorCode":-1000,"errorText":"internal error"} Wie bei 09:03:56 auch nach einer Minute connection closed? 2020-03-08 09:17:15.325 - debug: lgtv.0 (15427) Connection closed: 1000 2020-03-08 09:17:15.809 - debug: lgtv.0 (15427) Connecting to WebOS TV: ws://192.168.178.106:3000 2020-03-08 09:17:15.875 - debug: lgtv.0 (15427) WebOS TV Connected 2020-03-08 09:17:16.065 - debug: lgtv.0 (15427) DEBUGGING getForegroundAppInfo: {"appId":"com.webos.app.hdmi1","subscribed":true,"returnValue":true,"windowId":"","processId":""} 2020-03-08 09:17:16.066 - debug: lgtv.0 (15427) cur app is com.webos.app.hdmi1 2020-03-08 09:17:16.067 - debug: lgtv.0 (15427) audio/getVolume: {"returnValue":true,"volumeMax":100,"ringtonewithvibration":true,"scenario":"mastervolume_tv_speaker_ext","muted":false,"hac":false,"subscribed":true,"volume":3,"action":"requested","supportvolume":true,"ringer switch":true,"slider":false,"active":false,"changed":["muted","volume"]} 2020-03-08 09:17:16.067 - debug: lgtv.0 (15427) Service list: {"returnValue":true,"services":[{"name":"api","version":1},{"name":"audio","version":1},{"name":"config","version":1},{"name":"externalpq","version":1},{"name":"media.controls","version":1},{"name":"media.viewer","version":1},{"name":"pairing","version":1},{"name":"settings","version":1},{"name":"system","version":1},{"name":"system.launcher","version":1},{"name":"system.notifications","version":1},{"name":"timer","version":1},{"name":"tv","version":1},{"name":"user","version":1},{"name":"webapp","version":2}]} 2020-03-08 09:17:16.069 - debug: lgtv.0 (15427) getCurrentSWInformation: {"returnValue":true,"product_name":"webOSTV 4.0","model_name":"HE_DTV_W18H_AFADABAA","sw_type":"FIRMWARE","major_ver":"05","minor_ver":"10.40","country":"DE","country_group":"EU","device_id":"a8:23:fe:c4:2b:17","auth_flag":"N","ignore_disable":"N","eco_info":"01","config_key":"00","language_code":"de-DE"} 2020-03-08 09:17:16.073 - debug: lgtv.0 (15427) audio/getSoundOutput: {"soundOutput":"tv_external_speaker","subscribed":true} 2020-03-08 09:17:16.074 - debug: lgtv.0 (15427) getSystemInfo: {"returnValue":true,"features":{"3d":false,"dvr":true},"receiverType":"dvb","modelName":"OLED55B8LLA","programMode":"true"} 2020-03-08 09:17:16.077 - debug: lgtv.0 (15427) tv/getCurrentChannel: {"returnValue":false,"errorCode":-1000,"errorText":"internal error"} 2020-03-08 09:17:27.662 - info: javascript.0 (20600) script.js.VirtualDevices.BWM: function BWM_Praesenz - Bewegung Ende - Licht aktuell ein, starte Ausschaltverzoegerung fuer Praesenz. BWM: javascript.0.virtualDevice.BWM.Wohnzimmer.Couch TV aus: 2020-03-08 09:18:30.310 - debug: lgtv.0 (15427) ERROR! Response from TV: Error: timeout 2020-03-08 09:18:30.310 - debug: lgtv.0 (15427) check TV connection: Error: timeout 2020-03-08 09:18:30.310 - debug: lgtv.0 (15427) TV is off
Das zwischendurch Ausschalten war dabei immer die "direkt aus"-Variante. Wie er sich jetzt nach längerem Betrieb verhält und ob er dann am nächsten Tag noch reagiert werde ich morgen Abend sagen können.
-
BIsschen komisch ist das schon, allerdings das mit der 1 Minute neuconnecten is so gewollt, dasssollte man auch immer abwarten beim Testen. Hintergrund:
Ich habe die Erfahrung gemacht, dass der Websocket im Hintergrund sauber connected bleibt bei meinem TV, wenn er aus ist und so sollte es auch sein. Wenn der TV sich dann einschaltet, meldet er sich beim Adapter wieder und alles ist gut. Ich hatte es aber schon geschaftt, dass er nicht mehr alle Abos (oder wie übersetzt man subscription...) sauber hat, sprich beim Umschalten hat er sich nicht mehr gemeldet. Um das zu umgehen, kappe ich beim anschalten des TV's die connection, baue sie neu auf und mache alle Abos neu. Dient einfach der Stabilität, normalerweise bekommt man davon nichts mit. Ich gebe das auch im log ausrenew connection in one minute for stable subscriptions...
Dein TV lässt die connection halt nicht bestehen, wenn er aus ist und darum bekommt der Adapter es nicht mit, wenn der TV aus ist. Daher ist das pollen notwendig, sprich solange der TV an ist, gibt er immer eine Antwort, sobald das vorbei ist, kappe ich die Verbindung und der Adapter versucht sich die ganze Zeit neu zu verbinden, bis du den TV wieder an machst.
-
@dirkhe
Das mit dem polling alle 60s scheint noch nicht so richtig zu funktionieren. Beim Start des Adapters wird weiter alle 8s gecheckt, ob der TV verfügbar ist und nach dem Ausschalten des TVs hat sich auch nichts am Verhalten geändert.Die Einstellungen hab ich nochmal gecheckt, beim Start der Adapters wird der neue Parameter bei geänderten Werten ausgegeben (hab zwischenzeitlich testweie auch mal noch die MAC-Adresse eingetragen):
adapter.config = {"ip":"192.168.178.106","timeout":"15000","interval":"60000","mac":"A8:23:FE:C4:2B:17","power":false,"healthIntervall":"60000"}Hier das Log vom letzten Ausschaltevorgang:
2020-03-08 20:30:49.121 - [34mdebug[39m: lgtv.0 (15689) DEBUGGING getForegroundAppInfo: {"subscribed":true,"appId":"amazon","returnValue":true,"windowId":"","processId":""} 2020-03-08 20:30:49.121 - [34mdebug[39m: lgtv.0 (15689) cur app is amazon 2020-03-08 20:31:44.256 - [34mdebug[39m: lgtv.0 (15689) check TV connection: ok ... 2020-03-08 21:58:44.289 - [34mdebug[39m: lgtv.0 (15689) check TV connection: ok 2020-03-08 21:59:44.290 - [34mdebug[39m: lgtv.0 (15689) check TV connection: ok Amazon-App beendet, Adapter meldet TV-Status "Aus": 2020-03-08 22:00:03.116 - [34mdebug[39m: lgtv.0 (15689) DEBUGGING getForegroundAppInfo: {"subscribed":true,"appId":"","returnValue":true,"windowId":"","processId":""} 2020-03-08 22:00:03.617 - [34mdebug[39m: lgtv.0 (15689) TV is off 2020-03-08 22:00:04.159 - [34mdebug[39m: lgtv.0 (15689) DEBUGGING getForegroundAppInfo: {"subscribed":true,"appId":"com.webos.app.hdmi1","returnValue":true,"windowId":"","processId":""} 2020-03-08 22:00:04.160 - [34mdebug[39m: lgtv.0 (15689) cur app is com.webos.app.hdmi1 2020-03-08 22:00:04.165 - [34mdebug[39m: lgtv.0 (15689) renew connection in one minute for stable subscriptions... TV jetzt wirklich Aus: 2020-03-08 22:00:07.493 - [34mdebug[39m: lgtv.0 (15689) DEBUGGING getForegroundAppInfo: {"subscribed":true,"appId":"","returnValue":true,"windowId":"","processId":""} 2020-03-08 22:00:07.994 - [34mdebug[39m: lgtv.0 (15689) TV is off Keine weiteren Einträge / keine Reaktion auf Start des TVs am nächsten Tag
Jetzt nicht direkt das aktuelle Problem betreffend, aber beim Schließen der Amazon-App um 22:00:03 wird kurzzeitig eine leere appId gemeldet, wodurch der Adapter davon ausgeht, dass das Gerät jetzt aus ist. Vielleicht könnte man das noch mit einer Verzögerung von 2-3s, bis der State in iobroker tatsächlich auf false gesetzt wird, verbessern.
Hilft zwar wohl nicht, aber auf jeden Fall ist es bei Ausschalten nach kurzem Betrieb immer so, dass der Timeout-Error auftritt, wenn eben das nächste mal in dem 60s-Intervall die Verbindung geprüft wird. Bei Ausschalten (bzw. erstmal wechsel in diesen panel-refresh-Modus) nach längerem Betrieb erfolgt dagegen die Meldung der leeren appID durch den TV.
-
@Seraphis Lade bitte nochmal neu runter und probiere es aus. Ich habe jetzt die Zeit, wenn aus gemeldet und ich den Adapter aus setzt von 500ms auf 1,5 sec erhöht.
Desweiteren lasse ich den healtcheck beim Ausschalten weiterlaufen, bis er die connection verliert.
Sorry, dass du jetzt immer Testen mußt, aber ich kann das bei mir nicht nachstellen -
@dirkhe Klappt bei mir jetzt beides einwandfrei. Vielen Dank fürs anpassen
Wechsel/Schließen der App:
2020-03-10 21:44:12.390 - [34mdebug[39m: lgtv.0 (20145) check TV connection: ok 2020-03-10 21:44:25.534 - [34mdebug[39m: lgtv.0 (20145) DEBUGGING getForegroundAppInfo: {"subscribed":true,"appId":"com.webos.app.hdmi1","returnValue":true,"windowId":"","processId":""} 2020-03-10 21:44:25.535 - [34mdebug[39m: lgtv.0 (20145) cur app is com.webos.app.hdmi1 2020-03-10 21:44:35.654 - [34mdebug[39m: lgtv.0 (20145) DEBUGGING getForegroundAppInfo: {"subscribed":true,"appId":"amazon","returnValue":true,"windowId":"","processId":""} 2020-03-10 21:44:35.654 - [34mdebug[39m: lgtv.0 (20145) cur app is amazon 2020-03-10 21:44:50.922 - [34mdebug[39m: lgtv.0 (20145) DEBUGGING getForegroundAppInfo: {"subscribed":true,"appId":"","returnValue":true,"windowId":"","processId":""} 2020-03-10 21:44:51.958 - [34mdebug[39m: lgtv.0 (20145) DEBUGGING getForegroundAppInfo: {"subscribed":true,"appId":"com.webos.app.hdmi1","returnValue":true,"windowId":"","processId":""} 2020-03-10 21:44:51.958 - [34mdebug[39m: lgtv.0 (20145) cur app is com.webos.app.hdmi1 2020-03-10 21:45:12.368 - [34mdebug[39m: lgtv.0 (20145) check TV connection: ok
Verhalten beim Ausschalten des TVs:
2020-03-12 18:38:47.101 - [34mdebug[39m: lgtv.0 (20145) check TV connection: ok 2020-03-12 18:39:47.093 - [34mdebug[39m: lgtv.0 (20145) check TV connection: ok 2020-03-12 18:41:02.051 - [34mdebug[39m: lgtv.0 (20145) ERROR! Response from TV: Error: timeout 2020-03-12 18:41:02.052 - [34mdebug[39m: lgtv.0 (20145) check TV connection: Error: timeout 2020-03-12 18:41:02.052 - [34mdebug[39m: lgtv.0 (20145) TV is off 2020-03-12 18:42:02.051 - [34mdebug[39m: lgtv.0 (20145) ERROR! Response from TV: Error: timeout 2020-03-12 18:42:02.052 - [34mdebug[39m: lgtv.0 (20145) check TV connection: Error: timeout 2020-03-12 18:42:02.052 - [34mdebug[39m: lgtv.0 (20145) TV is off ... 2020-03-12 18:53:02.056 - [34mdebug[39m: lgtv.0 (20145) ERROR! Response from TV: Error: timeout 2020-03-12 18:53:02.056 - [34mdebug[39m: lgtv.0 (20145) check TV connection: Error: timeout 2020-03-12 18:53:02.056 - [34mdebug[39m: lgtv.0 (20145) TV is off 2020-03-12 18:56:02.057 - [34mdebug[39m: lgtv.0 (20145) ERROR! Response from TV: Error: timeout 2020-03-12 18:56:02.058 - [34mdebug[39m: lgtv.0 (20145) check TV connection: Error: timeout 2020-03-12 18:56:02.058 - [34mdebug[39m: lgtv.0 (20145) TV is off 2020-03-12 18:56:14.428 - [34mdebug[39m: lgtv.0 (20145) Error on connecting or sending command to WebOS TV: Error: read EHOSTUNREACH 2020-03-12 18:56:14.428 - [34mdebug[39m: lgtv.0 (20145) Connection closed: 1006 2020-03-12 18:56:19.428 - [34mdebug[39m: lgtv.0 (20145) Connecting to WebOS TV: ws://192.168.178.106:3000 2020-03-12 18:56:22.434 - [34mdebug[39m: lgtv.0 (20145) Error on connecting or sending command to WebOS TV: Error: connect EHOSTUNREACH 192.168.178.106:3000 2020-03-12 18:56:24.428 - [34mdebug[39m: lgtv.0 (20145) TV is off 2020-03-12 18:56:27.434 - [34mdebug[39m: lgtv.0 (20145) Connecting to WebOS TV: ws://192.168.178.106:3000 2020-03-12 18:56:29.428 - [34mdebug[39m: lgtv.0 (20145) TV is off 2020-03-12 18:56:35.441 - [34mdebug[39m: lgtv.0 (20145) Connecting to WebOS TV: ws://192.168.178.106:3000 2020-03-12 18:56:37.436 - [34mdebug[39m: lgtv.0 (20145) TV is off
Zwischen dem ersten timeout-error und dem host unreachable lagen auch gestern ca. 15 Minuten.
Macht es eigentlich Sinn die Parameter für timeout und den neuen für das Abfrageintervall in der Adapter-konfig noch in irgend einer Form anzupassen? Verwende momentan die Standard-Werte 15.000 bzw. 60.000ms
-
@Seraphis das freut mich, dann werde ich das mal zusammenpacken und ein Problem stellen.
Die Zeiten muss jeder für sich selber wissen. Das hängt halt damit zusammen, was du für Aktionen hinter tv an/aus hast und wie schnell die reagieren sollen -
Bekomme nur die V 1.1.5 via Git?
-
Aktuell nur über meinen Account https://github.com/dirkhe/ioBroker.lgtv
Muss erst ein Pull request stellen -
@dirkhe sagte in lgtv Adapter zur Steuerung von LG WebOS SmartTVs:
Aktuell nur über meinen Account https://github.com/dirkhe/ioBroker.lgtv
Muss erst ein Pull request stellen$ ./iobroker url "https://github.com/dirkhe/ioBroker.lgtv.git" install https://github.com/dirkhe/ioBroker.lgtv/tarball/044ccbd852bd5ea5280c59a17eb20fe3c75ccce7 NPM version: 6.9.0 npm install https://github.com/dirkhe/ioBroker.lgtv/tarball/044ccbd852bd5ea5280c59a17eb20fe3c75ccce7 --loglevel error (System call) gyp ERR! build error gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1gyp ERR! stack at ChildProcess.onExit (C:\Program Files\iobroker\Test\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)gyp ERR! stack at ChildProcess.emit (events.js:198:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12) gyp ERR! System Windows_NT 10.0.18363 gyp ERR! command "C:\\Program Files\\iobroker\\Test\\nodejs\\node.exe" "C:\\Program Files\\iobroker\\Test\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"gyp ERR! cwd C:\Program Files\iobroker\Test\node_modules\authenticate-pamgyp ERR! node -v v10.16.3gyp ERR! node-gyp -v v3.8.0gyp ERR! not ok gyp ERR! build error gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1gyp ERR! stack at ChildProcess.onExit (C:\Program Files\iobroker\Test\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23) gyp ERR! stack at ChildProcess.emit (events.js:198:13)gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12) gyp ERR! System Windows_NT 10.0.18363gyp ERR! command "C:\\Program Files\\iobroker\\Test\\nodejs\\node.exe" "C:\\Program Files\\iobroker\\Test\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"gyp ERR! cwd C:\Program Files\iobroker\Test\node_modules\bufferutilgyp ERR! node -v v10.16.3 gyp ERR! node-gyp -v v3.8.0gyp ERR! not ok gyp ERR! build error gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Program Files\iobroker\Test\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23) gyp ERR! stack at ChildProcess.emit (events.js:198:13)gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12) gyp ERR! System Windows_NT 10.0.18363gyp ERR! command "C:\\Program Files\\iobroker\\Test\\nodejs\\node.exe" "C:\\Program Files\\iobroker\\Test\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"gyp ERR! cwd C:\Program Files\iobroker\Test\node_modules\unix-dgram gyp ERR! node -v v10.16.3gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok gyp ERR! build error gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1gyp ERR! stack at ChildProcess.onExit (C:\Program Files\iobroker\Test\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23) gyp ERR! stack at ChildProcess.emit (events.js:198:13)gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)gyp ERR! System Windows_NT 10.0.18363gyp ERR! command "C:\\Program Files\\iobroker\\Test\\nodejs\\node.exe" "C:\\Program Files\\iobroker\\Test\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" gyp ERR! cwd C:\Program Files\iobroker\Test\node_modules\utf-8-validategyp ERR! node -v v10.16.3 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok upload [3] lgtv.admin C:/Program Files/iobroker/Test/node_modules/iobroker.lgtv/admin/words.js words.js application/javascript upload [2] lgtv.admin C:/Program Files/iobroker/Test/node_modules/iobroker.lgtv/admin/lgtv.png lgtv.png image/png upload [1] lgtv.admin C:/Program Files/iobroker/Test/node_modules/iobroker.lgtv/admin/index_m.html index_m.html text/html upload [0] lgtv.admin C:/Program Files/iobroker/Test/node_modules/iobroker.lgtv/admin/index.html index.html text/html process exited with code 0