The Corsair User Forums  

Go Back   The Corsair User Forums > Corsair Product Discussion > iCUE Software > iCUE SDK

Notices

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 02-28-2019, 10:24 AM
needmacsupport needmacsupport is offline
Registered User
 
Join Date: Jan 2018
Posts: 6
POST ID # = 995878
needmacsupport Reputation: 10
Default Access to battery level?

Hi folks,
I'm a budding developer and had a look at the
CUE SDK - Overview and Reference.pdf

I can't find a variable for battery level.

Is there a way to access battery level? One thing that drives me nuts is having to open iCUE (slow) and slick settings..and then visually search for the information.

Would love to write an application for PC that just shows me this critical info immediately!

Last edited by needmacsupport; 02-28-2019 at 10:29 AM.
Reply With Quote
  #2  
Old 03-03-2019, 02:53 AM
Macca_Cool Macca_Cool is offline
Registered User
Macca_Cool's PC Specs
 
Join Date: Sep 2018
Location: Melbourne, Australia
Posts: 37
POST ID # = 996208
Macca_Cool Reputation: 13
Default

Ha ha, ikr dude. There have been a number of threads about this, no responses from Corsair. I've tried personally with reading the value from memory, didn't go well. Good luck with any attempts to find it without Corsair's help.
Reply With Quote
  #3  
Old 05-17-2019, 04:07 AM
MrSlimbrowser MrSlimbrowser is offline
Registered User
 
Join Date: May 2019
Posts: 4
POST ID # = 1004811
MrSlimbrowser Reputation: 10
Default

I tried reading the values from iCUEs memory as well, works for me. Tried it with a Void Pro on Windows 10 Pro x64 with Corsair iCUE v3.15.101.
You can try it out if you want to: https://github.com/MrSlimbrowser/ReadBatteryLevel
Reply With Quote
  #4  
Old 05-18-2019, 12:23 AM
Macca_Cool Macca_Cool is offline
Registered User
Macca_Cool's PC Specs
 
Join Date: Sep 2018
Location: Melbourne, Australia
Posts: 37
POST ID # = 1004871
Macca_Cool Reputation: 13
Default

Sick dude, I'll give it a go soon. I tried something similar but the addresses I used changed on restart. So are those default addresses constant, as in no need to find them again on restart?
Reply With Quote
  #5  
Old 05-18-2019, 05:35 AM
MrSlimbrowser MrSlimbrowser is offline
Registered User
 
Join Date: May 2019
Posts: 4
POST ID # = 1004885
MrSlimbrowser Reputation: 10
Default

Assuming you did the neccessary pointerscans and found a suitable pointer, only the base address needs to be calculated. My tool uses MakeMEK's Threadstack Finder to do that automatically.
The program will default to the offsets I used by the way. I can imagine those work for you too as long as you use the same version of iCUE I used. So just start it up and give it a try ;)
Reply With Quote
  #6  
Old 04-09-2020, 04:38 AM
Macca_Cool Macca_Cool is offline
Registered User
Macca_Cool's PC Specs
 
Join Date: Sep 2018
Location: Melbourne, Australia
Posts: 37
POST ID # = 1040617
Macca_Cool Reputation: 13
Default

Hey man, sorry I never got back to you. Been almost a year but I finally tried out your software. Had to do my own pointer scan (I assume iCUE version and different devices effects it), but after like 20 minutes of that, works a charm.
You're a legend mate! I'm setting it up to run from Rainmeter now
Reply With Quote
  #7  
Old 04-09-2020, 04:44 AM
MrSlimbrowser MrSlimbrowser is offline
Registered User
 
Join Date: May 2019
Posts: 4
POST ID # = 1040620
MrSlimbrowser Reputation: 10
Default

No worries, I'm kust happy it will be useful to someone else than me to make the github effort worth it :)
True, it depends on iCUEs version and which headset you use.

Let me know about how you solved it with rainmeter. I'm using rainmeter too but I think my solution is a bit complicated, even though it works. But it was also the first time I actually tried changing a rainmeter skin to fit my needs..
Reply With Quote
  #8  
Old 04-16-2020, 03:40 AM
Macca_Cool Macca_Cool is offline
Registered User
Macca_Cool's PC Specs
 
Join Date: Sep 2018
Location: Melbourne, Australia
Posts: 37
POST ID # = 1041532
Macca_Cool Reputation: 13
Default

Yeah man, in the skin folder I have 2 files: VOIDBattery.ini and read_file.lua (see pastebin for both), as well as threadstack.exe and ReadBatteryLevel.exe (with config and output to ./battery_level.txt).

You'll want to customise the String meter however you want it. For me I have it on 'stay topmost' and placed over the taskbar, next to the time on my second monitor with 50% transparency.
Reply With Quote
  #9  
Old 04-16-2020, 04:22 AM
Macca_Cool Macca_Cool is offline
Registered User
Macca_Cool's PC Specs
 
Join Date: Sep 2018
Location: Melbourne, Australia
Posts: 37
POST ID # = 1041537
Macca_Cool Reputation: 13
Default

For anyone coming across this anew looking for threadstack.exe, you can compile it from the Github repo or alternatively there is a direct download link to a build, use by your own discretion.
Reply With Quote
  #10  
Old 04-16-2020, 05:29 AM
MrSlimbrowser MrSlimbrowser is offline
Registered User
 
Join Date: May 2019
Posts: 4
POST ID # = 1041549
MrSlimbrowser Reputation: 10
Default

Aah okay, thanks for that :)
A precompiled threadstack.exe is included in my release file too though

I think I remember now why I had issues with Rainmeter. I wanted to run it every two minutes so I used a Calc-Measure to executes an ActionTimer-Plugin-Measure to run the RunCommand-Plugin-Measure. (confused yet? lol)
I didn't just use the RunCommand-Plugin-Measure alone because the BatteryLevel.exe takes a while to write the file so LuaTextFile would always read the output of the previous run two minutes ago and I couldn't figure out a better way to run the LuaTextFile delayed. With your way you shouldn't notice too much, since you run it every 10 seconds anyway the 10 second delay doesn't matter.
I edited the 3Disks.ini from the default illustro so there is more in that file. The LuaTextFile.ini I took from a forum somewhere, it's not my own.
3Disks.ini
LuaTextFile.lua
Reply With Quote
  #11  
Old 04-16-2020, 06:15 AM
Macca_Cool Macca_Cool is offline
Registered User
Macca_Cool's PC Specs
 
Join Date: Sep 2018
Location: Melbourne, Australia
Posts: 37
POST ID # = 1041557
Macca_Cool Reputation: 13
Default

Yeah alright. I didn't download the release (I built from source) so there was no threadstack.exe, hadn't realised that you'd packaged it, by bad.
Reply With Quote
  #12  
Old 04-25-2020, 04:23 PM
lavelain lavelain is offline
Registered User
lavelain's PC Specs
 
Join Date: Apr 2020
Posts: 2
POST ID # = 1043041
lavelain Reputation: 10
Default

I feel silly, I downloaded ReadbatteryLevel, extracted it, didn't find the variables with threadstack so I used Cheatengine to locate 'em, and I put them in Readbatterylevel.ini
I then downloaded VoidBattery.ini and the read_file.lua, compiled a skin for them and I keep getting 0%. Did I do any of these steps in the wrong order or did I miss something obvious? Thanks for your time!
Reply With Quote
  #13  
Old 04-26-2020, 12:39 PM
Macca_Cool Macca_Cool is offline
Registered User
Macca_Cool's PC Specs
 
Join Date: Sep 2018
Location: Melbourne, Australia
Posts: 37
POST ID # = 1043175
Macca_Cool Reputation: 13
Default

Sorry yeah, that ones on me. I changed my ReadBatteryLevel.ini to output to ./battery_level.txt instead of the default. So to fix either make that change there or alternatively change read_file.lua to use the appropriate output file.
Reply With Quote
  #14  
Old 04-27-2020, 12:20 PM
lavelain lavelain is offline
Registered User
lavelain's PC Specs
 
Join Date: Apr 2020
Posts: 2
POST ID # = 1043360
lavelain Reputation: 10
Default

Ah, I made the change and got 997 as a result, which is an error code which means I got the memory addresses wrong. I'll give it another shot, and thank you!
Reply With Quote
Reply

Tags
api, battery status

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:18 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.