No description
  • Go 98.9%
  • Makefile 1.1%
Find a file
2025-11-12 18:27:16 +01:00
cmd refactor: remove temporary files 2025-11-12 18:24:46 +01:00
internal refactor: remove temporary files 2025-11-12 18:24:46 +01:00
.gitignore refactor: remove temporary files 2025-11-12 18:24:46 +01:00
go.mod init 2025-11-11 20:30:53 +01:00
go.sum init 2025-11-11 20:30:53 +01:00
README.md doc: add readme 2025-11-12 18:27:16 +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.