GithubHelp home page GithubHelp logo

badnest's Introduction

badnest

A bad Nest integration, forked from https://github.com/USA-RedDragon/badnest, that uses the web api to work after Works with Nest was shut down (bad Google, go sit in your corner and think about what you did)

Why is it bad

This isn't an advertised or public API, it's still better than web scraping, but will never be as reliable as the original API

Features

  • Doesn't use the now defunct Works with Nest API
  • Works with migrated/new accounts via Google auth
  • Nest Protect support
  • Nest Thermostat support
  • Nest Thermostat Sensor support
  • Nest Camera support

Drawbacks

Configuration

The camera's region is one of us or eu depending on your region. If you're not in the US or EU, you should be able to add your two-character country code, and it should work.

Example configuration.yaml - When you are using the Google Auth Login

badnest:
  issue_token: "https://accounts.google.com/o/oauth2/iframerpc....."
  cookie: "OCAK=......"
  region: us

climate:
  - platform: badnest
    scan_interval: 10

camera:
  - platform: badnest

sensor:
  - platform: badnest

Google Login support added with many thanks to: chrisjshull from https://github.com/chrisjshull/homebridge-nest/

The values of "issue_token" and "cookie" are specific to your Google Account. To get them, follow these steps (only needs to be done once, as long as you stay logged into your Google Account).

  1. Open a Chrome browser tab in Incognito Mode (or clear your cache).
  2. Open Developer Tools (View/Developer/Developer Tools).
  3. Click on 'Network' tab. Make sure 'Preserve Log' is checked.
  4. In the 'Filter' box, enter issueToken
  5. Go to home.nest.com, and click 'Sign in with Google'. Log into your account.
  6. One network call (beginning with iframerpc) will appear in the Dev Tools window. Click on it.
  7. In the Headers tab, under General, copy the entire Request URL (beginning with https://accounts.google.com, ending with nest.com). This is your "issue_token" in configuration.yaml.
  8. In the 'Filter' box, enter oauth2/iframe
  9. Several network calls will appear in the Dev Tools window. Click on the last iframe call.
  10. In the Headers tab, under Request Headers, copy the entire cookie (beginning OCAK=... - include the whole string which is several lines long and has many field/value pairs - do not include the cookie: name). This is your "cookie" in configuration.yaml.

Notes

The target temperature reported by the integration sometimes seems to be slightly off by a few tens of a degree. This is caused by the fact that the Nest mobile app actually actually allows users to set the temperature in small increments, but the displayed temperature is rounded to the nearest 0.5 degree. In other words, the temperature displayed by the integration is correct, just more exact than what is shown in the app.

badnest's People

Contributors

badguy99 avatar greengiant avatar oegemeister avatar piit79 avatar slinkymanbyday avatar therealryanbonham avatar usa-reddragon avatar vinodmishra avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

badnest's Issues

Broken: No schema supplied

Setting up a new Badnest integration from this repo using HACS results in:

2021-11-17 02:33:45 ERROR (MainThread) [homeassistant.setup] Error during setup of component badnest
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 254, in _async_setup_component
result = await task
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/badnest/__init__.py", line 44, in setup
'api': NestAPI(
File "/config/custom_components/badnest/api.py", line 54, in __init__
self.login()
File "/config/custom_components/badnest/api.py", line 72, in login
self._login_google(self._issue_token, self._cookie)
File "/config/custom_components/badnest/api.py", line 92, in _login_google
r = self._session.get(url=issue_token, headers=headers)
File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 555, in get
return self.request('GET', url, **kwargs)
File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 528, in request
prep = self.prepare_request(req)
File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 456, in prepare_request
p.prepare(
File "/usr/local/lib/python3.9/site-packages/requests/models.py", line 316, in prepare
self.prepare_url(url, params)
File "/usr/local/lib/python3.9/site-packages/requests/models.py", line 390, in prepare_url
raise MissingSchema(error)
requests.exceptions.MissingSchema: Invalid URL '': No schema supplied. Perhaps you meant http://?

Is this no longer maintained?

hot water control

Hi guys,

In EU nest you can also control hot water by your app. Is this something you can add to this integration ? It allows to control boiler to switch on the secondary pipes. I use it for water hear, water pump and also towel radiators

image

ClimateDevice is deprecated

Hello,

It seems that the ClimateDevice is deprecated and need to use Nestclimate. Can you please update the code?

Thanks

Ability to keep the connection alive longer?

BadNest works surprisingly well with the Hello doorbell that I have, and I get it, the developer doesn't have one so it is untested and will forever be unsupported. However, my only problem is the duration of how long it actually works, which right now is very short. Every time I restart HomeAssistant core, the feed will come back up and look just fine like this:
Screen Shot 2021-03-21 at 10 41 20 PM

But after a half hour to an hour or so, this happens:
Screen Shot 2021-03-22 at 12 05 05 AM

And it never recovers on it's own. Is there something I can do to refresh the connection automatically without having to start home assistant core every 30 minutes? Does anyone have to do this for the thermostats?

Badnest stopped working

Looks like badnest stopped working in hass 2021.6.0. I also noticed that RedDragons integration if completely gone.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.