hobbyquaker / node-red-contrib-zigbee

Node-RED Nodes for ZigBee Devices 🐝
MIT License
86 stars 15 forks source link

Fix for #160 and better serial error handling #161

Open hogthrob opened 2 years ago

hogthrob commented 2 years ago

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).

jokakilla commented 2 years ago

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","

hogthrob commented 2 years ago

^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

jokakilla commented 2 years ago

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

vibornoff commented 2 years ago

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