I am working on the home automation project, where one building has indoor devices connected to the Zigbee networks with a separate Zigbee network for each room. I am using the Digi XBee S2C Zigbee module as ZC with some 3rd party devices as ZED.
I observe that, after power reset, ZC is open to join for a particular amount of time defined by the NJ command. It can cause a potential problem during commissioning when after a power outage, multiple Zigbee Coordinators are open to join in the range of particular ZED under commissioning.
How to avoid this situation? What configuration is required? I understand that it is possible to set NJ to 0 after commissioning, but it requires an additional manual step, which I want to avoid.
Setting NJ to 0 should prevent it. The coordinator and routers should keep their child information thru a power cycle as long as you do not issue a network reset on power up.
In this case, I need to set NJ twice: before join and after. Is there a way to avoid the need to close the join manually and disable the open join after the restart at the same time?
Not at all. The NJ value is a timed value. Setting it to FF tells it to leave joining on pertinently. Setting NJ to a lower value,say 1, enables joining for 1 min.
The documentation says the following regarding the NJ command:
“Set or read the time that a Coordinator/Router allows nodes to join. You can changes this value at run time without requiring a Coordinator or Router to restart. The time starts once the Coordinator or Router starts, and the timer resets on power-cycle or when NJ changes.”
What I want to avoid is the situation when the device is open to join after power reset even for some interval of time.
You only have two options. Option one is to allow joining even for a min or two so that your devices can join if a power cycle occurs or disallow joining so that when a power cycle occur, your devices may not be allowed to re-join the network. These are your options.