# DIN kit, dia.py overwrites sleep time settings

**URL:** https://forums.digi.com/t/din-kit-dia-py-overwrites-sleep-time-settings/2782
**Category:** Python
**Created:** [May 26, 2011, 3:17pm UTC](https://forums.digi.com/t/din-kit-dia-py-overwrites-sleep-time-settings/2782 "2011-05-26T15:17:39Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![bruixian](https://avatars.discourse-cdn.com/v4/letter/b/e274bd/32.png) [@bruixian](https://forums.digi.com/u/bruixian)
#### Post date: [May 26, 2011, 3:17pm UTC](https://forums.digi.com/t/din-kit-dia-py-overwrites-sleep-time-settings/2782/1 "2011-05-26T15:17:39Z")

</div>

Hi all,

We are starting with Digi and testing with Connectport X4 and some router and end node sensors. Basically we are using sample software provided by Digi with the kit. I’m sure this question will be very basic fro you, but are unable to find out where our problem is.

The doubt is following: Using dia.yml we configure the devices, and using the X4 gateway web interface we stablish sleep mode for those end nodes, but for some reason we do not detect, the cycling sleep period and time sleep are “self” changed. I have detected that the “process” that overwrites my settings is XbeeConfigBlockDDO.apply\_config.

We are using default xbee\_sensor.py driver from Digi.

This happens only with Digi devices. We are testing also other sensors from Pikkerton and with this devices (and their drivers9 we do not have the problem.

Any idea?

Thanks in advance for your time and help!

Note: I have opened a ticket for this, but no news from Digi, so I come here to request the community help.

---

<div class="post-metadata">

### Author: ![lynnl](https://avatars.discourse-cdn.com/v4/letter/l/22d042/32.png) [@lynnl](https://forums.digi.com/u/lynnl)
#### Post date: [May 26, 2011, 3:34pm UTC](https://forums.digi.com/t/din-kit-dia-py-overwrites-sleep-time-settings/2782/2 "2011-05-26T15:34:48Z")

</div>

Yes, for most Digi products, the Dia forces changes to sleeping settings. For example, the LT/LTH Sensor driver has a required settings called ‘sample\_rate\_ms’ which will be downloaded to the device.

The only solution is to either modify the xbee\_sensor.py file, or make use of the skip\_config\_addr\_list setting of the xbee manager (see below). This cause the Dia to set NOTHING in the device, but is also causes Dia not to understand how to set the SN/SP parameters of the X4 and routers correctly for sleeping end-devices.

- name: xbee\_device\_manager  
driver: devices.xbee.xbee\_device\_manager.xbee\_device\_manager:XBeeDeviceManager  
settings:  
skip\_config\_addr\_list: [“00:13:a2:00:40:4a:6e:83!”, “00:13:a2:00:40:32:14:FA!”]

---

<div class="post-metadata">

### Author: ![DigiGuy42](https://avatars.discourse-cdn.com/v4/letter/d/59ef9b/32.png) [@DigiGuy42](https://forums.digi.com/u/DigiGuy42)
#### Post date: [May 26, 2011, 3:26pm UTC](https://forums.digi.com/t/din-kit-dia-py-overwrites-sleep-time-settings/2782/3 "2011-05-26T15:26:02Z")

</div>

Yes, Dia by default assumes a lower bar on pre-configuration of XBee devices than the one that you have set. It uses configuration information from the dia.yml file to set the sleep for devices accordingly.

There are a couple things that I can recommend looking into that may help, both in the configuration of the ‘xbee\_device\_manager’ [https://developer.idigi.com/edocs/documentation/user/devices/xbee/xbee\_device\_manager.html](https://developer.idigi.com/edocs/documentation/user/devices/xbee/xbee_device_manager.html)

The first sounds like the best for you. If you are configuring the devices appropriately and independently, you can inform dia of this with the ‘skip\_config\_addr\_list’. Add the MAC of your XBee sensor to this list, and Dia will not attempt to configure it.

A similar approach is to let Dia configure it once. If you set the ‘update\_skiplist’ setting to True (If it’s not already), it will configure the device and after doing so update the skiplist so that it does not configure the device again.

---

<div class="post-metadata">

### Author: ![bruixian](https://avatars.discourse-cdn.com/v4/letter/b/e274bd/32.png) [@bruixian](https://forums.digi.com/u/bruixian)
#### Post date: [May 26, 2011, 3:29pm UTC](https://forums.digi.com/t/din-kit-dia-py-overwrites-sleep-time-settings/2782/4 "2011-05-26T15:29:04Z")

</div>

Hi,

Thanks DigiGuy24 for the tip. I’m going to make a look right now.

Regards,

Bruixian

---

<div class="post-metadata">

### Author: ![bruixian](https://avatars.discourse-cdn.com/v4/letter/b/e274bd/32.png) [@bruixian](https://forums.digi.com/u/bruixian)
#### Post date: [May 26, 2011, 3:44pm UTC](https://forums.digi.com/t/din-kit-dia-py-overwrites-sleep-time-settings/2782/5 "2011-05-26T15:44:29Z")

</div>

Hi,

Thanks Lynnl fr the tips. Please let me question: what do you mean when you say: “but is also causes Dia not to understand how to set the SN/SP parameters of the X4 and routers correctly for sleeping end-devices”? Does that means that if I add the devices to the “skip\_config\_addr\_list” and then I change sleep time on the X4, this changes will not take effect? If so, how can I set the sleep time to the LHT?

Thanks,

Bruixian

---

<div class="post-metadata">

### Author: ![lynnl](https://avatars.discourse-cdn.com/v4/letter/l/22d042/32.png) [@lynnl](https://forums.digi.com/u/lynnl)
#### Post date: [May 31, 2011, 1:40pm UTC](https://forums.digi.com/t/din-kit-dia-py-overwrites-sleep-time-settings/2782/6 "2011-05-31T13:40:07Z")

</div>

Correct. The “skip\_config\_addr\_list” setting tells the framework to complete ignore trying to configure the sensor because YOU already did it yourself.

It is your typical all or nothing. Either you want Dia to manage your LTH settings, or you do not.

You can always temporarily change the YML to force a new update, then restore the “skip\_config\_addr\_list” setting

---

<div class="post-metadata">

### Author: ![bruixian](https://avatars.discourse-cdn.com/v4/letter/b/e274bd/32.png) [@bruixian](https://forums.digi.com/u/bruixian)
#### Post date: [May 31, 2011, 8:59pm UTC](https://forums.digi.com/t/din-kit-dia-py-overwrites-sleep-time-settings/2782/7 "2011-05-31T20:59:34Z")

</div>

Well, I added the devices to the “skip\_config\_addr\_list” and, as you can spect, I don’t have the problem any more. Thanks both of you!

Best Regards,

bruixian
