Quickly and easily control Philips Hue lights with Alfred.
-
After adding the workflow to Alfred, press the button on top of the Hue bridge and then run this command within 30 seconds:
-hue set-bridge
This command attempts to find the bridge on your local network. If it fails, you can specify the bridge's IP address. For example, if your bridge's IP is 192.168.42.126
:
-hue set-bridge 192.168.42.126
For convenience basic light control is available using the hue
keyword, while all admin features are accessed using -hue
keyword.
Control the on/off state, color, and brightness for any individual light, or all lights at once.
Quickly save the current state as a named preset.
Then load them:
Control or save the state of just subset of lights so that you can have group presets or avoid turning your roommate's light off by accident.
This affects which lights will be changed when setting the state for "All lights" using the workflow.
To reset the group to all lamps again, use -hue set-group 0
After installing the workflow you can edit it within the "Workflows" tab in the Alfred Preferences to set hotkey shortcuts for the following actions:
- Toggle all lights on
- Toggle all lights off
- Set lamps to random colors.
These have to be set by the user. Personally I use Control+O
, Control+Shift+O
, and Control+R
for each, respectively, as I find there are no collisions here with existing shortcuts.
You can also add your own Hotkeys for saved presets:
- Create your preset (see Presets section).
- Open up the Alfred Preferences, click the "Workflows" tab, and select the Philips Hue Controller workflow.
- Select the "+" icon, and select "Triggers > Hotkey" to add a new Hotkey.
- Edit your Hotkey to select the keyboard shortcut, and set the argument to "Text" with the value as the name of your preset.
- Connect this Hotkey action to the
/bin/bash
"Run Script" action that the other Hotkeys are attached to.
If you're having issues feel free to contact me via Twitter at @babylemurman, email me at ben@benknight.me, or open an issue on this Github page. I will try to get back to you within a day!
- Bugfix: #17
- Adds the ability to set Hotkeys for user-created presets.
- Download link: http://goo.gl/85imtI
- Download link 2: http://goo.gl/O0Pk0f
- Adds hotkeys for toggling all lights on and off, and setting all lights to random color.
- Adds help item to
hue
and-hue
commands. - Adds more helpful feedback text for light actions.
- Adds mechanism for checking if a new version exists.
- New icons & style tweaks.
- Made it possible to specify bridge IP as an argument to
-hue set-bridge
- Bugfix: workflow didn't work when there were things on the bridge that don't have color state (xy), such as dimmable plug-in units.
- Old download link: http://goo.gl/aot0aU
- Using full state/datastore API for getting lights state instead of getting and storing every light individually. This is backwards incompatible and won't work with old presets since it saves data differently.
- Old download link: http://goo.gl/o49DeD
- Ported all workflow code to Python, built on top of alp.
- 'Lights' is now the index result set.
- New 'All Lights' option for setting the state for all lights in one command.
- Lights icons are now the actual current light color!
- Save presets states for all lights.
- Set which lights the workflow controls using easy group management via
-hue set-group
- Set reminders (blink lights after some time delta).
- Old download link: http://goo.gl/6oZwOZ
- Speed improvements
- Old download link: http://goo.gl/L3swBq
- Initial Release
- Old download link: http://goo.gl/H26W2
Thanks to my testers & feature suggesters Danny Ricciotti and James Taylor
Thanks to Daniel Shannon for creating alp, which removed all the grunt work in creating a Workflow.