It is currently March 29th, 2024, 9:49 am

Using HWiNFO with Rainmeter

Plugins and Addons popular with the Community
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Using HWiNFO with Rainmeter

Post by jsmorley »

SilverAzide wrote: March 16th, 2021, 2:46 pm Oh yes yes yes.... I forgot that Registry measures return nothing for invalid keys. So you could use any index for "missing sensors", like -1 or "x" or whatever.
Yeah. I would give some thought to how you deal with it returning a 0 as the number value, since presumably that can be a valid number for lots of sensors. I would probably react to it returning a string value of "0", since that can't ever be the "label" for a sensor element.

I would strongly recommend using very clear [Variables] names for the indexes. So something like CPUCore0TempIndex=10 and not MyVar1=10.
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm

Re: Using HWiNFO with Rainmeter

Post by SilverAzide »

Is there a command line filter (regexp-like) that will turn the output of reg query HKEY_CURRENT_USER\SOFTWARE\HWiNFO64\VSB to something that just dumps the indexes and labels. So the output would look more like a list of indexes, as in:

Code: Select all

0 = Core 0 Clock
1 = Core 1 Clock
2 = Core 2 Clock
3 = Core 3 Clock
4 = Core 0 Distance to TjMAX
5 = ....etc.
It might be easier for the average user to parse.

reg query HKEY_CURRENT_USER\SOFTWARE\HWiNFO64\VSB | find "Label"???
Gadgets Wiki GitHub More Gadgets...
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Using HWiNFO with Rainmeter

Post by jsmorley »

SilverAzide wrote: March 16th, 2021, 3:00 pm Is there a command line filter (regexp-like) that will turn the output of reg query HKEY_CURRENT_USER\SOFTWARE\HWiNFO64\VSB to something that just dumps the indexes and labels. So the output would look more like a list of indexes, as in:

Code: Select all

0 = Core 0 Clock
1 = Core 1 Clock
2 = Core 2 Clock
3 = Core 3 Clock
4 = Core 0 Distance to TjMAX
5 = ....etc.
It might be easier for the average user to parse.
Nothing that exists today. There is no actual concept of "index" number in the registry. There are just the key names like Value0, Value1 etc. I expect that something could be written in Lua that could parse the output of the reg query command and create some more friendly output. I'd be tempted to keep the distinct rows for Sensor/Label/Value/ValueRaw however, since I see that as a good way to confirm that you are using what you think you are. I personally have like 3 or 4 sensor element labels that are just "CPU" for instance. Seeing the "context" of the overall sensor they are in, and that the value is 31.5 °C vs. 2,183 RPM tells me something.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Using HWiNFO with Rainmeter

Post by jsmorley »

So maybe something like:

Code: Select all

Index 0
Sensor		CPU [#0]: AMD Ryzen 7 2700X
Label		CPU Core 0 Speed
Value		4,298.9 MHz
ValueRaw	4298.9

Index 1
Sensor		CPU [#0]: AMD Ryzen 7 2700X
Label		CPU Core 1 Speed
Value		2,865.9 MHz
ValueRaw	2865.9
User avatar
raiguard
Posts: 660
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Re: Using HWiNFO with Rainmeter

Post by raiguard »

In my experience across my Intel and AMD CPU's, the sensor names are actually fairly consistent. So it might be possible to just output everything, then have a Lua script parse the sensor names and do most of the configuration automatically. Of course, it wouldn't be foolproof, but it would work for most of it.

I didn't notice any performance impact when outputting all ~200 sensors to the registry on my PC.
”We are pretty sure that r2922 resolves the regression in resolution caused by a reversion to a revision.” - jsmorley, 2017
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Using HWiNFO with Rainmeter

Post by jsmorley »

raiguard wrote: March 16th, 2021, 3:32 pm In my experience across my Intel and AMD CPU's, the sensor names are actually fairly consistent. So it might be possible to just output everything, then have a Lua script parse the sensor names and do most of the configuration automatically. Of course, it wouldn't be foolproof, but it would work for most of it.

I didn't notice any performance impact when outputting all ~200 sensors to the registry on my PC.
Possibly... I'm always hesitant to try and make things "foolproof", as the fools are just more clever than I can be. I don't know that there is any impact of having the end-user laboriously output all sensor elements in HWiNFO, likely not much.

I can ask Martin if he would consider a "select all" button on that screen.
User avatar
raiguard
Posts: 660
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Re: Using HWiNFO with Rainmeter

Post by raiguard »

jsmorley wrote: March 16th, 2021, 3:35 pm Possibly... I'm always hesitant to try and make things "foolproof", as the fools are just more clever than I can be. I don't know that there is any impact of having the end-user laboriously output all sensor elements in HWiNFO, likely not much.
It's not laborious, you can click the top, then shift+click the bottom to select all of the sensors and output all of them with a single click of the checkbox.

I'll experiment with parsing the names and see what I can come up with.
”We are pretty sure that r2922 resolves the regression in resolution caused by a reversion to a revision.” - jsmorley, 2017
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Using HWiNFO with Rainmeter

Post by jsmorley »

raiguard wrote: March 16th, 2021, 3:38 pm It's not laborious, you can click the top, then shift+click the bottom to select all of the sensors and output all of them with a single click of the checkbox.

I'll experiment with parsing the names and see what I can come up with.
Ah ha! Good.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Using HWiNFO with Rainmeter

Post by jsmorley »

Make for a hell of a long "list" for the user to wade through...
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm

Re: Using HWiNFO with Rainmeter

Post by SilverAzide »

PowerShell:
reg query HKEY_CURRENT_USER\SOFTWARE\HWiNFO64\VSB | Select-String -Pattern 'Label.*' -AllMatches | % { $_.Matches } | % { $_.Value -replace 'Label(\d+)\s+\w+\s+(.*)', '$1 = $2' }

Yields (for example):

Code: Select all

0 = Core 0 Clock
1 = Core 1 Clock
2 = Core 2 Clock
3 = Core 3 Clock
4 = Core 0
5 = Core 1
6 = Core 2
7 = Core 3
8 = Core 0 Distance to TjMAX
9 = Core Max
10 = CPU
11 = GPU
12 = CPU
13 = GPU
14 = GPU Temperature
15 = GPU Core Voltage
16 = GPU Clock
17 = GPU Core Load
18 = GPU Memory Usage
19 = GPU Memory Allocated
20 = Battery Voltage
21 = Remaining Capacity
22 = Charge Level
I haven't figured out how to resolve the issue pointed out about the duplicates (CPU/GPU). Having the Value shown as an example could help, but I can't figure out how to grab stuff off the ValueN lines. I'm not a regex-pert. :)
Gadgets Wiki GitHub More Gadgets...