It is currently May 25th, 2019, 2:15 pm

HWInfo : Min/max values for Lines & Bars

Help with creating, editing & fixing problems with skins
User avatar
krakoukas
Posts: 23
Joined: December 11th, 2018, 5:56 pm
Location: France

HWInfo : Min/max values for Lines & Bars

krakoukas » May 2nd, 2019, 1:57 pm

Hi Friends,

I'm trying to monitor CPU Temperature with HwInfo (red line and red bar below, green is CPU usage) :

Code: Select all

	[MeasureCPU-Temperature]
	Measure=Plugin
	Plugin=HWiNFO.dll
	HWiNFOSensorId=0xf0000400
	HWiNFOSensorInstance=0x0
	HWiNFOEntryId=0x10000ff
	HWiNFOType=CurrentValue
	MinValue=0
	MaxValue=100
It looks like this with Min-Max at 0-100 in the Measure
The red LINE is correct (53°C), the red BAR is correct (53°C) :
Image

Now figuring CPU Temp will never be below 20 and over 60, I changed Min and Max values in the Measure :

Code: Select all

	MinValue=20
	MaxValue=60
It looks like this with Min-Max at 20-60
The red BAR is correct but the red LINE is not (looks like not effect) :
Image

Can you help me ?

My CPU Temp Line Meter :

Code: Select all

		[Histogramme-CPU]
		Meter=Line
		LineCount=2
		LineColor=#Rouge#
		LineColor2=#Vert#
		MeasureName=MeasureCPU-Temperature
		MeasureName2=MeasureCPU
		X=1r
		Y=1r
		W=#LargeurHistogramme#
		H=#HauteurHistogramme#
		AntiAlias=#AntiAliasHistogramme#
My CPU Temp Bar Meter :

Code: Select all

		[Barre-Verticale-CPU-Temp]
		Meter=BAR
		MeterStyle=styleBar1
		MeasureName=MeasureCPU-Temperature
		X=15r
		Y=0r
		Barimage=#@#Images\Graphiques\Rouge.png
		W=10
		H=40
User avatar
balala
Rainmeter Sage
Posts: 8208
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: HWInfo : Min/max values for Lines & Bars

balala » May 2nd, 2019, 4:02 pm

Are you absolutely sure that the temperature returned by the [MeasureCPU-Temperature] measure varies between 20 and 60 degrees? There indeed seems to be a difference between the Line and Bar meters in such cases and if the value of the measure goes outside of this interval, that's exactly how the two meter types seems to behave.
Please check the values of the measure, eventually adding a String meter (if you don't already have one), to see the values.
User avatar
krakoukas
Posts: 23
Joined: December 11th, 2018, 5:56 pm
Location: France

Re: HWInfo : Min/max values for Lines & Bars

krakoukas » May 2nd, 2019, 10:49 pm

balala wrote:
May 2nd, 2019, 4:02 pm
Are you absolutely sure that the temperature returned by the [MeasureCPU-Temperature] measure varies between 20 and 60 degrees? There indeed seems to be a difference between the Line and Bar meters in such cases and if the value of the measure goes outside of this interval, that's exactly how the two meter types seems to behave.
Please check the values of the measure, eventually adding a String meter (if you don't already have one), to see the values.
Hi Balala ! Thanks for your answer

Both LINE meter and BAR meter are pointing on the same Measure : MeasureCPU-Temperature
Also, there is a String text (bottom right) that indicates CPU Temperature too. So I can check Measure varies between 20 and 60 in real time.

Image
So, with Min=0 Max=100 :
Line is OK (about 53), bar is OK (about 53) and String text is OK : 53

Image
But with Min=20 Max=60 :
Line is WRONG (about 40), bar is OK (about 57) and String text is OK : 57

What went wrong...
User avatar
balala
Rainmeter Sage
Posts: 8208
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: HWInfo : Min/max values for Lines & Bars

balala » May 3rd, 2019, 9:35 am

krakoukas wrote:
May 2nd, 2019, 10:49 pm
Image
So, with Min=0 Max=100 :
Line is OK (about 53), bar is OK (about 53) and String text is OK : 53

Image
But with Min=20 Max=60 :
Line is WRONG (about 40), bar is OK (about 57) and String text is OK : 57
Yep, there indeed seems to be a difference between what the Bar and Line meters indicate and you're right. Could be this a bug? A developer will be needed to take a look.
User avatar
krakoukas
Posts: 23
Joined: December 11th, 2018, 5:56 pm
Location: France

Re: HWInfo : Min/max values for Lines & Bars

krakoukas » May 3rd, 2019, 12:13 pm

balala wrote:
May 3rd, 2019, 9:35 am
Yep, there indeed seems to be a difference between what the Bar and Line meters indicate and you're right. Could be this a bug? A developer will be needed to take a look.
Thank you Balala. Should I move this post to developers ?
User avatar
jsmorley
Developer
Posts: 19245
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: HWInfo : Min/max values for Lines & Bars

jsmorley » May 3rd, 2019, 12:35 pm

I don't think I understand the issue.

If I have this:

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[MeasureCalc]
Measure=Calc
Formula=53
MinValue=0
MaxValue=100

[MeterLine]
Meter=Line
MeasureName=MeasureCalc
W=300
H=100
LineCount=1
LineColor=255,255,255,255
AutoScale=0
SolidColor=47,47,47,255
AntiAlias=1

[MeterPercent]
Meter=String
MeasureName=MeasureCalc
Percentual=1
Y=5R
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=%1%
I get this:
1.png

Which seems right to me. The line is more or less at 50% of the height of the meter.


If I have this:

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[MeasureCalc]
Measure=Calc
Formula=53
MinValue=20
MaxValue=60

[MeterLine]
Meter=Line
MeasureName=MeasureCalc
W=300
H=100
LineCount=1
LineColor=255,255,255,255
AutoScale=0
SolidColor=47,47,47,255
AntiAlias=1

[MeterPercent]
Meter=String
MeasureName=MeasureCalc
Percentual=1
Y=5R
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=%1%
I get this:
2.png

Which seems right to me. The line is more or less at 80% of the height of the meter.


Can anybody demonstrate this issue in a way that doesn't use HWiNFO or a bunch of #Variables# that we don't have the values for? Something I can ACTUALLY TEST?
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 19245
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: HWInfo : Min/max values for Lines & Bars

jsmorley » May 3rd, 2019, 2:19 pm

If I use two lines, I get similar results. Still looks right to me...

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[MeasureCalc1]
Measure=Calc
Formula=53
MinValue=0
MaxValue=100

[MeasureCalc2]
Measure=Calc
Formula=27
MinValue=0
MaxValue=100

[MeterLine]
Meter=Line
MeasureName=MeasureCalc1
MeasureName2=MeasureCalc2
W=300
H=100
LineCount=2
LineColor=255,255,255,255
LineColor2=255,0,0,255
AutoScale=0
SolidColor=47,47,47,255
AntiAlias=1

[MeterPercent]
Meter=String
MeasureName=MeasureCalc1
MeasureName2=MeasureCalc2
Percentual=1
Y=5R
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=%1% | %2%

3.png
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 19245
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: HWInfo : Min/max values for Lines & Bars

jsmorley » May 3rd, 2019, 3:11 pm

I think the issue at hand might be one of "scaling", which seems to me to rear its ugly head when you have two or more measures creating lines, and the MinValue/MaxValue used to generate a percentage based on those measures is different. While two entirely different MinValue/MaxValue combinations might both generate the same percentage, the "values" they are based on seem to play a role in the scaling.

For example, this surprises me a bit:

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[MeasureCalc1]
Measure=Calc
Formula=50
MinValue=0
MaxValue=100

[MeasureCalc2]
Measure=Calc
Formula=90
MinValue=20
MaxValue=160

[MeterLine]
Meter=Line
MeasureName=MeasureCalc1
MeasureName2=MeasureCalc2
W=300
H=100
LineCount=2
LineColor1=255,255,255,255
LineColor2=255,0,0,255
AutoScale=0
SolidColor=47,47,47,255
AntiAlias=1

[MeterPercent]
Meter=String
MeasureName=MeasureCalc1
MeasureName2=MeasureCalc2
Percentual=1
Y=5R
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=%1% | %2%

4.png


I confess I have no idea at all why those two lines are not drawn in exactly the same spot. I hope that brian or theAzack9 can poke around a bit at some point and illuminate the matter. It seems to me that the meter is taking into consideration the fact that the measure value "90" is greater than the measure value "50", but I don't see how that should play any role. I'm probably missing something fundamental, but to me this meter should entirely be based on the "percentage" as a factor of the meter "height". I may be misunderstanding the entire point of this meter... I mean, it is clearly based on the "percentage", not the "value", and yet the "value" seems to play some strange role in how the line is scaled in the context of the height.

The Line meter has always been a complete mystery to me, and pretty much never displays anything that is of any value, which is why I never use it. It sorta displays the "amount of change" between different values for a measure over the course of time, but not in any "context" that makes any sense to me. Setting AutoScale=1 on it just makes it go from "mysterious" to "bizarre".

If you have a Line meter with one line, based on one measure, it seems to make some kind of sense. The line is drawn based on the percentage in the context of the meter height. If you add a second line/measure, then it seems to be based on the percentage of the "largest" value for the measures in the context of the meter height, with other lines/measures based on some relationship to the first line. This feels to me like it is trying to be two conflicting things at once. It may be exactly right. "90" IS greater than "50", even though in this case they are both "50%". I just don't see how both the "value" and the "percentage" can both play a role when you have two or more lines. It's apples and oranges.
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 8208
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: HWInfo : Min/max values for Lines & Bars

balala » May 3rd, 2019, 4:12 pm

jsmorley wrote:
May 3rd, 2019, 3:11 pm
I think the issue at hand might be one of "scaling", which seems to me to rear its ugly head when you have two or more measures creating lines, and the MinValue/MaxValue used to generate a percentage based on those measures is different. While two entirely different MinValue/MaxValue combinations might both generate the same percentage, the "values" they are based on seem to play a role in the scaling.
I modified a little bit your code, using the following one:

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[MeasureCalc1]
Measure=Calc
Formula=50
MinValue=0
MaxValue=100

[MeasureCalc2]
Measure=Calc
Formula=70
MinValue=20
MaxValue=120

[MeterLine]
Meter=Line
MeasureName=MeasureCalc1
MeasureName2=MeasureCalc2
W=300
H=100
LineCount=2
LineColor1=255,255,255,255
LineColor2=255,0,0,255
AutoScale=0
SolidColor=47,47,47,255
AntiAlias=1

[MeterPercent]
Meter=String
MeasureName=MeasureCalc1
MeasureName2=MeasureCalc2
Percentual=1
Y=5R
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=%1% | %2%
I replaced the MaxValue option of the [MeasureCalc2] measure (replacing the original MaxValue=160 with MaxValue=120) and the Formula option of the same [MeasureCalc2] measure with Formula=70 (originally Formula=90). Now both values are exactly at half of the appropriate intervals. I'd expect to get both line meters at half of the height of the meter. But this doesn't happen:
Line.png
It seems like the Line meter ignores the MinValue, using always the default MinValue=0, no matter what value do you use there, while the MaxValue is taken into account, as it is set on the measure.
This seems to be a bug, I think. Should have to be investigated by the developers.
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 19245
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: HWInfo : Min/max values for Lines & Bars

jsmorley » May 3rd, 2019, 4:17 pm

I don't think this is a problem with MinValue. I think it is a problem with the relationship between two or more lines/measures in the same Line meter.

I believe it is taking the "largest" value being passed to it, and then using the "percentage" of that value in relationship to the "height" of the meter to determine where to draw that line. A second (lesser) line on the other hand, seems to be drawn in the context of its relationship to the first line.At that point the fact that both lines are "50%" is not a factor, but the fact that one is "70" and one is "50" is. This is very confusing behavior to me, but again, I may be missing some fundamental point. If the meter is based on the "percentage", then I would expect one kind of behavior, if it is based on the "value", I would expect another. I find it hard to reconcile "both" being a factor.

If you use either of the two measures in both your and my examples, and create a line meter with just the one, either one, they will both produce a line meter drawn at exactly half the height of the meter. MinValue is properly observed.

Mind you, this may be exactly the designed behavior, and maybe even the only possible behavior, but in my view it makes using two measures with different MinValue/MaxValue ranges less than entirely useful in this meter.