Hey everyone! I wanted to share a fun project I’ve been working on to enhance my home theater experience. I’ve always been a fan of how movies look on the big screen, and I thought why not bring that same magic into my living room? Here’s how I did it!
The Idea:
I wanted my RGB lights to automatically change color based on the dominant color of the current movie poster playing on my Plex server. It’s like having a dynamic backdrop that matches the mood of the movie!
The Setup:
I’m using OpenHAB as my home automation platform, along with a Shelly Duo RGBW bulb. The key was to integrate Plex and OpenHAB seamlessly. I also needed a way to analyze the poster image and extract the dominant color. Enter Python and the ColorThief library—perfect tools for the job!
The Process:
- Python Script: I wrote a script that takes the URL of the current movie poster from Plex, uses ColorThief to find the dominant color, and returns the Hue, Saturation, and Brightness values.
- SSH Execution: Since running scripts directly on my OpenHAB server was slow, I set up the script to run on my Plex server (a Windows machine) via SSH.
- OpenHAB Rule: When a movie starts playing, OpenHAB triggers the script, fetches the color values, and updates the RGB bulb accordingly.
The Result:
It’s absolutely magical! As soon as I start a movie, the lights shift to match the poster’s dominant color. Whether it’s the deep blues of a thriller or the warm tones of a drama, the ambiance is spot-on. Plus, it’s a great conversation starter during movie nights with friends!
Tips for Others:
- SSH Configuration: Make sure SSH is enabled on both your OpenHAB and Plex servers. It’s crucial for running the script remotely.
- Python Libraries: Install Python 3 and the necessary libraries (ColorThief, requests) on your Plex server.
- Testing: Start with a single bulb to ensure everything works smoothly before scaling up.
This project was a fantastic way to combine my love for movies with home automation. It’s not just about convenience—it’s about creating an immersive experience. If anyone has questions or wants to share their own projects, I’d love to hear about them!
Cheers to making every movie night unforgettable! ![]()
![]()