Home/Support/Support Forum/How do I get the ESP sensor code to work?
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

How do I get the ESP sensor code to work?

0 votes
I have an XBEE gateway and an XBEE ZB LTH sensor and am trying to read the data from the sensor.

ESP is installed and discovers the gateway. The sensor's settings are all default, firmware version 2ca7. Sample rate (IR) = 0
D1, D2 and D3 are all set to 2 (analog input)

I loaded the xbee_lt_sensor code in ESP and copied the MAC address from the discovery tool and pasted into the sensorlt.py code on line 42:
sensor_address = "[00:13:a2:00:40:ae:c1:c9]!"

When I run the code, I get:
ValueError: Adapter is not a XBee Sensor /L/T Adapter

I am a newbie, for sure. What am I doing wrong?
asked Apr 7, 2015 in Python by radio_davio New to the Community (1 point)

Please log in or register to answer this question.

1 Answer

0 votes
I found the solution in the xbeelt.py file. By changing all instances of XBeeSensorLTAdapter to XBeeSensorLTHAdapter, it started working.

Then, as an added bonus, I found the formula for the humidity and modified the code the read and report the humidity. These modifications are somewhat obvious if you look at the code for light and temperature in xbeelt.py and sensorlt.py
answered Apr 7, 2015 by radio_davio New to the Community (1 point)
...