Skip to content

A program to sync the image on your monitor with a Home Assistant RGB Light à la Philips Hue Sync

License

Notifications You must be signed in to change notification settings

Domi2803/hass-light-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hass-light-sync

hass-light-sync is a program to capture the display's image and send the average color to a light in Home Assistant. It's similar to solutions like Philips Hue Sync and Ambilight, but only supports a single light at the moment.

Demo (Video)

Demo Video

Installation

Precompiled Binaries (Windows)

Download the zip-Archive from Releases and edit the settings.json file with your server information, and run the hass-light-sync.exe.

Compile it yourself

Install the Rust SDK and clone the git repo. Run:

cargo build --release 

and copy the hass-light-sync.exe from the target folder anywhere you like. Then copy the settings.json file from the root of the project to the same directory, and edit it to match your server info.

Configuration

{
    "api_endpoint": "http://<IP>:<PORT>", 
    "light_entity_name": "light.[entity]",
    "token": "LONG ACCESS TOKEN HERE",  
    "grab_interval": 50,// interval in ms to grab frame
    "skip_pixels": 10,  // only sample n-th pixel (1 -> native, 2 -> 1/2 res etc.)
                        // saves cpu processing

    "smoothing_factor": 0.0, // factor to average out frames:
    // old_frame * smoothing_factor + new_frame * (1-smoothing_factor)   
    // 0 -> disable,   0.25 -> 25 % old frame, 75 % new frame etc.

    "monitor_id": 0 // ID of the target monitor
}

About

A program to sync the image on your monitor with a Home Assistant RGB Light à la Philips Hue Sync

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages