It is currently December 14th, 2018, 8:24 pm

Plugin for HWiNFO

Share your custom plugins and applications to enhance Rainmeter.
stangowner
Posts: 39
Joined: October 6th, 2012, 12:27 pm

Re: Plugin for HWiNFO

stangowner » February 4th, 2018, 10:40 pm

No, I think the reassignment of the same variable name is going to mask the other one, making all readings for that sensor inaccessible. Look at this example:

Code: Select all

HWiNFO-Host0=0
HWiNFO-Host0-CPU0-SensorId=0xf0000300
HWiNFO-Host0-CPU0-SensorInstance=0x0
HWiNFO-Host0-CPU0-Core3Clock=0x6000003
......
HWiNFO-Host0-CPU0-SensorId=0xf0002a00
HWiNFO-Host0-CPU0-SensorInstance=0x0
HWiNFO-Host0-CPU0-CPUPackage=0x1000004
With this in a skin:

Code: Select all

[HWiNFOCPU0Core3Clock]
Measure=Plugin
Plugin=Plugins\HWiNFO.dll
HWiNFOHostId=HWiNFO-Host0
HWiNFOSensorId=HWiNFO-Host0-CPU0-SensorId  (is it 0xf0000300 or 0xf0002a00 ?)
HWiNFOSensorInstance=HWiNFO-Host0-CPU0-SensorInstance  (both are 0 so no issue this time)
HWiNFOEntryId=HWiNFO-Host0-CPU0-CPUPackage
HWiNFOType=CurrentValue
Depending what HWiNFO-Host0-CPU0-SensorId is set to (initital value of 0xf0000300, or reassigned to 0xf0002a00) - when the plugin tries to find the entries under that sensor, it is only going to find the ones for the sensor assigned to that variable. The other ones will be inaccessible, and return a -9201 : HWI_ERROR_ENTRY_NOT_FOUND

I live in New England and am a Patriots fan......so I'll be offline for a while for the Super Bowl. I'll think about it for a few. Let me know if you have any ideas. Thanks!
stangowner
Posts: 39
Joined: October 6th, 2012, 12:27 pm

Re: Plugin for HWiNFO

stangowner » February 4th, 2018, 10:48 pm

Actually, if the entry Id's are the same, the plugin could actually find and return the wrong value......from an entry on the other sensor! :17what
User avatar
raiguard
Posts: 493
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Re: Plugin for HWiNFO

raiguard » February 5th, 2018, 4:15 pm

Honestly, I'm completely stumped. There is no solution to this that wouldn't be extremely convoluted and unpredictable. One possibility I came up with is that if two sections are identical, the parser could add a suffix to the duplicate, or another section. For example, you could have HWiNFO-Host0-CPU0-SensorId and HWiNFO-Host0-CPU0-1-SensorId. However, I don't like this solution because it's not representative of reality (where did the 1 come from?), and would cause problems if someone's machine happens to not have the other section.

And this is all assuming that the parser can keep track of what it has done before, so it can know if a sensor has the same name as a previous one.

I think the only permanent solution would be for the other section to get a different name. I'm not sure how HWiNFO gets and assigns the sensor names, but if it can be changed to have a different suffix or something, that would solve our problems.
”We are pretty sure that r2922 resolves the regression in resolution caused by a reversion to a revision.” - jsmorley, 2017
User avatar
SilverAzide
Posts: 502
Joined: March 23rd, 2015, 5:26 pm

Re: Plugin for HWiNFO

SilverAzide » February 5th, 2018, 5:03 pm

Is there anything on the HWiNFO API side that tells you what a node in the SMV tree is actually FOR? Or is all we have to work with are lists of generic sensor/entry IDs?

What I mean is -- speaking generically -- the only way I can tell a node is a CPU or GPU or disk drive is by its description, and also some guesswork on the entry ID descriptions. There isn't anything else that sticks out and says "this is a video card".

For example, like you showed above, SMV shows two nodes for my CPU with the exact same appearance/description. The only way to see why they are different is to look at the leaf nodes and see that one seems to have clock/thread-related entries, and the other has power-related entries. If there was a way to tell what a node in the tree is for, perhaps that could be added into the output variable names (similar to the way the "DTS" node is slightly different).
DeviantArt Gadgets More...
stangowner
Posts: 39
Joined: October 6th, 2012, 12:27 pm

Re: Plugin for HWiNFO

stangowner » February 5th, 2018, 5:29 pm

I'll have to ask Martin.

I should have known this was going to come full circle into friendly names. A reading requires a combination of all 3 sensorid, sensorinstance and entryid to be uniquely identified. Otherwise, the plugin would not have been designed like this in the first place. This is a requirement for interacting with HWiNFO.
User avatar
jsmorley
Developer
Posts: 18494
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Plugin for HWiNFO

jsmorley » February 5th, 2018, 6:54 pm

I have huge concerns with any change to the plugin that causes backwards compatibility issues with existing skins. That is something we really, really hate in Rainmeter, and it would take a change that is so insanely useful that it overrides our almost religious determination to protect backwards compatibility for the hundreds of thousands of skins out there that comprise our "community" and are our biggest asset. HWiNFO has become a hugely popular plugin, and there are now just boatloads of skins here, and on deviantART and other places. They need to continue to work, or we need a whole new plugin with a new name, so a user could in theory have "both" on their system.
stangowner
Posts: 39
Joined: October 6th, 2012, 12:27 pm

Re: Plugin for HWiNFO

stangowner » February 5th, 2018, 7:12 pm

Understood and agree. I'm not proposing any change to that at all. Just trying to help the general end user get a working skin easily. Actually, that's why I broke out the inc years ago.....so the user has 1 simple file with only a few lines to update using SMV....and not touch the skin.

Edit: all we want to is replace that sole user action with a button or silent command
User avatar
jsmorley
Developer
Posts: 18494
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Plugin for HWiNFO

jsmorley » February 5th, 2018, 7:18 pm

stangowner wrote:Understood and agree. I'm not proposing any change to that at all. Just trying to help the general end user get a working skin easily. Actually, that's why I broke out the inc years ago.....so the user has 1 simple file with only a few lines to update using SMV....and not touch the skin.

Edit: all we want to is replace that sole user action with a button or silent command
Yeah, I'm all for that, the fact that it is a bit complicated to set up a skin using it, and that it is very hard indeed to "distribute" a skin that works out of the box, is the only downside to the plugin. I'm not entirely convinced yet that we can really fix that, as it is sort of the nature of the beast. There are just tons of different hardware configurations out there, and there is no real standard set or names of sensors supported. It's why we are so glad HWiNFO the application exists, since there is no way we could ever build that terrifically complicated, and constantly changing structure into Rainmeter.

I don't envy Martin. He can barely take his birthday off without falling behind... ;-)
stangowner
Posts: 39
Joined: October 6th, 2012, 12:27 pm

Re: Plugin for HWiNFO

stangowner » February 5th, 2018, 7:25 pm

Exactly, on all points. :thumbup:
User avatar
jsmorley
Developer
Posts: 18494
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Plugin for HWiNFO

jsmorley » February 5th, 2018, 7:26 pm

I currently use a .inc file to control my skins, but it's still a real chore for the user if I want to "distribute" my skin.

Code: Select all

[Variables]
; HWiNFO variables

TempUnit=°C

HWiNFODesc1=CPU Chip
HWiNFOSensorId1=0xf0000501
HWiNFOSensorInstance1=0x0
HWiNFOEntryId1=0x1000000
HWiNFOType1=CurrentValue
HWiNFOMin1=10
HWiNFOMax1=90

HWiNFODesc2=CPU Fan
HWiNFOSensorId2=0xf7067760
HWiNFOSensorInstance2=0x0
HWiNFOEntryId2=0x3000001
HWiNFOType2=CurrentValue
HWiNFOMin2=2800
HWiNFOMax2=7100

HWiNFODesc3=Motherboard
HWiNFOSensorId3=0xf7067760
HWiNFOSensorInstance3=0x0
HWiNFOEntryId3=0x1000001
HWiNFOType3=CurrentValue
HWiNFOMin3=10
HWiNFOMax3=90

HWiNFODesc4=Graphics
HWiNFOSensorId4=0xe0002000
HWiNFOSensorInstance4=0x0
HWiNFOEntryId4=0x1000000
HWiNFOType4=CurrentValue
HWiNFOMin4=10
HWiNFOMax4=90
So they just have to change that, and the skin is fine:

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
SkinWidth=170
SkinHeight=125
BackgroundMode=2
SolidColor=255,0,0,0
OnRefreshAction=[!SnapEdges "0" "#CURRENTCONFIG#"]
ContextTitle=Open @Includes folder
ContextAction=["#@#"]
ContextTitle2=HWiNFO Sensors
ContextAction2=["#CURRENTPATH#HWInfoStuff\HWiNFOSharedMemoryViewer.exe"]

[Metadata]
Name=HWiNFO
Author=JSMorley
Information=Description:|HWiNFO temperatures and fan speed||Edit HWInfo.inc to set sensor information
Version=Feb 7, 2017
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0

[Variables]
;Variables are set in these files
@Include1="#@#GeneralVariables.inc"
@Include2="#@#HWInfo.inc"

[MeterAllBackground]
Meter=Shape
Shape=Rectangle 0.5,0.5,169,124,12 | Fill Color #BackgroundColor# | StrokeWidth 1.5 | Stroke Color #LabelColor#
W=170
H=125
UpdateDivider=-1

[MeasureHWiNFO1]
Measure=Plugin
Plugin=HWiNFO
Group=Sensors
HWiNFOSensorId=#HWiNFOSensorId1#
HWiNFOSensorInstance=#HWiNFOSensorInstance1#
HWiNFOEntryId=#HWiNFOEntryId1#
HWiNFOType=#HWiNFOType1#
MinValue=#HWiNFOMin1#
MaxValue=#HWiNFOMax1#
HWiNFOLogHandler=1
UpdateDivider=5
RegExpSubstitute=1
Substitute="^-9\d\d\d":"0"

[MeasureHWiNFO2]
Measure=Plugin
Plugin=HWiNFO
Group=Sensors
HWiNFOSensorId=#HWiNFOSensorId2#
HWiNFOSensorInstance=#HWiNFOSensorInstance2#
HWiNFOEntryId=#HWiNFOEntryId2#
HWiNFOType=#HWiNFOType2#
HWiNFOLogHandler=1
MinValue=#HWiNFOMin2#
MaxValue=#HWiNFOMax2#
UpdateDivider=5
RegExpSubstitute=1
Substitute="^-9\d\d\d":"0"

[MeasureHWiNFO3]
Measure=Plugin
Plugin=HWiNFO
Group=Sensors
HWiNFOSensorId=#HWiNFOSensorId3#
HWiNFOSensorInstance=#HWiNFOSensorInstance3#
HWiNFOEntryId=#HWiNFOEntryId3#
HWiNFOType=#HWiNFOType3#
MinValue=#HWiNFOMin3#
MaxValue=#HWiNFOMax3#
HWiNFOLogHandler=1
UpdateDivider=5
RegExpSubstitute=1
Substitute="^-9\d\d\d":"0"

[MeasureHWiNFO4]
Measure=Plugin
Plugin=HWiNFO
Group=Sensors
HWiNFOSensorId=#HWiNFOSensorId4#
HWiNFOSensorInstance=#HWiNFOSensorInstance4#
HWiNFOEntryId=#HWiNFOEntryId4#
HWiNFOType=#HWiNFOType4#
MinValue=#HWiNFOMin4#
MaxValue=#HWiNFOMax4#
HWiNFOLogHandler=1
UpdateDivider=5
RegExpSubstitute=1
Substitute="^-9\d\d\d":"0"

[MeterHWiNFO1Text]
Meter=String
X=15
Y=10
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#LabelColor#
StringAlign=Left
AntiAlias=1
Text=#HWiNFODesc1#

[MeterHWiNFO1Value]
MeasureName=MeasureHWiNFO1
Meter=String
X=154
Y=0r
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#ValueColor#
StringAlign=Right
NumOfDecimals=0
AntiAlias=1
Text=%1 #TempUnit#

[MeterHWiNFO1Bar]
Meter=Bar
MeasureName=MeasureHWiNFO1
BarOrientation=Horizontal
BarImage=#ImagePath#138x2Bar.jpg
SolidColor=#BarBackColor#
X=15
Y=2R
W=127
H=2

[MeterHWiNFO2Text]
Meter=String
X=15
Y=5R
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#LabelColor#
StringAlign=Left
AntiAlias=1
Text=#HWiNFODesc2#

[MeterHWiNFO2Value]
MeasureName=MeasureHWiNFO2
Meter=String
X=154
Y=0r
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#ValueColor#
StringAlign=Right
NumOfDecimals=0
AntiAlias=1
Text=%1

[MeterHWiNFO2Bar]
Meter=Bar
MeasureName=MeasureHWiNFO2
BarOrientation=Horizontal
BarImage=#ImagePath#138x2Bar.jpg
SolidColor=#BarBackColor#
X=15
Y=2R
W=127
H=2

[MeterHWiNFO3Text]
Meter=String
X=15
Y=5R
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#LabelColor#
StringAlign=Left
AntiAlias=1
Text=#HWiNFODesc3#

[MeterHWiNFO3Value]
MeasureName=MeasureHWiNFO3
Meter=String
X=154
Y=0r
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#ValueColor#
StringAlign=Right
NumOfDecimals=0
AntiAlias=1
Text=%1 #TempUnit#

[MeterHWiNFO3Bar]
Meter=Bar
MeasureName=MeasureHWiNFO3
BarOrientation=Horizontal
BarImage=#ImagePath#138x2Bar.jpg
SolidColor=#BarBackColor#
X=15
Y=2R
W=127
H=2

[MeterHWiNFO4Text]
Meter=String
X=15
Y=5R
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#LabelColor#
StringAlign=Left
AntiAlias=1
Text=#HWiNFODesc4#

[MeterHWiNFO4Value]
MeasureName=MeasureHWiNFO4
Meter=String
X=154
Y=0r
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#ValueColor#
StringAlign=Right
NumOfDecimals=0
AntiAlias=1
Text=%1 #TempUnit#

[MeterHWiNFO4Bar]
Meter=Bar
MeasureName=MeasureHWiNFO4
BarOrientation=Horizontal
BarImage=#ImagePath#138x2Bar.jpg
SolidColor=#BarBackColor#
X=15
Y=2R
W=127
H=2
1.jpg
But for the average user, figuring out what needs to be in the .inc file is a challenge...
HWiNFOExample1.jpg
You do not have the required permissions to view the files attached to this post.