The good news, is overnight, I had a couple of times when the binding disconnected from Nest, and did reconnect itself.
The bad news, is that it only reconnected itself when I sent a command to it. This meant that for ~4 hours, one room was cooling down way below its target temperature, until another room cooled enough to trigger the rule which updates the Nest’s target temperature!
The other couple of times it’s logged a disconnection, due to the way my rules are configured, it is sending multiple commands, it’s gone back online immediately - the first command detects it’s offline, the 2nd command a split second later re-initiates the connection.
What would help is if we see what is happening when the data is no longer updating. Maybe you can enable the debug logging of the Nest Binding via the Console so we can see whats happening?
You can enable debug logging in the console with the command:
log:set debug org.openhab.binding.nest
It will then log if it is connected, trying to reconnect and all received data and keep alives that Nest sends through the connection.
Disabling the debug logging is done by setting the log level back to info with:
I had just shut down laptop, but saw the email just as I was about to go up to bed so have fired it up again and have enabled the logging.
Will give it a shot overnight.
I have also added a rule running every 10 minutes to send the target temperature to the Nest - hopefully this means a maximum of 20 minutes without a proper update!
Will report back with some logging in the morning if it fails overnight again
Same here, nest structure, account and thermostat goes offline.
I can control Nest itself with android app, so it can send / receive data.
After I restart Openhab, nest is online in Things meniu again, after arround 3,5 h it went offline again.
Now it happens when i switched my routers, with the old one as I remember it was always online.
Can’t enable log as you wrote, maybe doing it not in the right place, see:
Some additional bug fixes were merged just before the openHAB 2.2.0 release was made. Time will tell if they solve all connection issues.
The old (1.x) binding was using a polling mechanism (max 1 update per minute due to Nest API rate limits) whereas the new binding is now using Server-sent Events (SSE). So you should instantly have the data when it is sent by your devices to Nest. Especially with a fire/smoke alarm that can make a big difference (when it works ofcourse ).
The Jersey library used by the binding for SSE seems to have some issues when connections disconnect for which a workaround was created.
Thanks for the help in this post, I finally got the Nest working for me, but I would like to know if there is a way that the binding can report the temperatures in Fahrenheit (in the US, we rarely use Celsius)?
Just upgraded to 2.2, so I thought I’d try the new nest binding, but no luck.
I still have the old nest1 binding running - can I have both? or just one?
I added the nest binding to my addons.cfg, and the Thing shows up. I enter my prodict id, and secret, then enter the one-time pin (from the website), but it mostly wont save. The thing just sits there marked “uninitialized”. Even on the one or two occasions when I have got it to save, it still just says “uninitialized” with no OAuth code and the PIN shown.
Most people seem to have this working, so I must be doing something stupid.
Yes to both, the binding is listed, and shows as active in the console.
When I delete the Thing, and re-add it, I get this in the log:
2017-12-22 14:15:58.449 [WARN ] [ore.thing.internal.ThingRegistryImpl] - Cannot create thing. No binding found that supports creating a thing of type 'nest:account'.
I also get:
Status: UNINITIALIZED - HANDLER_REGISTERING_ERROR org.eclipse.smarthome.core.thing.internal.ThingImpl cannot be cast to org.eclipse.smarthome.core.thing.Bridge
You cant have nest1 and nest loaded at the same time, it’s one or the other. I uninstalled nest1, installed nest (v2.2), and bingo! the account is now online.
Now have to figure out the channels…
Hmmm, don’t seem to be anywhere near as many channels as the documentation says. Maybe I’ll try the latest SNAPSHOT see if that helps.
Trying to uninstall the default 2.2.0 addon via PaperUI (so I can install the Fahrenheit addon), but it just sits with the wheel spinning forever? I’ve commented out my Nest things, but that hasn’t helped either. Nothing showing an error in events.log…
I’m havjng trouble getting a switch to respond to the hvac state and mode. These are String channels, so I should be able to map a Switch to the various values, which are “heating”, “ cooling”, “heat/cool”, and “off” I believe.
Where the items are String types. This construct works fine elsewhere, and the channels are not mapped to other values at all. Is this an openhab 2.2 issue, or am I missing something?
Also I see that there are no channels for the Nest Protect that give the date/time of the last connection, or last manual test (just manual test in progress as a switch). It’s hard to tell if the smoke alarms are connected without this information, can I vote for including these channels (they were in the V1.0 binding).