We have moved at community.getvera.com

Author Topic: Nest thermostat Automation bug  (Read 1913 times)

Offline goyk

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
Nest thermostat Automation bug
« on: July 17, 2013, 08:14:11 pm »
I have a 2nd generation Nest thermostat with a Mios plugin, and set up an automation "Scene" to turn on to cool and set to 72 degrees.

When the thermostat is completely off, clicking the scene once seems to just turn on the Cooling mode, but it stays at the last set temperature it was set to before it was shut off.

Once on, clicking the scene again, sets it to the correct temperature.

Is this a bug in the plugin or in the Mios system? How do I report it to someone who can fix it?

Thanks!!

Offline capjay

  • Hero Member
  • *****
  • Posts: 675
  • Karma: +9/-3
Re: Nest thermostat Automation bug
« Reply #1 on: July 17, 2013, 09:27:04 pm »
The author of the plugin is active in the form, probably (s)he can provide better insight, but I'm guessing that the plugin wasn't able to handle 2 instantaneous commands. I suggest putting a delay (say 1m) between turning on and setting the temperature. You can do this by editing your scene, choose to turn on the Nest, then click on "immediate" button at top, choose "manage delays", add a delay of 1m, choose the 1m delay, and choose to set the temperature here.

Offline watou

  • Moderator
  • Hero Member
  • *****
  • Posts: 889
  • Karma: +44/-12
Re: Nest thermostat Automation bug
« Reply #2 on: July 17, 2013, 09:42:15 pm »
I have a 2nd generation Nest thermostat with a Mios plugin, and set up an automation "Scene" to turn on to cool and set to 72 degrees.

When the thermostat is completely off, clicking the scene once seems to just turn on the Cooling mode, but it stays at the last set temperature it was set to before it was shut off.

Once on, clicking the scene again, sets it to the correct temperature.

Is this a bug in the plugin or in the Mios system? How do I report it to someone who can fix it?

Thanks!!

I think I know what's going on, but I don't yet have an idea about what to do about it.  I think capjay's advice as a workaround is essentially correct.

The plugin needs to know what ModeStatus the thermostat is in before it knows how to send the command to change the setpoint correctly.  Right now, the plugin inspects its own ModeStatus variable, but at the time the plugin is trying to set the setpoint, the ModeStatus variable may still read "Off" because it's only using its local copy of the real state of the thermostat, instead of the newly changed ModeStatus of CoolOn.  And so the plugin won't send the correct command to change the setpoint until the next status update (which is only about 5 seconds away anyway).

An immediate workaround might be to do the following:
  • Set the thermostat mode to CoolOn as you're doing.
  • Wait at least 5 seconds, preferably more like 7 seconds, for the new status to be properly reflected in the plugin's ModeStatus variable.
  • Set the cooling setpoint.

A more permanent fix would be to find a way to know the current ModeStatus without requiring an additional status poll every time you want to change a setpoint, which would be way too much overhead (in my opinion).  Copying the ModeStatus into the device variable as it's being set is one option, but has the downside of only guessing that the value is accurately reflected in the actual thermostat, while it could in fact be changed from the thermostat itself or one of the native Nest clients.  I want to avoid having the plugin have "best guess" values for device variables, instead of precisely what nest.com actually told the plugin on a status poll.

The root issue here is that Nest's setpoints are specific to the thermostat's operating mode, so trying to change a setpoint without knowing the current ModeStatus will never be dependable.

I hope this explanation helps.  Please let me know if this workaround is livable for now, and if it works.

watou