Brandawg93 / homebridge-nest-cam_old

Use your Nest Cam as IP camera in HomeKit.
Apache License 2.0
89 stars 14 forks source link

[NestCam]Failed to request access token. The username and password do not match #13

Open danbridgland opened 6 years ago

danbridgland commented 6 years ago

I’m unable to get the platform to load. I keep getting “[NestCam]Failed to request access token. The username and password do not match”

I’m running a Pi2. Node 7.9.0. I have the Homebridge-Nest platform already running successfully with a Thermostat, Protect, and Cams, but I’m only getting movement sensor notifications from the cameras. I’ve tried adding the additional HomeBridge-Nest-Cam Platform to the same config.json

"platforms" : [ { "platform" : "Nest", "code" : "A1B2C3D4", "clientSecret" : "a1B2c3d4e5f6g7h8", "clientId" : "1234a56-abc1-123a-abcd-a1b2c3d4", "token" : "c.abcdefghijklmnopqrstuvwzyz123456789abcdefghijklmnopqrstuvwzyz123456789abcdefghijklmnopqrstuvwzyz123456789" }, { "platform" : "Nest-cam", "username" : "name@domain.com", "password" : "ABCD1234", "useOMX" : false } ]

Any help gratefully received.

Thanks Dan

gabemunro commented 6 years ago

Same problem here. Does it have anything to do with 2FA maybe?

brendan-stephens commented 6 years ago

I encountered this issue when the username and password supplied were incorrect to login to nest.com

gabemunro commented 6 years ago

Definitely not the case in my instance.

I noticed references to v1 of the Nest API and I'm using the newer version, so my best guess is that it's related to that.

danbridgland commented 6 years ago

I’ve switched to the primary home owner user credentials and now it works.

gabemunro commented 6 years ago

Odd. That's what I'm using, even turned off two-factor auth, same error.

wherewuz commented 6 years ago

Same issue. Username/password definitely match. Odd.

leoneleone commented 6 years ago

I had the same issue. Thankfully it was Homebridge instance that only had this plugin on it. I changed the bridge name and the username (MAC) in config.json, re-entered my nest credentials in config.json (even though everything was correct), then deleted the 'accessories' and 'persist' folder from .homebridge

After restarting homebridge everything worked as expected. Lost my HomeKit setup for the accessories obviously, but everything else seems to be working fine now.

Diondk commented 6 years ago

I have the same issue but it only occurs when iam running homebridge as system service.

Finch106 commented 6 years ago

leoneleone ‘s suggestion worked for me. Of course I couldn’t stand having a different named homebridge or MAC after having it for so long, so after creating the new instance, I did the same thing and renamed it Homebrige.

EDIT: Just kidding, I don’t have an accessories or persist folder, but I’m still throwing the token error. I tried with and without 2FA, issue remains.

pipdog05 commented 5 years ago

I'm still getting this error - any help would be greatly appreciated. I've even tried http instead: pi@raspberrypi:~ $ curl -X "POST" "https://home.nest.com/session" \

 -H 'User-Agent: iPhone iPhone OS 11.0 Dropcam/5.14.0 com.nestlabs.jasper.release Darwin' \
 -H 'Content-Type: application/x-www-form-urlencoded; charset=utf-8' \
 --data-urlencode "email=UserName@email.com" \
 --data-urlencode "password=PASSWORD"

--data-urlencode "password=PASSWcurl -X "POST" "https://home.nest.com/session" -H 'User-Agent: iPhone iPhone OS 11.0 Dropcam/5.14.0 com.nestlabs.jasper.release Darwin' -H 'Content-Type: application/x-www-form-urlencoded; charset=utf-8' --data-urlencode "email=UserName@email.com" \3" {"error":"access_denied","error_description":"invalid user credentials","instance_id":"eb396a56-12d3-48ae-b9e1-7c4900425db6"}