Can Nest tokens be migrated to a new install? [Yes, and here's how!]

@JudoWill I wonder if this would work when trying to move access to Nest from HomeBridge? I have the access token in the HomeBridge config file. Unfortunately I got an RPI and installed Hassio at the beginning of September so I missed the window to access the Nest dev account to be able to setup a new integration.
I don’t quite understand your comment in the identity_id field?

@Townsmcp.

I don’t see why it wouldn’t work as long as you have all of the relevant info and can get the format right. Since I already had an entry in my config file from the previous install I just copy-pasted over everything. When I was pulling it over there were two long alpha-numeric strings that looked like tokens, passwords, or some type of hash: the entry_id and the access_token. I didn’t want to accidentally release my Google or HA tokens, so I just replaced them in the post.

I don’t know enough of the internals of HomeBridge, or HA, to know whether they’re connecting to Nest in a similar enough way for the tokens to be exchangeable though.

1 Like

I will give it a try and report back :grin:

@JudoWill, just to be clear, you had your Nest config in configuration.yaml and the above JSON text inside the config_entries file located in ./storage ? I assume entity_id pairs up with the Nest entity id defined in configuration.yaml?

@Townsmcp
That one I’m not sure about. The HA docs require you to give the client-ID and secret OAuth tokens as part of the configuration.yaml file. You get these from the Nest Developer Account (which is no longer enrolling new accounts). The entry_id and access_tokens in this .storage/core.config_entries file are entirely different from both of the OAuth tokens. I’m assuming they’re generated during the handshake between HA and Nest/Google that would normally occur through the Nest developer tool.

You might have to dig-around in the HomeBridge internals to find them.

Thank you! @JudoWill

I was able link Nest to a fresh HASS install.

Just say thank you!
I migrated Nest thermostat from RPi to NUC!

@benm, @acme, or anyone else that has gotten this to work. Did you also get the slow loading Lovelace problem? I’ve been getting it intermittently ever since this and I’m wondering if they’re related somehow or if it was a different problem all along. If you did, has it gone away?

JudoWill,

Going through the process of recovering my nest integration with hassio. Ill try the above steps, my SD card had a bit of memory corruption. Fortunately, I was able to recover the supervisor folder from the file system. Fingers crossed in hopes I have all the data needed to restore my nest integration. Ill report back on the performance.

Regards,
Coasterboy76

@JudoWill No issues or slowness here.

JudoWill,

No slowness, however I used the procedure outlined the following post.

Nest to turn off their API

Coasterboy76

Just upgraded to a NUC as well. Sooooo much better than my old raspberry pi. However, having the same issue with Nest. Works fine on my old HA instance, but can’t get it up and running on the one due to Google closing their works with nest program. I tried coping my existing Client ID and Secret key, but it didn’t work. Came across your thread while searching for a solution. How do I access the .storage file to copy the nest json entry? I have the FTP add on installed, but it is not giving me access to the directory. All I see is addons, backup, config, share and ssl.

Figured it out, I had to turn on hidden files…doh. Anyway, copied the nest entry from the core.cofig_entries file of the old HA instance to the new NUC and rebooted. Worked like a charm!

@Townsmcp any luck figuring out what the “entry_id” can be sourced from in HomeBridge?

I gave up in the end and just went with BadNest

I just figured it out! if you login to the nest website its the same string at the end of the URL after home/

Thanks for this thread, just used this to add Nest Protects into a new HA instance for a second home.

Really helpful thanks!

Okay @jgrippe1 @JasonRS so I got everything in the /core.config_entries (entity_id from next website after /home and access_token from https://home.nest.com/session as described by homebridge_nest doc). I dont see any entities showing up. Do I need to add anything to my YML file?

I pretty much followed the instructions above, ensured the integration appeared then restarted HA to pick up the entities.

Nothing more complex than that really.

Thanks for sharing, worked like a charm without a hitch.