The Vera Community forums have moved!

General => Connected Objects => Nest => Topic started by: therealdb on October 27, 2018, 02:56:38 am

Title: Nest Plugin: "Please restart engine to restore updates from Nest server"
Post by: therealdb on October 27, 2018, 02:56:38 am
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.
Title: Re: Nest Plugin: "Please restart engine to restore updates from Nest server"
Post by: Ionut A 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!
Title: Re: Nest Plugin: "Please restart engine to restore updates from Nest server"
Post by: therealdb 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.