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

Perfect! Thanks!

1 Like

Same situation as @stevehath here too, but still no live feed. Considering making a Google autg account and adding it to the family and then trying the Google auth method. Would this work, any drawbacks?! Thanks for all your efforts on this @USA-RedDragon.

1 Like

Still using the nest login and ran into some slow responses from Nest’s side after loading the updated code. At first nothing was connecting, but then saw I got about 5 emails from Nest saying there was a new login to my account. Then after restarting it was able to connect for my thermostat and my sensors, but not my cameras, (before was able to view one but seeing the issue where instead of seeing all my cameras had a number of camera entities showing the same camera).

Saw this error in my logs, guessing its taking a long time on Nest’s side.

2019-10-24 09:04:04 WARNING (MainThread) [homeassistant.components.camera] Setup of platform badnest is taking over 10 seconds.
2019-10-24 09:04:04 ERROR (MainThread) [homeassistant.components.camera] Error while setting up platform badnest
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 150, in _async_setup_platform
    await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
    return fut.result()
  File "/config/custom_components/badnest/camera.py", line 42, in async_setup_platform
    camera["uuid"]
  File "/config/custom_components/badnest/api.py", line 372, in __init__
    device_id)
  File "/config/custom_components/badnest/api.py", line 33, in __init__
    self.login()
  File "/config/custom_components/badnest/api.py", line 39, in login
    self._login_nest(self._email, self._password)
  File "/config/custom_components/badnest/api.py", line 45, in _login_nest
    self._user_id = r.json()["userid"]
  File "/usr/local/lib/python3.7/site-packages/requests/models.py", line 889, in json
    self.content.decode(encoding), **kwargs
  File "/usr/local/lib/python3.7/site-packages/simplejson/__init__.py", line 518, 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)

I am going to try moving over to the Google account autthentication, just wanted to report what I was seeing in case it helps anyone else out.

Super thanks for all your work on this @USA-RedDragon

Edit: Just switched over from Nest authentication to Google authentication and everything is working. Awesome!

1 Like

Thermostat works without errors now, Thanks :+1:

Another request; Is it possible to remove the small icons on the bottom of the thermostat card? And maybe even use them as separate entities on other cards? Would be nice to have the eco and heat mode a button or slider card.

1 Like

It’s generic HA’s thermostat card. You can use custom cards, such as this one:

And buttons for hvac mode handled via:

2 Likes

Dang. Tried adding a new google auth account to the family and it wouldn’t let me unless I migrated main account to Google Auth, bit the bullet and changed over as wasn’t too worried about losing other functions…still no camera feed :frowning:

I made the migration to Google auth myself to make sure it worked. I was in the same boat. I have a coworker who has a nest cam who hasn’t set it up yet who can help develop the camera side of things this weekend. H/t @gabe565

Sounds awesome @USA-RedDragon . Again thank you for your efforts, appreciate the efforts that have gone in above and beyond when you originally created this.

1 Like

This just gets better for me! Cameras are all there and working great! Thanks for your continued work on it.

1 Like

I’ve actually done something similar to this. I was able to get Nest Detects, Nest Guard (arming, disarming, state changes), cameras (no motion detection atm), and Nest Protects to work. Are you not worried about them purposely patching this as soon as they see it?

EDIT: Also, the camera URL is different for European users, just a heads up.

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/aiohttp/connector.py”, line 830, in _resolve_host
self._resolver.resolve(host, port, family=self._family)
File “/usr/local/lib/python3.7/site-packages/aiohttp/resolver.py”, line 30, in resolve
host, port, type=socket.SOCK_STREAM, family=family)
File “/usr/local/lib/python3.7/asyncio/base_events.py”, line 784, in getaddrinfo
None, getaddr_func, host, port, family, type, proto, flags)
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/local/lib/python3.7/socket.py”, line 748, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Try again

I have this Error

Patching their API would also require them changing their frontend as well. I doubt they’re so against this that they’d spend engineering time breaking the API schema and fixing it in the frontend.

Also can you share the camera url for EU? I’ll add that as well

This looks like your internet is down for some reason

Ok thanks!

Yes, please share, as this will fix my issues. Thanks Tom

Updated but Im getting a userid error still, im using Nest login not google:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 150, in _async_setup_platform
    await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
    return fut.result()
  File "/config/custom_components/badnest/climate.py", line 71, in async_setup_platform
    hass.data[DOMAIN][CONF_APIKEY]
  File "/config/custom_components/badnest/api.py", line 90, in __init__
    device_id)
  File "/config/custom_components/badnest/api.py", line 33, in __init__
    self.login()
  File "/config/custom_components/badnest/api.py", line 39, in login
    self._login_nest(self._email, self._password)
  File "/config/custom_components/badnest/api.py", line 45, in _login_nest
    self._user_id = r.json()["userid"]
KeyError: 'userid'

Got it to work. Awesome job, this is exactly what I was looking for. I know it’s not perfect but awesome for figuring out a work around.

1 Like

I have 2 logs. I don’t understand if mine just isn’t working.

Error while setting up platform badnest
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 150, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File “/usr/local/lib/python3.7/asyncio/tasks.py”, line 442, in wait_for
return fut.result()
File “/config/custom_components/badnest/climate.py”, line 71, in async_setup_platform
hass.data[DOMAIN][CONF_APIKEY]
File “/config/custom_components/badnest/api.py”, line 90, in init
device_id)
File “/config/custom_components/badnest/api.py”, line 33, in init
self.login()
File “/config/custom_components/badnest/api.py”, line 37, in login
self._login_google(self._issue_token, self._cookie, self._api_key)
File “/config/custom_components/badnest/api.py”, line 57, in _login_google
access_token = r.json()[‘access_token’]
KeyError: ‘access_token’

And

Connection error while access Nest web service: Authorization Failed

Oh and it was working fine until yesterday.

New HA user here… unfortunately started HA this month… never had a chance with NEST API…

I’ve install HACS, badnest… its all good, (hacs integration view is GREEN… meaning it is installed) I put the config yaml file. But I cannot find it on my front end lovelace… What am I missing? Would like to see home temperature in lovelace…