yozik04 / nibe

Library for communication with Nibe heatpumps.
GNU General Public License v3.0
46 stars 33 forks source link

Out of range values from some pumps #116

Open elupus opened 12 months ago

elupus commented 12 months ago

Seems some pumps have really weird out of range values. See https://github.com/home-assistant/core/issues/100852#issuecomment-1751118757 these cause reading to throw exceptions.

I'm pondering if we should demote range checks for decode to only log warnings, or even just log debug messages. We can still validate on write.

yozik04 commented 12 months ago

If you read a single coil then ReadException is what you expect on failure. When a full table is read then, I think, it just logs a warning.

elupus commented 12 months ago

Well, its not like the max/min have a real affect on things. We can still represent the value. So getting the out of range value (on read) might be more useful, given the rather poor quality of the databases of parameters.

Raising on write does make sense, to not confuse the pump.

yozik04 commented 12 months ago

I've seen invalid temperature readings previously. My MAX485 module is not that good because I see some mess on the line. After adding pull up registers oscilloscope started to display a better picture but far from perfect.. I do get read errors quite frequently. I was thinking that in the read response packet checksum somehow managed to be correct but readings were off (1000 degrees or above).

Also during a reboot you can get out of range values quite easily. Maybe we fixed it with def _is_hitting_integer_limit(self, coil: Coil, int_value: int):

I'd better keep range checks to keep these two issues away.