Sync computer's RGB peripherals via MQTT

Tags: #<Tag:0x00007f1737e2f900> #<Tag:0x00007f1737e2f6a8>

I created a little tool to sync the RGB peripherals of my desktop computer with the LED strips in my apartment (which are controlled via openHAB/MQTT).
It subscribes to an MQTT topic from which it extracts colors and passes them on to one (or more) OpenRGB instances. OpenRGB is a neat open source project that grants unified access to proprietary RGB solutions without the necessity of installing the actual vendor tooling for them (such as Razer Synapse, MSI MysticLight).

Here’s a little demo and the link to the github repository in case someone finds this helpful and wants to use it as well:


Enjoy and so long :bulb:
3 Likes

Is it Possible to change saved open rgb profiles over mqtt with that?

Short answer: No.

Long answer: The OpenRGB SDK does not support saving profiles (yet) but as soon as it does this would be very easy to add. These are the currently supported operations of the SDK: https://gitlab.com/CalcProgrammer1/OpenRGB/-/blob/master/NetworkProtocol.h

I briefly thought of another way of solving this by directly writing to the OpenRGB config file but they use a proprietary format, so there’s no quick win here. I will open a feature request for the SDK to support saving profiles.

Could you also describe your specific use case so I know what exactly you’re trying to achieve? As of now my tool basically looks at a single color from a source (for now only MQTT topics are supported) and passes it on to what I call a sink (OpenRGB). As you probably know, OpenRGB allows for very fine grained configuration of devices, zones, and even single LEDs thereof. Would your requirement be to provide such a very fine grained configuration via MQTT or would saving a single color (maybe a single color per device) in the profile be sufficient?

Thx for the reply

Ah OK.
I also want to sync my Living room Colors with my Pc and at the moment I send via Node red a text file to Dropbox and I got an Program called Assistant Computer Control that checks an directory of Dropbox and when a file appears the program reads it and deleted it after.
And with this text file the program starts open rgb with an specific argument to load the right profile.
This works great but it took like 15 sec for a Change and I was hoping with mqtt to get rid of the Dropbox and also the open rgb start delay.

And yes in some profiles I got a lot different colors for different leds so only a color per device or even one color for all devices wouldn’t be that great.

But when the sdk may one day can just load the profiles that was saved in open rgb before would be rly nice

I initially misunderstood and thought you were trying to update profiles. So your use case is selecting profiles via MQTT. Sounds reasonable :slight_smile: I opened an issue already. Here’s the link so you can track the progress (maybe I even find the time to work on it myself)

Yes exactly, that sounds good I will keep an eye on it.
Thx a lot

The latest version of my little tool now supports loading OpenRGB profiles (and also changing the desktop background on Windows machines). Profile management was added to the OpenRGB API with commit f63aec11.

Apart from the general documentation that you can find in the README.md, I also added a couple of examples that demonstrate what the configuration file should look like in the wiki.

1 Like

That sounds great, when I got some free time I will look at it.
Thx for the update.