Page 4 of 14
Re: NEST Account migration
Posted: Thursday 16 January 2020 0:17
by Ptje
Hello,
Does someone has any idea what my problem is. I have tried for days, but I can't get it work. I only get this.
2020-01-16 00:14:53.597 (Schaijk) Pushing 'onHeartbeatCallback' on to queue
2020-01-16 00:14:53.637 (Schaijk) Processing 'onHeartbeatCallback' message
2020-01-16 00:14:53.637 (Schaijk) Calling message handler 'onHeartbeat'.
2020-01-16 00:14:53.637 (Schaijk) onHeartbeat called
2020-01-16 00:14:53.637 (Schaijk) onHeartbeat called, run again in 28 heartbeats
I have read this topic several times, but I don's see what I'm doing wrong. Can somebody help ?
Greetings,
Peter
Re: NEST Account migration
Posted: Thursday 16 January 2020 12:25
by rolandbreedveld
can't get the plugin working, Domoticz hangs after some minutes.
So waiting for official Domoticz Nest-Google support, I used the original php code from
https://github.com/gboudreau/nest-api
created some virtual devices: switches, temp, Humidity and setpoind, build a unix cron-script arround it to update the device via the Domoticz json api.
also a a trigger script to enter eco-mode if no one is at home, and a dzVents event to change the setpoint
works pretty fine!
if you'r like it, code is below
- Nest with Google account.png (88.4 KiB) Viewed 9913 times
Re: NEST Account migration
Posted: Thursday 16 January 2020 23:59
by heggink
Hi Roland,
You missed one hardcoded idx in your script for setting the setpoint.
Since I needed the Eco mode switch, this is very helpful! Many thanks as well.
H
Re: NEST Account migration
Posted: Friday 17 January 2020 11:53
by rolandbreedveld
heggink wrote: ↑Thursday 16 January 2020 23:59
Hi Roland,
You missed one hardcoded idx in your script for setting the setpoint.
Since I needed the Eco mode switch, this is very helpful! Many thanks as well.
H
Hi Heggink, which one are you missing?
both setpoint and eco-mode are there, I both use them,
set-point will trigger a dzvents script, which calls a phpfile to set the set-point, see the readme
the eco-mode switch self starts the enable/disable scripts, see the pictures and the readme
Re: NEST Account migration
Posted: Friday 17 January 2020 14:36
by rmoria
I get the following:
Code: Select all
PHP Fatal error: Uncaught Error: Call to undefined function curl_init() in /home/pi/domoticz/scripts/nest-api/nest.class.php:1256
Stack trace:
#0 /home/pi/domoticz/scripts/nest-api/nest.class.php(1224): Nest->doRequest('GET', 'https://accoun...', NULL, true, Array)
#1 /home/pi/domoticz/scripts/nest-api/nest.class.php(1089): Nest->doGET('https://accoun...', Array)
#2 /home/pi/domoticz/scripts/nest-api/nest.class.php(124): Nest->login()
#3 /home/pi/domoticz/scripts/nest-api/get_nest.php(19): Nest->__construct(NULL, NULL, 'https://accoun...', 'OCAK=YXe7kE9rdi...')
#4 {main}
thrown in /home/pi/domoticz/scripts/nest-api/nest.class.php on line 1256
Got $issue_token and $cookies as instructed
Code: Select all
$issue_token = 'https://accounts.google.com/o/oauth2/iframerpc?action=issueToken&response_type=token%20id_token&login_hint=AJDLjxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxHgtbA&client_id=733xxxxxxxxxxxxxxxxxxxxxxxxxxxxxrq.apps.googleusercontent.com&origin=https%3A%2F%2Fhome.nest.com&scope=openid%20profile%20email%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fnest-account&ss_domain=https%3A%2F%2Fhome.nest.com';
$cookies = 'OCAK=YXe7kE9rdiP1V-x_xxxxxxxxxxxxxxxxxxu4; SID=swfHHHpxxxxxxx-YSCLMxxxxxxxxxxxxxxxxxXy_mkWvjbFxxxxxxxxxxxxxxxxxxRQ.; __Secure-3PSID=swfHHHpVxxxxxxxxxxxxxxxxxiXy_mkWvjqY4a8e3Zxxxxxxxxxxxxw.; HSID=AOALvZYoUgVo4O9Rn; SSID=AEQ4aQav4D8mO411a; APISID=VNxxxxxxxxxxTPf-/AZkdHXik_9Pvtk6zr; SAPISID=K_jXxxxxxxxxxxxxxxxxxxxxxxxxxxvwp; __Secure-HSID=AOALxxxxxxxxxxn; __Secure-SSID=AExxxxxxxx411a; __Secure-APISID=VNP6xxxxxxxxx/AZkdHXik_9Pvtk6zr; __Secure-3PAPISID=K_jXOxxxxxxxxxxxxxxvwp; NID=196=HbxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxWQg72jBnkJv_bGcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxW2kFNyvogI1S-ZCn909xxxxxxxxx5_WnWXxxxxxxxxxxxxxxxxxrV8bNXwlcWM; CONSENT=YES+NL.nl+20151207-13-0; user_id=1xxxxxxxxxxxxxxxx; GAPS=1:o_PHSGxxxxxxxxxxxxxxxxxxxxxxxxxx3ILcqVdTQzxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxR0tOx_gS_AsU6xNveg:piJKoQwjcracw3k3; LSID=lso|s.NL|s.youtube:swfHHJIb6z6QvkV67CuOcxC1Z66EPAd-Z__UqXWMT9LKlokAI98tdshtXSGWwuRz2K3dlQ.; __Host-3PLSID=lso|s.NL|s.youtube:swfHHJIb6z6QvkV67CuOcxC1Z66EPAd-Z__UqXWMT9LKlokAJ1_PfLszcR9CrfLaB3WvHA.; ACCOUNT_CHOOSER=AFx_qI7n2OqzzcEcE-phsvO7ghFkIk0hoVwuU9MW6DuOkqshnryjnXG-giJg3iGnEccVcWgon0xB9qY059UF91qv0-7tdB3ikkcse_sElraYXBWkxqtFH3juy8ul23Qo3AylAOnPmcKO; SIDCC=AN0-TYsiA3N-V6jep5oxxxxxxxxxxxxxxxxxxxxxxxxxxxxDu0wh5A';
Re: NEST Account migration
Posted: Friday 17 January 2020 16:16
by rolandbreedveld
@rmoria
Dit you create your own token and cookie, as instructed on:
https://github.com/FilipDem/Domoticz-NE ... ree/master ?
the ones in the delivered file are fake.
Re: NEST Account migration
Posted: Friday 17 January 2020 16:29
by heggink
rolandbreedveld wrote:heggink wrote: ↑Thursday 16 January 2020 23:59
Hi Roland,
You missed one hardcoded idx in your script for setting the setpoint.
Since I needed the Eco mode switch, this is very helpful! Many thanks as well.
H
Hi Heggink, which one are you missing?
both setpoint and eco-mode are there, I both use them,
set-point will trigger a dzvents script, which calls a phpfile to set the set-point, see the readme
the eco-mode switch self starts the enable/disable scripts, see the pictures and the readme
The last device update in your shell script still used your hardcoded device ID (462?). I changed it myself to ${IDX}.
Sent from phone.
Re: NEST Account migration
Posted: Friday 17 January 2020 16:45
by rmoria
Yes, I did. I just x-ed uit some stuff so I could post it.
Tried the keys from unrelated laptop and generated on my domoticz-pi3. All seem to have the same issue.
Is it possible to runwith just the google username/password ?
Re: NEST Account migration
Posted: Friday 17 January 2020 18:00
by rolandbreedveld
Thanxzz heggink
I understand, changed it together with some minor details.
Re: NEST Account migration
Posted: Friday 17 January 2020 18:02
by rolandbreedveld
rmoria wrote: ↑Friday 17 January 2020 16:45
Yes, I did. I just x-ed uit some stuff so I could post it.
Tried the keys from unrelated laptop and generated on my domoticz-pi3. All seem to have the same issue.
Is it possible to runwith just the google username/password ?
username and password is not possible, perhaps you missed a part of it, don't forget it is between quotes and ending with ;
$issue_token = 'xxxx';
But, looking at your error, I see you are missing some php packages, like php5-curl, If you install these, it should work:
apt-get install libapache2-mod-php5 libphp-adodb php-pear php5 php5-cli php5-common php5-curl php5-gd php5-json php5-mysql php5-readline curl
Re: NEST Account migration
Posted: Friday 17 January 2020 20:51
by rmoria
Does it work with a newer version ? The sudo apt-get ... says there are no candidates for installation.
php -v gives :PHP 7.0.33-0+deb9u6 (cli) (built: Oct 24 2019 18:50:20)
Standard raspbian strech
Re: NEST Account migration
Posted: Saturday 18 January 2020 11:38
by tinushigh
tinushigh wrote: ↑Wednesday 15 January 2020 16:29
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
My PkuginMgr keeps crashing, right now your plugin is the only plugin I have installed. What do I do wrong?
Re: NEST Account migration
Posted: Saturday 18 January 2020 12:12
by rolandbreedveld
rmoria wrote: ↑Friday 17 January 2020 20:51
Does it work with a newer version ? The sudo apt-get ... says there are no candidates for installation.
php -v gives :PHP 7.0.33-0+deb9u6 (cli) (built: Oct 24 2019 18:50:20)
Standard raspbian strech
try php7.0-curl , think this is enough
Re: NEST Account migration
Posted: Saturday 18 January 2020 21:11
by tinushigh
rolandbreedveld wrote: ↑Thursday 16 January 2020 12:25
can't get the plugin working, Domoticz hangs after some minutes.
So waiting for official Domoticz Nest-Google support, I used the original php code from
https://github.com/gboudreau/nest-api
created some virtual devices: switches, temp, Humidity and setpoind, build a unix cron-script arround it to update the device via the Domoticz json api.
also a a trigger script to enter eco-mode if no one is at home, and a dzVents event to change the setpoint
works pretty fine!
if you'r like it, code is below
Nest with Google account.png
Dear Roland, I would love to get this working and copy your setup, unfortunately I'm so new to Domoticz that I need some explanation on how to install your setup. Do I use SSH? WinSCP? Where to put the files? I need some help with the first step.
Thanks in advance!
Re: NEST Account migration
Posted: Saturday 18 January 2020 23:02
by rmoria
rolandbreedveld wrote: ↑Saturday 18 January 2020 12:12
try php7.0-curl , think this is enough
Yes, It works fine now ( after sudo apt-get install php7.0-curl)
Thanks
Re: NEST Account migration
Posted: Monday 20 January 2020 12:05
by rolandbreedveld
tinushigh wrote: ↑Saturday 18 January 2020 21:11
Dear Roland, I would love to get this working and copy your setup, unfortunately I'm so new to Domoticz that I need some explanation on how to install your setup. Do I use SSH? WinSCP? Where to put the files? I need some help with the first step.
Thanks in advance!
pretty simple:
(on raspberry pi)
use winscp to copy the file to /home/pi
ssh to it
cd /home/pi
extract the file: tar xzvf nest-api.tgz
cd /home/pi/nest-api
be shure you have curl and php-curl:
look which php version you have: dpkg -l|grep php
sudo apt-get install php7.0-curl curl
or if you have php5:
sudo apt-get install php5-curl curl
follow the instructions from the README, and enclosed images
to create the Virtual Sensors, create in the Hardware menu "Dummy (Does nothing, use for virtual switches only)", after creating, via the button, add all Virtual devices, they will show up on devices, see README and images which ones.
suc6!
Re: NEST Account migration
Posted: Friday 24 January 2020 18:19
by Marcello1970
Thank you for your effort, it works perfectly.
Only one question, is it difficult to also get the status Away / Home and to controle it?
Re: NEST Account migration
Posted: Friday 24 January 2020 18:50
by heggink
That function is tied to the eco switch. Switch that on and it switched to away as well.
Sent from phone.
Re: NEST Account migration
Posted: Friday 24 January 2020 19:53
by rolandbreedveld
Marcello1970 wrote: ↑Friday 24 January 2020 18:19
Thank you for your effort, it works perfectly.
Only one question, is it difficult to also get the status Away / Home and to controle it?
I will add it and post a new version
Re: NEST Account migration
Posted: Friday 24 January 2020 19:59
by Marcello1970
rolandbreedveld wrote: ↑Friday 24 January 2020 19:53
I will add it and post a new version
Thank you in advance!