No description
  • Go 98.9%
  • Makefile 1.1%
Find a file
Simon Vieille 4e84cc2ad4
feat: use input entity to enable the service
feat: add new params

BREAKING CHANGE: new cli params
2026-01-12 20:04:22 +01:00
cmd feat: use input entity to enable the service 2026-01-12 20:04:22 +01:00
internal feat: use input entity to enable the service 2026-01-12 20:04:22 +01:00
.gitignore refactor: remove temporary files 2025-11-12 18:24:46 +01:00
go.mod feat: add color delta checker to limit requests 2025-12-07 11:10:32 +01:00
go.sum feat: add color delta checker to limit requests 2025-12-07 11:10:32 +01:00
Makefile build: add makefile 2025-12-07 11:11:37 +01:00
README.md feat: use input entity to enable the service 2026-01-12 20:04:22 +01:00

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 screens 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:

  • -url specifies the webhook endpoint used to send color updates (without trailing slash)
  • -webhook specifies the webhook name
  • -state specifies the id of the entity that enable the light ambiance
  • -screen 0 selects the first display (useful if multiple monitors are connected)
  • -delay 500 sets the delay between color updates to 500 milliseconds
  • -delta sets 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