All Projects → MCPCapital → Harmonizeproject

MCPCapital / Harmonizeproject

Harmonize Project lets you sync HDMI video with Philips Hue lights using a Raspberry Pi!

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Harmonizeproject

Diyhue
Philips Hue emulator that is able to control multiple types of lights
Stars: ✭ 586 (+614.63%)
Mutual labels:  philips-hue, hue
HueBridgeEmulator
Python emulator for Philips Hue Bridge
Stars: ✭ 17 (-79.27%)
Mutual labels:  philips-hue, hue
Harmonizeproject
Harmonize Project - Sync HDMI video with Philips Hue lights using a Raspberry Pi!
Stars: ✭ 252 (+207.32%)
Mutual labels:  philips-hue, hue
Hue
💡 A Philips Hue library written in Swift, using Combine framework
Stars: ✭ 16 (-80.49%)
Mutual labels:  philips-hue, hue
Huebert
A dead-simple Philips Hue client for web and desktop
Stars: ✭ 51 (-37.8%)
Mutual labels:  philips-hue, hue
Homebridge Hue
Homebridge plugin for Philips Hue and/or deCONZ
Stars: ✭ 637 (+676.83%)
Mutual labels:  philips-hue, hue
hueplusplus
A simple C++ library to control Philips Hue lights on Linux, MacOS, Windows, Espressif ESP32 SDK and Arduino. Full documentation at
Stars: ✭ 48 (-41.46%)
Mutual labels:  philips-hue, hue
HueControl
Java-based framework for working with the Phillips Hue system
Stars: ✭ 14 (-82.93%)
Mutual labels:  philips-hue, hue
HueLightDJ
Hue Light DJ using Hue Entertainment API
Stars: ✭ 54 (-34.15%)
Mutual labels:  philips-hue, hue
huebot
Changes a Phillips Hue light's color and flashes based on GitHub's status
Stars: ✭ 34 (-58.54%)
Mutual labels:  philips-hue, hue
Kelvin
Kelvin - The hue bot
Stars: ✭ 256 (+212.2%)
Mutual labels:  philips-hue, hue
hass-hue-icons
Additional vector icons for home assistant to model Philips Hue bulbs and fixtures.
Stars: ✭ 161 (+96.34%)
Mutual labels:  philips-hue, hue
Q42.hueapi
C# helper library to talk to the Philips Hue bridge
Stars: ✭ 323 (+293.9%)
Mutual labels:  philips-hue, hue
Swifthuecolorpicker
iOS HUE color picker
Stars: ✭ 44 (-46.34%)
Mutual labels:  hue
Scriptis
Scriptis is for interactive data analysis with script development(SQL, Pyspark, HiveQL), task submission(Spark, Hive), UDF, function, resource management and intelligent diagnosis.
Stars: ✭ 696 (+748.78%)
Mutual labels:  hue
Laravel Philips Hue
Laravel Philips Hue package to control your lights with remote support
Stars: ✭ 67 (-18.29%)
Mutual labels:  philips-hue
Hyperion.ng
The successor to Hyperion aka Hyperion Next Generation
Stars: ✭ 1,008 (+1129.27%)
Mutual labels:  hue
Huestacean
Philips Hue control app for desktop with screen syncing. C++ with Qt Quick GUI.
Stars: ✭ 484 (+490.24%)
Mutual labels:  philips-hue
Yeetgif
gif effects CLI. single binary, no dependencies. linux, osx, windows. #1 workplace productivity booster. #yeetgif #eggplant #golang
Stars: ✭ 467 (+469.51%)
Mutual labels:  hue
Gamut
Go package to generate and manage color palettes & schemes 🎨
Stars: ✭ 416 (+407.32%)
Mutual labels:  hue

Harmonize Project for Philips Hue ForTheBadge built-with-love

Maintenance PRs Welcome Open Source Love svg2 Author forthebadge made-with-python

Harmonize Project is a low latency video analysis and pass-through application built in Python which alters Philips Hue lights based on their location relative to a screen; creating an ambient lighting effect and expanding content past the boundaries of a screen.

Check out our Reddit thread here and watch the demo below! Electromaker explains how our application works at a high level in his podcast here!

Harmonize Project Demo Video

GitHub Deleted our Account

GitHub deleted our account at 250 stars! Prior to deletion, we were in the top 20,000 repositories and top 7,000 Python-based projects on GitHub. Sorry for the interruption and loss of issues.

Harmonize Project (formerly known as Harmonize Hue) has no affiliation with Signify or Philips Hue. Hue and Philips Hue are trademarks of Signify.

Features:

  • Light color and intensity changes based on pixels in its relative set location
  • Video -> Light latency of 80ms via Streaming to Hue Lights via Entertainment API
  • Sending 50-75 color updates per second

Requirements

Hardware Option A (Tested on Raspberry Pi 4B):

  • RAM: 256MB Free Minimum (512MB recommended)
  • CPU: 1.5GHz+, 4 Cores strongly recommended due to running three simultaneous threads.
  • HDMI Splitter (Must be able to output 4k & 1080/720p simultaneously) Here is a good one for $25, though it breaks HDR when downscaling output 2. The goal here is one output of 4K and another output of 1080/720p.
  • USB3.0 HDMI Capture Card (Capable of capturing 720/1080p; delay should be 50ms or under.) I got this when it was $45. A similar one should be fine. These are untested: Panoraxy | Aliexpress (This shape/style tends to perform well.)

Hardware Option B (for A/V receivers with 2 or more HDMI outputs):

  • Raspberry Pi 4B kit running with recommended power supply (tested on 8GB model running on Ubuntu 20.04 64-bit OS)
  • HDMI Splitter (tested on U9 ViewHD Latest 4K 1x2 HDMI Splitter 1 in 2 Out, Model U9-Pluto v1.4)
  • USB3.0 HDMI Capture Card (tested on Elgato Cam Link 4k)

Setup

Software Setup Option A:

Download the latest scripts and install all dependencies via the following commands. Be sure to watch for errors! You will need about 1GB of free space. The script can run for up to an hour.

git clone https://github.com/MCPCapital/HarmonizeProject.git
cd HarmonizeProject
sudo ./setup.sh

Software Setup Option B (tested with Ubuntu 20.04.2 and Python v3.8.5):

Install all dependencies via the following commands. Be sure to watch for errors!

  • Install pip:
sudo apt-get install python3-pip
  • Install HTTP Parser and NumPy dependencies via pip:
pip3 install http-parser numpy
sudo apt-get install cmake
sudo apt-get install gcc g++
sudo apt-get install python3-dev python3-numpy
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev
sudo apt-get install libgtk-3-dev
sudo apt-get install git
git clone https://github.com/opencv/opencv.git
mkdir opencv/build
cd opencv/build
cmake ../
make
sudo make install
cd ../..
git clone https://github.com/MCPCapital/HarmonizeProject.git

Hardware Setup Option A:

  • Connect Video Device (PS4, FireStick, etc.) to the splitter input.
  • Connect an HDMI cable from the 4k output to the TV; and from Output 2 (downscaled) to the video capture card connected to your device.
  • Ensure your splitter's switches are set to downscale Output 2 to 1080 or 720p! Connection Diagram

Hardware Setup Option B (for A/V receivers with 2 or more HDMI outputs):

  • Connect your video device (PS4, FireStick, etc.) to an available HDMI input on your A/V receiver.
  • Connect an HDMI cable from the HDMI output 1 from A/V receiver to the TV.
  • Connect an HDMI cable from HDMI output 2 from the receiver to the HDMI input on the splitter.
  • Connect an HDMI cable from the HDMI output 1 of the splitter to the HDMI input on the video capture device.
  • Connect the video capture device USB 3.0 output to a USB 3.0 port (not a USB 2.0 port) on the Raspberry Pi.
  • Ensure that the DIP switches on the splitter are set to downscale HDMI Output 1 to 1080 or 720p.

Entertainment Area Configuration:

  • Hue App -> Settings -> Entertainment Areas
  • Harmonize will use the height and the horizontal position of lights in relation to the TV. The depth/vertical position are currently ignored.
  • In the example below, the light on the left is to the left of the TV at the bottom of it. The light on the right is on the right side of the TV at the top of it. Example Entertainment Area

First-Time Run Instructions:

  • If you have not set up a bridge before, the program will attempt to register you on the bridge. You will have 45 second to push the button on the bridge. Current Bug - After registering, the script will store the clientdata but fail & exit. Workaround - Simply run the script again since the data was saved.
  • If multiple bridges are found, you will be given the option to select one. You will have to do this every time if you have multiple bridges (for now).
  • If multiple entertainment areas are found, you will be given the option to select one. You can also enter this as a command line argument.

Usage

To start the program:

  • screen
  • cd HarmonizeProject
  • ./harmonize.py
  • Type Ctrl+A and Ctrl-D to continue running the script in the background.
  • To resume the terminal session use screen -r
  • Press ENTER to safely stop the program.

Command line arguments:

  • -v Display verbose output
  • -g # Use specific entertainment group number (#)

Configurable values within the script: (Advanced users only)

  • Line 237 - breadth - determines the % from the edges of the screen to use in calculations. Default is 15%. Lower values can result in less lag time, but less color accuracy.
  • Line 315 - time.sleep(0.01) - Determines how frequently messages are sent to the bridge. Keep in mind the rest of the function takes some time to run in addition to this sleep command. Bridge requests are capped by Philips at a rate of 60/s (1 per ~16.6ms) and the excess are dropped.
  • Run with sudo to give Harmonize higher priority over other CPU tasks.

Troubleshooting

  • "Import Error" - Ensure you have all the dependencies installed. Run through the manual dependency install instructions above.
  • No video input // lights are all dim gray - Run python3 ./videotest.py to see if your device (via OpenCV) can properly read the video input.
  • w, h, or rgbframe not defined - Increase the waiting time from 0.75 seconds - Line 330 {time.sleep(.75)} *This is a known bug (race condition).
  • python3-opencv installation fails - Compile from source - Follow this guide.
  • Many questions are answered on our Reddit release thread here. New issues should be raised on GitLab.

Contributions & License

Pull requests are encouraged and accepted! Whether you have some code changes or enhancements to the readme, feel free to open a pull request. Harmonize Project is licensed under The Creative Commons Attribution-NonCommercial 4.0 International Public License.

Development credits to Matthew C. Pilsbury (MCP Capital, LLC) and Ares N. Vlahos.

licensebuttons by-nc ForTheBadge makes-people-smile forthebadge forthebadge forthebadge

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].