meg768 / homebridge-ikea-tradfri-gateway

homebridge-ikea-tradfri-gateway
GNU General Public License v3.0
73 stars 25 forks source link

A specific "scene" in Trådfri prevents Homebridge from loading #51

Open Bejjje opened 4 years ago

Bejjje commented 4 years ago

Apparently, there is one specific scene causing trouble for me in Trådfri. But I can't figure out which one and how to work around it..

Dec 06 22:35:14 raspberry-server homebridge[2673]: [12/6/2019, 22:35:14] [Ikea Trådfri Gateway] Loading groups and scenes... Dec 06 22:35:15 raspberry-server homebridge[2673]: Error: The scene with the id 196617 could not be observed Dec 06 22:35:15 raspberry-server homebridge[2673]: at PendingRequest.handleResponse [as callback] (/usr/local/lib/node_modules/homebridge-ikea-tradfri-gateway/node_modules/node-tradfri-client/build/tradfri-client.js:575:53) Dec 06 22:35:15 raspberry-server homebridge[2673]: at Function.onMessage (/usr/local/lib/node_modules/homebridge-ikea-tradfri-gateway/node_modules/node-coap-client/build/CoapClient.js:631:33) Dec 06 22:35:15 raspberry-server homebridge[2673]: at SocketWrapper.emit (events.js:210:5) Dec 06 22:35:15 raspberry-server homebridge[2673]: at Socket. (/usr/local/lib/node_modules/homebridge-ikea-tradfri-gateway/node_modules/node-coap-client/build/lib/SocketWrapper.js:12:18) Dec 06 22:35:15 raspberry-server homebridge[2673]: at Socket.emit (events.js:210:5)

Bejjje commented 4 years ago

Managed to identify the "scene" in question via https://github.com/glenndehaan/ikea-tradfri-coap-docs#get-a-list-of-all-scenes coap-client and removed it, worked like a charm afterwards.

b@ubuntulabb:~$ coap-client -m get -u TF_USERNAME -k <REDACTED> coaps://xxx.xxx.x.xx:5684/15004/131076
v:1 t:CON c:GET i:ecf2 {} [ ]
{"9001":"Taklampa","5850":0,"9002":1575228061,"9003":131076,"5851":0,"9039":**196617**,"9018":{"15002":{"9003":[65565,65548,65561,65562,65563]}},"9108":0}
b@ubuntulabb:~$ 

So my immediate issue is worked around but the reason behind it is unclear, at least to me.

nixis commented 4 years ago

Hi everybody,

some problem here too.

Error: The scene with the id 196632 could not be observed at PendingRequest.handleResponse [as callback] (/var/snap/homebridge/common/lib/node_modules/homebridge-ikea-tradfri-gateway/node_modules/node-tradfri-client/build/tradfri-client.js:575:53) at Function.onMessage (/var/snap/homebridge/common/lib/node_modules/homebridge-ikea-tradfri-gateway/node_modules/node-coap-client/build/CoapClient.js:631:33) at emitTwo (events.js:126:13) at SocketWrapper.emit (events.js:214:7) at SocketWrapper.socket.on (/var/snap/homebridge/common/lib/node_modules/homebridge-ikea-tradfri-gateway/node_modules/node-coap-client/build/lib/SocketWrapper.js:12:18) at emitTwo (events.js:126:13) at Socket.emit (events.js:214:7) at Socket.udp_onMessage (/var/snap/homebridge/common/lib/node_modules/homebridge-ikea-tradfri-gateway/node_modules/node-dtls-client/build/dtls.js:189:34) at emitTwo (events.js:126:13) at Socket.emit (events.js:214:7)

I will try the workaround from @Bejjje, but can't solve the "scene" problem by myself. Homebridge and the Tradfri plugin are at the newest version.

Hom-beep commented 3 years ago

@nixis just skip the scenes feature. check out the workaround here: https://github.com/meg768/homebridge-ikea-tradfri-gateway/issues/64