# Xbee sensor sleep mode appears inconsistent

**URL:** <https://forums.digi.com/t/xbee-sensor-sleep-mode-appears-inconsistent/11321>\
**Category:** XBee - WiFi\
**Created:** [February 13, 2013, 1:40am UTC](https://forums.digi.com/t/xbee-sensor-sleep-mode-appears-inconsistent/11321 "2013-02-13T01:40:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![floridact](https://avatars.discourse-cdn.com/v4/letter/f/7ea924/32.png) [@floridact](https://forums.digi.com/u/floridact)\
**Post date:** [February 13, 2013, 1:40am UTC](https://forums.digi.com/t/xbee-sensor-sleep-mode-appears-inconsistent/11321/1 "2013-02-13T01:40:18Z")

</div>

Hi  
I am using the Xbee sensors ZB bat/L/T/H and a ConnectPort X2. The sensors are set for extended sleep and should wake up and send a single packet to the controller every 2mins which is running a single script to read that packet and post to a remote sql server.

When the program 1st sees a sensor it sets the following  
‘ir’, 1700)  
‘ST’, 2000)  
‘SP’, 2000)  
‘SN’, 6)  
‘SO’, 4)  
‘dh’, 0)  
‘dl’, 0)  
‘AC’, ‘’)

the xbee netowrk is opened with

```
xbee_socket = socket.socket(socket.AF_ZIGBEE,socket.SOCK_DGRAM,socket.ZBS_PROT_TRANSPORT) 
xbee_socket.bind(('', 0xe8, 0, 0))
xbee_socket.settimeout(1)

```

and accessed

```
nodes_list = zigbee.getnodelist(False)      

```

If I see any nodes in nodes\_list I issue

```
packet, source = xbee_socket.recvfrom(72)

```

and then  
if (source[3] == 0x92)

I process the packet  
I end up getting regular updates to my sql table but some outside the 2mins period expected.

device\_id device\_time reading Mvolt rssi rec\_nos  
[00:13:a2:00:40:79:2d:db] 2013-02-12T19:18:00 75.02 2927 35 15052  
[00:13:a2:00:40:79:2d:db] 2013-02-12T19:15:59 75.02 2927 35 15051  
[00:13:a2:00:40:79:2d:db] 2013-02-12T19:13:59 75.02 2927 35 15050  
[00:13:a2:00:40:79:2d:db] 2013-02-12T19:06:02 \< 75.02 2926 35 15049  
[00:13:a2:00:40:79:2d:db] 2013-02-12T18:58:06 75.02 2927 35 15048  
[00:13:a2:00:40:79:2d:db] 2013-02-12T18:56:07 \< 75.02 2927 35 15047  
[00:13:a2:00:40:79:2d:db] 2013-02-12T18:48:10 \< 75.02 2927 35 15046

Does anyone have any suggestions why that is or what it is I am missing here?  
Thanks for any help  
CT
