how would i get the temperature from a wall router?

how would i get the temperature from a wall router? get_temperatures() doesn’t bring back the temperature from a Wall router only from temperature sensors like watchport sensors. So once I have a list of ports for each sensor/device how would I get the temperature from a Wall router? Thank you for your assistance.

Message was edited by: admin

I created a seperate thread for your question since the thread you posted it under had nothing to do with temperature readings.

The answer is that you’d do an IS poll of the sensor using python running on a CP-X gateway, or by some other means to do the poll.

A description of the IS command can be found on page 75 of the following manual:


I am using a sample program to get the temperature values from the wall router. My program is,

Collect a sample from a known XBee Sensor adapter

and parse it into a temperature.

import zigbee and xbee_sensor modules:

import zigbee
import xbee_sensor

configure known destination:


ensure sensor is powered from adapter:

zigbee.ddo_set_param(DESTINATION, ‘D2’, 5)
zigbee.ddo_set_param(DESTINATION, ‘AC’, ‘’)

get and parse sample:

sample = zigbee.ddo_get_param(DESTINATION, ‘1S’)
xbee_temp = xbee_sensor.XBeeWatchportT()
print “Temperature is: %f degrees Celsius” % (xbee_temp.temperature)

After running the code, I am getting the error,

“Exception: ddo_get_param: error fetching DDO parameter.”

I have attached the image file. Please advice.


Hi there,

It seems you’re using the wrong code example to get these values from a Wall Router’s embedded Temp Sensor.

Please refer to file “Python Drivers for Digi Adapters” at this link:

The sample you’ll want to refer to is called, and is found within the file within

This will show you how to do the IS sample (needed), rather than 1S sample (incorrect, as its used for the 1-Wire Sensors rather than the Sensor embedded in the Wall Router).

Thanks for the help. It did work out for me…

My aim is to send the temperature sample from wallrouter to one of the Xbee module connected with serial port of the computer.

Following the program I wrote with the help of sample ones…

from socket import *
import sys

Import the library from the zip file

import xbeewr
import zigbee

The Xbee Wallrouter’s hardware address

DESTINATION = “[00:13:a2:00:40:34:13:05]!”

The Xbee module address

0xe8, 0xc105, 0x11)

Create a sensor object

wallrouter = xbeewr.XBeeWRN(DESTINATION)

Create the socket, datagram mode, proprietary transport:


Bind to endpoint 0xe8 (232):

sd.bind((“”, 0xe8, 0, 0))

sample = wallrouter.sample()
print “Temperature (Degrees) :”, sample[‘temperature’]
sd.sendto(sample[‘temperature’], 0, matlab)

After running the code, the error says,

TypeError: sendto() argument 1 must be string or read only buffer, not float.

Please help.