We have moved at community.getvera.com

Author Topic: Nest plugin causing auto away  (Read 4316 times)

Offline Floridagator

  • Sr. Newbie
  • *
  • Posts: 42
  • Karma: +0/-0
Nest plugin causing auto away
« on: October 28, 2013, 11:21:18 pm »
So for a couple of months I had used this plugin without a problem, but 2-3 months ago when the Vera switches them into "Home" mode the thermostats immediately go into auto away mode. This does not happen when using Nest's website or iPad application. Anyone else seen this behavior?

Offline watou

  • Moderator
  • Hero Member
  • *****
  • Posts: 889
  • Karma: +44/-12
Re: Nest plugin causing auto away
« Reply #1 on: October 29, 2013, 04:28:34 am »
So for a couple of months I had used this plugin without a problem, but 2-3 months ago when the Vera switches them into "Home" mode the thermostats immediately go into auto away mode. This does not happen when using Nest's website or iPad application. Anyone else seen this behavior?

I've not heard that or a similar report before.  When you say "auto away" mode do you mean "away" mode?  "Auto away" mode is the thermostat switching into away mode after some time of no one moving near the thermostat.  The Nest plugin does not intentionally switch the thermostat into auto away mode (and I don't think the plugin switches it unintentionally).  The plugin can only switch a thermostat to either home or away -- the "auto away" function isn't part of the plugin.

Are you sure you don't have a bit of forgotten automation defined in your Vera that is being triggered by a state change in the plugin?  This is probably not it, however, because the plugin should respond the same regardless of what changed the thermostat's state -- mobile apps, web, physical thermostat settings, or plugin.

Are you running the latest (1.3) release of the plugin? 

Please provide whatever other detailed information you can.

Regards,
watou

Offline Floridagator

  • Sr. Newbie
  • *
  • Posts: 42
  • Karma: +0/-0
Re: Nest plugin causing auto away
« Reply #2 on: October 29, 2013, 08:49:36 am »
I agree with you, this doesn't make sense. I know the plugin should only switch between away and home. If I disable the auto-away feature on my thermostats everything works fine. I do have two units, but that still doesn't change anything. I've even gone so far as to get a warranty replacement for one of my units.

If I login into the Vera and change to home, the thermostats switch to home, start the AC and then immediately go into Auto-away.

The version I have installed is 1.1 and it is not auto updating despite it being checked in the app.

The one thing that Nest support said is that the thermostats could go into auto away if they receive multiple "home" commands in quick succession.

Offline garrettwp

  • Master Member
  • *******
  • Posts: 6371
  • Karma: +227/-128
  • Vera 3, Lite, ISY994
Re: Nest plugin causing auto away
« Reply #3 on: October 29, 2013, 09:08:59 am »
Version 1.3 is the latest and a force update can be done using the following link:

http://yourveraip:3480/data_request?id=update_plugin&Plugin=3116

Change yourveraip to your vera's ip address.

- Garrett

Offline watou

  • Moderator
  • Hero Member
  • *****
  • Posts: 889
  • Karma: +44/-12
Re: Nest plugin causing auto away
« Reply #4 on: October 29, 2013, 09:19:38 am »
If I login into the Vera and change to home, the thermostats switch to home, start the AC and then immediately go into Auto-away.

By this do you mean to say that the AC immediately turns off after starting because the thermostat entered away mode?  Wouldn't auto-away mean that after some period of no one passing by the thermostat, it then switches to away?  I'm just trying to get a very detailed step-by-step here so I know what's going on.

The one thing that Nest support said is that the thermostats could go into auto away if they receive multiple "home" commands in quick succession.

Good to know.  There ought not be any multiple commands sent when only one was expected to be sent. 

I'm also wanting to know if you ruled out all automation on your Vera as being a possible culprit.

The only other thought I have about this is focused on timestamps.  Line 564 of I_Nest1.xml is part of setting home and away and looks like this:

Code: [Select]
local data = '{"away_timestamp":' .. tostring(os.time()) .. '000,"away":' .. tostring(away) .. ',"away_setter":0}'

(URL: https://github.com/watou/vera-nest-thermostat/blob/master/src/I_Nest1.xml#L564)

The away_timestamp is, I think, milliseconds since the Epoch.  But if it were instead in some local or DST-adjusted timestamp, then that could be enough to trip up some computation of how it's been since someone walked past the thermostat, for example.  Or it may be that away_timestamp ought to only be set when away is being set to true.  I hope we can find a resolution soon, but when I rewrite the plugin against the official API this mystery should be wrung out of the equation.

Regards,
watou

Offline Floridagator

  • Sr. Newbie
  • *
  • Posts: 42
  • Karma: +0/-0
Re: Nest plugin causing auto away
« Reply #5 on: October 29, 2013, 09:17:56 pm »
I upgraded to 1.3 tonight, so hopefully I will get to test tomorrow.

I know this is going to sound very strange, but this is what happens. When I leave the house I have a scene that turns the AC to "Away". I also have a scene that is triggered when I open the door that turns the AC to "Home". I open the door, I hear the AC kick on and then turn right off. I walk over to the Nest and it says "Auto-away" and then switches to cool (because it detects me standing in front of it) and begins the countdown to turn the AC back on (the safety countdown built in to prevent the units from cycling too much).

I've had the same results when switching the unit to home from the vera directly as well (this would rule out automation on the unit).

Its the strangest thing, this used to work fine and then just stopped out of the blue.

When does the Nest developer program start, hasn't it been about a month since they announced it?

Thank you both for the help, I'll let you know how 1.3 treats me.

Offline watou

  • Moderator
  • Hero Member
  • *****
  • Posts: 889
  • Karma: +44/-12
Re: Nest plugin causing auto away
« Reply #6 on: October 30, 2013, 05:55:44 am »
The one thing that Nest support said is that the thermostats could go into auto away if they receive multiple "home" commands in quick succession.

This is sounding a little more likely to me, as there is some chance that your automation might be causing this unintentionally.  When the plugin is told to set home or away mode, it does, even if it's told to do so multiple times.  If you could perform a test with all automation disabled, that would help distinguish where the root cause lies. 

Or, if you add ",35" to your LogLevels in /etc/cmh/cmh.conf (see http://wiki.micasaverde.com/index.php/Luup_Debugging for more info), then every time you or your automation sets home or away, you will see "in setAway()" in the /var/log/cmh/LuaUPnP.log file.  If you see more of these lines than you expect, this may be the root cause.

Good luck and let us know if you find out more.

Regards,
watou

Offline Floridagator

  • Sr. Newbie
  • *
  • Posts: 42
  • Karma: +0/-0
Re: Nest plugin causing auto away
« Reply #7 on: November 04, 2013, 08:06:13 pm »
Well so far I haven't had any problems in a few days. Question is, don't know what solved the issue. I did upgrade to 1.3, but the same day I was going to test to see if that resolved, the switch that my AP is plugged into died and needed to be replaced. So I guess in theory it could have been the switch dying too.

Thanks again for everyone's help.