mduran80 / pymadoka

A python library to control Daikin BRC1H (Madoka) thermostat
MIT License
26 stars 8 forks source link

Sub-zero temperatures #19

Open dawidi opened 7 months ago

dawidi commented 7 months ago

Thank you for your work! I've started using the CLI tool to record the state and temperatures of the device cooling the server room at work (because it started shutting itself down randomly).

We're currently experiencing outside air temperatures around the freezing point, and the json reports collected overnight included temperature readings of 2, 1, 0, 128 and 129, 130 and 131 degrees for outdoor, while the indoor temperature oscillates between 19 and 23 degrees as expected.

I'm not familiar enough with python to be able to point at the exact line, but I'm guessing there's a bug in your library's interpretation of temperature values, and they need to be read as signed integers, instead of unsigned - or something to the effect of temp=(input>=128) ? 127-input : input; needs to be added for temperatures specifically.

I can very well imagine this situation simply didn't come up while testing...? :-)