Don’t forget that the first post in a community guide is a wiki - feel free to add to it or correct it.
This guide was written with reference to:
Home Assistant 2023.8.3
Supervisor 2023.08.1
Operating System 10.5
Frontend 20230802.1 - latest
December 2023: The developer has resumed work on this integration. Please check issues on GitHub before proceeding.
Background
The official Google Nest integration does not support Nest Protect smoke alarms. A custom component is available from HACS which uses an “undocumented and unofficial” API:
However, in October 2022 Google blocked this authentication method. There is an alternative, known as the “cookie method” and the developer has a beta release which supports this:
Release v0.4.0b5 · iMicknl/ha-nest-protect · GitHub
This is a step-by-step guide to setting up the integration. Most of it is taken from the developer’s instructions - I have just added screenshots. Feel free to improve it.
Limitations
-
Only Google Accounts are supported, not legacy Nest accounts
-
Cookie authentication means that you need to login to the Nest website at least once to generate a cookie. This cookie will be used to authenticate with the Nest API. The cookie will be stored in the Home Assistant configuration folder and will be used for future requests. If you log out from Nest or change your password, you will need to reauthenticate.
Tools
-
The screenshots here were taken using the Chrome browser on a Chromebook - other browsers may vary.
-
Not essential, but highly recommended… If you are doing a manual installation, the Samba Share add-on in Home Assistant makes downloading files and copying them into HA very easy. On my Chromebook, I use the CX File Explorer app.
Method
Installation via HACS
- In HACS | Integrations search for Nest Protect
- Click on the Download button
- In the Download card, turn on Show beta versions
- From the dropdown list, select v0.4.0b2
- Click Download
- Restart Home Assistant
- Go to Devices & Services | Integrations and add the Nest Protect integration, which should now appear in the new integrations list
Manual Installation
- Go to Release v0.4.0b2 · iMicknl/ha-nest-protect · GitHub and download the source code
- Unpack the compressed file
- Copy the folder custom_components/nest_protect to the custom_components folder in Home Assistant
- Restart Home Assistant
- Go to Devices & Services | Integrations and add the Nest Protect integration, which should now appear in the new integrations list
Note: since this integration has been added manually it will not appear in the HACS integrations page.
Retrieve issue_token and cookies
During configuration, you will be asked to supply an issue_token and cookies.
To get these…
- Open a browser tab in Incognito Mode
- Open Developer Tools (in Chrome: More Tools/Developer Tools)
- Click on Network tab. Make sure Preserve Log is checked
- In the Filter box, enter issueToken
- Go to home.nest.com, and click Sign in with Google. Log into your account
Note: cookies (including third-party cookies) must be enabled in your browser or you will not be able to do this.
- One network call (beginning with iframerpc) will appear in the Dev Tools window. Click on it
- In the Headers tab, under General, copy the entire Request URL (beginning with https://accounts.google.com). This is your issue_token in the configuration form
- In the Filter box, enter oauth2/iframe
- Several network calls will appear in the Dev Tools window. Click on the last iframe call
- In the Headers tab, under Request Headers, copy the entire cookie (include the whole string which is several lines long and has many field/value pairs). This is your cookies in the configuration form
- Do not log out of home.nest.com, as this will invalidate your credentials. Just close the browser tab
Paste the values you have retrieved into the Configure dialogue and click submit.
For each smoke alarm you should get…
Three sensors:
Five configuration entities:
Eleven diagnostic entities:
Testing
The best way to test the connection with the cloud is to toggle one of the configuration switches - you should see the switch change in the Nest App.
In the absence of a real emergency the state of the three status sensors will not change. Manual testing (by pressing the button in the middle of the Nest Protect) does not affect them - this is testing the siren, not the smoke/CO detectors. Automations triggered by smoke/CO detection can be tested by changing the value of the sensor in Developer Tools. Notice that most of the sensors are binary, so they will appear as “off” (no problem) or “on” (problem).
You can buy aerosol sprays to carry out “real life” testing of smoke alarms without damaging them.
It is not scientific to blow cigaratte smoke round the room.