chrisjshull / homebridge-nest

Nest plugin for HomeBridge
699 stars 112 forks source link

Homebridge Error Log related to Charateristics #598

Closed ChrisColotti closed 1 year ago

ChrisColotti commented 1 year ago

Describe the bug This error is seen in the HB logs repeatedly. This may have started after the latest HB update these were not there before if I recall

This plugin generated a warning from the characteristic 'Cooling Threshold Temperature': characteristic was supplied illegal value: number 8.3 exceeded minimum of 10. See https://homebridge.io/w/JtMGR for more info.

To Reproduce Steps to reproduce the behavior:

  1. plugin was running for 3-4 months no issues.

Expected behavior

Include with your bug report this version info:

node --version 18.12.1
homebridge --version 1.6.0

Make sure you have the latest LTS from https://nodejs.org and the latest packages: npm upgrade -g homebridge homebridge-nest

Also include debug log output from startup through seeing the issue: DEBUG=* homebridge -D

ChrisColotti commented 1 year ago

I found this and yes I have a new NEST that has NO cooling only heating..

https://github.com/chrisjshull/homebridge-nest/issues/389#issuecomment-898847883

moerloos commented 1 year ago

I have this issue, as well:

Nest Bridge 7ED9@Family Room Thermostat@@Heating Threshold Temperature] characteristic was supplied illegal value: number 9.444444444444445 exceeded minimum of 10

kevinberthiaume commented 1 year ago

I also have this in the log : B039FAC1-67DB-4C0F-8EF4-B35DBE9B2852

adriancable commented 1 year ago

Duplicate of #581 (and many others). This isn't an error.

tpitale commented 1 year ago

Why does the plugin output a warning if it's not something you can fix?

adriancable commented 1 year ago

It’s not the plug-in outputting a warning, it’s Homebridge. The reason is that Nest thermostats have different min/max limits for setting and reading temperature ranges (for example, safety temperature setpoints are lower than temperatures that can be manually set). Homebridge doesn’t like this and so throws a warning, and there’s no way you can stop it from doing so, but you can ignore it because it doesn’t mean anything is wrong and has no functional impact.

tpitale commented 1 year ago

Thank you for the extra info. That was what I was searching for. I found you shared this on another one of the many versions of this issue. I will try to submit a PR to homebridge to either update the docs with this helpful explanation, or perhaps add an option to silence these warnings.

JurgenLB commented 1 year ago

It is a warning from Homebridge, but the reason is that the Plugin does not change the standard limits from Homebridge. There are parameters that the plugin can use for changing the limits, so for this you need to look at the plugin and not Homebridge

adriancable commented 1 year ago

@JurgenLB - let me add some more detail and hopefully put this one to bed.

On a Nest thermostat, under a number of different circumstances, the returned temperature setpoints can be lower (or higher) than what can be manually set. For example, if safety temperatures are active, the heating threshold setpoint can go down to 35 degrees F. However, it is not allowed by thermostat to manually change the heating threshold to any value below 50 degrees F. So in this example, there is a difference in the value range allowed for a characteristic 'get' for Characteristic.HeatingThresholdTemperature and the value range allowed for a characteristic 'set' for Characteristic.HeatingThresholdTemperature. HomeKit does not support such a thing. Yes, you can indeed set minValue in the props for the characteristic (and of course the plug-in does this already) and this affects the range on the thermostat dial UI in Apple Home. But you cannot set different values of minValue for reading and writing the characteristic.

So there are two choices. One, I set minValue for Characteristic.HeatingThresholdTemperature to 35 degrees F (i.e. the minimum threshold temperature the thermostat can return via an API 'read'). This would prevent all warnings. But it would also lead to an incorrect UI in the Apple Home app, because it would produce a thermostat dial UI that can be adjusted all the way down to 35 degrees F, which is incorrect and misleading because setting temperatures below 50 degrees F will fail and cause an API error on the Nest side.

Two, I set minValue for Characteristic.HeatingThresholdTemperature to 50 degrees F (i.e. the minimum threshold temperature the thermostat can set via an API 'write'). This produces the warnings you see but leads to a correct rendering of the thermostat dial UI in the Apple Home app, and prevents users setting an invalid temperature below 50 degrees F which would fail.

I chose option two. I think under the circumstances this is clearly the right choice.