Home/Support/Support Forum/Do you think it is possible / how might make XBee(s) self-configure based on what they see in the system?

Do you think it is possible / how might make XBee(s) self-configure based on what they see in the system?

0 votes
So I have a home project I am working on. I will describe my project and then get to the question.

I have a network of 10 XBee's successfully communicating and performing the same basic functions but in a position dependent sequence. Each XBee is permanently attached to a tower. So, there are 10 towers each with an XBee. These 10 towers communicate remotely with a coordinator module at the control panel. When not in use, the towers are on a rack in a closet. When they are in use a tower is randomly grabbed and push-to-connected into 1 of 10 ports. Do this with each XBee with the remaining push-to-connect ports. So here is the goal: I would like to make the network so that when a random XBee tower is connected to a random port the XBee "sees" that specific port and assumes that position's specific functionality.
I have 2 solutions in mind:
1.) using Micropython and then tethering into Python: I2C bus of sensors running to each of the 10 ports. On an I2C bus each sensor has a unique address. So, when an XBee tower is push-to-connected, it would see the address of the I2C sensor and then run an if statement depending on the sensor's address.
2.) power cycling.. on/off power is manipulated in such a way that when one tower is ON, that tower knows the position that its in because only that tower was powered on.. then that tower assumes that position's functionality.

Any thoughts or suggestions on this problem? The primary question is below:

last but not least, is it possible to change the Node Identifier (NI) of an XBee module in python code?? Because right now I'm thinking the easiest thing to do with either of the proposed solutions is to essentially have a module push-to-connect into a port, see a position identification, and then change it's own NI to the NI of that position's functionality. In the code the positions are ordered by module NI order, i.e. module00, module01, module10, etc. Because originally the design was such that you had to put tower00 with module00 in port00. But I want to put towerXX with moduleXX into portXX and the system reconfigure itself accordingly. (All the XBees are doing the same basic functionality but in a different sequence based on their position)

It a cool project! thanks for any help or even just conversing about it

cheers
asked Jul 7 in XBee3 ZigBee by edunn106 New to the Community (24 points)

Please log in or register to answer this question.

1 Answer

0 votes
Either the first or the last would work. As long as you write the proper code for it.
answered Jul 7 by mvut Veteran of the Digi Community (13,472 points)
How to send an input read from my i2c io expander from micropython to my python program?..
You need to do a Discover on the I2C port to see what devices are on it. This is a standard function of I2C and something you should be able to find in the I2C specification.
...