Sample app showcasing Nest's REST Streaming API using Node.js
Install the dependencies from npm:
npm install
Log in to https://developer.nest.com/clients
Create a client using the following permissions:
- Away read v1
- Camera read v1
- Camera read + images v1*
- Smoke+CO alarm read v3
- Thermostat read v3
*Note: Images are only available with a Nest Aware subscription.
Set your client redirect URI to be http://localhost:3000/auth/nest/callback
Set up your Nest credentials in your environment variables:
export NEST_ID=XXX
export NEST_SECRET=XXX
Start the server:
npm start
Open your browser to http://localhost:3000
By default the app runs in a server-client mode with a browser UI. You can also run the app in server-only mode (still requires a browser for initial OAuth2 flow).
Start in server-only mode:
npm run server-only
The events will then be logged to the node console rather than displayed in a browser UI.
We love contributions! 😄 Please follow the steps in CONTRIBUTING to get started. If you found a bug, please file it here.
Licensed under the Apache 2.0 license. See LICENSE for details.