dehsgr / node-red-contrib-evohome

This provides nodes for controlling Honeywell Evohome
ISC License
5 stars 7 forks source link

Nr of decimals #24

Open MikeyMan83 opened 1 year ago

MikeyMan83 commented 1 year ago

Hi!

Would it be possible to add the number of decimals to the configuration? Evohome supports two decimals. Would be nice to have them available. Currently it's only half degrees.

Br, Michael

dehsgr commented 1 year ago

Hi. I currently see no effect adding decimals to configuration. The node is returning the data as received from Evohome without any influence from the plugin's site. Unfortunately I don't see any possibility for providing this setting back to Evohome. Maybe I'm missing sth.?

MikeyMan83 commented 1 year ago

Hmm... That's weird... In domoticz the plugin for the API does provide that option, so it must be there somewhere.

The reason I'm asking is that I don't trust the way evohome rounds a bit. It rounds towards the setpoint. With double digits it doesn't seem to do that.

Let me have a look if I can find the python for the domoticz api.

MikeyMan83 commented 1 year ago

Does this help? Line 61 and beyond:

https://github.com/domoticz/domoticz/blob/development/hardware/EvohomeWeb.cpp

dehsgr commented 1 year ago

Not really. Can’t imagine that line 1935 and following would do what we try to get working. But this might be some kind of unclear to me.

MikeyMan83 commented 1 year ago

Ah, found out there's a second part to the plugin... C++, so no clue how it works: https://github.com/domoticz/domoticz/blob/development/hardware/EvohomeWeb.h

MikeyMan83 commented 1 year ago

Looking at the HA integration i found the following:

Temperature Precision
Note that TCC devices may well measure temperatures with very high precision, but the vendor API will report temperatures rounded towards the setpoint (i.e., either up or down) with a precision of 0.5 °C; this a proxy for the deadband as used by other climate systems. Where possible, this integration will leverage an older vendor API to obtain current temperatures with a precision of 0.01 °C.

Therefore, depending upon the above, Home Assistant will display/record current temperatures with a precision of either 0.5 °C or 0.1 °C (it’s highest supported precision).

https://www.home-assistant.io/integrations/evohome/

Exactly what i meant :)

dehsgr commented 1 year ago

I see. But you didn‘t mention that there would be a call to an old API to get those values. I think this is a risk for fetching that data because we‘ve to expect that this old API might be deleted in future. Isn’t it?

dehsgr commented 1 year ago

Nevertheless I‘m not sure how to implement for now.

MikeyMan83 commented 1 year ago

Tbh; i didn't know it was a hybrid API till i just found out this.

And yes it's a risk, for which you can probably build a function "If value from V1 available then value from V1, otherwise V2'. But i understand you wouldn't want to go down that rabbithole.

I really dont understand the absurd way evohome is rounding is also the way the API data works. Totally rediculous.