Colorlight my room by screenshotting the raspberry, calculating colors and then sending it to the philips hue bridge. Because fuck only using official philips hue lights for entertainment zones.
- PHP 94.2%
- Shell 5.1%
- Dockerfile 0.7%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| app | ||
| bin | ||
| bootstrap | ||
| config | ||
| database | ||
| docker/raspi2png_screenshot | ||
| tests | ||
| .editorconfig | ||
| .env.example | ||
| .gitattributes | ||
| .gitignore | ||
| box.json | ||
| composer.json | ||
| composer.lock | ||
| docker-compose.yml | ||
| luminize | ||
| phpunit.xml.dist | ||
| README.md | ||
Luminize
Colorlight my room by screenshotting the raspberry, calculating colors and then sending it to the philips hue bridge. Because fuck only using official philips hue lights for entertainment zones.
Locations
These locations are available, lights can follow these locations. For these location the average pixel value is calculated.
| ID | Description |
|---|---|
| overall | The average color for the whole screen |
| left | The left side of the screen |
| center | The center of the screen horizontally |
| right | The right side of the screen |
| top | The top of the screen |
| middle | The middle of the screen vertically |
| bottom | The bottom of the screen |
| topleft | Top left segment if screen is divided in a 3x3 matrix |
| topcenter | Top center segment if screen is divided in a 3x3 matrix |
| topright | Top right segment if screen is divided in a 3x3 matrix |
| middleleft | Middle left segment if screen is divided in a 3x3 matrix |
| middlecenter | Middle center segment if screen is divided in a 3x3 matrix |
| middleright | Middle right segment if screen is divided in a 3x3 matrix |
| bottomleft | Bottom left segment if screen is divided in a 3x3 matrix |
| bottomcenter | Bottom center segment if screen is divided in a 3x3 matrix |
| bottomright | Bottom right segment if screen is divided in a 3x3 matrix |
Installation
Clone this repository
git clone git@code.elementon.nl:dm/Luminize.git ./luminize
Dependencies
Install Docker:
curl -fsSL https://get.docker.com | sudo sh
Light Setup
- Run
docker compose run --rm -it prepare - Set values for
HUE_HOSTandHUE_USERin.env. - Run
docker compose run --rm -it runner. - Within the runner run
./luminize light:setup. When done use ctrl+c to exit.
Running
Start luminize using raspi2png service: ./bin/run
Stop luminize and raspi2png service: ./bin/stop
Development
docker compose run --rm -it provision
./bin/develop
Useful commands:
docker compose run --rm -it runner
docker compose run --rm -it tinker
Stack
- Laravel-zero - https://laravel-zero.com/
- Raspi2png - https://github.com/AndrewFromMelbourne/raspi2png
- phue - https://github.com/sqmk/Phue