It is currently February 19th, 2020, 11:46 am

Plugin: Device RGB Controller

Share and get help with Plugins and Addons
User avatar
tjhrulz
Developer
Posts: 226
Joined: October 13th, 2016, 1:28 am
Location: Earth

Plugin: Device RGB Controller

Post by tjhrulz »

Its 2017 the year of RGB and yet rainmeter can not control your RGB devices colors. This plugin aims to fix that.

The plugin is still in an early stage but I wanna get it out there to make sure it works on a variety of razer products as I only have a razer headset and mouse.

Currently I only support razer products and any Keyboard, Keypad, and Mousepad support is untested. If you have these any of these products and want to help me in testing future versions the best way to message me is on discord at tjhrulz#5476.
I also am looking for people who have logitech and corsair products as once I finish razer support this plugin will be expanded to support those products as well. Once I finish those manufactures I will take requests on who to do next.

My apologies that example skin currently is not a great demonstration of the full capabilities of the plugin. However it includes a few examples of turning on built in lighting functionality and reactively coloring devices based on CPU usage. I plan on making it a more example skin on showcasing a few cool uses once I check a few things off my todo list.

Example Measure usage

Code: Select all

Plugin=RGBController
;Currently supported manufactures are razer
Manufacture=Razer
;Currently supported devices are Headset Keyboard Mouse and All
Device=All
;Current effects supported are Static, Breathing, Wave, Spectrum, Reactive, and Gradient
;Headset does not support wave or reactive
Effect=Breathing
;Optional, only needed if effect is Static, Breathing or Reactive. 
;If effect is Gradient it is optional and assumed to be 0,0,0
Color=0,255,0
;Optional, only used by Gradient and Breathing
Color2=255,0,0
;Only needed if effect is Gradient, PercentMin is 100% color1, PercentMax is 100% color2
;The transition between the two colors is linear, Set DynamicVariables=1 to get this to update continually
Percent=[CPUUsage]
;Only used if effect is Gradient, assumes 100 if none is given
PercentMax=100
;Only used  if effect is Gradient, assumes 0 if none is given
PercentMin=0
Example bang usages

Code: Select all

;This would change the headset to cycle through the color spectrum
[!CommandMeasure MeasureRGBHeadset "Spectrum"]
;This would make your mouse update to slowly flash blue
[!CommandMeasure MeasureRGBMouse "Breathing 0,0,255"]
;This would make your keyboard update to slowly flash blue then green back and forth
[!CommandMeasure MeasureRGBKeyboard"Breathing 0,0,255 0,255,0"]
;This would make all supported devices change to somewhere between green and red based on CPU usage
;Note if you wanted to have a different min and max they would need to be set in MeasureRGBAll
[!CommandMeasure MeasureRGBAll "Gradient [CPUMonitor] 0,255,0 255,0,0"]
Current bugs:
Lighting changes persist until rainmeter is closed.
If you have your chroma devices set to switch off lighting when your display is off the effect you have set will turn off and stay off once your display turns off until you relaunch rainmeter.
If you launch a game with chroma support it will correctly override this plugin but when you close it it will keep the last color set by the game until you relaunch rainmeter.

I plan on adding support for targeting only specific LEDs on your mouse and only targeting specific keys on the keyboard in the next release.
You do not have the required permissions to view the files attached to this post.
Last edited by tjhrulz on March 6th, 2017, 7:30 pm, edited 2 times in total.
User avatar
theAzack9
Developer
Posts: 521
Joined: March 2nd, 2016, 6:23 pm

Re: Plugin: Device RGB Controller

Post by theAzack9 »

This looks cool :thumbup:
I need to test it with my razer chrome when i get home :)

I remember looking into the razer api a while ago and i remember it being possible to set the color of every single key independently. Will this be possible with this plugin at some poing? (I know it can be difficult, but i'm asking nontheless ;) )
User avatar
tjhrulz
Developer
Posts: 226
Joined: October 13th, 2016, 1:28 am
Location: Earth

Re: Plugin: Device RGB Controller

Post by tjhrulz »

Yes it will be, right now the plan is to start by breaking it up into groups and then once those are tested add support for defining your own key(s). I plan on adding support for it once I finish custom mouse led targeting support.

The groups I have blocked out to support are
MAIN, //The normal keys
MAINNOWASD, //Normal keys not including WASD
WASD, //W A S and D keys
NUMPAD, //Numpad
ARROWS, //Arrow keys
FUNCTION, //The 12 function keys and the escape button
SYSTEM, //The 9 system keys (insert, home, pg up, delete, end, pg down, print screen, scroll lock and break)
EXTRAS, //Any extra keys your keyboard has, if applicable
CUSTOM //A set of custom keys to change defined in the rainmeter measure using the option keylist (comma, colon, or space seperated)
Charlatan
Posts: 7
Joined: January 18th, 2013, 7:14 am

Re: Plugin: Device RGB Controller

Post by Charlatan »

That's really cool. How does Razer's API work...? I did some work on sending colours to SteelSeries products but it's incredibly ugly stuff, having to use CURL.exe through the Command Line to make HTML POST requests to a port on localhost. If that sounds a bit confusing it's probably because I only sort of knew what I was doing when I mashed it all together, so that's as well as I can explain it.
User avatar
tjhrulz
Developer
Posts: 226
Joined: October 13th, 2016, 1:28 am
Location: Earth

Re: Plugin: Device RGB Controller

Post by tjhrulz »

Razer's API (As well as corsair's and logitech's for the limited amount I looked at them) are all just C++ based. Now I prefer C# and Razer's examples were over complicated so I am using a C# library called Colore instead. Since Corsair has a similar library for its version and logitech supports C# I should be able to do them all in one go.

Also here is an example of the current mouse support I am working on that I should have done by tonight (Would have been done yesterday but I needed to clean my keyboard). The lights are currently backwards though. In this demo I have it reacting to CPU usage.
Image
cde2006
Posts: 4
Joined: February 4th, 2017, 7:37 pm

Re: Plugin: Device RGB Controller

Post by cde2006 »

I have Cosair RGB Strafe Keyboard, Corsair MM800 Mouse Mat, Corsair VOID Wireless Headset and Logitech G900 mouse.
You can send me the release for testing when you are ready for those :D
ingoldxc1090
Posts: 2
Joined: September 27th, 2015, 9:08 pm

Re: Plugin: Device RGB Controller

Post by ingoldxc1090 »

Hey, I saw in the github that you were adding support for Corsair devices is it possible to get an updated plugin or is the Corsair support still unfinished? Also curious if this would be easily extend over to control corsair link lighting as well.
User avatar
tjhrulz
Developer
Posts: 226
Joined: October 13th, 2016, 1:28 am
Location: Earth

Re: Plugin: Device RGB Controller

Post by tjhrulz »

The project is kinda dead for the moment as there is not as far as I am aware a universal API for these kinda things making it hard to keep them all have feature parity. It is also really difficult for me to debug a project like this due to me not having a full RGB keyboard and not having any of the peripherals by the other companies I want to support. I thought about doing like a patreon or something for it but decided against it for the time being. Maybe one day in the future I can get the other peripherals/find devs who have them/find a universal API but until then consider this project dead for now.

Edit: After someone else asked about adding a paid API to Rainmeter unrelated to the RGB controller I decided to reconsider making a patreon. If I get enough to start offsetting the cost of getting new gear I figure I can start development on this plugin again. I hate to advertise but if you would like to support me making Rainmeter plugins you can here: https://www.patreon.com/tjhrulz