hue
Service for flashing Philips Hue lights when interesting things happen on Booodl. The Philips Hue API Documentation is recommended reading.
If you want to add a new event to react to, you'll need to make some changes to app.coffee
:
- Add a key/value pair to
EVENTS
. - Create a function that will be the reaction. Usually this will just call
hue.lights([...])
- Add the function and
EVENT
key to the switch statement for on new data.
In this project, 'state' refers to a state of a light (e.g. what colour, brightness, etc). For more info, see node-hue-api lightStates.
hue.lights(states)
will transition the lights to the states, as specified as a list of strings in states
. These strings should be keys of states
in hue.coffee
Getting Started
Make sure you create a locals.json
file and specify eventBusUrl
and eventBusExchange
. It should probably look something like:
{
"eventBusUrl": "amqp://booodl:[email protected]",
"eventBusExchange": "BooodlBus"
}
and then run with coffee app.coffee