Nest Oauth failes after restore database

For heating/cooling related questions in Domoticz

Moderator: leecollings

Post Reply
molekuul
Posts: 1
Joined: Sunday 11 March 2018 16:09
Target OS: Linux
Domoticz version:
Contact:

Nest Oauth failes after restore database

Post by molekuul »

I try upgrade my Domoticz from version: 3.8849 to version: 4.9701 and I find this problem with my Nest.
When I install version 4.9701, and use an empty database, I can configure the Nest Thermostat as a type: Nest Thermostat/Protect OAuth.

see Below: I replaced some of the access token for security reasons

Code: Select all

2019-03-03 14:08:40.989  Status: NestOAuthAPI: Worker started...
2019-03-03 14:08:45.995  NestOAuthAPI: No API key available.
2019-03-03 14:08:45.995  NestOAuthAPI: Access token missing. Will request an API key based on Product Id, Product Secret and PIN code.
2019-03-03 14:08:45.995  NestOAuthAPI: Preparing URL
2019-03-03 14:08:45.995  NestOAuthAPI: Doing POST request to URL: https://api.home.nest.com/oauth2/access_token
2019-03-03 14:08:45.995  NestOAuthAPI: Will now attempt to fetch access token.
2019-03-03 14:08:50.186  NestOAuthAPI: POST request completed. Result: {"access_token":"c.***********************************wf6DsqkgT7JEQaQ9TNy8qBL4LekhLO9XQTyczRTqP9EBQSssmT28g3oVxTSLOBWlnzpP489YIBN1gV4WVM*****************************","expires_in":315360000}
2019-03-03 14:08:50.186  NestOAuthAPI: Will now parse result to JSON
2019-03-03 14:08:50.187  NestOAuthAPI: JSON data parse call returned.
2019-03-03 14:08:50.187  NestOAuthAPI: Parsing of JSON data apparently successful
2019-03-03 14:08:50.187  NestOAuthAPI: parsed JSON data contains more than 0 elements
2019-03-03 14:08:50.187  NestOAuthAPI: Fetching access_token from JSON object
2019-03-03 14:08:50.188  NestOAuthAPI: Returning fetched access token: c.***********************************wf6DsqkgT7JEQaQ9TNy8qBL4LekhLO9XQTyczRTqP9EBQSssmT28g3oVxTSLOBWlnzpP489YIBN1gV4WVM*****************************"
2019-03-03 14:08:50.188  NestOAuthAPI: Received an access token to use for future requests: c.***********************************wf6DsqkgT7JEQaQ9TNy8qBL4LekhLO9XQTyczRTqP9EBQSssmT28g3oVxTSLOBWlnzpP489YIBN1gV4WVM*****************************"
2019-03-03 14:08:50.189  NestOAuthAPI: Storing received access token c.***********************************wf6DsqkgT7JEQaQ9TNy8qBL4LekhLO9XQTyczRTqP9EBQSssmT28g3oVxTSLOBWlnzpP489YIBN1gV4WVM*****************************" and clearing token request information.
2019-03-03 14:08:50.190  NestOAuthAPI: Trying to access API on https://developer-api.nest.com/structures.json?auth=c.***********************************wf6DsqkgT7JEQaQ9TNy8qBL4LekhLO9XQTyczRTqP9EBQSssmT28g3oVxTSLOBWlnzpP489YIBN1gV4WVM*****************************"
2019-03-03 14:08:58.789  NestOAuthAPI: Access token appears to be valid.
2019-03-03 14:08:58.790  NestOAuthAPI: Login success. Token successfully validated.
2019-03-03 14:09:06.111  (Nest Thermostaat) Lighting 2 (Mylocation Away)
2019-03-03 14:09:06.113  (Nest Thermostaat) Thermostat (Mylocation Family Room Setpoint)
2019-03-03 14:09:06.119  (Nest Thermostaat) Temp + Humidity (Mylocation Family Room TempHum)
2019-03-03 14:09:06.120  (Nest Thermostaat) Lighting 2 (Mylocation Family Room HeatingOn)
2019-03-03 14:09:06.121  (Nest Thermostaat) Lighting 2 (Mylocation Family Room Manual Eco Mode)
However When I restore my database from my "old" domoticz version 3.8849, and configure the Nest, I get several errors:

Code: Select all

2019-03-03 14:37:34.023  NestOAuthAPI: Trying to access API on https://developer-api.nest.com/structures.json?auth=c.***********************************wf6DsqkgT7JEQaQ9TNy8qBL4LekhLO9XQTyczRTqP9EBQSssmT28g3oVxTSLOBWlnzpP489YIBN1gV4WVM*****************************
2019-03-03 14:37:34.808  NestOAuthAPI: Access token appears to be valid.
2019-03-03 14:37:34.808  NestOAuthAPI: Login success. Token successfully validated.
2019-03-03 14:37:37.003  Error: NestOAuthAPI: Error getting structures!
2019-03-03 14:38:07.025  NestOAuthAPI: Trying to access API on https://developer-api.nest.com/structures.json?auth=c.***********************************wf6DsqkgT7JEQaQ9TNy8qBL4LekhLO9XQTyczRTqP9EBQSssmT28g3oVxTSLOBWlnzpP489YIBN1gV4WVM*****************************
2019-03-03 14:38:08.541  Error: NestOAuthAPI: Error while performing login: Got empty response body while getting structures. Response code: 28
2019-03-03 14:38:08.541  Error: NestOAuthAPI: Login failed: token did not validate.
2019-03-03 14:38:09.366  Error: OpenWeatherMap: Error getting http data!
2019-03-03 14:38:38.559  NestOAuthAPI: Trying to access API on https://developer-api.nest.com/structures.json?auth=c.***********************************wf6DsqkgT7JEQaQ9TNy8qBL4LekhLO9XQTyczRTqP9EBQSssmT28g3oVxTSLOBWlnzpP489YIBN1gV4WVM*****************************
2019-03-03 14:38:39.748  Error: NestOAuthAPI: Error while performing login: Got empty response body while getting structures. Response code: HTTP/1.1 307 Temporary Redirect
2019-03-03 14:38:39.748  Error: NestOAuthAPI: Login failed: token did not validate.
2019-03-03 14:39:09.770  NestOAuthAPI: Trying to access API on https://developer-api.nest.com/structures.json?auth=c.***********************************wf6DsqkgT7JEQaQ9TNy8qBL4LekhLO9XQTyczRTqP9EBQSssmT28g3oVxTSLOBWlnzpP489YIBN1gV4WVM*****************************
2019-03-03 14:39:10.988  Error: NestOAuthAPI: Error while performing login: Got empty response body while getting structures. Response code: HTTP/1.1 307 Temporary Redirect
2019-03-03 14:39:10.988  Error: NestOAuthAPI: Login failed: token did not validate.
What should I fix in the database?
Do I have convert the database to the new version?, how Do I do that?

Kind regards,
Joris Weijters
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest