Git Product home page Git Product logo

nest-scrape's Introduction

nest-scrape

This program logs into to the Nest website and retrieves the thermostat, temperature sensor, and humidity measurements, and the external temperature. It's a workaround for the fact that the Nest API doesn't allow retrieval of the temperature sensor measurements.

It works by starting the firefox browser in headless mode, and controlling it via the marionette protocol to perform the login. After login, it scrapes the web UI to retrieve the sensor information and prints it out two lines: a line of comma-separated headings, and a line of comma separated measurements, like so:

Time, Dining Room Thermostat Int. Temp., Bedroom 1 Int. Temp., Bedroom 2 Int. Temp., Upstairs Hallway Int. Temp., Dining Room Humid., Home Ext. Temp.
Jan 14 14:54:16 2019, 20, 18.5, 18.5, 19.5, 31, -8

Requirements

  • Linux
  • Firefox (tested with 64.0.2)
  • Go (for compiling. Compiles with Go 1.11)

Instructions

First, download firefox.

Then, compile the program using Go. If Go is installed, this should be as easy as go get github.com/jeffwilliams/nest-scrape. This'll produce a binary named nest-scrape.

Next, run nest-scrape --generate. This will output a sample config file named nest.yaml. Change the permissions on the file so that group and other cannot read or write it (chmod go-rw nest.yaml) because it'll contain your password. Then edit the file and enter the correct settings.

Finally, run nest-scrape to collect the measurements and print them to stdout.

See nest-scrape --help for other options.

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.