No description
  • Go 98.9%
  • Makefile 1.1%
Find a file
2025-12-08 08:43:26 +01:00
cmd feat: add color delta checker to limit requests 2025-12-07 11:10:32 +01:00
internal doc: add documentation of delta 2025-12-08 08:43:26 +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 doc: add documentation of delta 2025-12-08 08:43:26 +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/api/webhook/xxxxx -screen 0 -d 500

Runs the RGB Screen Sync tool and connects it to your Home Assistant instance via a webhook. The -url parameter specifies the webhook endpoint used to send color updates. The -screen 0 option selects the first display (useful if multiple monitors are connected), and the -d 500 option sets the delay between color updates to 500 milliseconds — meaning the lamps color will refresh twice per second to match the average color of the chosen screen.

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 7)
  -screen int
    	Screen index
  -url string
    	Webhook URL
  -v	Verbose mode