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

@opq how did you install “manually”?

I second the post above by bwalter. I get this when I reboot my hassio

The following components and platforms could not be set up:

I successfully installed badnest and added items to my configuration.yaml file. I am not confident that it is authenticating though… where can I view logs to double check!?

Imperialistic American here…

How to convert Celsius to Fahrenheit with bad nest?

HOw did you install it? I tried thru the REPO under hassio but it doesnt seem to be working… Config still says it cannot find badnest.

Did you install HACS per the instructions Here ?

Then add the baddest repository with ‘integration’ option selected as described above in the original post.

I hope that helps…

Struggling to understand those instructions. I am using this.

I added the repo there. Not exactly sure but seems the gif you sent has an older version?

Hi everyone,

I cannot find the badnest sensors or logs related to badnest after installing and configuring.
Can someone help me diagnose?

where

1 Like

Try following this to install HACS.

I just realized yes I don’t have HACS, I am going to add it in tonight.

Thanks!
Joshua

Hi Everyone

I had this working very well with a drop cam, nest cam and nest thermostat v2. I upgraded to a thermostat v3 and now the thermostat entity won’t load. It says that it is unavailable. I have checked my unused entities and the climate entity is no longer listed. I can still see my cameras and nest protects.

I have checked and double checked my config and tried updating and reintalling badnest but it doesn’t seem to pick up the thermostat. I’ve also updated the issue token and cookie as well.

Any suggestions?

I’ve had the same issue adding mine - do you know where I might find logs to help diagnose?

I’m trying this one out next to my original nest API access, just preparing for the inevitable.

At the moment it seems the Thermostat isn’t updating properly. Is this a known issue and any idea what I can do?
This is showing in the logs:

2019-12-05 11:27:44 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.downstairs_thermostat fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 270, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 450, 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 289, in update
    self.device.update()
  File "/config/custom_components/badnest/api.py", line 296, in update
    sensor_data = r.json()[0]
IndexError: list index out of range

Second topic is actually a feature request.
I know the cameras can have sensors like “has_person”, “has_sound” and “has_motion”. These are included in the build-in component and available in the API through: https://developer-api.nest.com/devices/cameras/device_id/last_event/has_person
Would it be possible to add these? Unfortunately I have no python skills otherwise I would have attempted it myself. Thanks for the great work!!!

@krock I’ve been looking through the logs in my docker and in HA but I’m not seeing any errors come through. It sees all my other nest devices and it looks like it was just hanging on to the old thermostat and not adding the new one. I thought doing a clean install of badnest and removing the entries in the config files would fix it but to no avail. Still trying to figure out how to resolve it.

I was in the same boat… somehow, though, I started receiving errors today - thoughts?
I tried re-inputting my token_id & cookie… but I still receive this error:

Log Details (ERROR)
Thu Dec 05 2019 22:24:08 GMT-0500 (EST)
Error during setup of component badnest
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/setup.py”, line 176, in _async_setup_component
component.setup, hass, processed_config # type: ignore
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/init.py”, line 49, in setup
region,
File “/config/custom_components/badnest/api.py”, line 55, in init
self._get_devices()
File “/config/custom_components/badnest/api.py”, line 168, in _get_devices
self.cameras = self._get_cameras()
File “/config/custom_components/badnest/api.py”, line 126, in _get_cameras
for camera in r.json()[“items”]:
File “/usr/local/lib/python3.7/site-packages/requests/models.py”, line 897, in json
return complexjson.loads(self.text, **kwargs)
File “/usr/local/lib/python3.7/site-packages/simplejson/init.py”, line 525, in loads
return _default_decoder.decode(s)
File “/usr/local/lib/python3.7/site-packages/simplejson/decoder.py”, line 370, in decode
obj, end = self.raw_decode(s)
File “/usr/local/lib/python3.7/site-packages/simplejson/decoder.py”, line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

core-ssh:/config# tail home-assistant.log
simplejson.errors.JSONDecodeError: Expecting value: line 2 column 1 (char 1)
2019-12-05 23:19:07 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform badnest.climate: Unable to set up component.
2019-12-05 23:19:07 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform badnest.sensor: Unable to set up component.
2019-12-05 23:19:22 WARNING (MainThread) [homeassistant.setup] Setup of default_config is taking over 10 seconds.
2019-12-05 23:19:51 WARNING (MainThread) [homeassistant.components.frontend] Overwriting integration hacs
2019-12-05 23:19:52 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 399, in _async_add_entity
raise HomeAssistantError(msg)
homeassistant.exceptions.HomeAssistantError: Entity id already exists: sensor.hacs. Platform hacs does not generate unique IDs

My instance started giving errors as well but I updated the issue_token and cookie (ran through the process again) and it came back, minus the thermostat which is still not being detected.

When starting up, it sets up all the badnest items (climate, sensors, cameras etc) but when adding nothing appears under Thermostat but you can see that the Protect and Cameras are being added.

Got it working once I got the HACS on my hassio. I didn’t understand that when I saw hacs…Lol

Thanks guys!

How do I call to change state etc. thru node_red on hassio?

Can anyone please help me?
I am totally new to Home Assistant.
I installed this integration, but i can´t get my 3 nest protect to work.
I added the following to my configuration.yaml

badnest:
  issue_token: "https://accounts.google.com/o/oauth2/iframerpcxxx.nest.com"
  cookie: "OCAK=xxx"
  region: de

sensor:
  platform: badnest

But i got only “0”

Is your token longer than what you show in your post? This seems short …

Yes, the token and cookie are correct. I don’t want to post the right values.