If pressing amazon dash button toggle a hue light
Variable | Notes |
---|---|
HUE_HOST | IP address of your HUE bridge |
HUE_USER | Your hue-bridge user name |
LIGHT_NUMBER | Light Number you'd like to control |
DASH_MAC | Mac Address of Dash Button eg., de:62:ba:1o:d6:c5 |
Start the script with export $(cat .env | xargs) && npm start
in case you have all environment variables defined in a .env file.
- node >=4
- GIT
How to install node >=4 on a Raspberry pi:
wget http://nodejs.org/dist/v4.3.1/node-v4.3.1-linux-armv7l.tar.gz
tar -xvf node-v4.3.1-linux-armv7l.tar.gz
sudo cp -R * /usr/local/
cd /home/pi
git clone https://github.com/Pindar/dash-hue.git
cd dash-hue
npm install
- create your environment file(s)
/home/pi/hue-forecast/.env
(one for each light you'd like to control) - update your systemd file(s), you can find an example ./systemd/dash-hue.service
sudo cp systemd/* /lib/systemd/system/
sudo systemctl daemon-reload
sudo systemctl start dash-hue.service