Hi everyboy;
Here is my problem, I have follow the sample code to
read XbeeWatchportT with no error .
But reading XbeeWatchportH temperature with errors,
here is my code
#config known destination
#Xbeewatchport T
DESTINATION=“[00:13:a2:00:40:0a:39:97]!”
#XbeewatchportH
DESTINATION2=“[00:13:a2:00:40:31:4d:b4]!”
#ensure sensor is power on from adater
#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()
xbee_temp.parse_sample(sample)
print “Temperature is: %f degrees C” %(xbee_temp.temperature)
sample1 = zigbee.ddo_get_param(DESTINATION2, ‘1S’)
xbee_temp = xbee_sensor.XBeeWatchportH()
xbee_temp.parse_sample(sample1)
==>
traceback (most recent call last):
File “”, line 24, in ?
File “WEB/python/xbee_sensor.py”, line 191, in parse_sample
self.sensor_rh = (1 / 0.0062) * ((v_output / v_supply) - 0.16)
TypeError: unsupported operand type(s) for /: ‘NoneType’ and ‘NoneType’
The reading to XbeewatchportH temperature xbee_temp.parse_sample(sample1)
has errors , how should I modify it ?!
Thanks for you kndly help
Message was edited by: john01
Message was edited by: john01