Custom component for Home Assistant to interact with Nest Protect devices via an undocumented and unofficial Nest API. Unfortunately, Google SDM doesn't support Nest Protect devices and thus the core Nest integration won't work for Nest Protect.
This integration will add the most important sensors of your Nest Protect device (CO, heat and smoke) and the occupancy if your device is wired (to main power). In addition, it will expose several diagnostic and configuration entities. All sensor values will be updated real-time.
- Only Google Accounts are supported, there is no plan to support legacy Nest accounts
- When Nest Protect (wired) occupancy is triggered, it will stay 'on' for 10 minutes. (API limitation)
- Only cookie authentication is supported as Google removed the API key authentication method. This 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.
You can install this integration via HACS or manually.
Search for the Nest Protect integration and choose install. Reboot Home Assistant and configure the Nest Protect integration via the integrations page or press the blue button below.
Copy the custom_components/nest_protect
to your custom_components folder. Reboot Home Assistant and configure the Nest Protect integration via the integrations page or press the blue button below.
(adapted from homebridge-nest documentation)
The values of "issue_token" and "cookies" are specific to your Google Account. To get them, follow these steps (only needs to be done once, as long as you stay logged into your Google Account).
- Open a Chrome browser tab in Incognito Mode (or clear your cache).
- Open Developer Tools (View/Developer/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.
- 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 - do not include the cookie: name). 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.
Feel free to create an issue on GitHub if you find an issue or if you have a suggestion. It is always helpful to download the diagnostics information and to include debug logging.
The logger integration lets you define the level of logging activities in Home Assistant. Turning on debug mode will show more information about unsupported devices in your logbook.
logger:
default: critical
logs:
custom_components.nest_protect: debug
Based on the research and implementation of homebridge-nest.