chrisjshull / homebridge-nest

Nest plugin for HomeBridge
699 stars 112 forks source link

Target Temperature: characteristic error #581

Closed hvjackson closed 1 year ago

hvjackson commented 1 year ago

I'm seeing my HomeBridge log filled with error messages like this:

[homebridge-nest] This plugin generated a warning from the characteristic 'Target Temperature': characteristic was supplied illegal value: number 5 exceeded minimum of 10. See https://homebridge.io/w/JtMGR for more info.

This thermostat is currently set to "Off" in the Nest app.

when I enable HomeKit debugging I get somewhat more logging info:

[11/15/2022, 9:07:45 AM] [Nest] initing thermostat "Gym Thermostat": deviceId: 09AA01AC46150653 structureId: eb25f510-3c49-11e4-b264-22000b3280d6
[11/15/2022, 9:07:45 AM] [Nest] Temperature unit for Gym Thermostat is: Fahrenheit
[11/15/2022, 9:07:45 AM] [Nest] Current temperature for Gym Thermostat is: 5.022 °C / 41.04 °F
[11/15/2022, 9:07:45 AM] [Nest] Current humidity for Gym Thermostat is: 48%
[Gym Thermostat@@Target Temperature] characteristic was supplied illegal value: number 5 exceeded minimum of 10
[11/15/2022, 9:07:45 AM] [Nest] Cooling threshold temperature for Gym Thermostat is: 23.900000000000002 °C / 75.02 °F
[11/15/2022, 9:07:45 AM] [Nest] Heating threshold temperature for Gym Thermostat is: 20 °C / 68 °F
[11/15/2022, 9:07:45 AM] [Nest] Online status for Gym Thermostat is: true
[11/15/2022, 9:07:45 AM] [Nest] Sunlight Correction Enabled for Gym Thermostat is: true

and later a stack trace:

[11/15/2022, 9:12:08 AM] [homebridge-nest] This plugin generated a warning from the characteristic 'Target Temperature': characteristic was supplied illegal value: number 5 exceeded minimum of 10. See https://homebridge.io/w/JtMGR for more info.
[11/15/2022, 9:12:08 AM] [homebridge-nest] Error: 
    at TargetTemperature.Characteristic.characteristicWarning (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2138:105)
    at TargetTemperature.Characteristic.validateUserInput (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2050:14)
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1617:24
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/once.ts:10:18
    at NestThermostatAccessory.<anonymous> (/homebridge/node_modules/homebridge-nest/lib/nest-device-accessory.js:76:27)
    at TargetTemperature.emit (node:events:390:28)
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1592:14
    at new Promise (<anonymous>)
    at TargetTemperature.<anonymous> (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1590:12)
    at step (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:144:27)
adriancable commented 1 year ago

@hvjackson - is anything not working correctly, or do you just not like the message?

hvjackson commented 1 year ago

I don't think it's causing an issue, but the HomeBridge documentation says to report this error to developers so I have done so! If you think it's harmless, that's fine with me.

Based on the debug output it seems like the plugin might be getting an unexpected value for "Target Temperature" when the thermostat is set to "off".

adriancable commented 1 year ago

This is a duplicate of #444. It's a consequence of the fact that Nest has a variable lower target temperature limit depending on mode (eco/safety/normal) whereas HomeKit does not support such a thing. You can ignore it.