node-red-contrib-zigbee icon indicating copy to clipboard operation
node-red-contrib-zigbee copied to clipboard

Fix for #160 and better serial error handling

Open hogthrob opened this issue 4 years ago • 4 comments

We just check for the existence of the supportsLED method and only then run the code which used to work in older zigbee-herdsman versions. In case of problems in connect we now properly stop the zigbee adapter before trying to restart it. This was a problem uncovered by #160 but not the root cause (that was the call to a no-longer-existing method of zigbee-herdsman).

hogthrob avatar Nov 28 '21 00:11 hogthrob

I just wanted to say thanks for the fix but also ask if the root cause was really that the led control methods have been removed in zigbee-herdsman. As far as I could see these were removed with zigbee-herdsman 0.13.170. In the dependencies part in package.json of node-red-contrib-zigbee only contains version 0.13.130. "zigbee-herdsman": "^0.13.130","

jokakilla avatar Nov 30 '21 19:11 jokakilla

^0.13.130 means to use the newest version which is 0.13.130 or higher, but below 0.14, i.e. the newest 0.13.xxx version. You can see this by yourself here: https://semver.npmjs.com/ Just enter zigbee-herdsman and ^0.13.130

hogthrob avatar Dec 01 '21 01:12 hogthrob

Thanks for clarifying. I knew semver with major, minor, patch versions but missed the meaning of the prefix in context of node.

jokakilla avatar Dec 02 '21 09:12 jokakilla

JFYI this PR works fine. @hobbyquaker merge it please.

vibornoff avatar May 11 '22 10:05 vibornoff