Xbee Sensor LHT

How can I read the temperature and humity from a Xbee Sensor ?
There is an API example to do this?
It´s possible to read using AT commands?


There is some sample code on the support site - not sure where. I’ll ask around and see if someone can point you to it.

Or you can download the Digi Python ESP, then the same code will be in:
C:\Program Files\Digi\DigiPython\Dia\Dia_1.4.6\src\devices\xbee\xbee_devices\xbee_sensor.py

In a nutshell, you need to:

  • configure your sleep settings
  • config an auto-send for a sample (aka: it might wake up once per 15 minutes & send in the values)
  • you’ll need to have some code waiting for the auto-send (the “IS” commadn receipt)
  • there is a forumla to convert the raw 0-1023 binary into a temperature.

This info would be in the sample code.

Thanks , but I´m with a huge doubts about the API mode…
I could not to comunicate the xbee lht using API mode…
There are someone that helps me?There is some example to work with LHT sendor using API mode with .net,c#,labview?

Yes, there is a confusing point that tripped me up for several hours.

The docstring for xbee_sensor.py says:

A Dia Driver for the XBee Sensor /L/T(/H) Product.

Note: this is not the driver for the XBee Sensor Adapter product.

Ok, so I flip over my Sensor and it says XBee Sensor, ZB Bat /L/T on the label. The word “Adapter” does not appear anywhere on the box (front or back). Sure seems like this the correct py file for driving this device. Wrong!

On the ConnectPort X4, under Configurat>XBee Network>XBee devices, the device is listed as “XBee /L/T Adapter”. Well, what do you know, I have the Adapter version after all. Digital indentification win; box label fail.

Of course, the docstring above fails to answer the obvious question, Where is the driver for the XBee Sensor Adapter product? Apparently there isn’t one.

However, now knowing which product I actually had, some searching turned up a very nice example in

C:\Program Files\Digi\DigiPython\Python_Apps\Samples\xbee\xbee_lt_sensor

Works like a charm.

While the Digi XBee products and online docs are quite extensive, there seems to be some mysterious voids in basic operations. The informaton is either too low level or too high level with no middle ground. I wish I had time to write some tutorials for others on this road, because these missing key bits of info really make the learning curve steep (even for very experienced programmers like myself).

– James –

Any idea how I can access/configure the sensor without the gateway? I only have the sensor (configured as an AT End device, firmware 2813), an XBee ZB module series 2 (configured as an AT coordinator, firmware 20A7), a Raspberry Pi with a shield for the XBee. SO my communication with the sensor happens through the XBee module. So far I managed to connect the sensor to the XBee, but I don’t know how to get some data.

Does anyone have any idea about how I can configure the sensor through this setup?

Thank you,