Page 12 of 14

Re: NEST Account migration

Posted: Sunday 24 May 2020 11:20
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

Re: NEST Account migration

Posted: Sunday 24 May 2020 18:12
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?

Re: NEST Account migration

Posted: Sunday 24 May 2020 20:59
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

Re: NEST Account migration

Posted: Friday 29 May 2020 22:41
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!

Re: NEST Account migration

Posted: Sunday 31 May 2020 10:46
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

Re: NEST Account migration

Posted: Monday 01 June 2020 12:25
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.

Re: NEST Account migration

Posted: Monday 01 June 2020 14:05
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

Re: NEST Account migration

Posted: Sunday 07 June 2020 14:05
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!

Re: NEST Account migration

Posted: Monday 15 June 2020 13:53
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.

Re: NEST Account migration

Posted: Monday 15 June 2020 15:28
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

Re: NEST Account migration

Posted: Tuesday 16 June 2020 11:51
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.

Re: NEST Account migration

Posted: Tuesday 16 June 2020 12:24
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'}

Re: NEST Account migration

Posted: Tuesday 16 June 2020 16:14
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

Re: NEST Account migration

Posted: Tuesday 16 June 2020 20:28
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

Re: NEST Account migration

Posted: Monday 29 June 2020 18:01
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?

Re: NEST Account migration

Posted: Monday 29 June 2020 20:03
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.

Re: NEST Account migration

Posted: Monday 29 June 2020 21:39
by tjabas
ok, didnt see that.thanks anyway!

Re: NEST Account migration

Posted: Friday 24 July 2020 8:32
by jberinga
https://github.com/rolandbreedveld/nest-api

Just looking for a confirmation: Is this also working on a Synology NAS with Domoticz running?

Re: NEST Account migration

Posted: Friday 24 July 2020 11:32
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.

Re: NEST Account migration

Posted: Friday 24 July 2020 11:42
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.