Paul,

I've got two typo's in the code I send you. Sorry for that! The right code 
should be:

=================================================
elif message_type == 0xA:
# outside humidity
# message examples:
# A0 00 00 80 85 00 3E 1F (old model vantage pro)
# A0 00 00 C9 3D 00 2A 87 (new model vantage pro)
# A1 00 DB 00 03 00 47 C7 (no sensor)
humidity_raw = ((pkt[4] >> 4) << 8) + pkt[3]
if humidity_raw != 0:
# valid humidity value
if pkt[4] == 0x85:
# format of old model Vantage Pro2
humidity = (680 - pkt[3]) / 10.0
else:
# format of new model Vantage Pro2
humidity = humidity_raw / 10.0
if data['channel'] == th1_ch:
data['humid_1'] = humidity
elif data['channel'] == th2_ch:
data['humid_2'] = humidity
else:
data['humidity'] = humidity
dbg_parse(2, "humidity_raw=0x%03x value=%s" %
  (humidity_raw, humidity))
=================================================

Luc

Reply via email to