getnodelist refresh


why does node_list=zigbee.getnodelist(refresh=true) shows nodes that are offline? im guessing its something with MAC tables?
im playing with loop that outputs IS[1] value, while connecting nodes to network and offline. after renewing node list items offline have addr_short value of [ffff], and keep their addr_extended value, how to kill them zombies?



If you have external routers, these are likely “children of other routers”, as they won’t flush their node tables.

So the refresh only applies to the Xbee within the gateway. It flushes and rebuilds, while other nodes are free to do as they please when replying to the gateway.

Such routers will eventually flush (or timeout) nodes which are offline, but remember that it is impossible to distinguish a “node dead & gone” from a “node which is sleeping”.

do you know any way to force node cleanup itself? at least for a test, because in testing environment i disconnect nodes very often.


Power off all the devices in your PAN. When powered back on and a node discovery is issued, only valid devices will reply and be re-added to the routing tables.

-[test environment]-
X4 gateway
usb adapter
rs232 adapter

run loop on gateway:

  1. node_list=zigbee.getnodelist(refresh=true)
  2. read IS from all the nodes

poweroff rs232 adapter

after getnodelist rs232 adapter is allways on the list. as lynn said - “refresh” flushes gateway table.
ok, i connect to usb adapter using XCTU and perform factory reset.
getnodelist - still shows rs232 in node list

is there any quick way to drop zombies from the nodelist or is there some parameter to force faster network refresh?

Power off the X4, RS232, and USB. When all are powered off, power only the X4 and USB back on, then do:

"run loop on gateway:

  1. node_list=zigbee.getnodelist(refresh=true)
  2. read IS from all the nodes"

crap, and i was planning to launch 100 nodes… …imagine me restarting them all, because one is out of batteries

If you use batteries, then I assume the nodes also sleep. As mentioned, it is IMPOSSIBLE for the mesh to differentiate a sleeping node from what you called a “zombie node” because a sleeping node (say sleeping for 10 minutes) won’t talk anymore than does a dead one at any arbitrary time.

Thus doing a “getnodelist” to detect dead batteries won’t work. You’ll need to maintain your own internal state of “last seen activity” and mark nodes as dead-and-gone if they miss sending data for too long.

For example, I have AIO devices waking once per hour to take tank levels. The Dia device produces a data sample, which is timestamped. So my other routines need to understand and handle when the age of last sample is greater than 3 hours old (my definition of “dead”).

So people like me require the sleeping nodes to remain in the various node lists even when they don’t talk. I assume what you want is for getnodelist(0 to only return a list of nodes which can at this instant be contacted, which in most mesh systems is a small subset of the total mesh nodes. For example, I might have 50 tanks which are all sleeping, so my “active” node list would only be a handful of routers.