ebaauw / homebridge-deconz

Homebridge plugin for deCONZ
Apache License 2.0
135 stars 7 forks source link

Strange behavior DeConz after update #97

Closed stefan1957 closed 1 year ago

stefan1957 commented 1 year ago

Hi,

After updating homebridge-deconz to v0.1.2 homebridge log shows strange things of all the nodes (see the log) what is here the problem? Thanx for your answer in advance

Grtz Stefan

[24-1-2023 21:58:42] [deCONZ2] Tafel boven: error: RangeError: The value of "value" is out of range. It must be >= 0 and <= 65535. Received -1598 at new NodeError (node:internal/errors:400:5) at checkInt (node:internal/buffer:74:11) at writeU_Int16LE (node:internal/buffer:724:3) at Buffer.writeUInt16LE (node:internal/buffer:732:10) at History.addEntry (/var/lib/homebridge/node_modules/homebridge-deconz/node_modules/homebridge-lib/lib/ServiceDelegate/History.js:634:12) at Light. (/var/lib/homebridge/node_modules/homebridge-deconz/node_modules/homebridge-lib/lib/ServiceDelegate/History.js:567:16) at Light.emit (node:events:513:28) at Light.emit (/var/lib/homebridge/node_modules/homebridge-deconz/node_modules/homebridge-lib/lib/Delegate.js:172:13) at DeconzPlatform._beat (/var/lib/homebridge/node_modules/homebridge-deconz/node_modules/homebridge-lib/lib/Platform.js:302:38) at Timeout._onTimeout (/var/lib/homebridge/node_modules/homebridge-deconz/node_modules/homebridge-lib/lib/Platform.js:279:12) [24-1-2023 21:58:42] [deCONZ2] Zolder: error: RangeError: The value of "value" is out of range. It must be >= 0 and <= 65535. Received -1421 at new NodeError (node:internal/errors:400:5) at checkInt (node:internal/buffer:74:11) at writeU_Int16LE (node:internal/buffer:724:3) at Buffer.writeUInt16LE (node:internal/buffer:732:10) at History.addEntry (/var/lib/homebridge/node_modules/homebridge-deconz/node_modules/homebridge-lib/lib/ServiceDelegate/History.js:634:12) at Light. (/var/lib/homebridge/node_modules/homebridge-deconz/node_modules/homebridge-lib/lib/ServiceDelegate/History.js:567:16) at Light.emit (node:events:513:28) at Light.emit (/var/lib/homebridge/node_modules/homebridge-deconz/node_modules/homebridge-lib/lib/Delegate.js:172:13) at DeconzPlatform._beat (/var/lib/homebridge/node_modules/homebridge-deconz/node_modules/homebridge-lib/lib/Platform.js:302:38) at Timeout._onTimeout (/var/lib/homebridge/node_modules/homebridge-deconz/node_modules/homebridge-lib/lib/Platform.js:279:12) [24-1-2023 21:58:42] [deCONZ2] Schuur midden: error: RangeError: The value of "value" is out of range. It must be >= 0 and <= 65535. Received -1472 at new NodeError (node:internal/errors:400:5) at checkInt (node:internal/buffer:74:11) at writeU_Int16LE (node:internal/buffer:724:3) at Buffer.writeUInt16LE (node:internal/buffer:732:10) at History.addEntry (/var/lib/homebridge/node_modules/homebridge-deconz/node_modules/homebridge-lib/lib/ServiceDelegate/History.js:634:12) at Light. (/var/lib/homebridge/node_modules/homebridge-deconz/node_modules/homebridge-lib/lib/ServiceDelegate/History.js:567:16) at Light.emit (node:events:513:28) at Light.emit (/var/lib/homebridge/node_modules/homebridge-deconz/node_modules/homebridge-lib/lib/Delegate.js:172:13) at DeconzPlatform._beat (/var/lib/homebridge/node_modules/homebridge-deconz/node_modules/homebridge-lib/lib/Platform.js:302:38) at Timeout._onTimeout (/var/lib/homebridge/node_modules/homebridge-deconz/node_modules/homebridge-lib/lib/Platform.js:279:12) [24-1-2023 21:58:42] [deCONZ2] Trap: error: RangeError: The value of "value" is out of range. It must be >= 0 and <= 65535. Received -1689 at new NodeError (node:internal/errors:400:5) at checkInt (node:internal/buffer:74:11) at writeU_Int16LE (node:internal/buffer:724:3) at Buffer.writeUInt16LE (node:internal/buffer:732:10) at History.addEntry (/var/lib/homebridge/node_modules/homebridge-deconz/node_modules/homebridge-lib/lib/ServiceDelegate/History.js:634:12) at Light. (/var/lib/homebridge/node_modules/homebridge-deconz/node_modules/homebridge-lib/lib/ServiceDelegate/History.js:567:16) at Light.emit (node:events:513:28) at Light.emit (/var/lib/homebridge/node_modules/homebridge-deconz/node_modules/homebridge-lib/lib/Delegate.js:172:13) at DeconzPlatform._beat (/var/lib/homebridge/node_modules/homebridge-deconz/node_modules/homebridge-lib/lib/Platform.js:302:38) at Timeout._onTimeout (/var/lib/homebridge/node_modules/homebridge-deconz/node_modules/homebridge-lib/lib/Platform.js:279:12)

ebaauw commented 1 year ago

The internal Homebridge deCONZ administration of Eve history seems corrupted. Not sure how that came to be, did you do a clean upgrade, did you see install errors, or did you try to downgrade? If you’re on a Raspberry Pi, double-check the uSD card.

Anyway, to reset the administration, un-expose each device showing the error and re-expose it, or simply stop deCONZ, delete cachedAccessories and restart it. You might need to delete history from Eve before doing this, or un-install and re-install Eve, or it won’t show new history entries thinking it already downloaded them.

stefan1957 commented 1 year ago

Thx for your quick response. I deleted the cachedAccessories and restart homebridge. It seems to be alright but at the end i deleted the bridge in homekit and in Homebridge and started over again ;) The strange thing is that the groups in DeConz do not expose anymore. I tried to fix that with postman but without succes. Is there an other way to add them?

ebaauw commented 1 year ago

The gateway setting should auto-expose new groups, but for already existing groups you might need to expose each device individually

sadpixel commented 1 year ago

I had a similar experience with my upgrade – some previously exposed groups got un-exposed, but others came through fine. I was able to re-expose them using the new API:

curl -s -X PUT -d '{"expose": true}' 127.0.0.1:[random port]/gateways/[my gateway]/devices/[my gateway]-G[my group number]/settings

stefan1957 commented 1 year ago

Everything works fine now, thx for the advice. Grtz Stefan