Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lkarbownik/pywalhue
A simple wrapper over pywal to integrate it with Philips Hue light system
https://github.com/lkarbownik/pywalhue
hue hue-bridge hue-lights pywal
Last synced: 3 months ago
JSON representation
A simple wrapper over pywal to integrate it with Philips Hue light system
- Host: GitHub
- URL: https://github.com/lkarbownik/pywalhue
- Owner: lkarbownik
- Created: 2018-01-15T17:00:14.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-15T17:00:29.000Z (about 7 years ago)
- Last Synced: 2024-08-01T19:54:47.689Z (6 months ago)
- Topics: hue, hue-bridge, hue-lights, pywal
- Language: Python
- Homepage:
- Size: 1000 Bytes
- Stars: 12
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome - lkarbownik/pywalhue - A simple wrapper over pywal to integrate it with Philips Hue light system (Python)
README
# pywalhue
A simple wrapper over pywal to integrate it with Philips Hue light system## Getting Started
### How to use
Simply run `pywalhue -i ~/file/path/to/image` to generate a new colorscheme using pywal and trigger pywal-hue-hook to send an API request to Hue Bridge API.You can use pywal-hue-hook directly:
Running `pywal-hue-hook.py` will load the background color from last theme generated by pywal and send it to Hue Bridge API.
You can also test the hook by providing a specific color in the hex format as the first argument, e.g. `pywal-hue-hook.py FF00FF`### Configuration
To configure the script you need to provide 2 variables in pywal-hue-hook.py file:
- `BRIDGE_IP` - a string specifying IP address of the bridge, e.g. `'192.168.1.30'`
- `LIGHTS` - a string or a list of strings specifying name(s) of light(s) to be used
- Optionally, you can uncomment selected line responsible for calculating brightness level based on RGB input - by default lights will be set to 100% brightnessAlso, note that before first usage of the script you may need to press a bridge button to allow for registration of new API user.
### Requirements
- `python3`
- `pywal`
- `phue`
- `rgbxy`To install required modules cd into repo directory and run the following comand:
`pip3 install -r requirements.py`
### Installation
Copy `pywalhue` and `pywal-hue-hook.py` to a directory listed in $PATH environment variable, e.g. `/usr/local/bin`### Demo
[Youtube](https://www.youtube.com/watch?v=VlOteZxqEnw)