On Friday, 29 March 2019 17:28:47 UTC-3, kobuki wrote:
>
> But if I'm right, temps should also be wrong. For the NTC Davis is using 
> we already have the formula IIRC. 
>

Kobuki,

You are wrong! :-) The analog temperatures are calculated right, see code 
below:

============================================================
elif message_type == 8:
# outside temperature
# message examples:
# 80 00 00 33 8D 00 25 11 (digital temp)
# 81 00 00 59 45 00 A3 E6 (analog temp)
# 81 00 DB FF C3 00 AB F8 (no sensor)
temp_raw = (pkt[3] << 4) + (pkt[4] >> 4)  # 12-bits temp value
if temp_raw != 0xFFC:
if pkt[4] & 0x8:
# digital temp sensor
temp_f = temp_raw / 10.0
temp_c = weewx.wxformulas.FtoC(temp_f) # C
dbg_parse(2, "digital temp_raw=0x%03x temp_f=%s temp_c=%s"
  % (temp_raw, temp_f, temp_c))
else:
# analog sensor (thermistor)
temp_raw /= 4  # 10-bits temp value
temp_c = calculate_thermistor_temp(temp_raw)
dbg_parse(2, "thermistor temp_raw=0x%03x temp_c=%s"
  % (temp_raw, temp_c))
if data['channel'] == th1_ch:
data['temp_1'] = temp_c
elif data['channel'] == th2_ch:
data['temp_2'] = temp_c
else:
data['temperature'] = temp_c
============================================================
 
The formula of the humidity I didn't know. Probably my formula wont work 
then...

Luc

Reply via email to