NEST Account migration

For heating/cooling related questions in Domoticz

Moderator: leecollings

Apievuisy
Posts: 11
Joined: Tuesday 13 August 2019 20:22
Target OS: -
Domoticz version:
Contact:

Re: NEST Account migration

Post by Apievuisy »

Filip wrote: Friday 20 December 2019 19:02 Indeed as mentioned earlier, a reboot is required.
I have another topic open for the support or threading (this makes it crash when updating the settings and a reboot is required).
Unfortunately not any feedback yet on viewtopic.php?f=6&t=30359.
Filip
I also found after removing and adding the hardware a couple of times, that the devices are only created if i manually alter the temperature or any setting on the nest or nest-app.

Also, the only thing that is working for me is the temperature setting in the utility menu. The other switches do not seem to do anything.
The values are not updated either. Anyone else encountered this problem?

Keep up the good work Filip :)

Edit: The values ARE updated, but only when they need to be updated. Switches still don't work, but i do not know if they are intended to.
JaapKoppejan
Posts: 6
Joined: Monday 08 February 2016 10:15
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11590
Contact:

Re: NEST Account migration

Post by JaapKoppejan »

Great to have this script and be able to connect to the Nest service again!

I have two NEST thermostats installed (V2), but regretfully only one is recognised by the python script while both are visible on the usual NEST portal. Is this a familiar issue?
Filip
Posts: 100
Joined: Thursday 03 November 2016 10:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NEST Account migration

Post by Filip »

It works fine in my house with a NEST Thermostat (V2 also) and a NEST Protect.
Indeed it seems not to work everywhere.
However seen I have not enough material (and time) to test (unless somebody offers me devices :-)), it is very difficult.
Only together with different people we could extend the plugin to make it working in more environments.
Therefore I published it on GitHub. Would be nice if people could contribute so that we can put it in the master and make it available for more people.
Github link: https://github.com/FilipDem/Domoticz-NE ... ree/master
Filip
JaapKoppejan
Posts: 6
Joined: Monday 08 February 2016 10:15
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11590
Contact:

Re: NEST Account migration

Post by JaapKoppejan »

I found the answer! The problem was apparently that the name of the room where my second thermostat is located was a customised name, not a standard one. Once I changed it to 'Office', it worked! So i now have two thermostats working.

What is the minimum refresh interval? I am asking as I am using a LUA script that slightly increases the thermostat setpoint in case it is not running, if there is heat demand in the bedrooms (concluded from zwave thermostats sending setpoint and actual temperature in those bedrooms).
Filip
Posts: 100
Joined: Thursday 03 November 2016 10:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NEST Account migration

Post by Filip »

It is in minutes... I normally use sth like 2-3 minutes. I don't expect any problem with 1 minute.
However if you need to go low, you would need to enter 0.5. Don't know if it will work.
Certainly don't go lower than 30 seconds, seen the main thread (heartbeat) is done every 20 seconds by Domoticz and I work with this... When defined interval time is achieved, I update the NEST and the next heartbeat I update the devices... Could certainly approved, but it costed me some time to make the plugin and honestly, I was happy it was already working and didn't could the courage to optimize further... Perhaps one day, I hope there will still an official API published by google so that we can get a native Domoticz NEST solution.
Cooper6611

Re: NEST Account migration

Post by Cooper6611 »

With me it seems the plugin crashes:

2020-01-10 18:08:41.601 Error: (GoogleNest) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/Domoticz-NEST-plugin/:/usr/lib/python35.zip:/usr/lib/python3.5:/usr/lib/python3.5/plat-arm-linux-gnueabihf:/usr/lib/python3.5/lib-dynload:/usr/local/lib/python3.5/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.5/dist-packages'.
2020-01-10 18:08:41.601 Error: (Nest) Module Import failed, exception: 'ImportError'
2020-01-10 18:08:41.601 Error: (Nest) Module Import failed: ' Name: requests'
2020-01-10 18:08:41.601 Error: (Nest) Error Line details not available.

Any help appreciated.

Cheers,
Martin
Filip
Posts: 100
Joined: Thursday 03 November 2016 10:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NEST Account migration

Post by Filip »

Hi, typically a problem of python libraries.
Be sure the following libs are installed in the python used by Domoticz, i.e. python3.
import threading
import time
import json
import fnmatch
import requests
import os
import sys
import datetime

You can find the source on https://github.com/FilipDem/Domoticz-NEST-plugin.

Filip
Thelion
Posts: 54
Joined: Saturday 08 October 2016 12:15
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: The Netherlands
Contact:

Re: NEST Account migration

Post by Thelion »

For those who don't specifically need the Nest functionality, but basically use Nest as a on/off switch for the heater based on other temperature readings done by Domoticz:

Take a look at the Shelly 1 smart switch (https://shop.shelly.cloud/shelly-1-wifi ... omation#50). It features separated dry contacts, which can by used to switch your heating on/off, while the Shelly itself is powered by 12v/120v/220v (I currently use 200v, haven't tested the others, so use at your own risk!).

It can be flashed with Tasmota, so it will communicate with Domoticz through MQTT.

My Nest is currently a fancy thermometer/clock ;-)
User avatar
heggink
Posts: 972
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: NEST Account migration

Post by heggink »

Hey Filip,

First of all, many thanks (to you and others who helped) for creating this solution. I 'think' I have my Nest back in domoticz :-).

quick question: I had a bunch of dzvents scripts that used the various nest devices. Easiest I thought was to rename the devices created by the plugin back to their original names to then find that the plugin then re-creates the devices with it's own names again...

I now changed the names in the scripts as I suspect the plugin matches on device name rather than device ID but maybe good to know.

H
Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
User avatar
rolandbreedveld
Posts: 156
Joined: Wednesday 09 March 2016 11:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Contact:

Re: NEST Account migration

Post by rolandbreedveld »

get the script working from command-prompt:
python3 nest.py
{'Humidity': 48, 'Eco': False, 'Temperature_scale': 'C', 'Current_temperature': 21.21999, 'Name': 'Home', 'Away': False, 'Target_temperature': 20.36002, 'Where': 'Downstairs', 'Heating': False}
{'Humidity': 48, 'Eco': False, 'Temperature_scale': 'C', 'Current_temperature': 21.21999, 'Name': 'Home', 'Away': False, 'Target_temperature': 20.36002, 'Where': 'Downstairs', 'Heating': False}
{'Humidity': 48, 'Eco': False, 'Temperature_scale': 'C', 'Current_temperature': 21.21999, 'Name': 'Home', 'Away': False, 'Target_temperature': 20.36002, 'Where': 'Downstairs', 'Heating': False}
{'Humidity': 48, 'Eco': False, 'Temperature_scale': 'C', 'Current_temperature': 21.21999, 'Name': 'Home', 'Away': False, 'Target_temperature': 20.36002, 'Where': 'Downstairs', 'Heating': False}
{'Humidity': 48, 'Eco': False, 'Temperature_scale': 'C', 'Current_temperature': 21.21999, 'Name': 'Home', 'Away': False, 'Target_temperature': 20.36002, 'Where': 'Downstairs', 'Heating': False}
it's looping endless,is this OK?


but when running it as pluging, Domoticz hangs after a while, also no Devices are created, running latest beta 4.11605 on rpi
Raspberry Pi(SSD)+UPS HAT,Dashticz on WallTablet,HomeBridge, P1, HarmonyHub,FritzBox,API to 123Solar+ABB-PowerOne+SMA,ESP-Leds(flashed LSC),Tasmota,Shelly,MQTT,Mosquito,Node-Red,http://wiki.breedveld.net/index.php?title=RPiWaterMeter, Mercedes-Me
Ptje
Posts: 73
Joined: Sunday 06 March 2016 23:56
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: Schaijk
Contact:

Re: NEST Account migration

Post by Ptje »

Hello,

Can the cookie look like this ?

OCAK=GswEEPebnHOHe5NV9sXjYhMGJwLMkepEHAxiyJafhpM; SID=sgdtxVAOa4YjlPXC85Jk7dqzsQa6Vk0ODA16iNMy08Y6PFmvxImcViEXFOqyCd3TqJ0EXA.; __Secure-3PSID=sgdtxVAOa4YjlPXC85Jk7dqzsQa6Vk0ODA16iNMy08Y6PFmve1QbcL1EBNFsJSIO1M71ig.; HSID=AVP4l90ujypnvAiQu; SSID=AO5GuuDRhN4w3TyVz; APISID=Sf_1-wLPFY2z1rsh/A4R7zMdSojjAYcBIp; SAPISID=tOWKrQlWYL_TlttI/AIwgMjoZ77f8QWKNA; __Secure-HSID=AVP4l90ujypnvAiQu; __Secure-SSID=AO5GuuDRhN4w3TyVz; __Secure-APISID=Sf_1-wLPFY2z1rsh/A4R7zMdSojjAYcBIp; __Secure-3PAPISID=tOWKrQlWYL_TlttI/AIwgMjoZ77f8QWKNA; NID=195=LI6oYKFbTRcYTdy2XO0-KZN7kPUjbgY1cYnhKDhR3zouGyAccwgH186S-iUcplKBvghlPu05QZHGkav5EC7YUXkQK3r8CMyLimDJhwATzncnREb7UcK_aagxB0IaytDnKbsnJjos4d5J2h5SWvH-8Ikgy--tQN01fSBvLb_qDddVTWI88CkVaRIi; user_id=109081465743643690491; LSID=lso|s.NL|s.youtube:sgdtxXpQg8Bn6O2TpXVW36bcDHsuJXTB3TC-kiYJPBUuh-tZ_h4rD33tqLpd6gTw3GfS-w.; __Host-3PLSID=lso|s.NL|s.youtube:sgdtxXpQg8Bn6O2TpXVW36bcDHsuJXTB3TC-kiYJPBUuh-tZRjWIZwsGqgrOaTmYjCK5Vg.; ACCOUNT_CHOOSER=AFx_qI6YFBTAoHMq6LJq1WDGYeTR5iemMn8kgmInU1phh8t_G8ICBjrPprpYDfomOER-I8Zg5MMngWrvUB2qD3PPOccfR9DgjgPs7XP-lgq_UV_TrpKADhiBl_LOjMTvFWprTsj7nZ1p; GAPS=1:h3MxJlRFSUcusFX-wmKlvNIBWAWn-ZCts7gQiL4UeM3kLY6FQvQ03UZv_7cvPhehkUPTZaRbjXzUyyTqL0s8uEf3LDsZXQ:JInkE7cQF8VEsb0Q; SIDCC=AN0-TYt-XHeHv7Vbk9-Ki7-XaWE1Lr1d_CMHqkHqIu46lMoHhHWKKoua77EgTT5tBvqZsfY3

Greetings,
Peter
photomoto
Posts: 2
Joined: Tuesday 14 January 2020 19:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10717
Contact:

Re: NEST Account migration

Post by photomoto »

Has anyone got this to work on a RPI?
I only have a nest thermostat. I do **NOT** have a nest protect.

I can get "nest.py" to work, but I can't get the domotiz plugin.py to work.
I am able to download and install the plugin and add the new hardware, but i dont see any devices added after I reboot.
I am getting the following error in the log.

Code: Select all

2020-01-14 16:04:18.439 Error: NestPythonic hardware (10) thread seems to have ended unexpectedly
Steps i followed to install:
1) downloaded the zip file from https://github.com/FilipDem/Domoticz-NE ... ree/master
2) unzipped it to

Code: Select all

~/domoticz/plugins/
3) install/make the plugin executable (for linux)

Code: Select all

chmod +x plugin.py
4) reboot to see the plugin installed
5) add the new hardware via the domoticz web interface
setup->Hardware->add Type=Nest Thermostat/Protect Google
"enable" the new hardware
input "issue_token" for my account retrieved via the instructions in the readme.
input "cookie" for my account retrieved via the instructions in the readme.
hit add button
6)reboot rpi (because threading issues)
7) notice issues in the log
8) no nest devices are added

I tried both the
"GoogleNest3.zip" via the attachment in the original post.
https://www.domoticz.com/forum/download ... p?id=21458

And downloading the zip from Git Hub (appears to be newer?)
https://github.com/FilipDem/Domoticz-NE ... ree/master

debug output via nest.py:

Code: Select all

python3 nest.py
{'Where': 'Hallway', 'Name': 'MotoHome', 'Away': False, 'Target_temperature': 19.88889, 'Current_temperature': 20.12, 'Heating': True, 'Temperature_scale': 'F', 'Eco': False, 'Humidity': 39}
{'Where': 'Hallway', 'Name': 'MotoHome', 'Away': False, 'Target_temperature': 19.88889, 'Current_temperature': 20.12, 'Heating': True, 'Temperature_scale': 'F', 'Eco': False, 'Humidity': 39}
Domoticz version:
Version: 4.10717
Build Hash: b38b49e

Thanks for any help, and Filip for posting this workaround.
Last edited by photomoto on Wednesday 15 January 2020 19:58, edited 1 time in total.
dressie
Posts: 156
Joined: Monday 25 May 2015 22:44
Target OS: Raspberry Pi / ODroid
Domoticz version: V2020.2
Location: Netherlands
Contact:

Re: NEST Account migration

Post by dressie »

Did you enabe "allow new hardware" ?
Everything else looks right the way you did it. Today I'm planning on reinstalling Domoticz including this plugin, I'll walk through your steps and see if I get the same issue.
My installation is running on a PI and latest stable version.
Filip
Posts: 100
Joined: Thursday 03 November 2016 10:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NEST Account migration

Post by Filip »

My initial version posted on GitHub seemed not to be my latest version... There was a problem with the detection of the NEST Protect (and if no NEST protect available on your account, it quit with an exit).
Hence I updated Tuesday with the correct version (and got already feedback from somebody else that it works for him now).
So see which version you had from GitHub.
Sorry for the inconvenience.
Kr,
Filip
User avatar
heggink
Posts: 972
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: NEST Account migration

Post by heggink »

Hey Filip,
Quick question: every time I change something in another python plugin (causing a restart of that plugin), it seems like your google nest plugin stops working and a reboot is required.
Any thoughts?
H
Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
Filip
Posts: 100
Joined: Thursday 03 November 2016 10:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NEST Account migration

Post by Filip »

I don't have such problem... I develop regularly a new plugin, but don't have this problem.
Perhaps check if your plugin also uses threading...

I have an open problem about threading in Domoticz (see https://www.domoticz.com/forum/viewtopi ... =6&t=30359), however not any help so far... This is very annoying me, but so far didn't found the solution... But as said: I only have the problem when the GoogleNest plugin is stopped/started.

If you could look once to https://www.domoticz.com/forum/viewtopi ... =6&t=30359 to see whether you could help, it would be great.

Filip
tinushigh
Posts: 4
Joined: Friday 03 January 2020 20:29
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NEST Account migration

Post by tinushigh »

Ok, in the First Place, Filip, thanks for all the work, both developping and supporting! Upvote/like/+1

Please, I am quite new to SSH / linux / python and Domoticz so I made a mistake and cant figure out what.
Symptom: about 2 minutes after roboot / restart, my Domoticz crashes with these 2 error messages:

Code: Select all

2020-01-15 16:24:12.654 Error: Domoticz(pid:1135, tid:1275('PluginMgr')) received fatal signal 6 (Aborted)
2020-01-15 16:24:12.655 Error: siginfo address=0x46f, address=(nil)
Question, where to start troubleshooting? How to solve this fatal error?

thanks in advance! A newbe
Filip
Posts: 100
Joined: Thursday 03 November 2016 10:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NEST Account migration

Post by Filip »

The PluginManager crashed. Normally you have a a crash report in the domoticz folder.
There you should be able which one crashed. I suppose there are dedicated topics on the forum to debug.
Once you identified which plugin crashes, you will need to start debugging...
photomoto
Posts: 2
Joined: Tuesday 14 January 2020 19:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10717
Contact:

Re: NEST Account migration

Post by photomoto »

Filip wrote: Wednesday 15 January 2020 9:24 My initial version posted on GitHub seemed not to be my latest version... There was a problem with the detection of the NEST Protect (and if no NEST protect available on your account, it quit with an exit).
Hence I updated Tuesday with the correct version (and got already feedback from somebody else that it works for him now).
So see which version you had from GitHub.
Sorry for the inconvenience.
Kr,
Filip
Hi Filip,
On github. It looks like nest.py was updated on tuesday, but plugin.py was not updated.
i just wanted to confirm that was correct.
thanks again for the help.
https://github.com/FilipDem/Domoticz-NE ... ree/master
--------
nest.py Update nest.py 2 days ago
plugin.py Add files via upload 9 days ago
--------
User avatar
heggink
Posts: 972
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: NEST Account migration

Post by heggink »

Hey Filip,

I used the old plugin's Eco mode to set the temperature to a low value when the alarm was armed and set it to normal mode on disarm which causes the thermostat to resume it;s schedule.

Is my understanding correct that you did not implement setting and 'unsetting' eco mode? It doesn't seem to work...

Thanks,

Herman
Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests