Skip to main content

Python script to make OpenRGB lights available in MQTT

Project description

RGB2MQTT

PyPI Latest Release GitHub Code style: black Imports: isort

This is a Python script that will act as a brige between an OpenRGB server and an MQTT broker (like Mosquitto). Useful for if you want to control your PC RGB lights via Home Assistant for example.

This script is inspired by the original script from ghomasHudson and the fork from buttercheetah. This script is licensed under the MIT license, so feel free to try or change it yourself!

Installation

Use pip install rgb2mqtt to install the package. If you are running an older Python version (<3.11) you also need to install tomli: pip install tomli

Configuration

Configuration is stored in a config.toml file, see the config.toml.example file.

To generate a configuration file run the rgb2mqtt-config script after installing. To find the location of the saved config file see Logs and config location

Be aware that in the device map section, you need to list the name of the OpenRGB device exactly as key. To figure out which devices are supported by OpenRGB, see the notebooks/tryout_openrgb_sdk.ipynb file.

Logs and config location

The log file and config file will be written to a folder under:

  • Users\username\AppData\Roaming\rgb2mqtt\ when using Windows
  • /home/username/rgb2mqtt/ when using Linux

Usage

The run the script, use python src/rgb2mqtt/rgb2mqtt.py, or use rgb2mqtt-run after installing. All logging will be written to the log file, unless you use the verbose option (rgb2mqtt-run -v) in which case the logging is written to stdout.

If you want this script to autostart when your PC turns on (on Windows), use the rgb2mqtt-autostart command.

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

rgb2mqtt-1.0.1.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rgb2mqtt-1.0.1-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file rgb2mqtt-1.0.1.tar.gz.

File metadata

  • Download URL: rgb2mqtt-1.0.1.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.1

File hashes

Hashes for rgb2mqtt-1.0.1.tar.gz
Algorithm Hash digest
SHA256 d6cdaaa458eba32fcb72644e82bb9f819b3f1aafb4ce8136128f6ae2dbbb1f63
MD5 d800c7b848a111e9d0546171002a241b
BLAKE2b-256 7487be5c2b297e5f3d26eacdbb7dd8b026cd25f37833fbdbb5d6a77acffcee3e

See more details on using hashes here.

File details

Details for the file rgb2mqtt-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: rgb2mqtt-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.1

File hashes

Hashes for rgb2mqtt-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fe2f1531e74a5d656aaac363fbcf6497781030c24c573c17e008fa6469277b19
MD5 133de240b5cf7bfe4d0fa86d140f6433
BLAKE2b-256 bbbf5a5864acf8b46fedbedb24abee841cce8383e35a1a6516a85667ae8832de

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page