We have moved at community.getvera.com

Author Topic: Nest Plugin: "Please restart engine to restore updates from Nest server"  (Read 1706 times)

Offline therealdb

  • Sr. Member
  • ****
  • Posts: 258
  • Karma: +6/-0
  • Automate all the things!
Overall I like Nest's integration, but this error is driving me crazy.
I travel a lot for work, so I usually take a look at my Vera every Saturday/Sunday.

It's the second time I found the Nest plugin has crashed and stopped updating from remote server, making all the automation around temperature, home/away useless.
I tried to intercept this error with no luck.

Is there a way to
a) intercept this particular state, to avoid weeks of no integration
b) modify your plugin in order to be more stable and/or have a "reset connection" button, calling your startup code, instead of making me reload the entire luup engine every time the cose crashes?

Thanks.
Vera Edge EU, Fibaro FGRM 222 (14), Fibaro FGS 223 (26), Fibaro FGS 222 (6), Fibaro UBS (2), Fibaro+N Plug (3), NeoCoolCam Door Sensor (3), PIR (2) & Plugs (2), Nest (3), Home Server running my own integrations, Harmony Hub, OpenSprinkler, Personal Weather Station, Sonoff TH & more

Offline Ionut A

  • Global Moderator
  • Jr. Member
  • *****
  • Posts: 68
  • Karma: +1/-0
Re: Nest Plugin: "Please restart engine to restore updates from Nest server"
« Reply #1 on: October 28, 2018, 12:09:00 pm »
Hello therealdb,

We have opened a ticket in our system for you, please check your email address and reply to us.

Thank you!

Offline therealdb

  • Sr. Member
  • ****
  • Posts: 258
  • Karma: +6/-0
  • Automate all the things!
Re: Nest Plugin: "Please restart engine to restore updates from Nest server"
« Reply #2 on: October 30, 2018, 10:13:08 am »
I managed to get it with this code

local D_NEST = "urn:micasaverde-com:serviceId:VeraConnectWWN1"
local minutes = 20 -- how many minutes before alerting
local lastRequest = luup.variable_get(D_NEST, "LastRequest", 30)
lastRequest = tonumber(lastRequest)
local currentTime = os.time(os.date("*t"))
local diff = currentTime - lastRequest
if(diff> minutes * 60) then
-- send notification
end

I send a notification to myself, in order to reset the engine manually.
Vera Edge EU, Fibaro FGRM 222 (14), Fibaro FGS 223 (26), Fibaro FGS 222 (6), Fibaro UBS (2), Fibaro+N Plug (3), NeoCoolCam Door Sensor (3), PIR (2) & Plugs (2), Nest (3), Home Server running my own integrations, Harmony Hub, OpenSprinkler, Personal Weather Station, Sonoff TH & more