Page 6 of 14
Re: NEST Account migration
Posted: Saturday 08 February 2020 21:58
by rolandbreedveld
jeroenkl wrote: ↑Saturday 08 February 2020 19:44
PHP Fatal error: Uncaught Error: Call to undefined function curl_init() in /home/pi/nest-api/nest.class.php:1256
Hi Jeroen
answer is simple your missing php-curl, php5-curl or php7-curl, depending of your php version
sudo apt install ....
succes,Roland
Re: NEST Account migration
Posted: Sunday 09 February 2020 10:29
by jeroenkl
rolandbreedveld wrote: ↑Saturday 08 February 2020 21:58
jeroenkl wrote: ↑Saturday 08 February 2020 19:44
PHP Fatal error: Uncaught Error: Call to undefined function curl_init() in /home/pi/nest-api/nest.class.php:1256
Hi Jeroen
answer is simple your missing php-curl, php5-curl or php7-curl, depending of your php version
sudo apt install ....
succes,Roland
Thanks!
Yes indeed, need to install it
pi@raspberrypi:~ $ php -v
PHP 7.3.11-1~deb10u1 (cli) (built: Oct 26 2019 14:14:18) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.11, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.11-1~deb10u1, Copyright (c) 1999-2018, by Zend Technologies
pi@raspberrypi:~ $ sudo apt install php-curl
I've got only a nest protect, should your script run properly?
BR,
Jeroen
Re: NEST Account migration
Posted: Sunday 09 February 2020 11:16
by mark.sellwood
Hi, Sorry to hijack this, but its related.
Does this script do anything with Nest Hello Doorbells?
Re: NEST Account migration
Posted: Sunday 09 February 2020 15:05
by rolandbreedveld
mark.sellwood wrote: ↑Sunday 09 February 2020 11:16
Hi, Sorry to hijack this, but its related.
Does this script do anything with Nest Hello Doorbells?
Also @jeroenkl
If the script
php nest-api.php
gives the output of your devices, it can be easily added, I only have a NestV3, so I can’t see it.
A doorbell however needs quick response, I don’t know these, the initiation to Domoticz should come from it, perhaps someone knows how these works.
Re: NEST Account migration
Posted: Wednesday 12 February 2020 15:42
by Vomera
Hi Guys,
nice to see there is solution for the nest thermostat.
I was wondering if the Google Nest Thermostat E is also supported with the script.
All i can see in the logging is, number of NEST Devices:
Code: Select all
20-02-12 15:40:39.234 (Nest) Processing 'onHeartbeatCallback' message
2020-02-12 15:40:39.234 (Nest) Calling message handler 'onHeartbeat'.
2020-02-12 15:40:39.234 (Nest) onHeartbeat called
2020-02-12 15:40:39.234 (Nest) onHeartbeat called, run again in 4 heartbeats.
2020-02-12 15:40:39.234 (Nest) Number of NEST devices: 0
2020-02-12 15:40:49.225 (Nest) Pushing 'onHeartbeatCallback' on to queue
2020-02-12 15:40:49.250 (Nest) Processing 'onHeartbeatCallback' message
2020-02-12 15:40:49.250 (Nest) Calling message handler 'onHeartbeat'.
2020-02-12 15:40:49.250 (Nest) onHeartbeat called
2020-02-12 15:40:49.251 (Nest) onHeartbeat called, run again in 3 heartbeats.
2020-02-12 15:40:59.226 (Nest) Pushing 'onHeartbeatCallback' on to queue
2020-02-12 15:40:59.267 (Nest) Processing 'onHeartbeatCallback' message
2020-02-12 15:40:59.269 (Nest) Calling message handler 'onHeartbeat'.
2020-02-12 15:40:59.269 (Nest) onHeartbeat called
2020-02-12 15:40:59.269 (Nest) onHeartbeat called, run again in 2 heartbeats.
2020-02-12 15:41:09.230 (Nest) Pushing 'onHeartbeatCallback' on to queue
2020-02-12 15:41:09.236 (Nest) Processing 'onHeartbeatCallback' message
2020-02-12 15:41:09.236 (Nest) Calling message handler 'onHeartbeat'.
2020-02-12 15:41:09.236 (Nest) onHeartbeat called
2020-02-12 15:41:09.236 (Nest) onHeartbeat called, run again in 1 heartbeats.
2020-02-12 15:41:19.232 (Nest) Pushing 'onHeartbeatCallback' on to queue
2020-02-12 15:41:19.252 (Nest) Processing 'onHeartbeatCallback' message
2020-02-12 15:41:19.252 (Nest) Calling message handler 'onHeartbeat'.
2020-02-12 15:41:19.252 (Nest) onHeartbeat called
2020-02-12 15:41:19.253 (Nest) Start thread
2020-02-12 15:41:19.253 (Nest) Thread: GetNestCredentials done
2020-02-12 15:41:19.816 (Nest) Thread: GetDevicesAndStatus done
2020-02-12 15:41:19.816 (Nest) End threa
I changed the token and cookie value in the nest.py
edit: when i call it with python3 nest.py nothing happends
Re: NEST Account migration
Posted: Wednesday 12 February 2020 20:16
by Joncho
So I read the news today about Google forcing to use 2FA login for its Nest products. Does this mean this solution willl become useless as well?
Re: NEST Account migration
Posted: Friday 14 February 2020 22:02
by heggink
I sincerely hope not. If that happens, we should all send our products back to Google. It's been s constant struggle with my thermostat. One more issue and I will call it quits and buy something else.
Sent from phone.
Re: NEST Account migration
Posted: Thursday 20 February 2020 18:23
by Marcello1970
Is it possible to chance the location of the temporary files. I use a RAM drive on my Raspberry, so I prefer that the files be stored there. It would be nice its a option in the nest_devices.cfg file.
An other issue is that I have manually chance the rights of the both temporary files to make the scripts work. After an update I have to do it again.
Would you know what that could be?
Re: NEST Account migration
Posted: Friday 21 February 2020 14:59
by rolandbreedveld
Marcello1970 wrote: ↑Thursday 20 February 2020 18:23
Is it possible to chance the location of the temporary files. I use a RAM drive on my Raspberry, so I prefer that the files be stored there. It would be nice its a option in the nest_devices.cfg file.
An other issue is that I have manually chance the rights of the both temporary files to make the scripts work. After an update I have to do it again.
Would you know what that could be?
Hi Marcello
this is a standard php option:
/etc/php5/cli/php.ini for command line interface (/etc/php5/apache2/php.ini for use from apache
sys_temp_dir = "/tmp" <<< this is the one
soap.wsdl_cache_dir="/tmp" <<< better change this one too
for the 2nd question, that happens if you run the script from different accounts, example you test it with "root", while Domoticz is running as user "pi"
so if you test with a different user, don't forget to remove the cachefiles. ( rm -f /tmp/nest_php* , or rm -f /var/tmp/nest_php* )
suc6!
Re: NEST Account migration
Posted: Friday 21 February 2020 16:22
by dens1975
Hi,
First of all thanks for this api/script. It looks like it almost works for me. I can switch the switches and set the temperature. Only thing is that my temperature and humidity isn't updated in my Domoticz devices. I'm on a Synology NAS.
when I excecute get_nest.sh I get the output:
Update TEMP to 20.2
Update HUMIDITY to 45.0
Update SETPOINT to 19.5
What I'm I missing?
Re: NEST Account migration
Posted: Friday 21 February 2020 16:31
by rolandbreedveld
dens1975 wrote: ↑Friday 21 February 2020 16:22
Hi,
First of all thanks for this api/script. It looks like it almost works for me. I can switch the switches and set the temperature. Only thing is that my temperature and humidity isn't updated in my Domoticz devices. I'm on a Synology NAS.
when I excecute get_nest.sh I get the output:
Update TEMP to 20.2
Update HUMIDITY to 45.0
Update SETPOINT to 19.5
What I'm I missing?
what if you update it manually, here for the temperature? : (replace IDX and VALUE)
curl -X GET "
http://127.0.0.1:8080/json.htm?type=com ... alue=VALUE"
Re: NEST Account migration
Posted: Friday 21 February 2020 16:37
by dens1975
ok, thanks! I now see what's wrong. It's looking for my domoticz on port 8080 but mine is on 8084. I changed all port numbers in get_nest.sh and now it's working.
Re: NEST Account migration
Posted: Friday 21 February 2020 17:00
by rolandbreedveld
dens1975 wrote: ↑Friday 21 February 2020 16:37
ok, thanks! I now see what's wrong. It's looking for my domoticz on port 8080 but mine is on 8084. I changed all port numbers in get_nest.sh and now it's working.
in the following version it will be configurable:
https://github.com/rolandbreedveld/nest-api/
Re: NEST Account migration
Posted: Sunday 23 February 2020 20:52
by heggink
My cookie expired a couple of days ago. I now check so I can get the new cookie as soon as it expires. Took a few weeks...
Sent from phone.
Re: NEST Account migration
Posted: Monday 24 February 2020 14:10
by rolandbreedveld
heggink wrote: ↑Sunday 23 February 2020 20:52
My cookie expired a couple of days ago. I now check so I can get the new cookie as soon as it expires. Took a few weeks...
Sent from phone.
I started it on 16-jan and never had to change the cookie, perhaps if the system is not running for a while, the cookie and or token will become invalid.
Re: NEST Account migration
Posted: Monday 24 February 2020 14:21
by Ptje
Hello,
I'm jealous at everybody who has it work. I tried for a long time, but I can't get it done. In the past I used my Nest for heatpump, airco and normal heating. Now it is useless for me and I consider to buy another thermostaat.
There is no example or something what in detail is the cookie and token ?
Greetings,
Peter
Re: NEST Account migration
Posted: Monday 24 February 2020 14:54
by rolandbreedveld
Ptje wrote: ↑Monday 24 February 2020 14:21
Hello,
I'm jealous at everybody who has it work. I tried for a long time, but I can't get it done. In the past I used my Nest for heatpump, airco and normal heating. Now it is useless for me and I consider to buy another thermostaat.
There is no example or something what in detail is the cookie and token ?
Greetings,
Peter
if you follow the readme step by step you'll find out.
https://github.com/rolandbreedveld/nest-api
Re: NEST Account migration
Posted: Monday 24 February 2020 16:53
by Ptje
Hello,
cookie: OCAK=1FQYSpvNpDvkUp-kot-5ATrHc5cTEOckawg_osZKBM0; <<<< I have to leave this away ?
This is the start from te cookie ? >>>>>>>>>SID=uAdtxYOIwIyzFOewOlDSbmnEJ
Greetings,
Peter
Re: NEST Account migration
Posted: Monday 24 February 2020 17:10
by rolandbreedveld
Ptje wrote: ↑Monday 24 February 2020 16:53
Hello,
cookie: OCAK=1FQYSpvNpDvkUp-kot-5ATrHc5cTEOckawg_osZKBM0; <<<< I have to leave this away ?
This is the start from te cookie ? >>>>>>>>>SID=uAdtxYOIwIyzFOewOlDSbmnEJ
Greetings,
Peter
you need the complete data from the cookie field, it's a long string starts with XXXX= (OCAK in your case), don't forget to terminate it with ';
be shure take it from the "Request Headers" part
Re: NEST Account migration
Posted: Monday 24 February 2020 18:41
by Ptje
Hello Roland,
What do you mean with terminate ? Do I have to remove the ' ?
Greetings
Peter