XBee Device Auto-Enumeration configuration

contrary to the example in docs_1.2.19/user/devices/xbee/xbee_devices/autoenum.html the xbee_autoenum device does not need (or want) an extended_address setting.

- name: xbee_autoenum
  driver: devices.xbee.xbee_devices.xbee_autoenum:XBeeAutoEnum
      xbee_device_manager: xbee_device_manager
      extended_address: "" <-- no no
      discover_rate: 600
          - name: auto_aio
            driver: devices.xbee.xbee_devices.xbee_aio:XBeeAIO
                xbee_device_manager: xbee_device_manager
                extended_address: ""
                sample_rate_ms: 900000
                power: On
                sleep: True
                channel1_mode: CurrentLoop
                channel2_mode: CurrentLoop
                channel3_mode: CurrentLoop
                channel4_mode: CurrentLoop

You are correct, but I would NOT even include the setting as “”. Just delete that line, plus you do NOT need the xbee_device_manager setting in the ‘devices’, because they inherit this from the ‘xbee_autoenum’ base.

You should look at the sample YML in demos\autoenum\dia.yml

I am doing my own testing of this feature. My experience is that sleeping devices are very hard to ‘auto-enum’ since they have to be awake and in the XBee network list to be detected. Are you finding it works well with your sleeping AIO?

I’m not using XBeeAIO (yet), trying to get things going with Sensors and Wall Routers for starters.

I have been having trouble getting the sensors to sleep for the correct amount of time. It turns out that dia wasn’t setting the period multiplier (SN). I wanted 3 minutes, 180000ms = 10 * SP * SN. That was translating to SP=0x30 (48) and SN=0x177 (375), but only SP got set so the sensor only slept 480ms!

Funny thing is that xbee_config_block_sleep.py calculates SN but then neglects to set it. Here’s a patch for xbee_config_block_sleep.py that adds SN to the list of parameters set during sleep configuration:

Index: xbee_config_block_sleep.py

— xbee_config_block_sleep.py (revision 51)
+++ xbee_config_block_sleep.py (working copy)
@@ -93,7 +93,7 @@
for XBee nodes via the :meth:sleep_cycle_set method.

  • PARAM_ORDER = (‘ST’, ‘SP’, ‘SO’, ‘SM’)
  • PARAM_ORDER = (‘ST’, ‘SP’, ‘SN’, ‘SO’, ‘SM’)

    def init(self, ext_addr):
    self.__parameters = { }

Sleeping devices are not ONLY hard to ‘auto-enum’, Sleeping devices hard to be configuring by dia also with static-configuration. When device awake for small time period (about 1s) the device manager unable to send all configuration parameters, the device isn’t go to running state. It is big trouble - dia+Sleeping devices.

I am also having trouble with sleeping devices not rejoining the network after the gateway reboots :frowning: Testing this is slow and boring…