GithubHelp home page GithubHelp logo

gavinmcmeeking / alexa-home Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zachfeldman/alexa-home

0.0 2.0 0.0 279 KB

Using Amazon Echo to control the home

Home Page: https://www.youtube.com/watch?v=9AmxiGVBekE

License: Other

Ruby 97.77% JavaScript 1.54% Shell 0.69%

alexa-home's Introduction

Alexa Home

Welcome to Alexa Home! The goal of this project is to use your Amazon Echo to control various home automation software. Interested in integrating a new module? Check out some of the code and send in a pull request! Glad to help out.

Good demo video at http://youtu.be/9AmxiGVBekE

Here's a blog post too with a bad demo video and some background:

http://blog.zfeldman.com/2014-12-28-using-amazon-echo-to-control-lights-and-temperature

Setting up

You'll need to clone the repository from GitHub in the Terminal. I recommend putting it in the folder ~/dev/alexa-home

You'll also need to set some environmental variables, which could be accomplished like this:

# in a file called .env, located at ~
# try vim ~/.env or nano ~/.env
export ALEXA_HOME=/path/to/alexa-home/repo

export [email protected]
export NEST_PASS=your_nest_password_not_test123

export AMAZON_EMAIL=youramazonlogin
export AMAZON_PASSWORD=your_awesome_pass_not_12345

For more, check out Using Environment Variables to Safely Store API Credentials(

Getting Started

This has to be run on the same network your Hue is on, but not necessarily the same network your Echo is on.

  1. Clone this repository (see the link on the right) or download it as a zip file.

  2. Open up the directory in your terminal application by dragging it into Terminal from the Finder or using the cd (change directory) command, I.E. cd /home/pi/dev/alexa-home

  3. Run bundle install (I'm assuming you have Ruby 2.0+, using ruby -v to find out, if not try rbenv or rvm to upgrade).

  4. If you plan on using a Hue setup, press the button on top of your Hue unit

  5. If you don't want to use all of the existing modules, edit config.yml and comment out or remove modules. Should look like this:

---

# this is a comment, only configuring hue and nest
modules:
  - hue
  - nest
  1. Type chmod +x startScript.sh && ./startupScript.sh

  2. This will start Alexa Home in the background. To stop Alexa Home, see "Stopping Alexa Home"

Running automatically on a Rasperry Pi at boot

  1. Edit the autostartfile: sudo vim /etc/xdg/lxsession/LXDE-pi/autostart

  2. Add the following line: @bin/bash /homepi/dev/alexa-home/startupScript.sh at the bottom

  3. Try it out by typing startx, or for real by typing sudo reboot

Note: Since you can't see the screen if starting a headless Pi: I have the first generation Pi and it takes about 3.5 minutes to start up and startup Iceweasel (the Echo proxy). I'd give it 5 minutes before worrying about troubleshooting your setup. Or just wait with a screen plugged in if you can.

Existing Modules

  1. Phillips Hue

  2. Nest Thermostat

Module Roadmap

I'd love to get these resolvers/modules done at some point too:

  1. August Smart Lock

  2. IR Transmitter to turn on and off the television

  3. Uber to call a cab...with your voice!

Stopping Alexa Home

  1. Type ps aux | grep ruby at the Terminal to see a list of running Ruby processes

  2. If you see the server (app.rb) or the Watir runner (watir-login.rb) and want to stop either of them, type sudo kill -9 <PID> , PID corresponding to the program's process ID.

Contributors

@zachfeldman

Contributing

Send in pull requests!

License

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.

alexa-home's People

Contributors

zachfeldman avatar danehammer avatar

Watchers

James Cloos avatar Gavin McMeeking avatar

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.