Reputation: 2063
I have a mesh network running with Xbees. I have to total possible nodes (i.e 20) in the network along with their addresses. I want to create a script that would tell me which of the nodes are on (in case some turn off for what ever reason).
How can I do this.
I am using the following library: https://pypi.python.org/pypi/XBee
Any help would be appreciated.
Thanks!
Upvotes: 2
Views: 624
Reputation: 11694
I assume that if you don't have a microprocessor attached to remote nodes, you're making use of their remote I/O functionality. You could send a remote AT command (like ATD0
to read digital input 0) to each node on a periodic basis. Or set up input sampling to have nodes send you a periodic report of their I/O lines along with notification of changes.
What's wrong with constantly receiving messages from the remote nodes? You must be using API mode if you have that many devices, and you can just keep a table of devices along with the last timestamp that you heard from them. If a device hasn't reported back within a certain time, you can mark it as offline.
Upvotes: 1