This is a fork for other repo. It's made during hackathon and may not be fully ready for re-use
Sample app showcasing Nest's REST Streaming API using Node.js
Install the dependencies from npm:
npm installLog in to the Nest Developer portal
Create an OAuth Client using the following permissions:
- Away read v2
- Camera read v2
- Camera read + images v2*
- Smoke+CO alarm read v4
- Thermostat read v4
*Note: Images are only available with a Nest Aware subscription.
Set your client redirect URI to be http://localhost:3000/auth/nest/callback
Set your OAuth client ID and client secret as environment variables:
export NEST_ID='Your OAuth client ID here'
export NEST_SECRET='Your OAuth client secret here'Start the server:
npm startOpen 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-onlyThe 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.
