Hi all,
I have a problem getting the nest binding up and running and haven’t found someone reporting the same error.
Have OH2 running but reverted to OH1 (1.8.2) without any other binding to exclude as many variables as possible.
Binding seems to fail getting the access token. From the logfile:
2016-04-16 21:49:42.277 TRACE o.o.b.n.internal.NestBinding[:155]- Querying Nest API
2016-04-16 21:49:42.277 TRACE o.o.b.n.internal.NestBinding[:613]- Retrieving access token in order to access the Nest API.
2016-04-16 21:49:42.285 TRACE o.o.b.n.internal.NestBinding[:616]- Request: AccessTokenRequest[pinCode=R2QAP792,clientId=:e3d582f6-4fd1-43fb-8fa4-6500bf2ca28a,clientSecret=gIuAYfOpfID6GjGW7iT32n0BF]
2016-04-16 21:49:42.328 TRACE o.o.b.n.i.m.AbstractRequest[:131]- About to execute 'https://api.home.nest.com/oauth2/access_token?code=R2QAP792&client_id=:e3d582f6-4fd1-43fb-8fa4-6500bf2ca28a&client_secret=gIuAYfOpfID6GjGW7iT32n0BF&grant_type=authorization_code'
2016-04-16 21:49:43.019 WARN o.o.b.n.i.m.AbstractRequest[:153]- Method failed: HTTP/1.1 403 Forbidden
2016-04-16 21:49:43.024 TRACE o.o.b.n.i.m.AbstractRequest[:172]- {"error":"client_not_active","error_description":"client is not active","instance_id":"5c6e72f2-cb72-4e72-a21c-3e115538d35b"}
2016-04-16 21:49:43.106 TRACE o.o.b.n.internal.NestBinding[:619]- Response: AccessTokenResponse[accessToken=<null>,expiresIn=<null>,error=client_not_active,errorDescription=client is not active]
2016-04-16 21:49:43.106 ERROR o.o.b.n.internal.NestBinding[:622]- Error retrieving access token: AccessTokenResponse[accessToken=<null>,expiresIn=<null>,error=client_not_active,errorDescription=client is not active]'
2016-04-16 21:49:43.106 WARN o.o.b.n.internal.NestBinding[:163]- Periodic poll skipped.
Error seems pretty self explanatory!
However…
If I request the access token ‘manually’ I get a token without problems.
curl -X POST “https://api.home.nest.com/oauth2/access_token” -d “code=R2QAP792,” -d “client_id=e3d582f6-4fd1-43fb-8fa4-6500bf2ca28a” -d “client_secret=gIuAYfOpfID6GjGW7iT32n0BF” -d “grant_type=authorization_code”
Response:
{“access_token”:“c.tCvNemRiYzCAT2b9ONr8U0z6EZ91iPiI0IL35iPoNfIGi1KnHm2xaj32qePPBemPl7xgDkU7hv1M8dmuWyEJU3MgnHf2sCphc6peTZkx2GDreK86cN7Kxxi4F9SSrh60llwadjsQULlUCMRh”,“expires_in”:315360000}
Anybody recognizes this error? Help appreciated!
I browsed through the code and believe the token is stored in the preferences? tried to add it manually to bypass the access token request but to no avail…
Thanks!