Jump to content
Corsair Community

Wrote something that can be used with Task Scheduler to automate brightness


bgunn925
 Share

Recommended Posts

I have been using some code written by Pascal Roeleven (https://pascalroeleven.nl/multi-profile-for-asus-aura/) in conjunction with Task Scheduler to automate the brightness of my Aura stuff (RAM/mobo/GPU) based on time of day (dims everything at 9PM, brightens at 9AM). I adapted his code to be used to adjust the brightness of iCUE hardware. Now, my entire rig dims at 9PM and brightens at 9AM, automatically.

 

DISCLAIMER: Use this at your own risk. I do not have any affiliation with Corsair.

 

HOW THE PROGRAM WORKS:

 

iCUE saves the brightness information in a config.cuecfg file. This program swaps out config files with different brightness values. Save this program in a folder somewhere and it will save config files in that local directory.

 

Basically:

 

1) Start iCUE and change the brightness for each device (or manually change the values in the config file)

2) Use the program (Run as Administrator) to save a copy of the current config file under another name (ex: "night_profile")

3) Use the program to swap in the saved config file and then restart iCUE, resulting in the brightness being changed to whatever values are stored in the config file you swapped in. This can be done using Task Scheduler (ex: changing to the "night_profile" profile at 9PM every night)

 

The program needs to be Run as Administrator. When using Task Scheduler, the Event should be running the program and the options should be "2 night_profile" (or whatever your profile being swapped in is called). It needs "Run With The Highest Privilege" enabled.

 

To restart iCUE, it kills the process then starts the program. It uses PowerShell to get the iCUE window to close. There is a 5 second delay between starting iCUE and closing the window. If your PC takes longer to fully start iCUE (likely for an HDD), you will need to increase this value.

 

Because iCUE does not remember which profile you loaded last and just reverts to the top profile upon start (at least it does for me), you need to keep the profile in question at the top of the list in iCUE.

 

Luckily, Pascal's code gave me a great starting point. Unfortunately, iCUE is more difficult to work with than Aura. With Aura, the entire profile is stored in a file called LastProfile.xml. By simply swapping out the xml files and restarting the corresponding service, the entire profile can be changed. With Corsair, I can't figure out what mechanism is used to change profiles. If anyone can figure this out, we can rewrite this program to swap entire profiles, not just brightness levels. iCUE saves the profile information in %AppData%\Corsair\CUE\profiles as .cueprofiledata files. I am not sure how they get swapped in when you change a profile in iCUE. Also, a simple stop/start of the Corsair service is not sufficient. The entire iCUE program needs to be killed and restarted.

 

I am a n00b at writing batch files, so any improvements are welcome -- but for now, it seems to get the job done.

 

MAJOR THANKS to Pascal for writing the source code. Please check out his site at https://pascalroeleven.nl/multi-profile-for-asus-aura/ for his programs which control ASUS Aura and MSI RGB stuff.

 

Here is the program in question (can't upload directly... this will host for 30 days): https://ufile.io/3tav6

 

Feel free to ask questions. If anyone has any ideas of how apply this to swapping entire profiles, please share!!

 

To Corsair: Can we just add this feature to iCUE already?!

Edited by bgunn925
Link to comment
Share on other sites

Cool and creative work around. I am playing around with PS and a SDK tool that someone made for Gigabyte's Fusion. I am setting my MB colors based off what game I am playing and loading Fusion profiles so they match iCUE as iCUE can already be linked to running processes. Anyway you should create an account on github and use that as a repository. People can fork off your project and contribute.

 

It would be awesome if there was a CLI tool for iCUE that allowed us to change profiles, then this could be handled by task manager.

Link to comment
Share on other sites

Cool and creative work around. I am playing around with PS and a SDK tool that someone made for Gigabyte's Fusion. I am setting my MB colors based off what game I am playing and loading Fusion profiles so they match iCUE as iCUE can already be linked to running processes. Anyway you should create an account on github and use that as a repository. People can fork off your project and contribute.

 

It would be awesome if there was a CLI tool for iCUE that allowed us to change profiles, then this could be handled by task manager.

 

Thanks! I have space on git from working at CERN but I can't post something personal like this on there. But it looks like hosting public projects are free on git, didn't know that. I'll definitely get this posted, thanks for the tip!

Link to comment
Share on other sites

Thanks! I have space on git from working at CERN but I can't post something personal like this on there. But it looks like hosting public projects are free on git, didn't know that. I'll definitely get this posted, thanks for the tip!

 

Yeah, I think you have to pay if you want to locally host a git repo or if you want to have one that is not accessible to others. Though if you don't mind that people can use your code, then github is free.

 

Here is my repo: https://github.com/windows2000bug/RGB-Fusion-Tool-PS

Link to comment
Share on other sites

 Share

×
×
  • Create New...