Huegely is a simple python library to control Philips Hue lights. It mirrors data from the hue bridge transparently, not attempting to do any caching, keeping of state, or similar.
- All hue light features should be supported (at least for the standard lights, I don't have any of the the more exotic ones to try)
- The full group API is supported, allowing querying for, getting state from and applying actions to, groups.
- Using RGB for colours.
- Return meaningful state for groups (would have to be some kind of average of lamp states).
- Have some functional tests, not just feel-good coverage.
- Searching for / adding new lights/groups/rules/schedules (as I don't have any need for it, the app works fine for that).
- Having a command line interface.
- Having some kind of server (it's written to be used by apps and servers and things, not to be one).
Huegely is heavily inspired by https://github.com/studioimaginaire/phue. The logic for dealing with the hue API transition time bug especially is mostly taken from phue, many thanks for dealing with that!
To install, run pip install git+https://github.com/kirberich/huegely.git
.
To be able to run the tests, do the following:
- Create a python 3 virtualenv called env
- Run
pip install -r test_requirements.txt
Using tox, which will also generate a coverage report:
- Run
tox
Running tests directly:
- Run
py.test
Huegely requires python 3.x, for no good reason other than that I'm heartless.
The only other requirement is the requests
library.
Documentation can be found at https://huegely.readthedocs.org/