Support for Nest Protect

Sneak preview. Still a lot of work that has to be done, currently it will only pull the state when you start Home Assistant. I need to figure out how their ‘subscribe for data’ endpoint works…

And as a bonus, I added some other sensors (most will be disabled by default) where you can keep track of the config and have diagnostic state. And it will read the area from your Protect settings and configure that one in Home Assistant.

13 Likes

iMicknl/ha-nest-protect: Nest Protect integration for Home Assistant (github.com)

A first, initial and very limited version to try. It should work for Nest Protect devices with Google Accounts, hasn’t been tested with Nest Protect Battery versions. See known limitations and issues for the current state of the project.

If you would like to test, that would be great. Please report any issues or bugs via GitHub Issues.

4 Likes

I am still using the original Nest account. I seem to remember that there is an integration which allows you to use Nest Protect with the original account.

Are you planning to support that as well?

Unfortunately not, especially since I hope that this integration is just ‘temporarily’ until Google supports it someday in SDM hopefully. However, others can extend the integration eventually with the older login method.

First I would need to add in basic features and implement the subscribe pattern to have (near) real-time updates.

1 Like

This is great! I’ll give it a try tomorrow for my Nest Protect battery and report back any issues in GitHub. Thanks so much!

Nevermind, you made it so easy using HACS I’ve just installed it and it seems to be reporting back all properties just fine. Great work!

1 Like

Wow this is great! I’m i correct to understand that at the moment the state is only updated on start so if there is smoke detected by a nest protect it won’t show up in home assistant yet?

1 Like

I just Setup the solution with homebridge a few days ago and that seems to work fine. However it only shows smoke and CO status. While this is already great, I am very much looking forward to a real integration with more features. Thanks for working on this.

2 Likes

Indeed! For now, you need to still use a solution like HomeBridge if you want near real-time updates of your sensor state.

Normally I would wait a bit longer with releasing a ‘pre-release’ of an integration, but since I just own a single device, it is good to gather some feedback from the beginning. It looks like this is working great already, thus I hope to implement the (long-polling) subscribe API in the coming weeks.

If anyone has experience with implementing a long polling API endpoint (POST with long timeout) in Home Assistant, feel free to ping me :slight_smile:.

2 Likes

By long api polling, do you mean a something like aiohttp.ClientResponse = await self._session.post and a long timeout? I can try and help, I’d imagine you can poll for updates on an interval?

Follwing the Idea from Support for Nest Protect - #7 by PaulNL

Small Readme as a Workaround for anyone on Hass OS:

If you’re on Hass OS it’s easy to install the Portainer Addon and simply create a new container with Network Mode ‘host’ using this image: oznu/homebridge

Afterwards the UI is accessible on

yourhomeassistant-ip:8581
login: admin/admin

If you need the Google Refresh Token then clone the repository from GitHub here (on your local machine - not your HassOS host) and then run

  1. npm install
  2. node login.js

And you should have everything running. Don’t forget to restart the Container after adding the Nest Integration in Homebridge - then your Devices should be detected. Afterwards look at your Homeassistant Lovelace-Frontend in the Integrations Section - it should auto-detect it and also add all devices after pairing.

Glad you put your experiences in here! I followed your steps and was able (eventually) to get my Nest Protect entities via Homebridge into HA.

After HA auto discovering the HomeBridge, try as I might, I just could not get to the PIN input screen in the HA Homekit Controller integration. Turns out, since my HomeBridge is running in a container on a different server, even though I could access it’s web UI, I needed to select the interface for communications with HA - as it’s on a separate RPi, this was “eth0”. All working now.

Just need to work out which entities are which: smoke, heat, CO,… as the first have entities *_1 and *_2

I try trying to get this natively to HA is key, when it comes to things like life safety mixed with automation too many moving parts can be concerning.

HA has the support for the thermostats, how different is the protect api from the thermostats?

Unfortunately the ‘new’ SDM API doesn’t support Nest Protect (yet?). Thus in the mean-time I am working on porting the HomeBridge integration to Home Assistant, however the long-term goal is that Google adds support to the SDM API and that it will be supported by the official Nest integration in core.

Well done! Perfect installation instructions and was able to integrate my powered nest protects.

What a great job !!! No worries with installation ! You 've solved a famous matter !!!

i also want to intergrate my Google Nest Protect V2 Battery , but how to intergrate it ?
is there a help?

I’m looking for the same info.

To be honest, if you would scroll up just a few messages, your answers are all here.

Option 1: use a HomeBridge plugin and expose these sensors in Home Assistant
See Support for Nest Protect - #32 by thiscantbeserious

Option 2: use ha-nest-protect which is currently in development and thus has limited features for now, but should eventually be the easiest way to achieve Nest Protect sensors in Home Assistant.
See Support for Nest Protect - #23 by imick

A status update for the others, I didn’t forget about it, but I just have been extremely busy. I hope to work on it (or get some help) in the coming weeks, since I would love to have my Nest Protects in Home Assistant.

1 Like

Hi Mick , option 2 is a very good solution for me ( i do not want to install extras like HomeBridge)
hopefully you can keep up the good work , would be nice that it will be standard ntegrated into HA

When installing it , can it also be updated , when you are releasing a new version ?

Sorry im not have much experience in HA