Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Entwicklung
    4. lgtv Adapter zur Steuerung von LG WebOS SmartTVs

    NEWS

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    lgtv Adapter zur Steuerung von LG WebOS SmartTVs

    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      dirkhe Developer @Seraphis last edited by

      @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.

      1 Reply Last reply Reply Quote 0
      • D
        dirkhe Developer last edited by

        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

        S 1 Reply Last reply Reply Quote 0
        • S
          Seraphis @dirkhe last edited by

          @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  - debug: lgtv.0 (14084) check TV connection: ok
          2020-03-07 22:44:36.127  - debug: lgtv.0 (14084) DEBUGGING getForegroundAppInfo: {"subscribed":true,"appId":"","returnValue":true,"windowId":"","processId":""}
          2020-03-07 22:44:36.629  - debug: 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.

          1 Reply Last reply Reply Quote 0
          • D
            dirkhe Developer last edited by

            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 aus

            renew 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.

            S 1 Reply Last reply Reply Quote 0
            • S
              Seraphis @dirkhe last edited by

              @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  - debug: lgtv.0 (15689) DEBUGGING getForegroundAppInfo: {"subscribed":true,"appId":"amazon","returnValue":true,"windowId":"","processId":""}
              2020-03-08 20:30:49.121  - debug: lgtv.0 (15689) cur app is amazon
              2020-03-08 20:31:44.256  - debug: lgtv.0 (15689) check TV connection: ok
              ...
              2020-03-08 21:58:44.289  - debug: lgtv.0 (15689) check TV connection: ok
              2020-03-08 21:59:44.290  - debug: lgtv.0 (15689) check TV connection: ok
              
              Amazon-App beendet, Adapter meldet TV-Status "Aus":
              2020-03-08 22:00:03.116  - debug: lgtv.0 (15689) DEBUGGING getForegroundAppInfo: {"subscribed":true,"appId":"","returnValue":true,"windowId":"","processId":""}
              2020-03-08 22:00:03.617  - debug: lgtv.0 (15689) TV is off
              2020-03-08 22:00:04.159  - debug: lgtv.0 (15689) DEBUGGING getForegroundAppInfo: {"subscribed":true,"appId":"com.webos.app.hdmi1","returnValue":true,"windowId":"","processId":""}
              2020-03-08 22:00:04.160  - debug: lgtv.0 (15689) cur app is com.webos.app.hdmi1
              2020-03-08 22:00:04.165  - debug: lgtv.0 (15689) renew connection in one minute for stable subscriptions...
              
              TV jetzt wirklich Aus:
              2020-03-08 22:00:07.493  - debug: lgtv.0 (15689) DEBUGGING getForegroundAppInfo: {"subscribed":true,"appId":"","returnValue":true,"windowId":"","processId":""}
              2020-03-08 22:00:07.994  - debug: 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.

              D 1 Reply Last reply Reply Quote 0
              • D
                dirkhe Developer @Seraphis last edited by

                @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

                S 1 Reply Last reply Reply Quote 0
                • S
                  Seraphis @dirkhe last edited by

                  @dirkhe Klappt bei mir jetzt beides einwandfrei. Vielen Dank fürs anpassen 🙂

                  Wechsel/Schließen der App:

                  2020-03-10 21:44:12.390  - debug: lgtv.0 (20145) check TV connection: ok
                  2020-03-10 21:44:25.534  - debug: lgtv.0 (20145) DEBUGGING getForegroundAppInfo: {"subscribed":true,"appId":"com.webos.app.hdmi1","returnValue":true,"windowId":"","processId":""}
                  2020-03-10 21:44:25.535  - debug: lgtv.0 (20145) cur app is com.webos.app.hdmi1
                  2020-03-10 21:44:35.654  - debug: lgtv.0 (20145) DEBUGGING getForegroundAppInfo: {"subscribed":true,"appId":"amazon","returnValue":true,"windowId":"","processId":""}
                  2020-03-10 21:44:35.654  - debug: lgtv.0 (20145) cur app is amazon
                  2020-03-10 21:44:50.922  - debug: lgtv.0 (20145) DEBUGGING getForegroundAppInfo: {"subscribed":true,"appId":"","returnValue":true,"windowId":"","processId":""}
                  2020-03-10 21:44:51.958  - debug: lgtv.0 (20145) DEBUGGING getForegroundAppInfo: {"subscribed":true,"appId":"com.webos.app.hdmi1","returnValue":true,"windowId":"","processId":""}
                  2020-03-10 21:44:51.958  - debug: lgtv.0 (20145) cur app is com.webos.app.hdmi1
                  2020-03-10 21:45:12.368  - debug: lgtv.0 (20145) check TV connection: ok
                  

                  Verhalten beim Ausschalten des TVs:

                  2020-03-12 18:38:47.101  - debug: lgtv.0 (20145) check TV connection: ok
                  2020-03-12 18:39:47.093  - debug: lgtv.0 (20145) check TV connection: ok
                  2020-03-12 18:41:02.051  - debug: lgtv.0 (20145) ERROR! Response from TV: Error: timeout
                  2020-03-12 18:41:02.052  - debug: lgtv.0 (20145) check TV connection: Error: timeout
                  2020-03-12 18:41:02.052  - debug: lgtv.0 (20145) TV is off
                  2020-03-12 18:42:02.051  - debug: lgtv.0 (20145) ERROR! Response from TV: Error: timeout
                  2020-03-12 18:42:02.052  - debug: lgtv.0 (20145) check TV connection: Error: timeout
                  2020-03-12 18:42:02.052  - debug: lgtv.0 (20145) TV is off
                  ...
                  2020-03-12 18:53:02.056  - debug: lgtv.0 (20145) ERROR! Response from TV: Error: timeout
                  2020-03-12 18:53:02.056  - debug: lgtv.0 (20145) check TV connection: Error: timeout
                  2020-03-12 18:53:02.056  - debug: lgtv.0 (20145) TV is off
                  2020-03-12 18:56:02.057  - debug: lgtv.0 (20145) ERROR! Response from TV: Error: timeout
                  2020-03-12 18:56:02.058  - debug: lgtv.0 (20145) check TV connection: Error: timeout
                  2020-03-12 18:56:02.058  - debug: lgtv.0 (20145) TV is off
                  2020-03-12 18:56:14.428  - debug: lgtv.0 (20145) Error on connecting or sending command to WebOS TV: Error: read EHOSTUNREACH
                  2020-03-12 18:56:14.428  - debug: lgtv.0 (20145) Connection closed: 1006
                  2020-03-12 18:56:19.428  - debug: lgtv.0 (20145) Connecting to WebOS TV: ws://192.168.178.106:3000
                  2020-03-12 18:56:22.434  - debug: 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  - debug: lgtv.0 (20145) TV is off
                  2020-03-12 18:56:27.434  - debug: lgtv.0 (20145) Connecting to WebOS TV: ws://192.168.178.106:3000
                  2020-03-12 18:56:29.428  - debug: lgtv.0 (20145) TV is off
                  2020-03-12 18:56:35.441  - debug: lgtv.0 (20145) Connecting to WebOS TV: ws://192.168.178.106:3000
                  2020-03-12 18:56:37.436  - debug: 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

                  D 1 Reply Last reply Reply Quote 0
                  • D
                    dirkhe Developer @Seraphis last edited by

                    @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

                    sigi234 S 2 Replies Last reply Reply Quote 0
                    • sigi234
                      sigi234 Forum Testing Most Active @dirkhe last edited by

                      @dirkhe

                      Bekomme nur die V 1.1.5 via Git?

                      1 Reply Last reply Reply Quote 0
                      • D
                        dirkhe Developer last edited by

                        Aktuell nur über meinen Account https://github.com/dirkhe/ioBroker.lgtv
                        Muss erst ein Pull request stellen

                        sigi234 1 Reply Last reply Reply Quote 0
                        • sigi234
                          sigi234 Forum Testing Most Active @dirkhe last edited by

                          @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
                          
                          1 Reply Last reply Reply Quote 0
                          • D
                            dirkhe Developer last edited by

                            Ich weiss nicht, ob das was mit dem adapter zu tun hat, vlt kannst du mal den originalen nochmal installieren, ob das klappt. Wenn du den adapter aber mal startest, was steht denn dann im Log als Version?

                            sigi234 1 Reply Last reply Reply Quote 0
                            • sigi234
                              sigi234 Forum Testing Most Active @dirkhe last edited by sigi234

                              @dirkhe sagte in lgtv Adapter zur Steuerung von LG WebOS SmartTVs:

                              was steht denn dann im Log als Version?

                              Interessant:

                              lgtv.0	2020-03-12 21:18:40.973	info	(13820) Ready. Configured WebOS TV IP: 192.168.178.41
                              lgtv.0	2020-03-12 21:18:40.956	info	(13820) starting. Version 1.1.6-RC01 in C:/Program Files/iobroker/Test/node_modules/iobroker.lgtv, node: v10.16.3
                              host.Medion(Test)	2020-03-12 21:18:39.150	info	instance system.adapter.lgtv.0 started with pid 13820
                              

                              Screenshot (2013).png

                              1 Reply Last reply Reply Quote 0
                              • D
                                dirkhe Developer last edited by

                                Dann hast du die richtige Version, was da in der Info steht ist bei Entwicklung unwichtig.

                                1 Reply Last reply Reply Quote 0
                                • S
                                  Seraphis @dirkhe last edited by

                                  @dirkhe Wäre es nicht gut, dann auch noch das Intervall, in dem versucht wird die Verbindung zum TV herzustellen, anpassbar zu machen? Das liegt aktuell ja bei 8s:

                                  lgtv.0	2020-03-14 08:24:35.344	debug	(27131) Connecting to WebOS TV: ws://192.168.178.106:3000
                                  lgtv.0	2020-03-14 08:24:37.337	debug	(27131) TV is off
                                  lgtv.0	2020-03-14 08:24:43.353	debug	(27131) Connecting to WebOS TV: ws://192.168.178.106:3000
                                  lgtv.0	2020-03-14 08:24:45.345	debug	(27131) TV is off
                                  
                                  1 Reply Last reply Reply Quote 0
                                  • D
                                    dirkhe Developer last edited by

                                    @SchuetzeSchulz die reconnect time ist aktuell hart auf 5 sec eingestellt. Das ist auch die Default Zeit von hobyquackers lib. Macht es Sinn die einstellbar zu machen, hattet ihr da in der Vergangenheit mal getestet?

                                    S 1 Reply Last reply Reply Quote 0
                                    • S
                                      SchuetzeSchulz @dirkhe last edited by

                                      @dirkhe sagte in lgtv Adapter zur Steuerung von LG WebOS SmartTVs:

                                      @SchuetzeSchulz die reconnect time ist aktuell hart auf 5 sec eingestellt. Das ist auch die Default Zeit von hobyquackers lib. Macht es Sinn die einstellbar zu machen, hattet ihr da in der Vergangenheit mal getestet?

                                      Hatten wir nicht getestet. Mir ist nur damals aufgefallen alles unter 5 Sekunden führt zu Problemen.

                                      1 Reply Last reply Reply Quote 0
                                      • D
                                        dirkhe Developer last edited by

                                        OK, ich habe die reconnect time jetzt mal konfigurierbar gemacht. https://github.com/dirkhe/ioBroker.lgtv

                                        Könnt ihr ja mal testen. Wenn das soweit passt, würde ich einen Merge Request stellen

                                        1 Reply Last reply Reply Quote 0
                                        • F
                                          FloW da FunK @rh1212 last edited by FloW da FunK

                                          @rh1212

                                          Hallo rh1212 und Community!
                                          Ich bin ein kompletter Neuling was ioBroker betrifft und habe es mittels der Anleitung von rh1212 soweit geschafft, dass ich über die "launch app" des LG TV Adapter, unter Erstellung der Objekte und Verwendung von Blockly, gewisse "Apps" auf meinem LG TV zum starten bringe. Wenn ich bei den erstellten Objekten in ioBroker den Button dahinter anklicke, startet auch auf meinem TV jede App die ich anklicke. In Blockly habe ich im Baustein TEXT immer den Wert eingetragen, welchen mir das Objekt Launch App als Wert angezeigt hat (z.B. für HDMI-1 -> com.webos.app.hdmi1) eingetragen.

                                          Ich binde dann diese Objekte in dem iot.0 Adapter unter "Alexa-Geräte" ein. Jedoch sagt mir der Adapter, dass er manche Objekte nicht einbinden möchte (siehe Screenshot). Warum macht der Adapter das??? Gibt es da vielleicht eine andere Lösung?

                                          Auch im Log kann ich keine Fehlermeldung finden.
                                          Danke im Voraus für eure Hilfe 😉

                                          EDIT: Ich versuche die ganzen Befehle natürlich mittels Echo-dot umzusetzen.

                                          Logfile.jpg lgtv.0_Adapter.jpg Einbindung_iot_cloud.jpg Blockly.jpg

                                          1 Reply Last reply Reply Quote 0
                                          • D
                                            dirkhe Developer last edited by

                                            Hast du den smartname korrekt gesetzt? Passt Role und Type ?

                                            F 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            372
                                            Online

                                            31.7k
                                            Users

                                            79.8k
                                            Topics

                                            1.3m
                                            Posts

                                            lgtv
                                            113
                                            861
                                            272374
                                            Loading More Posts
                                            • Oldest to Newest
                                            • Newest to Oldest
                                            • Most Votes
                                            Reply
                                            • Reply as topic
                                            Log in to reply
                                            Community
                                            Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                                            The ioBroker Community 2014-2023
                                            logo