Skip to content

REST Streaming API sample app for Nest Cam, Thermostat and Protect using Node.js

License

Notifications You must be signed in to change notification settings

ikb42/rest-streaming

Repository files navigation

Nest REST Streaming API Sample

Sample app showcasing Nest's REST Streaming API using Node.js

Install

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

Start the server:

npm start

Open your browser to http://localhost:3000

Server Only Mode

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.

Contributing

We love contributions! 😄 Please follow the steps in CONTRIBUTING to get started. If you found a bug, please file it here.

License

Licensed under the Apache 2.0 license. See LICENSE for details.

About

REST Streaming API sample app for Nest Cam, Thermostat and Protect using Node.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published