No description
- Go 98.9%
- Makefile 1.1%
|
|
||
|---|---|---|
| cmd | ||
| internal | ||
| .gitignore | ||
| go.mod | ||
| go.sum | ||
| Makefile | ||
| README.md | ||
RGB Screen Sync for Home Assistant
🌈 Overview
This project synchronizes your RGB lamp (connected via Home Assistant) with the average color displayed on your screen in real time. The goal is to create an immersive ambient lighting experience that reacts dynamically to your screen’s content — perfect for movies, gaming, or music visualization.
🧩 How It Works
- The script captures a screenshot of your screen
- It calculates the average RGB color
- It sends a color update command to your Home Assistant instance via its REST API
- Your RGB lamp updates its color to match the screen
🗃️ Home Assistant configuration
Create an automation
Set a trigger and copy the URL
Set an action
🧪 Example
ha-rgb-screen -url http://homeassistant.local:8123 -webhook xxxxxxxxxx -state input_boolean.ambiance_tv -screen 0 -delay 500 -delay 0.5
Runs the RGB Screen Sync tool and connects it to your Home Assistant instance via a webhook:
-urlspecifies the webhook endpoint used to send color updates (without trailing slash)-webhookspecifies the webhook name-statespecifies the id of the entity that enable the light ambiance-screen 0selects the first display (useful if multiple monitors are connected)-delay 500sets the delay between color updates to 500 milliseconds-deltasets the minimum delta to update the color (Wikipedia: CIEDE2000)
All arguments:
Usage of ./ha-rgb-screen:
-debug
Debug mode (no http request)
-delay int
Delay in ms (default 500)
-delta float
Mininum delta to update the color (default 0.5)
-screen int
Screen index
-url string
Webhook URL
-v Verbose mode



