Hello,
I've read a few of the raised issues but can't work through the problem I am having. I've followed the instructions on getting my access token & cookie numerous times and keep hitting the same issue:
[16:17 19] james@oracle:nest-api (master *%=)$ php FHR-new.php
PHP Notice: Undefined offset: 0 in /home/james/git/nest-api/nest.class.php on line 1067
PHP Notice: Undefined property: stdClass::$link in /home/james/git/nest-api/nest.class.php on line 374
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 374
PHP Notice: Trying to get property 'structure' of non-object in /home/james/git/nest-api/nest.class.php on line 374
PHP Notice: Undefined offset: 1 in /home/james/git/nest-api/nest.class.php on line 374
PHP Notice: Undefined property: stdClass::$ in /home/james/git/nest-api/nest.class.php on line 375
PHP Notice: Trying to get property 'away' of non-object in /home/james/git/nest-api/nest.class.php on line 375
PHP Notice: Undefined property: stdClass::$device in /home/james/git/nest-api/nest.class.php on line 376
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 376
PHP Notice: Trying to get property 'current_schedule_mode' of non-object in /home/james/git/nest-api/nest.class.php on line 376
PHP Notice: Undefined property: stdClass::$shared in /home/james/git/nest-api/nest.class.php on line 377
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 377
PHP Notice: Trying to get property 'target_temperature_type' of non-object in /home/james/git/nest-api/nest.class.php on line 377
PHP Notice: Undefined property: stdClass::$device in /home/james/git/nest-api/nest.class.php on line 378
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 378
PHP Notice: Trying to get property 'eco' of non-object in /home/james/git/nest-api/nest.class.php on line 378
PHP Notice: Trying to get property 'mode' of non-object in /home/james/git/nest-api/nest.class.php on line 378
PHP Notice: Undefined property: stdClass::$device in /home/james/git/nest-api/nest.class.php on line 386
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 386
PHP Notice: Trying to get property 'away_temperature_low_enabled' of non-object in /home/james/git/nest-api/nest.class.php on line 386
PHP Notice: Undefined property: stdClass::$device in /home/james/git/nest-api/nest.class.php on line 393
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 393
PHP Notice: Trying to get property 'away_temperature_low_enabled' of non-object in /home/james/git/nest-api/nest.class.php on line 393
PHP Notice: Undefined property: stdClass::$device in /home/james/git/nest-api/nest.class.php on line 397
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 397
PHP Notice: Trying to get property 'away_temperature_high_enabled' of non-object in /home/james/git/nest-api/nest.class.php on line 397
PHP Notice: Undefined property: stdClass::$rcs_settings in /home/james/git/nest-api/nest.class.php on line 427
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 427
PHP Notice: Trying to get property 'associated_rcs_sensors' of non-object in /home/james/git/nest-api/nest.class.php on line 427
PHP Warning: Invalid argument supplied for foreach() in /home/james/git/nest-api/nest.class.php on line 427
PHP Notice: Undefined property: stdClass::$shared in /home/james/git/nest-api/nest.class.php on line 439
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 439
PHP Notice: Trying to get property 'current_temperature' of non-object in /home/james/git/nest-api/nest.class.php on line 439
PHP Notice: Undefined offset: 0 in /home/james/git/nest-api/nest.class.php on line 1067
PHP Notice: Undefined offset: 0 in /home/james/git/nest-api/nest.class.php on line 1067
PHP Notice: Undefined property: stdClass::$device in /home/james/git/nest-api/nest.class.php on line 1022
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 1022
PHP Notice: Trying to get property 'temperature_scale' of non-object in /home/james/git/nest-api/nest.class.php on line 1022
PHP Notice: Undefined property: stdClass::$device in /home/james/git/nest-api/nest.class.php on line 440
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 440
PHP Notice: Trying to get property 'backplate_temperature' of non-object in /home/james/git/nest-api/nest.class.php on line 440
PHP Notice: Undefined offset: 0 in /home/james/git/nest-api/nest.class.php on line 1067
PHP Notice: Undefined offset: 0 in /home/james/git/nest-api/nest.class.php on line 1067
PHP Notice: Undefined property: stdClass::$device in /home/james/git/nest-api/nest.class.php on line 1022
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 1022
PHP Notice: Trying to get property 'temperature_scale' of non-object in /home/james/git/nest-api/nest.class.php on line 1022
PHP Notice: Undefined property: stdClass::$device in /home/james/git/nest-api/nest.class.php on line 441
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 441
PHP Notice: Trying to get property 'current_humidity' of non-object in /home/james/git/nest-api/nest.class.php on line 441
PHP Notice: Undefined property: stdClass::$shared in /home/james/git/nest-api/nest.class.php on line 442
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 442
PHP Notice: Trying to get property 'hvac_ac_state' of non-object in /home/james/git/nest-api/nest.class.php on line 442
PHP Notice: Undefined property: stdClass::$shared in /home/james/git/nest-api/nest.class.php on line 443
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 443
PHP Notice: Trying to get property 'hvac_heater_state' of non-object in /home/james/git/nest-api/nest.class.php on line 443
PHP Notice: Undefined property: stdClass::$shared in /home/james/git/nest-api/nest.class.php on line 444
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 444
PHP Notice: Trying to get property 'hvac_alt_heat_state' of non-object in /home/james/git/nest-api/nest.class.php on line 444
PHP Notice: Undefined property: stdClass::$shared in /home/james/git/nest-api/nest.class.php on line 446
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 446
PHP Notice: Trying to get property 'auto_away' of non-object in /home/james/git/nest-api/nest.class.php on line 446
PHP Notice: Undefined property: stdClass::$device in /home/james/git/nest-api/nest.class.php on line 449
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 449
PHP Notice: Trying to get property 'leaf' of non-object in /home/james/git/nest-api/nest.class.php on line 449
PHP Notice: Undefined property: stdClass::$device in /home/james/git/nest-api/nest.class.php on line 450
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 450
PHP Notice: Trying to get property 'battery_level' of non-object in /home/james/git/nest-api/nest.class.php on line 450
PHP Notice: Undefined property: stdClass::$shared in /home/james/git/nest-api/nest.class.php on line 453
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 453
PHP Notice: Trying to get property 'hvac_heater_state' of non-object in /home/james/git/nest-api/nest.class.php on line 453
PHP Notice: Undefined property: stdClass::$shared in /home/james/git/nest-api/nest.class.php on line 454
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 454
PHP Notice: Trying to get property 'hvac_heat_x2_state' of non-object in /home/james/git/nest-api/nest.class.php on line 454
PHP Notice: Undefined property: stdClass::$shared in /home/james/git/nest-api/nest.class.php on line 455
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 455
PHP Notice: Trying to get property 'hvac_heat_x3_state' of non-object in /home/james/git/nest-api/nest.class.php on line 455
PHP Notice: Undefined property: stdClass::$shared in /home/james/git/nest-api/nest.class.php on line 456
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 456
PHP Notice: Trying to get property 'hvac_alt_heat_state' of non-object in /home/james/git/nest-api/nest.class.php on line 456
PHP Notice: Undefined property: stdClass::$shared in /home/james/git/nest-api/nest.class.php on line 457
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 457
PHP Notice: Trying to get property 'hvac_alt_heat_x2_state' of non-object in /home/james/git/nest-api/nest.class.php on line 457
PHP Notice: Undefined property: stdClass::$shared in /home/james/git/nest-api/nest.class.php on line 458
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 458
PHP Notice: Trying to get property 'hvac_aux_heater_state' of non-object in /home/james/git/nest-api/nest.class.php on line 458
PHP Notice: Undefined property: stdClass::$shared in /home/james/git/nest-api/nest.class.php on line 459
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 459
PHP Notice: Trying to get property 'hvac_emer_heat_state' of non-object in /home/james/git/nest-api/nest.class.php on line 459
PHP Notice: Undefined property: stdClass::$shared in /home/james/git/nest-api/nest.class.php on line 462
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 462
PHP Notice: Trying to get property 'hvac_ac_state' of non-object in /home/james/git/nest-api/nest.class.php on line 462
PHP Notice: Undefined property: stdClass::$shared in /home/james/git/nest-api/nest.class.php on line 463
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 463
PHP Notice: Trying to get property 'hvac_cool_x2_state' of non-object in /home/james/git/nest-api/nest.class.php on line 463
PHP Notice: Undefined property: stdClass::$shared in /home/james/git/nest-api/nest.class.php on line 464
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 464
PHP Notice: Trying to get property 'hvac_cool_x3_state' of non-object in /home/james/git/nest-api/nest.class.php on line 464
PHP Notice: Undefined property: stdClass::$device in /home/james/git/nest-api/nest.class.php on line 468
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 468
PHP Notice: Trying to get property 'auto_away_enable' of non-object in /home/james/git/nest-api/nest.class.php on line 468
PHP Notice: Undefined property: stdClass::$device in /home/james/git/nest-api/nest.class.php on line 470
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 470
PHP Notice: Trying to get property 'away_temperature_low_enabled' of non-object in /home/james/git/nest-api/nest.class.php on line 470
PHP Notice: Undefined property: stdClass::$device in /home/james/git/nest-api/nest.class.php on line 471
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 471
PHP Notice: Trying to get property 'away_temperature_high_enabled' of non-object in /home/james/git/nest-api/nest.class.php on line 471
PHP Notice: Undefined property: stdClass::$device in /home/james/git/nest-api/nest.class.php on line 474
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 474
PHP Notice: Trying to get property 'lower_safety_temp_enabled' of non-object in /home/james/git/nest-api/nest.class.php on line 474
PHP Notice: Undefined property: stdClass::$device in /home/james/git/nest-api/nest.class.php on line 475
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 475
PHP Notice: Trying to get property 'upper_safety_temp_enabled' of non-object in /home/james/git/nest-api/nest.class.php on line 475
PHP Notice: Undefined property: stdClass::$device in /home/james/git/nest-api/nest.class.php on line 481
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 481
PHP Notice: Trying to get property 'time_to_target' of non-object in /home/james/git/nest-api/nest.class.php on line 481
PHP Notice: Undefined property: stdClass::$device in /home/james/git/nest-api/nest.class.php on line 484
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 484
PHP Notice: Trying to get property 'serial_number' of non-object in /home/james/git/nest-api/nest.class.php on line 484
PHP Notice: Undefined property: stdClass::$device in /home/james/git/nest-api/nest.class.php on line 485
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 485
PHP Notice: Trying to get property 'temperature_scale' of non-object in /home/james/git/nest-api/nest.class.php on line 485
PHP Notice: Undefined offset: 0 in /home/james/git/nest-api/nest.class.php on line 1067
PHP Notice: Undefined property: stdClass::$track in /home/james/git/nest-api/nest.class.php on line 1092
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 1092
PHP Notice: Trying to get property 'online' of non-object in /home/james/git/nest-api/nest.class.php on line 1094
PHP Notice: Trying to get property 'last_connection' of non-object in /home/james/git/nest-api/nest.class.php on line 1095
PHP Notice: Trying to get property 'last_connection' of non-object in /home/james/git/nest-api/nest.class.php on line 1096
PHP Notice: Undefined property: stdClass::$device in /home/james/git/nest-api/nest.class.php on line 1098
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 1098
PHP Notice: Trying to get property 'local_ip' of non-object in /home/james/git/nest-api/nest.class.php on line 1098
PHP Notice: Undefined property: stdClass::$device in /home/james/git/nest-api/nest.class.php on line 1099
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 1099
PHP Notice: Trying to get property 'mac_address' of non-object in /home/james/git/nest-api/nest.class.php on line 1099
PHP Notice: Undefined property: stdClass::$device in /home/james/git/nest-api/nest.class.php on line 489
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 489
PHP Notice: Trying to get property 'leaf_threshold_cool' of non-object in /home/james/git/nest-api/nest.class.php on line 489
PHP Notice: Undefined property: stdClass::$device in /home/james/git/nest-api/nest.class.php on line 490
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 490
PHP Notice: Trying to get property 'leaf_threshold_heat' of non-object in /home/james/git/nest-api/nest.class.php on line 490
PHP Notice: Undefined property: stdClass::$device in /home/james/git/nest-api/nest.class.php on line 490
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 490
PHP Notice: Trying to get property 'leaf_threshold_heat' of non-object in /home/james/git/nest-api/nest.class.php on line 490
PHP Notice: Undefined offset: 0 in /home/james/git/nest-api/nest.class.php on line 1067
PHP Notice: Undefined offset: 0 in /home/james/git/nest-api/nest.class.php on line 1067
PHP Notice: Undefined property: stdClass::$device in /home/james/git/nest-api/nest.class.php on line 1022
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 1022
PHP Notice: Trying to get property 'temperature_scale' of non-object in /home/james/git/nest-api/nest.class.php on line 1022
PHP Notice: Undefined property: stdClass::$device in /home/james/git/nest-api/nest.class.php on line 493
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 493
PHP Notice: Trying to get property 'has_humidifier' of non-object in /home/james/git/nest-api/nest.class.php on line 493
PHP Notice: Undefined property: stdClass::$device in /home/james/git/nest-api/nest.class.php on line 498
PHP Notice: Trying to get property '' of non-object in /home/james/git/nest-api/nest.class.php on line 498
PHP Notice: Trying to get property 'has_fan' of non-object in /home/james/git/nest-api/nest.class.php on line 498
stdClass Object
(
[current_state] => stdClass Object
(
[mode] => off,
[temperature] => 0
[backplate_temperature] => 0
[humidity] =>
[ac] =>
[heat] =>
[alt_heat] =>
[hot_water] =>
[auto_away] =>
[manual_away] =>
[structure_away] =>
[leaf] =>
[battery_level] =>
[active_stages] => stdClass Object
(
[heat] => stdClass Object
(
[stage1] =>
[stage2] =>
[stage3] =>
[alt] =>
[alt_stage2] =>
[aux] =>
[emergency] =>
)
[cool] => stdClass Object
(
[stage1] =>
[stage2] =>
[stage3] =>
)
)
[eco_mode] =>
[eco_temperatures_assist_enabled] =>
[eco_temperatures] => stdClass Object
(
[low] =>
[high] =>
)
[safety_temperatures] => stdClass Object
(
[low] =>
[high] =>
)
)
[target] => stdClass Object
(
[mode] =>
[temperature] =>
[time_to_target] =>
)
[sensors] => stdClass Object
(
[all] => Array
(
)
[active] => Array
(
)
[active_temperatures] => Array
(
)
)
[serial_number] =>
[scale] =>
[location] =>
[network] => stdClass Object
(
[online] =>
[last_connection] => 1970-01-01 01:00:00
[last_connection_UTC] => 1970-01-01 00:00:00
[wan_ip] =>
[local_ip] =>
[mac_address] =>
)
[name] => Not Set
[auto_cool] =>
[auto_heat] => 0
[where] =>
)
Obviously altered my details here slightly:
<?php
require_once('nest.class.php');
// Or use a Google account (see instructions below on how to find those values):
$issue_token = 'https://accounts.google.com/o/oauth2/iframerpc?action=issueToken&response_type=token%20id_token&login_hint=AJDLj6LQu-SMCQLMJfOUep6S7tCeUMzH6FwNmk0LkF6QnBgRUrJ2NKhKtpNj0NxDU72s3nkhdAZ2HELLOwhhYI1fIr67KlpOw&client_id=133749279899-44tchle2kaa9afr5v9ov7jbuojfr9lrq.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&include_granted_scopes=true';
$cookies = '__Secure-3PSID=HELLO_mO83JLCJzJhbVm9yJHgj5rkkHR4cbS5TutoSuAUOUHutZE6RXu6VTaWIpo6V5g.; __Secure-3PAPISID=HELLOIeftJcEpnWBU/A3sQUQLhPI_-jost0; NID=511=HELLOVW8AoiFijbHc9QPY9lMEsRLLIUdFmJSZdj1u3fTB8G1EhLcZuLFS8m24Gkoe_1Z110tWKJu43OQ988KeTo0qrhmCvwvL2YUuqbh3M1y0CblXnDgG4NC6iUBXhBTgD69H5BcM_k0pHROF7WTomCD5ZTmX-lrrvddk4SLX4r4pYi8mZ5MpfcWc-XhbLKIx7G6cg45z1AyP3yJBA; __Host-HELLO=s.GB|s.youtube:Ogj5q88UjjREo1g55RIY67WaPt9gLKZBq6KiiTYK4zh9iyM3746DZh8LE22vQenHELLO.; __Secure-HELLO=AEf-XMSCJAsfrXnpS4tUOGuDyQ1j0ThE928lVNFfRUVpeEyNqosI2EgwLE5WX4HELLO_';
$nest = new Nest(NULL, NULL, $issue_token, $cookies);
// Get the device information:
$infos = $nest->getDeviceInfo();
print_r($infos);
Does anything look wrong with the above? I used to have this script working a couple of years ago but can't get it working now to save my life! Hoping someone here can point me in the right direction.
Thank you
Hello,
I've read a few of the raised issues but can't work through the problem I am having. I've followed the instructions on getting my access token & cookie numerous times and keep hitting the same issue:
Obviously altered my details here slightly:
Does anything look wrong with the above? I used to have this script working a couple of years ago but can't get it working now to save my life! Hoping someone here can point me in the right direction.
Thank you