A Python tool for synchronizing screen colors with smart bulbs.
Project description
Screen Sync
About
Screen Sync is a Python application designed to synchronize the colors of your computer screen with various smart light bulbs, including Tuya WiFi bulbs. It captures the dominant colors from your screen and sets your smart bulbs to match these colors in real-time, enhancing your entertainment and work environment with ambient lighting.
Video of ScreenSync v2 in action
Features
- Real-time screen color synchronization.
- Support for multiple bulb types (Currently for Tuya WiFi bulbs and bulbs via Zigbee2MQTT).
- Customizable settings for color processing and bulb control.
- Per-bulb type refresh rate settings
- Multiple zone sampling
- User-friendly GUI for easy interaction.
Installing
There are two ways to install ScreenSync - either via pypi / pip3 or via downloading a standalone executable for windows.
Downloading Standalone
Go to the releases page, there you can find a Windows executable that has been created using pyinstaller. Hopefully soon I'll also have time to share pre-built binaries for Mac.
If you'd like to create the executable yourself, you can clone this repository then run the following command to create the executable:
pyinstaller --onefile --windowed --icon=screensync/assets/ScreenSync.ico --name=ScreenSync --add-data="screensync/assets;screensync/assets" screensync/ui.py
Installation via pip
For installing via pip, you can use the following command:
pip3 install ScreenSync
Once installed via pip, you can simply run with ScreenSync
on the command line
First Run
On the first run, ScreenSync will create a config.ini in an appropriate directory (using the awesome platformdirs to figure out the right place).
Once open you can add bulbs via the settings page.
Tuya Bulbs
To add your Tuya bulbs, you'll need a 'Device_ID' as well as a 'LocalKey' and an IP address of each bulb.
If you don't already know the DeviceID and LocalKey, you can use the very awesome 'tinytuya' python module to discover bulbs and get their associated information.
You can find out more information and instructions here: https://github.com/jasonacox/tinytuya
ScreenSync v2 uses the tinytuya library for communicating with Tuya bulbs, it's awesome!
Zigbee2MQTT based bulbs
For Zigbee2MQTT based bulbs, you just need to ensure that the MQTT server information is filled out completely as well as the information on a per bulb basis.
To add a Zigbee2MQTT based bulb, you just need to add the topic that the bulb is accessible via. Typically this would be something like zigbee2mqtt/<friendly name>/set
. For example for my Garden Lights, it's zigbee2mqtt/Garden_Lights/set
MagicHome based bulbs
These bulbs just require knowing the IP address of the bulb / LED strip that you'd like to connect to.
To-Dos
- Optimise MSS code to use multiprocessing // speed up sampling. We need to get to 50+ samples/sec as this seems to be what Tuya bulbs can handle
- Optimise latency Sample->Update
- Add ability to customise sampling
- Improve UI
- Add additional common bulb types
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ScreenSync-0.0.6.tar.gz
.
File metadata
- Download URL: ScreenSync-0.0.6.tar.gz
- Upload date:
- Size: 1.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7ba839fa07e22e6b0821c4334dd5fdc8211aa37e674975c9f79eb44f3e98c5d |
|
MD5 | ad9d9512ac18f96cf721f86c8bfc8883 |
|
BLAKE2b-256 | 1358cc741c8a4eb790914c48ea037334bc8e2fa62e3a3901155fb2ae4521de4d |
File details
Details for the file ScreenSync-0.0.6-py3-none-any.whl
.
File metadata
- Download URL: ScreenSync-0.0.6-py3-none-any.whl
- Upload date:
- Size: 1.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80db9bd25592dddc077a8c1f6180b1626595909194460b1762bdff5f7770f8bc |
|
MD5 | d24dc75a6fa522132e01248c81f729b7 |
|
BLAKE2b-256 | 174da9e10b7ac082e83399f6a631f87c8a5e219edb5cbbfee9289d9cdf9b7b4d |