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
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 NEST_EMAIL=your_nest_email@awesome.com
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(
This has to be run on the same network your Hue is on, but not necessarily the same network your Echo is on.
-
Clone this repository (see the link on the right) or download it as a zip file.
-
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
-
Run
bundle install
(I'm assuming you have Ruby 2.0+, usingruby -v
to find out, if not try rbenv or rvm to upgrade). -
If you plan on using a Hue setup, press the button on top of your Hue unit
-
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
-
Type
chmod +x startScript.sh && ./startupScript.sh
-
This will start Alexa Home in the background. To stop Alexa Home, see "Stopping Alexa Home"
-
Edit the
autostart
file:sudo vim /etc/xdg/lxsession/LXDE-pi/autostart
-
Add the following line:
@bin/bash /homepi/dev/alexa-home/startupScript.sh
at the bottom -
Try it out by typing
startx
, or for real by typingsudo 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.
-
Phillips Hue
-
Nest Thermostat
I'd love to get these resolvers/modules done at some point too:
-
August Smart Lock
-
IR Transmitter to turn on and off the television
-
Uber to call a cab...with your voice!
-
Type
ps aux | grep ruby
at the Terminal to see a list of running Ruby processes -
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.
Send in pull requests!
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.