Nest issues

Originally reported disconnect problem surfaced on my Nest in Canada this morning. Updated to 1.5 in the marketplace and have reconnection.

Mine just stopped again. The error in the log is:

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:

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>

[quote=“guessed, post:42, topic:180170”]Mine just stopped again. The error in the log is:

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>[/quote]

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

        if (code ~= 200) then

to

        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!

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

Thanks again for these patches! I’ve applied it this morning and will let you know if I see any further issues.

I was on 1.0 up until today. I saw the issue day before yesterday, upgraded to 1.5 and the patch file, all appears well.

Thanks Watou!,

I just saw today that my Nest was not being polled and I grabbed your patch and uploaded to Vera.

All up and running again, Thank you!

I noticed that Vera stopped polling my Nests last night. So I just applied the fix. Fingers crossed… :slight_smile:

I noticed that v1.6 of the Nest plugin has been approved, which is functionally identical to the last I_Nest1.xml I uploaded here (as applied to v1.4 or v1.5). So upgrade to v1.6 now instead of installing patches from this topic if you want to be on the latest plugin version. (Either way, it should behave the same.)

watou

Installed 1.6 and this has restored communications between Vera and Nest. I truly wish Nest (or should I say Google) would release their API and slow way down on the firmware updates (c’mon, it’s just a stat). Whatever it is they recently pushed to the masses has (once again) cause my unit to lose it WiFi handshake. I hate dialing my credentials in that thing when this happens.

Thanks Watou for the update and quick attention…

Thanks for the update, it works again.

Is there anyway for these plugins to auto update? Currently I have to delete the nest plugin in order to download the newest version… Then re- set the plugin back up in Vera and also in my iPhone app, homewave.

Is this how everybody’s doing it?

Sent from my iPhone using Tapatalk

You can do this for any plugin

http://YourVeraIPAddress:3480/data_request?id=update_plugin&Plugin=Plugin#

Just edit yourveraip and plugin number

Thanks for the reply but I keep getting a message stating “Bad_plugin”

Does this look correct?

http://192.168.1.xxx:3480/data_request?id=update_plugin&Plugin=9

Thanks

[quote=“rsoares28, post:53, topic:180170”]Does this look correct?

http://192.168.1.xxx:3480/data_request?id=update_plugin&Plugin=9[/quote]

the IP address is not a valid IP

i’m using the correct ip of my Vera

Is it supposed to look like this?

http://XXX.XXX.X.XXX:3480/data_request?id=update_plugin&Plugin=[b]9[/b]

or

http://XXX.XXX.X.XXX:3480/data_request?id=update_plugin&Plugin=[b]Plugin#9[/b]

Thanks

Also I think the Nest plugin ID is 3116, not 9.

watou

Ok I see now…I was using the wrong plugin #… thanks for the help!

I just tried one and I got an “ok”… i’m assuming this means up to date

Thank you for 1.6

Hi guys,

How can I change the display of temperature from Fahrenheit to Celcius

Also I’m unable to change the temperature display to be more granular (tenth or half), I don’t have this setting available TemperatureScale

Have look through this.
http://cocu.la/vera/nest/README.md

(I’m on the latest version 1.6)

In UI5, go to Setup → Location → Temperature format. You may have to restart Vera and reload the browser before you see the change. I don’t have a known good answer for versions later than UI5.

Go to the main Nest device (with the big green “n” on it), the Advanced tab, and scroll down until you see the TemperatureScale variable, whose default value is 1. See the documentation at http://cocu.la/vera/nest/README.md for the full details.

watou