vekexasia / comfoair-esp32

Interact with Zehnder Comfoair with esp32
Other
116 stars 38 forks source link

Wrong variable type (uint16) for pre_heater_temp_before and post_heater_temp_after #39

Open panosnl opened 1 year ago

panosnl commented 1 year ago

Today the temps dropped below zero and I noticed that one temp started showing wrong values. Since it was OK for T >0 I checked the code where it was declared as uint16

message.cpp, line 186: LAZYSWITCH(220, "pre_heater_temp_before", "%.1f", uint16/10.0) // C° LAZYSWITCH(221, "post_heater_temp_after", "%.1f", uint16/10.0) // C°

Changing it to int16 should solve the problem (I have to wait for tonight to confirm..)

LAZYSWITCH(220, "pre_heater_temp_before", "%.1f", int16/10.0) // C° LAZYSWITCH(221, "post_heater_temp_after", "%.1f", int16/10.0) // C°

nebman commented 1 year ago

Can confirm the problem over here with negative temps

$ mosquitto_sub -t "comfoair/pre_heater_temp_before" -v
comfoair/pre_heater_temp_before 6552.6
svde commented 1 year ago

rmot is probably also affected.

vekexasia commented 1 year ago

fixed in #46