Open LarsSimonsen opened 2 years ago
The error comes from here: https://github.com/AlCalzone/node-tradfri-client/blob/9bf1929eea3fd161b83a4bb843174123754aef71/src/tradfri-client.ts#L1222-L1251
It could be that the node doesn't have an event handler for the "error"
event attached, which Node.js might treat as a unhandled exception.
IMO, this event should be listened for and reacted accordingly by the application/node/... which wraps node-tradfri-client
. It might be fine to just swallow this error, but some commands won't be fulfilled as the error message says. So it's really up to the caller to decide how to handle this.
If this happens every few hours, this seems like there's something weird going on. Are you often using the app in parallel to this library, which could force a reconnection?
I don't use the app often, but my SO might. OTOH, this seems to happen when automations adjust many lights in a short time.
So should I take this issue to node-red-contrib-ikea-home-smart instead?
So should I take this issue to node-red-contrib-ikea-home-smart instead?
Yeah, I guess that needs to be handled there. In this specific case, node-tradfri-client can't do much else than tell the application what happened.
My Node-Red crashes in its entirety every few hours. I'm on Windows 10, Node-Red 2.2.0, node-red-contrib-ikea-home-smart 0.3.3. The last console output entry looks like this:
Should I catch it with an exception node? I'm puzzled that it brings Node-Red down completely, did't know that a single node had the power to do that.