jbnunn / Alexa-NestThermostat

Use your Amazon Echo and the Alexa Skills Kit to control your Nest Thermostat.
5 stars 0 forks source link

Alexa-NestThermostat

Description

Use your Amazon Echo and the Alexa Skills Kit to control your Nest Thermostat. You'll create an Alexa Skills Kit (ASK) app that fires off requests to AWS Lambda. Lambda in turn will call the NEST API to control a thermostat in your structure.

Usage

  1. Create an Alexa Skills Kit (ASK) app, using the intent schema, custom slot values, and sample utterances in this repo. Choose an invocation name like my Nest.
  2. Use the code in main.py as your Lambda function. I use DynamoDB as a simple key-value store for my Nest username and password. You can do the same, or just self.username and self.password with your own hardcoded values. Additionally, substitute amzn1.echo-sdk-ams.app.<your-alexa-skills-id> with the ID of the ASK skill you created.
  3. Modify your ASK skill with the ARN of your newly created function.
  4. Test your interactions with the ASK console. When you've got it working, try it on your Echo: Alexa, ask my Nest to turn on the heat, or Alexa, ask my Nest what the temperature is set to.

Caveats

Alexa Skills Kit Documentation

The documentation for the Alexa Skills Kit is available on the Amazon Apps and Services Developer Portal.

Resources

Here are a few direct links to Alexa and Lambda documentation:

Disclaimers

The code here is based off of an unsupported Nest API and is subject to change without notice. The authors claim no responsibility for damages to your Nest or property by use of the code within. You may incur charges using AWS Lambda, but there is a free tier available for up to 1M requests per month that you may be eligible for--check AWS Lambda Pricing for details.

License

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.

In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

For more information, please refer to http://unlicense.org