NEST Account migration

For heating/cooling related questions in Domoticz

Moderator: leecollings

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 »

thebartzman wrote: Saturday 23 May 2020 22:24 Hi i've been searching for a while, but can anybody explain what the nest features are in Domoticz? I have several Nest Protects in use and I'm curious what the Domoticz features are when Nest project is integrated.
Thanks
hi
the usual stuff, temp, humidity, control of setpoint, see if its heating, set or view away and eco modes.
I use Domoticz also as an automatic alarm system, if no one is at home, alarm switches on, and also a trigger to set the Nest in eco mode, this will spare energy.
regards Roland
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
thebartzman
Posts: 10
Joined: Friday 27 December 2019 10:37
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: The Netherlands
Contact:

Re: NEST Account migration

Post by thebartzman »

rolandbreedveld wrote: Sunday 24 May 2020 11:20 hi
the usual stuff, temp, humidity, control of setpoint, see if its heating, set or view away and eco modes.
I use Domoticz also as an automatic alarm system, if no one is at home, alarm switches on, and also a trigger to set the Nest in eco mode, this will spare energy.
regards Roland
Thanks for the answer, but as I said I have Nest protect smoke detectors only. I think you talk about data which comes from the Nest Thermostat?
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,

Here my eco mode in action. You can see that Nest has saved energy at the moment it went in eco mode with open door.

Gr.
Peter
Attachments
AAD55BB7-FD3C-4F2E-8F0A-394CC37F81C3.png
AAD55BB7-FD3C-4F2E-8F0A-394CC37F81C3.png (202.39 KiB) Viewed 3565 times
Slyguy
Posts: 2
Joined: Friday 29 May 2020 22:18
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NEST Account migration

Post by Slyguy »

Hi,

Thanks for bringing back Nest to Domoticz! I already gave up ever seeing back my nest protects in Domoticz.

But could someone help out this noob? I can manage the Domoticz webinterface, but when it comes to coding and dzVents, I'm lost. So now I'm stuck. I've read this topic, but I'm not able to figure it out.

I own a couple of Nest protects and not the thermostat.
I've managed to install the nest-api on my pi.
I also retrieved my google nest credentials and added them to nest.auth.php.
When I run php get_nest.php status of one of my protects is displayed.
But I don't know how to link this information to a domoticz item.

- I've created a Hardware dummy, but do I need to create a virtual sensor? And if so, what kind of sensor should this be. For now I'm mainly interested in the smoke and CO2 status.
- The IDX from the virtual sensor should be placed in the nest_devices.cfg, correct? And should the name of this virtual sensor correspond to the one in the nest_devices.cfg?
- And then somehow I should create a dzVent Device based on dzVents_script_nest_setpoint.txt? Or is this only meant for the active control of sensors and therefor not needed for my protects, since they're only generate output.

Thanks in advance!
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 »

Slyguy wrote: Friday 29 May 2020 22:41 Hi,

Thanks for bringing back Nest to Domoticz! I already gave up ever seeing back my nest protects in Domoticz.

But could someone help out this noob? I can manage the Domoticz webinterface, but when it comes to coding and dzVents, I'm lost. So now I'm stuck. I've read this topic, but I'm not able to figure it out.

I own a couple of Nest protects and not the thermostat.
I've managed to install the nest-api on my pi.
I also retrieved my google nest credentials and added them to nest.auth.php.
When I run php get_nest.php status of one of my protects is displayed.
But I don't know how to link this information to a domoticz item.

- I've created a Hardware dummy, but do I need to create a virtual sensor? And if so, what kind of sensor should this be. For now I'm mainly interested in the smoke and CO2 status.
- The IDX from the virtual sensor should be placed in the nest_devices.cfg, correct? And should the name of this virtual sensor correspond to the one in the nest_devices.cfg?
- And then somehow I should create a dzVent Device based on dzVents_script_nest_setpoint.txt? Or is this only meant for the active control of sensors and therefor not needed for my protects, since they're only generate output.

Thanks in advance!
it's all described on https://github.com/rolandbreedveld/nest-api
follow it carefully.
suc6, Roland
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
Slyguy
Posts: 2
Joined: Friday 29 May 2020 22:18
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NEST Account migration

Post by Slyguy »

rolandbreedveld wrote: Sunday 31 May 2020 10:46 it's all described on https://github.com/rolandbreedveld/nest-api
follow it carefully.
suc6, Roland
Hi Roland, thanks for the reply.

I've read your description on github. What I don't understand is how the gathered variables by nest_class.php of the nest protect, like "co_status", are linked to my virtual sensors in Domoticz.

For example: I created a virtual switch sensor named CO en added this to nest_devices.cfg with the corresponding IDX. But how is the co_status passed to this virtual sensor? Integrating my rooted Eneco Toon in Domoticz required me to add several "User variables" in Domoticz. Or am I now comparing appels met peren?

Sadly, as you may have noticed, my Domoticz skills and knowledge are quite basic.
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 »

Slyguy wrote: Monday 01 June 2020 12:25
rolandbreedveld wrote: Sunday 31 May 2020 10:46 it's all described on https://github.com/rolandbreedveld/nest-api
follow it carefully.
suc6, Roland
Hi Roland, thanks for the reply.

I've read your description on github. What I don't understand is how the gathered variables by nest_class.php of the nest protect, like "co_status", are linked to my virtual sensors in Domoticz.

For example: I created a virtual switch sensor named CO en added this to nest_devices.cfg with the corresponding IDX. But how is the co_status passed to this virtual sensor? Integrating my rooted Eneco Toon in Domoticz required me to add several "User variables" in Domoticz. Or am I now comparing appels met peren?

Sadly, as you may have noticed, my Domoticz skills and knowledge are quite basic.
Hi,
CO2 is not implemented in this, this is for a Nest (V3) Thermostat, which not has no CO2 and something like co-status.
the script nest.class.php is from https://github.com/gboudreau/nest-api
regards, Roland
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
meel4chris
Posts: 41
Joined: Monday 03 October 2016 15:11
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: NEST Account migration

Post by meel4chris »

Hello,

Recently I had to reinstall my OS and domoticz.
I'm now running on the stable release 2020.2. This week I also configured the Nest interface again (thanks for the great work and documentation).

The interface is working and I can controle the nest via domoticz when I change the setpoint.
However, when I want to change the setpoint via my LUA scripts, the nest isnt being updated.

I'm using the syntax below (VarNest_SetpointIDX is an integer uservariable which has the IDX of the virtual Thermostat SetPoint device, 897 in my case).

commandArray[#commandArray + 1]={["UpdateDevice"]=uservariables['VarNest_SetpointIDX'] .. '|0|16'}

anybody any thoughts?

thanks in advance!
meel4chris
Posts: 41
Joined: Monday 03 October 2016 15:11
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: NEST Account migration

Post by meel4chris »

update: also with the latest beta (build 12164), the Nest thermostat isnt being update when I change the setpoint via my LUA script.
I'm very curious if somebody has the same experience.
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 »

meel4chris wrote: Monday 15 June 2020 13:53 update: also with the latest beta (build 12164), the Nest thermostat isnt being update when I change the setpoint via my LUA script.
I'm very curious if somebody has the same experience.
Hi Chis

did you do run the script on the command line?
/usr/bin/php /home/pi/nest-api/nest_setpoint.php 19
and this one in debug mode:
/home/pi/nest-api/get_nest.sh -d
(don't forget to remove the cache file, see instructions on:
https://github.com/rolandbreedveld/nest-api
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
meel4chris
Posts: 41
Joined: Monday 03 October 2016 15:11
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: NEST Account migration

Post by meel4chris »

Hi,

thanks for your reply!
yes I did run the script on command line and also checked the log from debug mode. no errors or warnings.

When I run the script on command line, the nest device temperature is changed. Also when I change the setpoint from domoticz webinterface, the temperature is changed on the nest itself.
This all works well.

Only when I try to change the temperature via a lua script the nest device isnt updated.
The setpoint in domoticz is updates, only not the nest itself.
meel4chris
Posts: 41
Joined: Monday 03 October 2016 15:11
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: NEST Account migration

Post by meel4chris »

Hi,

I have now made a workaround and added the following to my LUA scripts to change the Nest:
os.execute('/usr/bin/php /home/pi/nest-api/nest_setpoint.php 16')

but still strange that the Nest is not updated together with the setpoint in domocticz if I use the following in my LUA script:
commandArray[#commandArray + 1]={["UpdateDevice"]='897|0|16'}
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 »

meel4chris wrote: Tuesday 16 June 2020 12:24 Hi,

I have now made a workaround and added the following to my LUA scripts to change the Nest:
os.execute('/usr/bin/php /home/pi/nest-api/nest_setpoint.php 16')

but still strange that the Nest is not updated together with the setpoint in domocticz if I use the following in my LUA script:
commandArray[#commandArray + 1]={["UpdateDevice"]='897|0|16'}
the example script is dzVentz, not LUA
regards, Roland
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
meel4chris
Posts: 41
Joined: Monday 03 October 2016 15:11
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: NEST Account migration

Post by meel4chris »

Ok, now I understand. Good to know everything works as it should.

Thanks again for the great work!
Regards,
Christian


Verzonden vanaf mijn iPhone met Tapatalk
tjabas
Posts: 564
Joined: Sunday 11 December 2016 13:51
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NEST Account migration

Post by tjabas »

im about to order a nest hello door bell, would this be possible to se this device in domoticz with this account migration?
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 »

tjabas wrote: Monday 29 June 2020 18:01 im about to order a nest hello door bell, would this be possible to se this device in domoticz with this account migration?
This is about the Nest thermostat, It won’t work without modification.
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
tjabas
Posts: 564
Joined: Sunday 11 December 2016 13:51
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NEST Account migration

Post by tjabas »

ok, didnt see that.thanks anyway!
jberinga
Posts: 53
Joined: Tuesday 11 August 2015 14:20
Target OS: NAS (Synology & others)
Domoticz version: 2.2903
Location: The Netherlands
Contact:

Re: NEST Account migration

Post by jberinga »

https://github.com/rolandbreedveld/nest-api

Just looking for a confirmation: Is this also working on a Synology NAS with Domoticz running?
CPtje
Posts: 6
Joined: Sunday 11 November 2018 17:15
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NEST Account migration

Post by CPtje »

Today I upgraded to version 1.11 after using 1.04 succesfully for a couple of months. In that period, I had to update my token and cookie twice until now.

After the update to 1.11 I cannot anymore read the data from my NEST. Changing the temperature is no problem but I always get the following message when trying to read the values:

pi@raspberrypi:~/nest-api $ bash get_nest.sh -d
PHP Notice: Undefined variable: result in /home/pi/nest-api/nest.class.php on line 1100
PHP Fatal error: Uncaught UnexpectedValueException: Response to login request doesn't contain required access token. Response: null in /home/pi/nest-api/nest.class.php:1100
Stack trace:
#0 /home/pi/nest-api/nest.class.php(1095): Nest->login(false)
#1 /home/pi/nest-api/nest.class.php(124): Nest->login()
#2 /home/pi/nest-api/get_nest.php(19): Nest->__construct(NULL, NULL, 'https://account...', '__Secure-3PSID=...')
#3 {main}
thrown in /home/pi/nest-api/nest.class.php on line 1100
[/i]

I updated my nest.auth.php several times but without success.
A strange thing that caught my eye was the beginning of the cookies value: '$cookies = '__Secure-3PSID=zg...'
I have never before seen it beginning with "___Secure"

Again, updating my NEST with a new temperature works! So I would think that authentication should work fine, but the above info says something diferently. So I am really puzzled.

Any help to solve this would be welcome.
CPtje
Posts: 6
Joined: Sunday 11 November 2018 17:15
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NEST Account migration

Post by CPtje »

UPDATE!!!!!

Somehow, out of the blue, I get the data now. I don't know why it didn't work before.

Because I have my RPI on a WIFI connection, it takes approx. 20 seconds to receive the data so I will need to run the process in the background to prevent errors in Domoticz. Going to add some "&" where required.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests