It is currently March 28th, 2024, 9:35 am

[SOLVED] measure FreeDiskSpace option Type question

General topics related to Rainmeter.
User avatar
nmdelrio
Posts: 74
Joined: June 28th, 2015, 12:51 pm
Location: Paranaque City, Philippines

Re: measure FreeDiskSpace option Type question

Post by nmdelrio »

Yincognito wrote: April 17th, 2023, 9:37 am The Rainmeter part is explained here.
:D Thanks, that's what I am looking for.

You just made me realise that It is more conveninet to write script with the Rainmeter-native UsageMonitor plugin than HWinfo plugin. UsageMonitor uses 'plain' English words, while HWInfo deals with 'humbers'. The former is easier to debug i.e., ''English' Category=LogicalDisk against 'numbers' HWiNFOSensorId=0xf000010

Here's how I achieve the same things using two different methods.

HWInfo plugin..

Code: Select all

[HDDN_WriteMBPS]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xf0000101
HWiNFOSensorInstance=#IDRWN#
HWiNFOEntryId=0x8000001
HWiNFOType=CurrentValue
IfCondition=HDDN_Write > 0
IfTrueAction=[!SetOption "N_Write" ImageAlpha 255][!SetOption "N_WriteLed" ImageAlpha 255]
IfCondition2=HDDN_Write = 0
IfTrueAction2=[!SetOption "N_Write" ImageAlpha 0][!SetOption "N_WriteLed" ImageAlpha 0]
versus UsageMonitor plugin...

Code: Select all

[HDDAltN_WriteBPS]
Measure=Plugin
Plugin=UsageMonitor
Category=LogicalDisk
Counter=Disk Write Bytes/sec
Name=N:
IfCondition=HDDAltN_Write > 0
IfTrueAction=[!SetOption "N_Write" ImageAlpha 255][!SetOption "N_WriteLed" ImageAlpha 255]
IfCondition2=HDDAltN_Write = 0
IfTrueAction2=[!SetOption "N_Write" ImageAlpha 0][!SetOption "N_WriteLed" ImageAlpha 0]

[HDDAltN_WriteMBPS]
Measure=CALC
Formula=ROUND(HDDAltN_Write/1024/1024,3)
I will gradually migrate my skins to UsageMonitor whenever possible. Nice. nice! :thumbup:
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm
Contact:

Re: measure FreeDiskSpace option Type question

Post by SilverAzide »

nmdelrio wrote: April 17th, 2023, 11:04 pm
Just FYI, you don't need to use the HWiNFO plugin anymore. Since v7.x of HWiNFO, you can use HWiNFO without any plugin and configuration is vastly simpler than all those hex numbers. All you need is Rainmeter's built-in registry measure. It looks something like this:

Code: Select all

[MeasureHWiNFO]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=SOFTWARE\HWiNFO64\VSB
RegValue=ValueRaw1
Can't get much simpler than that! :)

That said, you are better off using UsageMonitor when possible simply because you don't need any third-party apps running in the background to make it work.
User avatar
nmdelrio
Posts: 74
Joined: June 28th, 2015, 12:51 pm
Location: Paranaque City, Philippines

Re: measure FreeDiskSpace option Type question

Post by nmdelrio »

SilverAzide wrote: April 18th, 2023, 3:29 am

Code: Select all

[MeasureHWiNFO]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=SOFTWARE\HWiNFO64\VSB
RegValue=ValueRaw1
I never knew v7+ didn't need the plugin anymore. Nice!

I really like doing away with the hex numbers because they don't mean a thing, unlike words on a measure.

Does that mean I don't need SharedMemoryViewer support anymore? Do you mean all the sensor values that HWInfo shows, I can get from the registry?

I never used Registry measure before. From your example above I went to the Registry's HKEY_CURRENT_USER\SOFTWARE\HWiNFO64\VSB but I didn't find the VSB folder. I am still on Windows 10. :confused:

An example would be nice. :sly:
Attachments
hwinfo-registry.PNG
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5380
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA
Contact:

Re: measure FreeDiskSpace option Type question

Post by eclectic-tech »

nmdelrio wrote: April 18th, 2023, 6:30 am I never knew v7+ didn't need the plugin anymore. Nice!

I really like doing away with the hex numbers because they don't mean a thing, unlike words on a measure.

Does that mean I don't need SharedMemoryViewer support anymore? Do you mean all the sensor values that HWInfo shows, I can get from the registry?

I never used Registry measure before. From your example above I went to the Registry's HKEY_CURRENT_USER\SOFTWARE\HWiNFO64\VSB but I didn't find the VSB folder. I am still on Windows 10. :confused:

An example would be nice. :sly:
Here is an example skin for CPU and the context menu item will displays the Registry values.

Here is the documentation on the using HWiNFO with Rainmeter
User avatar
Yincognito
Rainmeter Sage
Posts: 7017
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: measure FreeDiskSpace option Type question

Post by Yincognito »

nmdelrio wrote: April 17th, 2023, 11:04 pm :D Thanks, that's what I am looking for.
No problem. As both SilverAzide and eclectic-tech mentioned, over time using HwInfo with Rainmeter became considerably simpler. Choosing one way over the other largely depends on whether you want to minimize dependencies or you need a certain measurement that is not available in the other method.
User avatar
nmdelrio
Posts: 74
Joined: June 28th, 2015, 12:51 pm
Location: Paranaque City, Philippines

Re: measure FreeDiskSpace option Type question

Post by nmdelrio »

eclectic-tech wrote: April 18th, 2023, 8:14 am Here is an example skin for CPU and the context menu item will displays the Registry values.
Thanks for the link, I missed this. This will prove invaluable. :great:
Here is the documentation on the using HWiNFO with Rainmeter
I knew there was this documentation but never really bothered to read it, I must confess. I guess all the registry stuff scared me. Thanks :thumbup:
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm
Contact:

Re: measure FreeDiskSpace option Type question

Post by SilverAzide »

nmdelrio wrote: April 18th, 2023, 6:30 am Does that mean I don't need SharedMemoryViewer support anymore? Do you mean all the sensor values that HWInfo shows, I can get from the registry?
Correct, the shared memory viewer is no longer needed, and you also do not need the paid version of HWiNFO. The free version with the shared memory option turned off is fine.
nmdelrio wrote: April 18th, 2023, 6:30 am I never used Registry measure before. From your example above I went to the Registry's HKEY_CURRENT_USER\SOFTWARE\HWiNFO64\VSB but I didn't find the VSB folder. I am still on Windows 10. :confused:
You will see this registry key once you have turned on "Gadgets reporting" for at least one sensor in the HWiNFO sensor settings screen. The docs linked above should explain how to do this, but if you run into issues, feel free to ask.
User avatar
nmdelrio
Posts: 74
Joined: June 28th, 2015, 12:51 pm
Location: Paranaque City, Philippines

Re: measure FreeDiskSpace option Type question

Post by nmdelrio »

SilverAzide wrote: April 18th, 2023, 5:12 pm You will see this registry key once you have turned on "Gadgets reporting" for at least one sensor in the HWiNFO sensor settings screen. The docs linked above should explain how to do this, but if you run into issues, feel free to ask.
I've been going through the documentation, and I find it very thorough. The [Snippet ShowReg[/Snippet] mini config is nifty. It beats CMD screen by miles. The doc even MinMaxAvg values have been covered, though I have not looked at it yet. Nothing was left out for d. Kudos to the Rainmeter Team for putting this documantation together, and thank you for HWInfo's Martin Malik's gracious unselfish cooperation. :thumbup:

I have been playing with the Registry measure, I noticed the N inLabelN, ValueN, ValueRawN change depending on how many sensors have been selected to 'report to Gadget'. Safest and best, I guess, is for the user to add all sensors.

Just a thought, a drawback would be adding new hardware (e.g., disk) to the system, and user would want it reported, may potentially wreak havoc on the N values to sensors lower in the hierarchy of the sensors. Even replacing a HDD to an SSD will changes N values. Am I thinking correctly? :confused: HWInfo groups sensors by SensorIDs. CPU is 0xf0000300, motherboard is 0xf0ec0502, disks is 0xf0000101, so on and so forth. So adding (or changing a disk from e.g., HDD to SSD), would just change the only the SensorInstance, but still be under the same SensorID 0xf0000101. But then how often does a user add or change disks? I'd say it's a minor drawback.

Great work on this, Rainmeter Team. Kudos! :great:
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm
Contact:

Re: measure FreeDiskSpace option Type question

Post by SilverAzide »

nmdelrio wrote: April 19th, 2023, 4:07 am I have been playing with the Registry measure, I noticed the N inLabelN, ValueN, ValueRawN change depending on how many sensors have been selected to 'report to Gadget'. Safest and best, I guess, is for the user to add all sensors.
I would suggest not adding all sensors. You will find that HWiNFO performance will be noticeably impacted by doing this. It is unfortunate that the sensor indexes are reassigned/reordered if you make changes, but in reality once you have a set of skins you like using, it will be very rare to ever change your configuration.
Post Reply