We have moved at community.getvera.com

Author Topic: Nest issues  (Read 21323 times)

Offline strangely

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3722
  • Karma: +34/-2
  • Vera 1,3 & V light
Re: Nest issues
« Reply #30 on: March 18, 2014, 02:25:48 pm »
I would call it unofficial, and I would not support it either if I was you :)

People have been warned about updating.
Kwickset locks, HA01C, HA14C, HA02C, HA03C, HA05C, HA04C, HA07C, HA09C, Aeon HEM, GE 45604, 45606, 45609, ZDP100, VRF01-1LZ, WDTC-20, HA18WD, WDHA-12R, HRDS1, HM-TS001, AC1-ZW, TV-IP110, BL-C210A, LUUP control- EtherRain8, DSC Alarm, HDMI matrix, HR24-200, Panasonic TV, SQblaster

Offline aaronsquire

  • Full Member
  • ***
  • Posts: 144
  • Karma: +3/-0
Re: Nest issues
« Reply #31 on: March 18, 2014, 03:14:34 pm »
I'm an unofficial accident to UI6... Wish I would have read forum and knew it wasn't official but listed on the website as update. I'm running fine and all, just the nest device reading temp wrong only problem I know of at the moment. Rest of plugins i'm using are UI6 compatible and also my phone app updated. No reason to for anyone to update though, nothing really different other than login.
Thanks!

Offline watou

  • Moderator
  • Hero Member
  • *****
  • Posts: 889
  • Karma: +44/-12
Re: Nest issues
« Reply #32 on: March 18, 2014, 03:23:42 pm »
To anyone who is using the unofficial UI6 and is having trouble with the temperature scale in the Nest plugin: you are invited to hack the I_Nest1.xml file uploaded earlier in this topic, and change the 149th line in a text editor:
Code: [Select]
veraTemperatureScale = ((code == 0) and (data ~= nil) and (data.temperature ~= nil)) and data.temperature or "F"to
Code: [Select]
veraTemperatureScale = "F"or
Code: [Select]
veraTemperatureScale = "C"as you wish.  You would have to make a similar change in future plugin releases, until...
When there is an official UI6, or when there is official guidance on how plugins can reliably detect the preferred temperature scale on both UI5 and later versions, I will update the plugin.  Until then, it is either a bug in UI6 or at the very least a moving target I would prefer not to try to track.

Offline mhurst

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
Re: Nest issues
« Reply #33 on: March 18, 2014, 09:03:08 pm »
The new XML resolved my issue as well. I just noticed it was not connected.. not sure how long it was out as I was out of town.

Thanks for the quick fix!

Offline strangely

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3722
  • Karma: +34/-2
  • Vera 1,3 & V light
Re: Nest issues
« Reply #34 on: March 19, 2014, 12:30:27 am »
I wonder why some of us were affected, and others not?
Kwickset locks, HA01C, HA14C, HA02C, HA03C, HA05C, HA04C, HA07C, HA09C, Aeon HEM, GE 45604, 45606, 45609, ZDP100, VRF01-1LZ, WDTC-20, HA18WD, WDHA-12R, HRDS1, HM-TS001, AC1-ZW, TV-IP110, BL-C210A, LUUP control- EtherRain8, DSC Alarm, HDMI matrix, HR24-200, Panasonic TV, SQblaster

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: Nest issues
« Reply #35 on: March 19, 2014, 01:02:58 am »
I wonder why some of us were affected, and others not?
Rolling software upgrades.

Mine weren't impacted until yesterday, then I applied the patch and all was well again.

Offline watou

  • Moderator
  • Hero Member
  • *****
  • Posts: 889
  • Karma: +44/-12
Re: Nest issues
« Reply #36 on: March 19, 2014, 09:12:02 am »
Hi all,

To anyone who is seeing what appears to be a dead connection, reenter your nest.com password and press the Set button.  I just had to go through that to get a working connection again.  If anyone has any insights to add to that, please do so here.

Regards,
watou

Offline aaronsquire

  • Full Member
  • ***
  • Posts: 144
  • Karma: +3/-0
Re: Nest issues
« Reply #37 on: March 19, 2014, 09:53:34 am »
To anyone who is using the unofficial UI6 and is having trouble with the temperature scale in the Nest plugin: you are invited to hack the I_Nest1.xml file uploaded earlier in this topic, and change the 149th line in a text editor:
Code: [Select]
veraTemperatureScale = ((code == 0) and (data ~= nil) and (data.temperature ~= nil)) and data.temperature or "F"to
Code: [Select]
veraTemperatureScale = "F"or
Code: [Select]
veraTemperatureScale = "C"as you wish.  You would have to make a similar change in future plugin releases, until...
When there is an official UI6, or when there is official guidance on how plugins can reliably detect the preferred temperature scale on both UI5 and later versions, I will update the plugin.  Until then, it is either a bug in UI6 or at the very least a moving target I would prefer not to try to track.

Thanks, that fixed it.
Thanks!

Offline MarvieMonkey

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Re: Nest issues
« Reply #38 on: March 19, 2014, 09:36:25 pm »

I had the connection problem as well, which was fixed by the new .xml file (thanks watou) and I immediately had good connection again.  The following morning I noticed that I had lost connection again, so I followed the tip to re-enter the password and hit "set."  That fixed the problem, but again only temporarily.  6 or 8 hours later I noticed connectivity was lost again.  Re-entering the password immediately brings connectivity back.

Is anyone else finding that the fix is only sticking temporarily or is it just me?

Offline watou

  • Moderator
  • Hero Member
  • *****
  • Posts: 889
  • Karma: +44/-12
Re: Nest issues
« Reply #39 on: March 20, 2014, 08:04:52 am »
Is anyone else finding that the fix is only sticking temporarily or is it just me?

I am constantly checking my connection to see if I encounter this problem, but so far I've only had to force a fresh login the one time (reported earlier).  It's entirely possible that there is some semantic difference recently introduced in the session logic, but as of yet I don't have enough to go on.  I am obviously interested in hearing others' observations, in hopes that we can keep the current plugin humming along until there is an official, documented API to switch to.

Regards,
watou

UPDATE: I just saw my session had "fouled" again, and needed the login refreshed by re-entering the username or password and pressing the "Set" button.  If anyone can find anything in the logs related to this, please let me know and I will take a look tomorrow.

UPDATE 2: I saw the stale connection just now again, but the native web client is also now stuck with stale data, so it makes me wonder if this might be an unintentional change that is causing this issue.  Any observations and insights welcome.
« Last Edit: March 20, 2014, 06:44:22 pm by watou »

Offline Ds514

  • Full Member
  • ***
  • Posts: 189
  • Karma: +2/-0
  • Because automatic.
Re: Nest issues
« Reply #40 on: March 20, 2014, 08:21:58 am »
Originally reported disconnect problem surfaced on my Nest in Canada this morning. Updated to 1.5 in the marketplace and have reconnection.

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: Nest issues
« Reply #41 on: March 20, 2014, 11:27:38 pm »
UPDATE: I just saw my session had "fouled" again, and needed the login refreshed by re-entering the username or password and pressing the "Set" button.  If anyone can find anything in the logs related to this, please let me know and I will take a look tomorrow.

Mine just stopped again.  The error in the log is:
Code: [Select]
35      03/20/14 19:44:12.089   luup_log:333: Nest: debug: success getting status from nest.com <0x2df35680>                                                                                           
01      03/20/14 19:44:12.090   ^[[31;1mLuaInterface::CallFunction_Timer-5 function poll failed [string "..."]:423: bad argument #1 to 'pairs' (table expected, got nil)^[[0m <0x2df35680>

Resetting the password in the dialog (to the same value) causes it to sync correctly again, and the log line is the normal:

Code: [Select]
35      03/20/14 20:22:46.660   luup_log:333: Nest: debug: success getting status from nest.com <0x2df35680>                                                                                           
11      03/20/14 20:22:46.662   Child_Devices::AddChild id loc.eieio-old-mac-dona-ldhadafarm parent id  device type urn:schemas-watou-com:device:NestStructure:1 parent device: 333 devfile:D_Nes
urn:watou-com:serviceId:NestStructure1,StreetAddress=                                                                                                                                                   
urn:watou-com:serviceId:NestStructure1,Location=                                                                                                                                                       
urn:watou-com:serviceId:NestStructure1,PostalCode=90210                                                                                                                                                 
urn:watou-com:serviceId:NestStructure1,CountryCode=US                                                                                                                                                   
urn:micasaverde-com:serviceId:HaDevice1,LastUpdate=1395361080                                                                                                                                           
urn:upnp-org:serviceId:SwitchPower1,Status=1 <0x2df35680>     

Offline watou

  • Moderator
  • Hero Member
  • *****
  • Posts: 889
  • Karma: +44/-12
Re: Nest issues
« Reply #42 on: March 21, 2014, 12:11:24 am »

Mine just stopped again.  The error in the log is:
Code: [Select]
35      03/20/14 19:44:12.089   luup_log:333: Nest: debug: success getting status from nest.com <0x2df35680>                                                                                           
01      03/20/14 19:44:12.090   ^[[31;1mLuaInterface::CallFunction_Timer-5 function poll failed [string "..."]:423: bad argument #1 to 'pairs' (table expected, got nil)^[[0m <0x2df35680>

Thanks very much for that.  This looks like the transport servers now return an HTTP 200 but with an empty payload, and the resulting code error stops polling.  So I will put some better error checking code there, and once I think it's ready for others to test, upload it here.

UPDATE: In my local copy I've changed line 433 in I_Nest1.xml from
Code: [Select]
        if (code ~= 200) thento
Code: [Select]
        if (code ~= 200) or not res or not res.structure or not res.shared or not res.device or not res.track then
in order to catch the case that @guessed reported but I've not again seen the poll-killing scenario that @guessed (and I think others) have seen.  Last night there were some HTTP 500 errors that were caught properly and polling continued.  It's possible that there was an issue that has now quiesced, but please report anything that looks like a problem is lingering.  I will continue to monitor my connection. Thank you!
« Last Edit: March 21, 2014, 10:51:14 am by watou »

Offline watou

  • Moderator
  • Hero Member
  • *****
  • Posts: 889
  • Karma: +44/-12
Re: Nest issues
« Reply #43 on: March 22, 2014, 02:43:30 am »
It took many hours, but I did again finally see the poll-killing scenario that @guessed saw.  However, the attached I_Nest1.xml caught it and polling resumed no problem.  I don't know why the query now returns 200 (OK) but not with the payload we expect.

To apply this fix, go to Apps -> Develop Apps -> Luup files -> Choose file (I_Nest1.xml), check the Restart Luup after upload box, and press GO.

I am also submitting this change to apps.mios.com as v1.6 of the Nest plugin.  Hopefully this is the end of this episode and we can move on to the official API soon.  After applying this fix or v1.6 of the plugin, please report your observations.

Regards,
watou

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: Nest issues
« Reply #44 on: March 22, 2014, 09:30:07 am »
Thanks again for these patches!  I've applied it this morning and will let you know if I see any further issues.