NEWS
UNSOLVED Osram Lightyfy Adapter Problem
-
Hallo zusammen,
bin gerade auf den Thread gestoßen, denn ich habe auch Probleme mit dem Lightify Adapter und Node 10.
Beide Workarounds funktionieren leider nicht.
Gibt es hier noch weitere Lösungsansätze? -
Nur den allgemeinen:
Fehlermeldung posten, schauen was die Ursache ist, abstellen (lassen)
A.
-
OK, hatte immer folgendes Problem:
host.rock64 2019-08-28 22:04:52.979 error instance system.adapter.lightify.0 terminated with code 0 (OK) host.rock64 2019-08-28 22:04:52.979 error Caught by controller[0]: at Socket.Readable.push (_stream_readable.js:224:10) host.rock64 2019-08-28 22:04:52.979 error Caught by controller[0]: at readableAddChunk (_stream_readable.js:269:11) host.rock64 2019-08-28 22:04:52.979 error Caught by controller[0]: at addChunk (_stream_readable.js:288:12) host.rock64 2019-08-28 22:04:52.978 error Caught by controller[0]: at Socket.emit (events.js:198:13) host.rock64 2019-08-28 22:04:52.978 error Caught by controller[0]: at Socket.<anonymous> (/opt/iobroker/node_modules/iobroker.lightify/lib/lightify.js:151:18) host.rock64 2019-08-28 22:04:52.978 error Caught by controller[0]: at lightify.onData (/opt/iobroker/node_modules/iobroker.lightify/lib/lightify.js:173:18) host.rock64 2019-08-28 22:04:52.978 error Caught by controller[0]: at lightify.processData (/opt/iobroker/node_modules/iobroker.lightify/lib/lightify.js:116:32) host.rock64 2019-08-28 22:04:52.978 error Caught by controller[0]: at Object.cb (/opt/iobroker/node_modules/iobroker.lightify/lib/lightify.js:463:28) host.rock64 2019-08-28 22:04:52.978 error Caught by controller[0]: at Uint8Array.readUInt8 (internal/buffer.js:137:5) host.rock64 2019-08-28 22:04:52.977 error Caught by controller[0]: at boundsError (internal/buffer.js:43:11) host.rock64 2019-08-28 22:04:52.977 error Caught by controller[0]: RangeError [ERR_OUT_OF_RANGE]: The value of "offset" is out of range. It must be an integer. Received 43.33333333333333 lightify.0 2019-08-28 22:04:52.914 error RangeError [ERR_OUT_OF_RANGE]: The value of "offset" is out of range. It must be an integer. Received 43.33333333333333 at boundsError (internal/buffer.js:43:11) at Uint8Array.readUInt8 (inter lightify.0 2019-08-28 22:04:52.910 error uncaught exception: The value of "offset" is out of range. It must be an integer. Received 43.33333333333333 lightify.0 2019-08-28 22:04:52.015 info starting. Version 0.2.16 in /opt/iobroker/node_modules/iobroker.lightify, node: v10.16.2 javascript.0 2019-08-28 22:04:51.587 info script.js.common.Stromverbrauch.Strom_Zaehlerstaende_Verbrauch_Kosten: Fehler beim Auslesen des Datums. Eventuell falsche Syntax? null (Error:TypeError: Cannot read property 'match' of null) smartmeter.0 2019-08-28 22:04:51.322 info Received 10 values, 3 updated host.rock64 2019-08-28 22:04:49.487 info instance system.adapter.lightify.0 started with pid 30091 host.rock64 2019-08-28 22:04:49.436 info object change system.adapter.lightify.0 host.rock64 2019-08-28 22:04:48.380 info instance system.adapter.lightify.0 terminated with code 0 (OK) Caught 2019-08-28 22:04:48.380 error by controller[0]: at Socket.Readable.push (_stream_readable.js:224:10) Caught 2019-08-28 22:04:48.380 error by controller[0]: at readableAddChunk (_stream_readable.js:269:11) Caught 2019-08-28 22:04:48.379 error by controller[0]: at addChunk (_stream_readable.js:288:12) Caught 2019-08-28 22:04:48.379 error by controller[0]: at Socket.emit (events.js:198:13) Caught 2019-08-28 22:04:48.379 error by controller[0]: at Socket.<anonymous> (/opt/iobroker/node_modules/iobroker.lightify/lib/lightify.js:151:18) Caught 2019-08-28 22:04:48.379 error by controller[0]: at lightify.onData (/opt/iobroker/node_modules/iobroker.lightify/lib/lightify.js:173:18) Caught 2019-08-28 22:04:48.379 error by controller[0]: at lightify.processData (/opt/iobroker/node_modules/iobroker.lightify/lib/lightify.js:116:32) Caught 2019-08-28 22:04:48.379 error by controller[0]: at Object.cb (/opt/iobroker/node_modules/iobroker.lightify/lib/lightify.js:463:28) Caught 2019-08-28 22:04:48.379 error by controller[0]: at Uint8Array.readUInt8 (internal/buffer.js:137:5) Caught 2019-08-28 22:04:48.379 error by controller[0]: at boundsError (internal/buffer.js:43:11) Caught 2019-08-28 22:04:48.379 error by controller[0]: RangeError [ERR_OUT_OF_RANGE]: The value of "offset" is out of range. It must be an integer. Received 43.33333333333333 host.rock64 2019-08-28 22:04:48.307 info stopInstance system.adapter.lightify.0 killing pid 30076 host.rock64 2019-08-28 22:04:48.307 info stopInstance system.adapter.lightify.0 host.rock64 2019-08-28 22:04:48.306 info object change system.adapter.lightify.0 lightify.0 2019-08-28 22:04:48.297 info terminating lightify.0 2019-08-28 22:04:48.268 error at Socket.Readable.push (_stream_readable.js:224:10) lightify.0 2019-08-28 22:04:48.268 error at readableAddChunk (_stream_readable.js:269:11) lightify.0 2019-08-28 22:04:48.268 error at addChunk (_stream_readable.js:288:12) lightify.0 2019-08-28 22:04:48.268 error at Socket.emit (events.js:198:13) lightify.0 2019-08-28 22:04:48.268 error at Socket.<anonymous> (/opt/iobroker/node_modules/iobroker.lightify/lib/lightify.js:151:18) lightify.0 2019-08-28 22:04:48.268 error at lightify.onData (/opt/iobroker/node_modules/iobroker.lightify/lib/lightify.js:173:18) lightify.0 2019-08-28 22:04:48.268 error at lightify.processData (/opt/iobroker/node_modules/iobroker.lightify/lib/lightify.js:116:32) lightify.0 2019-08-28 22:04:48.268 error at Object.cb (/opt/iobroker/node_modules/iobroker.lightify/lib/lightify.js:463:28) lightify.0 2019-08-28 22:04:48.268 error at Uint8Array.readUInt8 (internal/buffer.js:137:5) lightify.0 2019-08-28 22:04:48.268 error at boundsError (internal/buffer.js:43:11) lightify.0 2019-08-28 22:04:48.268 error RangeError [ERR_OUT_OF_RANGE]: The value of "offset" is out of range. It must be an integer. Received 43.33333333333333 lightify.0 2019-08-28 22:04:48.256 error uncaught exception: The value of "offset" is out of range. It must be an integer. Received 43.33333333333333 lightify.0 2019-08-28 22:04:47.260 info starting. Version 0.2.16 in /opt/iobroker/node_modules/iobroker.lightify, node: v10.16.2
Nachdem ich dann von dir die Zeile 463 wie folgt geändert hatte:
var cnt = data.readUInt8(Math.floor(pos + 0.5) + 16);
erhalte ich nun:
lightify.0 2019-10-16 10:48:18.149 error at process._tickCallback (internal/process/next_tick.js:68:7) lightify.0 2019-10-16 10:48:18.149 error at promise.then (/opt/iobroker/node_modules/standard-as-callback/built/index.js:19:49) lightify.0 2019-10-16 10:48:18.149 error at tryCatcher (/opt/iobroker/node_modules/standard-as-callback/built/utils.js:11:23) lightify.0 2019-10-16 10:48:18.149 error at (anonymous function).(anonymous function)._0x2f5fa7 (/opt/iobroker/node_modules/iobroker.objects-redis/index.js:17:72663) lightify.0 2019-10-16 10:48:18.149 error at /opt/iobroker/node_modules/soef/soef.js:609:26 lightify.0 2019-10-16 10:48:18.149 error at Devices.setState (/opt/iobroker/node_modules/soef/soef.js:642:36) lightify.0 2019-10-16 10:48:18.149 error (6129) TypeError: Cannot read property 'val' of undefined lightify.0 2019-10-16 10:48:18.147 error (6129) uncaught exception: Cannot read property 'val' of undefined lightify.0 2019-10-16 10:48:17.470 info (6129) starting. Version 0.2.16 in /opt/iobroker/node_modules/iobroker.lightify, node: v10.16.3 ```#
-
Hallo nochmal,
kann hier jemand was dazu sagen, wie ich den Fehler abstellen kann?
-
@hg6806
Osram Bridge rauschschmeissen, durch Hue Bridge ersetzen. -
@hg6806 hier muss der Adapterentwickler ran. Es wird auf eine nicht korrekt mit Info gefüllten Variable zugegriffen.
Eine Lösung ohne im Detail den Adapter zu debuggen wird schwer zu finden sein.
A.
-
Hat doch funktioniert.
Keine Ahnung warum jetzt erst. Vielleicht nach einem Reboot oder so.Auf jeden Fall funktioniert es mit dem Ändern der Zeile 463 in
var cnt = data.readUInt8(Math.floor(pos + 0.5) + 16);
Endlich....eine Baustelle weniger und Frau ist auch happy
-
@hg6806 Hattest du ein Upload gemacht nachdem du die Zeile angepasst hast ?
A.
-
Glaube hatte ich nicht getan...
-
Hallo an alle,
habe seit einigen Tagen auch diesen Fehler in meinem System. Zufällig habe ich dann diesen Thread gefunden und war direkt froh, dass dieser auch noch "lebt". Auf dem Adapter "Osram Ligtify" liegt mittlerweile auch viel Staub.....
IOBroker läuft bei mir in einem Hyper-V Container, Betriebssystem CentOS, seit ein paar Monaten keine Updates durchgeführt. Nach allen möglichen Updates verbindet sich der Adapter Osram nicht mehr.Also habe ich einen weiteren Container für IOBroker eingerichtet, um den Osram Adapter alleine laufen zu lassen und Fehler zu suchen.
Das Workaround habe ich versucht, ohne Erfolg....
/opt/iobroker/node_modules/iobroker.lightify/lib/lightify.js /// Zeile 463 modifizieren var cnt = data.readUInt8(Math.floor(pos + 0.5) + 16);
Wird jemand aus den Angaben meines LOGs schlau?
undefined2019-11-28 13:30:12.110 - info: host.iobroker "system.adapter.lightify.0" enabled 2019-11-28 13:30:12.121 - info: host.iobroker instance system.adapter.lightify.0 started with pid 2405 2019-11-28 13:30:12.403 - info: lightify.0 (2405) starting. Version 0.2.16 in /opt/iobroker/node_modules/iobroker.lightify, node: v10.17.0 2019-11-28 13:30:12.956 - error: lightify.0 (2405) uncaught exception: Cannot read property 'val' of undefined 2019-11-28 13:30:12.956 - error: lightify.0 (2405) TypeError: Cannot read property 'val' of undefined at Devices.setState (/opt/iobroker/node_modules/soef/soef.js:642:36) at /opt/iobroker/node_modules/soef/soef.js:609:26 at (anonymous function).(anonymous function)._0x344e03 (/opt/iobroker/node_modules/iobroker.objects-redis/index.js:17:77549) at tryCatcher (/opt/iobroker/node_modules/standard-as-callback/built/utils.js:11:23) at promise.then (/opt/iobroker/node_modules/standard-as-callback/built/index.js:19:49) at process._tickCallback (internal/process/next_tick.js:68:7) 2019-11-28 13:30:12.961 - info: lightify.0 (2405) terminating 2019-11-28 13:30:12.961 - info: lightify.0 (2405) Terminated (NO_ERROR): Without reason 2019-11-28 13:30:13.465 - error: host.iobroker Caught by controller[0]: TypeError: Cannot read property 'val' of undefined 2019-11-28 13:30:13.465 - error: host.iobroker Caught by controller[0]: at Devices.setState (/opt/iobroker/node_modules/soef/soef.js:642:36) 2019-11-28 13:30:13.465 - error: host.iobroker Caught by controller[0]: at /opt/iobroker/node_modules/soef/soef.js:609:26 2019-11-28 13:30:13.465 - error: host.iobroker Caught by controller[0]: at (anonymous function).(anonymous function)._0x344e03 (/opt/iobroker/node_modules/iobroker.objects-redis/index.js:17:77549) 2019-11-28 13:30:13.465 - error: host.iobroker Caught by controller[0]: at tryCatcher (/opt/iobroker/node_modules/standard-as-callback/built/utils.js:11:23) 2019-11-28 13:30:13.465 - error: host.iobroker Caught by controller[0]: at promise.then (/opt/iobroker/node_modules/standard-as-callback/built/index.js:19:49) 2019-11-28 13:30:13.465 - error: host.iobroker Caught by controller[0]: at process._tickCallback (internal/process/next_tick.js:68:7) 2019-11-28 13:30:13.465 - info: host.iobroker instance system.adapter.lightify.0 terminated with code 0 (NO_ERROR) 2019-11-28 13:30:13.465 - info: host.iobroker Restart adapter system.adapter.lightify.0 because enabled 2019-11-28 13:30:15.664 - info: host.iobroker "system.adapter.lightify.0" disabled
-
@AgentLibelle
Es scheint so das in einer Bibliothek ein umgesetzter Wert nicht abgefangen wird. Das im Detail zu finden ist nicht einfach, insbesondere weil ich den Adapter selber nicht laufen lassen kann - ich hab die Hardware nicht.Du kannst versuchen im Modul soef in der Datei /opt/iobroker/node_modules/soef/soef.js folgende Anpassung vornehmen:
this.setState = function (o, id, val, ack) { if (val !== undefined) objects[id].val = val
zu
this.setState = function (o, id, val, ack) { if (objects[id] == undefined) return; if (val !== undefined) objects[id].val = val
ändern.
Alles auf eigene Gefahr.
A.
-
Das Problem besteht bei mir auch. Vor Wochen hatte die Anpassung "var cnt = data.readUInt8(~~pos + 16);" mal geholfen aber nach der heutigen Neuinstallation, klappt keine von den Lösungen. Hat jemand Kontakt zum Adapter Entwickler und kann mal darauf hinweisen?
@soef Der Adapter war doch von dir, oder? Kannst du uns vielleicht helfen?
-
Gleiches Problem hier:
host.ioBroker-Pi 2019-12-11 10:21:00.024 info instance system.adapter.dwd.0 started with pid 29168 host.ioBroker-Pi 2019-12-11 10:20:57.495 info Restart adapter system.adapter.lightify.0 because enabled host.ioBroker-Pi 2019-12-11 10:20:57.495 info instance system.adapter.lightify.0 terminated with code 0 (NO_ERROR) host.ioBroker-Pi 2019-12-11 10:20:57.495 error Caught by controller[0]: at process._tickCallback (internal/process/next_tick.js:68:7) host.ioBroker-Pi 2019-12-11 10:20:57.494 error Caught by controller[0]: at promise.then (/opt/iobroker/node_modules/standard-as-callback/built/index.js:19:49) host.ioBroker-Pi 2019-12-11 10:20:57.494 error Caught by controller[0]: at tryCatcher (/opt/iobroker/node_modules/standard-as-callback/built/utils.js:11:23) host.ioBroker-Pi 2019-12-11 10:20:57.494 error Caught by controller[0]: at client.set.err (/opt/iobroker/node_modules/iobroker.js-controller/lib/objects/objectsInRedis.js:2044:51) host.ioBroker-Pi 2019-12-11 10:20:57.494 error Caught by controller[0]: at /opt/iobroker/node_modules/soef/soef.js:609:26 host.ioBroker-Pi 2019-12-11 10:20:57.493 error Caught by controller[0]: at Devices.setState (/opt/iobroker/node_modules/soef/soef.js:642:36) host.ioBroker-Pi 2019-12-11 10:20:57.493 error Caught by controller[0]: TypeError: Cannot read property 'val' of undefined
Was kann man nun machen?
-
Seit dem heutigen Versuch mit den Anpassungen:
var cnt = data.readUInt8(~~pos + 16);
und
if (objects[id] == undefined) return;
Funktioniert mein Lightify Adapter wieder! Endlich ist das Thema vom Tisch!
-
@Marc-Nied
Wie Wo mache ich diese Änderung? -
in der Datei
/opt/iobroker/node_modules/iobroker.lightify/lib/lightify.js
in Zeile 463, in der Datei
sudo nano lightify.js aufrufen und zu der Zeile gehen
Dann Eintrag “var cnt = data.readUInt8(pos + 16);"
in "var cnt = data.readUInt8(~~pos + 16);" ändern und speichern.
Dann noch die Anpassung in der Datei soef
/opt/iobroker/node_modules/soef/soef.js
sudo nano soef.js aufrufen (die Zeile weiß ich nicht, habe es stumpf gesucht) und in diesen Code
this.setState = function (o, id, val, ack) {
if (val !== undefined) objects[id].val = valergänzen um if (objects[id] == undefined) return;
Also so muss es gesamt aussehen
this.setState = function (o, id, val, ack) {
if (objects[id] == undefined) return;
if (val !== undefined) objects[id].val = valSpeichern, Linux Reboot und danach Adapter starten und es lief bei mir.
-
der Vorschlag von Marc Nied war klasse die Änderung in Zeile 463 hat geholfen!
-
@struppi_2000 Das war nicht meine Leistung sondern nur das zusammengefasste Wissen anderer
Aber es freut mich das es bei dir nun auch wieder funktioniert!
-
@Marc-Nied Hallo Marc, (und jeder, der mitliest), ich bräuchte Deine/Eure Hilfe:
Ich habe heute Node von Version 8.x auf 10.x angehoben (gemäß der Doku, also auch den Fixer laufen lassen, Reihenfolge der Anweisungen beachtet). Zunächst hatte ich einige Fehler bei NPM rebuild, später starteten dann der Lightify, ioGo und Zwave-Adapter nicht mehr. [Node.js v10.18.0, NPM 6.13.4]
Ich habe dann zu guter letzt das reinstall.sh durchlaufen lassen, jetzt starten ioGo und Zwave zwar, doch Lightify nicht.
Ich habe eben basierend auf Deiner Zusammenfassung die beiden Dateien geändert, sowohl einen System-Reboot, als auch einen Adapter-Upload gemacht. Der Adapter bleibt aber auf Rot und spuckt diese Meldung im Log aus:host.ioBrokerDeb 2020-01-04 16:51:59.258 error instance system.adapter.lightify.0 terminated with code 1 (JS_CONTROLLER_STOPPED) host.ioBrokerDeb 2020-01-04 16:51:59.258 error Caught by controller[0]: at Module._compile (internal/modules/cjs/loader.js:778:30) host.ioBrokerDeb 2020-01-04 16:51:59.257 error Caught by controller[0]: at Object.<anonymous> (/opt/iobroker/node_modules/iobroker.lightify/lightify.js:17:16) host.ioBrokerDeb 2020-01-04 16:51:59.257 error Caught by controller[0]: at require (internal/modules/cjs/helpers.js:25:18) host.ioBrokerDeb 2020-01-04 16:51:59.257 error Caught by controller[0]: at Module.require (internal/modules/cjs/loader.js:692:17) host.ioBrokerDeb 2020-01-04 16:51:59.257 error Caught by controller[0]: at Function.Module._load (internal/modules/cjs/loader.js:585:3) host.ioBrokerDeb 2020-01-04 16:51:59.257 error Caught by controller[0]: at tryModuleLoad (internal/modules/cjs/loader.js:593:12) host.ioBrokerDeb 2020-01-04 16:51:59.257 error Caught by controller[0]: at Module.load (internal/modules/cjs/loader.js:653:32) host.ioBrokerDeb 2020-01-04 16:51:59.257 error Caught by controller[0]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) host.ioBrokerDeb 2020-01-04 16:51:59.257 error Caught by controller[0]: at Module._compile (internal/modules/cjs/loader.js:778:30) host.ioBrokerDeb 2020-01-04 16:51:59.257 error Caught by controller[0]: at Object.<anonymous> (/opt/iobroker/node_modules/iobroker.lightify/lib/lightify.js:1:1) host.ioBrokerDeb 2020-01-04 16:51:59.257 error Caught by controller[0]: ReferenceError: W is not defined host.ioBrokerDeb 2020-01-04 16:51:59.256 error Caught by controller[0]: ^ host.ioBrokerDeb 2020-01-04 16:51:59.256 error Caught by controller[0]: W// Taken from here https://github.com/rainlake/node-lightify host.ioBrokerDeb 2020-01-04 16:51:59.256 error Caught by controller[0]: /opt/iobroker/node_modules/iobroker.lightify/lib/lightify.js:1
Iobroker läuft bei mir in einer DebianVM auf Proxmox.
Ich bin leider (noch) nicht der Linux/Iobroker-Crack dass ich das alleine lösen konnte; SuFu habe ich benutzt, nur leider keine funktionierende Lösung gefunden.Eine (verzweifelte) Idee hätte ich noch: den js-controller auf die v2 stable zu hieven. Könnte das was bringen?
Hast Du oder hat jemand eine Idee?
Wenn ich noch mehr Infos braucht, dann sagt bitte Bescheid (mir raucht langsam der Kopf..
)
Danke Dir/Euch,
schöne Grüße und noch ein nachträglich Frohes Neues!
HolgerNachtrag: Adapter gelöscht und neu installiert bringt denselben Fehler..
Noch'n Nachtrag: keine Ahnung, wie das ging, aber ich habe wohl den js-controller mitgeupdated. Ist jetzt v2.1.1.
Ich raff's nicht.... Hab die Schritte im "js-controller 2 jetzt für alle im Stable" - Post gar nicht angerührt...
Naja, Problem besteht halt. Hab noch einen Snapshot, vielleicht ist ein Zurück die beste Option..? -
@horos73 Hast du schon eine Lösung meiner ist nach dem Update des js-Controller auch rot.
Wird dieser Adapter noch weiterentwickelt?