KraigM / homebridge-nest

Nest plugin for HomeBridge
210 stars 72 forks source link

Properly handling “below” and “above” temperatures #169

Open ELLIOTTCABLE opened 6 years ago

ELLIOTTCABLE commented 6 years ago

So, when trying to adjust the temperature via HomeKit or my HomePod, I eventually get an error like the following:

[2018-2-10 08:06:45] [Nest] Trying to set temperature 26
[2018-2-10 08:06:46] [Nest] Trying to set temperature 25
[2018-2-10 08:06:46] [Nest] Trying to set temperature 24
FIREBASE WARNING: set at /devices/thermostats/Rb9i_ioL4gvjgpFh8Nv5685pudk5On5A/target_temperature_low_c failed: Cannot set target low temperature '%s' higher than target high temperature '%s'
[2018-2-10 08:06:51] [Nest] Temperature set to 24

… or, sometimes, the following:

[2018-2-10 08:07:57] [Nest] Trying to set temperature 20
[2018-2-10 08:08:02] [Nest] Temperature set to 20
[2018-2-10 08:08:10] [Nest] Trying to set temperature 21
[2018-2-10 08:08:15] [Nest] Temperature set to 21
[2018-2-10 08:08:20] [Nest] Trying to set temperature 22
[2018-2-10 08:08:25] [Nest] Temperature set to 22
[2018-2-10 08:08:28] [Nest] Trying to set temperature 23
[2018-2-10 08:08:28] [Nest] Trying to set temperature 24
FIREBASE WARNING: set at /devices/thermostats/Rb9i_ioL4gvjgpFh8Nv5685pudk5On5A/target_temperature_low_c failed: Cannot set target temperature closer than %s degrees %s
[2018-2-10 08:08:33] [Nest] Temperature set to 24

As far as I can tell, homebridge-nest only attempts to set the “low” temperature.

This is a bit of a thorny problem, though, as I doubt there's any real way to expose this functionality in the Home app? Can thermostat objects have two temperatures?

I see two possible ways of dealing with this:

  1. Attempt to adjust one temperature (default to “low” in the winter, and “high” in the summer, perhaps?), watch, and if that fails, adjust the other temperature instead (this fails to adjust the “closer than %s degrees” error)

  2. Attempt to maintain a “middle point” target-temperature halfway between the two set temperatures, and report that middle-point to HomeKit; then, when receiving an update, update both the “high” and “low” to make the desired temperature the new middle-point.

Both seem to have some downsides; but either is better than Nest thermostats simply failing to update, silently, with no feedback as to why it failed, unless one opens up the Homebridge logs …

chrisjshull commented 6 years ago

(deleted)

chrisjshull commented 6 years ago

(ignore previous, wrong thread)

but do try using my fork, it has a lot of fixes from people merged in, and I'm pretty sure it adds support for min and max settings (nest "auto" mode): npm install -g "https://github.com/chrisjshull/homebridge-nest"

chrisjshull commented 6 years ago

Great news! I have taken up maintenance of the homebridge-nest plugin in npm. The source code now lives at https://github.com/chrisjshull/homebridge-nest/. To update to the latest version of homebridge-nest, simply run npm update -g homebridge-nest. If you've been using the fork via URL, simply do npm install -g homebridge-nest.

1moreRobot commented 6 years ago

Hi! Thanks for the work on the plugin. Is there a way to turn this new auto mode functionality off? I just want to be able to say "set the temperature to x" and have it stick with whatever mode the Nest is currently in (warm in the wintertime, cool in the summertime). I don't like auto mode at all, but can't seem to figure out how to avoid it now.

ersan commented 6 years ago

I opened an issue on the new github because I'm having the same issue as @1moreRobot - https://github.com/chrisjshull/homebridge-nest/issues/47

toshibochan commented 6 years ago

I don’t like auto mode to! Keep turning ON by self! Please take out auto mode!

1moreRobot commented 6 years ago

I ended up just jumping down to a previous version (1.1.3) for the time being, and the behavior is back as I want it, with no ranged temperatures and no auto mode. Like I said though, I do appreciate that work is continuing on this plugin, and will keep an eye on future updates.

ersan commented 6 years ago

I checked out https://github.com/chrisjshull/homebridge-nest/commit/356e13ebb3ffb703cfc8a2ddfdc0b5988f750258 because I really wanted some of the new features (notably the eco mode switch) and this was the last version that didn't have code that automatically turns on heat/cool mode. It works great for me.