I made a crappy Nest Thermostat integration that will work as a stopgap until alternatives come out

I forked the original repo on github.

Here’s the version with the google auth login.
Please read the info.md for the steps to make it work.

Have fun!

1 Like

Hello all, sorry for the disappearance.

@dannix The fix for the userid issue is now pushed, and you can update from HACS for it to work again.

I just added beta support for Cameras thanks to a contribution from @slinkymanbyday on Github, and I’m working on getting multiple thermostats working, as well as making the temp sensors work as actual sensors in HA.

Google login is coming later tonight as well, thanks to @sjoerdoegema

4 Likes

Google login is now included. Big thanks to @sjoerdoegema

2 Likes

I would like your help with testing multiple thermostats. Version 3.0.0 in HACS should enable support for multiple temperature sensors and thermostats. Let me know if any issues arise.

Thanks for your efforts on this. I am new to Home Assistant and unfortunately missed out on the Nest API so this has been a useful addition. I have had this integration installed from the start and have had no problems seeing my thermostat etc. I have updated to the latest version, added camera and sensor to config and whilst I can now see 3 camera’s as entities I cannot see any video, also no temperature sensors for the thermostat.

I appreciate that the camera is untested but wanted to see if others have it working.

For reference

Hassio running on Raspberry Pi3
Badnest installed via HACS (previously just added as a custom component)
2 x Nest Indoor
1 x Nest Outdoor
Nest Thermostat
Nest Account Login

are presets working yet?

also, do you have to migrate to a google login for this to work? That is, what if you still have a legacy nest account from, like, 6 years ago…

I don’t think presets are working yet. I am able to control my thermostat using a standard login, not Google.

Presets are not working. I’ll try to get that fixed and released tonight. And both Google and legacy Nest logins work with this integration

Can you share your relevant config entries and the HA log?

Hey this is awesome! So have just set it up and it is showing my nest hello twice in the available cameras and isn’t showing my other nest driveway camera. I am seeing video from the nest hello when added as an entity.

config yaml is -

climate:

  • platform: badnest
    scan_interval: 10
    camera:
  • platform: badnest
    sensor:
  • platform: badnest

Thermostat is in there and working great!

Edit… nest thermostat now showing in Homekit which is what I have wanted for a long time! This is great work!

In release 3.1.0 I added support for the eco preset. It looks like the official Nest thermostat integration has support for eco, away, and eco and away. The api I’m using has no way I can see to set Away on the fly.

Edit: This introduced a bug that can cause thermostats to appear to be switching between auto and the set mode. I’m looking into options to fix this.

Edit 2: The previous bug is fixed in 3.1.1

Hi,

I have the later Next Theromstat E models so I think I might be stuffed, however installed badnest, got the cookie/api key etc (nice instructions BTW), rebooted and… nothing…, no error messages in the logs (that I could find) apart from the expected:

2019-10-21 10:47:41 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for badnest which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant

Checked in the the states tab under developer tools and no additional devices found under sensors or climate…

So, I’m a right in thinking that this (temporary) integration only works with the ‘Full Fat’ Nest thermostats and not the the E models ?

Cheers.
Phil.

Hi,
I know you solved all authentication stuff (bravo btw.)
Gkeepapi uses an auth lib faking an Android app.
(gpsoauth)
I will try if it can work and simplify authentication.
(For Google account, it’s not user-friendly)
Keep in touch
And… A big thank you ! You did it !

Sure… this is my config

camera:
  - name: Tablet Camera
    platform: generic
    still_image_url: http://192.168.0.25:2323/?cmd=getCamshot&password=1234
  - platform: badnest
badnest:
  email: ***
  password: ***

I cant see anything in the Log relating to badnest. Except the custom integration warning.

Thank you for your work on this. Great guide. I was ready to replace my nest with something else until I found this. Is there any reason to place the issue token, cookie or api key in the !secret file?

1 Like

Hy, i have this error
Mon Oct 21 2019 22:53:59 GMT+0200 (CEST)

Update for climate.09aa01ac38160p2p fails
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 268, in async_update_ha_state
await self.async_device_update()
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 448, in async_device_update
await self.hass.async_add_executor_job(self.update)
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/config/custom_components/badnest/climate.py”, line 270, in update
self.device.update()
File “/config/custom_components/badnest/api.py”, line 137, in update
self._czfe_url = r.json()[“service_urls”][“urls”][“czfe_url”]
KeyError: ‘service_urls’

Help me

Most likely your token expired. I’m not sure what the time for expiration is for these. Try restarting Home Assistant and see if that helps

I haven’t the slightest clue, but if it shows up on home.nest.com, it should work in HA with this as well

if I restart it works, but a few minutes later it won’t work again

@USA-RedDragon you are the man! Got both of my nest E thermostats added to HA!!

1 Like