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

Could you follow the instructions here? Badnest is not required.
Support Nest Thermostat temperature sensors · Issue #59 · iMicknl/ha-nest-protect (github.com)

For Nest Thermostat (if you have a Google account), I would just go for the core integration. (which requires the one time 5$ fee). This is the official supported way. The goal of ha-nest-protect is just to provide support for devices that are not supported in the official Google SDM API.

Wow, lots of changes recently since I have been here last!

Oscar, since I had just got your integration to work and you’ve scrapped it, can you tell me how you switched? I’ve never before removed an integration and replaced it…is it just as easy as it sounds to convert to Mick’s?

I love your suggestion of detecting when there is a power outage too!

Thanks,

Yes, I tested Mick’s integration and it works very well and has ongoing support. So There was no point to keep maintaining two branches as he does have the majority of the functions I needed in there.

I uninstalled the integration via HACS by removing it from the menu. Then I manually removed the badnest: record inside the configuration.yaml file.
It did not remove all my sensors, so I searched in developer tools for the keyword protect and removed unavailable sensors as a cleanup.

Then I just installed Mick’s integration via HACS following his setup. It was straightforward. Since the sensor names are different, you could even run them parallel at the same time, but I don’t mind losing the history of the previous sensor group.

Hi,
I made a mistake and assumed, that there’s only one badnest implementation/fork… man I was wrong… :slight_smile:
Anyway, I’d need some guidance: I have created some patches (to this fork: GitHub - badguy99/badnest) for hot water management in order to be able to query/set target temperature and query the current temperature and also added a hot water temperature sensor (note: this branch already contained the features to be able to boost/turn on/off the water). The new features are enabled if the heatlink is connected via opentherm interface to the heater,
I’d like to push this upstream, but as there are 149 forks already, I honeslty have no idea which to which fork shall I send my merge request.
Note: domestic hot water management is not and have never been exposed via the official APIs by any means regardless of several requests, so the unofficial API seems to be the only way for now.

2 Likes

Thanks, I merged that.
Yeah there are lots of forks. I can’t even remember where I started mine from. I haven’t done much on it recently as it does what I need now. I added the hot water control as you found - I needed a way to turn off the hot water heating via gas boiler when I was generating a lot of solar power, as I could then use the excess solar to heat the water with the immersion heater.
I also added a mute for the door bell - matches up with the “Indoor chime on/off” setting in the Nest app as an on/off switch

Well, did as you said (except I used Configuration->Devices & Services->Entities and filtered by protect to remove all of the old entities from badnest, after I removed it from HACS (and restarted HA).

Mick, this integration is fantastic! Soooo much easier to configure the integration. No more crazy stuff to obtain the access_token and cookie from web page source. And it shows right up in the Integrations page. I love it, thanks!

2 Likes

Sorry for a newbie question, I am slowly converting from ST to HA and have run into an issue with my badnest installation. I installed badnest throught HACS, I have also updated my configuration.yaml, I however get the following errors during configuration validation:

Platform error camera.badnest - Integration 'badnest' not found. Platform error sensor.badnest - Integration 'badnest' not found. Platform error binary_sensor.badnest - Integration 'badnest' not found. Integration error: badnest - Integration 'badnest' not found. Platform error climate.badnest - Integration 'badnest' not found. Platform error switch.badnest - Integration 'badnest' not found.

Any thoughts on what may be the issue?

The integration is definitely installed:

Edit: Figured this out, the manifest was missing a version number which was preventing it from loading.

This post was written 3 years ago and its title is “I made a crappy Nest Thermostat integration that will work as a stopgap until alternatives come out”. If you’re a new user I’m not sure why this is where you would choose to start for integrating your Nest devices but regardless don’t do that.

The official nest integration was updated to support Google auth a long time ago and works great, start there. If you have Nest Protects and want to integrate those as well then use this.

1 Like

Mike: the reason I am is that it’s my understanding that the official integration does not support humidity control, but badnest does. I am trying to move my SmartThings automation over to control the humidity this upcoming winter based on the outdoor temperature. The ST automation used an addon MyNextManager to control the thermostat using the unofficial API too.

1 Like

@imick: great work on this addon, I am new convert from ST and one the issues I am struggling with is that the official API does not allow from modification of the target humidity (the unofficial API does). I currently use this to automate Humidity control during the winter based on outside temps.

Any chance of opening some of these settings with your addon?

Huh. Didn’t even know Nest did that. Carry on then, sorry for assuming.

Got everything up and running now after many tweaks, any ideas on how to pull in Fahrenheit vs. Celsius values for temperature?

image

@krock did you ever figure this out?

This version of badnest fixed this for anyone that has the same issue:

I wish I knew of a way to contact the forker on this one, I cannot get the Camera function to work due to an attribute that needs to be added for the camera entity (it looks like this was a breaking change in HA earlier this year):

This is the following error within the logs:

TypeError: NestCamera.camera_image() got an unexpected keyword argument 'width'

Ive been using badguy/badnest integration for years. I relied loads on being able to connect to my nest and water heater for boosts and linking to automations so thank you for making it and keeping it updated.

All has been working fine except today the integration would not start. I have tried updating the authentication cookie but still get:

The following integrations and platforms could not be set up:

Please check your config and logs.

Ive spent all evening but made no progress. I also reinstalled the integration and installed the ‘master’ branch but nothing. Havnt seen anyone else having issues but thought I would post here and see if anyone had any ideas what I might be doing wrong and how I could fix it.

my current config file reads:

badnest:
  issue_token: "https://accounts.google.com/o/oauth2/iframerpc?action=issueToken&response_type=token id_token&login_hint=XXXXXX&client_id=XXXXXXXXXX.apps.googleusercontent.com&origin=https://home.nest.com&scope=openid profile email https://www.googleapis.com/auth/nest-account&ss_domain=https://home.nest.com&include_granted_scopes=true"
  cookie: "__Secure-3PSID=RAgwXXXXXXXXXX.; __Secure-3PAPISID=p0o1TQXXXXXXX; NID=511=mnmXXXXXX; __Host-3PLSID=s.GB|s.youtube:XXXXXXXXX.; __Secure-3PSIDCC=XXXXXXXX"
  region: eu

climate:
  - platform: badnest
    scan_interval: 10

water_heater:
  - platform: badnest

Do you still have this issue?

I have been using this version without any major issues:

The one thing I am trying to troubleshooting is humidity setting, you by any chance have any luck?

Took a while but got it working again. Managed to use a backup of the integration file I had made. my setup seems to be very sensitive to change so Just going to careful from now on if updating. No issues with the humidity sensor, guessing the entity is enabled? Don’t know what else to check…

Sorry for needing to write this post, but I have been trying to install for over a week and just can’t get my head around how to find in HACS?

Could someone give me some pointers?

I have latest HACS and HA install as of today, but can’t seem to find the repository to add.
This is what I get, I’m logged in to Github (via browser) is there somewhere else in HA I need to provide username and pw?
image

Thanks, appreciate the help.