Closed amigomcu closed 7 years ago
We have seen similar issues, usually restarting the software, reseting the device or ZNP dongle does the job.
Often this happens when the software is restarted. Our current operating theory is that the ZNP dongle thinks the device is joined in the firmware. I have not been able to find a place where Zigbee Shepherd asks for a list of joined devices.
Perhaps executing a ZNP reset before start / init would solve the problem?
Internal discussion reveals:
Our proposed solution we are toying with at the moment is on-init to use assocFindDevice and assocCount to iterate the ZNP's status and mark devices as online/offline in devbox (the db).
Would love some feedback from the Zigbee Shepherd guys.
That would be limited to associations on the coordinator, it wouldn't pick up on associations on routers in the network.
Perhaps the approach described here: http://electronics.stackexchange.com/questions/199078/how-do-i-maintain-an-active-list-of-zigbee-devices-in-a-han
Initial implementation in our fork, cursory evaluation in our lab looks positive.
Still todo: creation of devices if database doesnt have them (query for simple desc etc to get eps etc)
Edit: False alarm, device was joining another network.
Hi @amigomcu. you can try the node-env out to have the environment variable been set correctly in windows.
npm install cross-env --save-dev
cross-env DEBUG=zigbee-shepherd* node server.js
Could you paste your code to us? Let's see if anything went wrong with the 'ind' issue. Thanks!
Hi @splitice, I think your speculation on these two points is making sense:
My proposal is to have a handler to always disallow device joining when the server shutting down:
process.on('exit', function () {
shepherd.permitJoin(0);
})`
But I wonder that this would not fully solve the problem, there is still a very little chance that a device comes into the network when ZS is not in the ready state and the ZNP dongle still opens for joining.
That still doesnt help as existing devices will stay joined during reboot, they will never re-join as they are in fact still joined. You could do a hardware reset instead. Still, it's not all that reliable and for some devices rejoining takes hours.
Our current method of doing an network scan is holding up reasonably well. Still a few kinks to be found though.
Further work is required as per the TODO though in case we loose the database, or a new device joins while the software isnt running.
hi all, when i start permitJoin device, i can see my device have been add PAN network. but it don't trigger 'ind' event and shepherd.list() return only Coordinator. could you give me some suggestion with this?
I'm a beginner at full-stack iot development. how to use the utilizes debug module on windows(win 7 64bit)
hw. cc2531 usb dongle. fw. cc-znp