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.gztar -xvf node-v4.3.1-linux-armv7l.tar.gzsudo cp -R * /usr/local/
cd /home/pigit clone https://github.com/Pindar/dash-hue.gitcd dash-huenpm 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-reloadsudo systemctl start dash-hue.service