Bouni / python-luxtronik

python-luxtronik is a library that allow you to interact with a Luxtronik heatpump controller.
MIT License
37 stars 20 forks source link

fix issue with ip4 addresses below 128.0.0.0 #8

Closed steff333 closed 4 years ago

steff333 commented 4 years ago

If IP addresses are below 128.0.0.0 the corresponding integer value is not below 0, so adding 2 **32 to the value results in illegal values and the reading of values crashes

kbabioch commented 1 year ago

Okay, this might explain the change needed to the _from function, i.e. for values received from the heat pump. For the _to function I still don't get it, since you're adding 2**32 to the value before passing it into the ipaddress library. This will result in an Error.

If, at all needed, the value needs to be added to the resulting calculation of ipaddress.

I will try to reproduce this later on. Do you happen to know where this report was coming from and/or which parameter was affected by this?