Dirnei / node-red-contrib-zigbee2mqtt-devices

Node-red nodes for controlling and managing zigbee devices managed by zigbee2mqtt
MIT License
30 stars 7 forks source link

occasional error on ikea remote device #110

Closed marek-l closed 2 years ago

marek-l commented 2 years ago

node-red-contrib-zigbee2mqtt-devices version: 0.19.2 running in docker container

Occasionaly node-red crashes with error:

[error] TypeError: Cannot read property 'replace' of null
    at MqttSubscription.callback (/usr/src/node-red/node_modules/node-red-contrib-zigbee2mqtt-devices/dist/nodes/devices-ikea.js:61:49)
    at MqttSubscription.invokeIfMatch (/usr/src/node-red/node_modules/node-red-contrib-zigbee2mqtt-devices/dist/lib/mqtt.js:28:18)
    at /usr/src/node-red/node_modules/node-red-contrib-zigbee2mqtt-devices/dist/zigbee2mqtt-config.js:33:25
    at Array.forEach (<anonymous>)
    at /usr/src/node-red/node_modules/node-red-contrib-zigbee2mqtt-devices/dist/zigbee2mqtt-config.js:32:36
    at MqttClient.handler (/usr/src/node-red/node_modules/@node-red/nodes/core/network/10-mqtt.js:809:25)
    at MqttClient.emit (events.js:314:20)
    at MqttClient._handlePublish (/usr/src/node-red/node_modules/mqtt/lib/client.js:1277:12)
    at MqttClient._handlePacket (/usr/src/node-red/node_modules/mqtt/lib/client.js:410:12)
    at work (/usr/src/node-red/node_modules/mqtt/lib/client.js:321:12)
    at processTicksAndRejections (internal/process/task_queues.js:79:11)
Andreas-Huber commented 2 years ago

Sorry, for the late reply. Christmas and stuff. I had a look into it, and I'm pretty sure Pull-Request #111 should fix it. I cannot test it with a remote this week - but since the error message is pretty much spot on - I'm confident that that fixes the problem.

I'll try to get a patch out ASAP.

marek-l commented 2 years ago

Sorry, for the late reply. Christmas and stuff. I had a look into it, and I'm pretty sure Pull-Request #111 should fix it. I cannot test it with a remote this week - but since the error message is pretty much spot on - I'm confident that that fixes the problem.

I'll try to get a patch out ASAP.

Hi, great, thanks so much for your effort

Andreas-Huber commented 2 years ago

The release is out, should be available in a few hours via the Node-RED palette.