apetrycki / daikinskyport

API for accessing a DaikinOne+ Thermostat
63 stars 27 forks source link

Are percentages actually 0..255? #29

Closed knightjoel closed 2 years ago

knightjoel commented 2 years ago

I'm wondering if we got it wrong in 9df2d624 and 0ef0493c where we said that percentage values returned by the API are in the range 0..200. I had maintenance done on my outdoor unit recently and the breakers were opened. During that time, the data coming from the API appeared to max out.

D8738225-481D-4819-94F6-9447C1C1071F

Given power jumps to a power of two value, it seems logical that the first two values would do the same and that the API would've been returning 255. Since 0ef0493c, the API values are divided by two and that's why we get 127.5 in HA.

I wonder if the formula for frequency should be x/255 * 100? I don't know how to validate this other than this anecdotal evidence.

apetrycki commented 2 years ago

Generally if it's a 255 value, that means there's an error in the value. If you had values between 200 and 255, I would agree. If you look at some of the values for things your system doesn't support, you'll see 255 instead of a real number.

knightjoel commented 2 years ago

Yes, I stand corrected. It occurred to me that the thermostate shows some metrics in the dealer menu (dealer menu / 4. system optimization / status / {air conditioner,furnace}). With the furnace on, I look at the requested heat demand value on the tstat and it correlates exactly with the value for ctIFCHeatRequestedDemandPercent returned from the API divided by 200. This holds true for other metrics as well. So it would seem that the percentage values are 0..200, while an error value is 255.

Apologies for the noise :)