It is currently May 7th, 2024, 5:31 pm

Power Plugin Status Issue

Report bugs with the Rainmeter application and suggest features.
User avatar
viewfindr
Posts: 4
Joined: January 19th, 2011, 1:32 am

Power Plugin Status Issue

Post by viewfindr »

Hello all,

I've been customizing hpluslabels' excellent suite here, but am having trouble getting the battery meter to work correctly - The power status is a plugin measure of the status value, but it always returns 0 for me when the battery is 'low'. I've tried using both the STATUS and STATUS2 values, and both of them return the same value of 0 when my battery is between 33% and 66%. I'm running Windows 7 Ultimate x86 on Rainmeter 1.4Beta, compiled on 1/16/2011.

This measure of zero generates the annoying 'battery not detected' remark for me, which is obviously false when my battery is still decently usable. Any insight as to what I'm doing wrong here?

TIA.
poiru
Developer
Posts: 2872
Joined: April 17th, 2009, 12:18 pm

Re: Power Plugin Status Issue

Post by poiru »

Post your code.
User avatar
viewfindr
Posts: 4
Joined: January 19th, 2011, 1:32 am

Re: Power Plugin Status Issue

Post by viewfindr »

Code: Select all

[Rainmeter]
Author=h_plus^labels
Update=750

;Metadata added by RainBrowser
;http://rainmeter.net/cms/Rainmeter101-EditingSkins

[Metadata]
Name=BatteryCPUminimal
Config=Battery status, also CPU
Description=Show You the info of your CPU,RAM, BATTERY
Version=1.0.0
License=h_plus^labels

;End of added Metadata

[Variables]

[MeasureUptime]
Measure=Uptime
Substitute="d":" day",":":" hour ","0 day":"","0 hour":""
UpdateDivider=60

[MeasurePowerSource]
Measure=Plugin
PlugIn=PlugIns\PowerPlugin.dll
PowerState=ACLINE
Substitute="0":"Battery","1":"Plugged In"

[MeasurePercent]
Measure=Plugin
PlugIn=PlugIns\PowerPlugin.dll
PowerState=PERCENT
UpdateDivider=60

[MeasurePowerStatus]
Measure=Plugin
Plugin=Plugins\PowerPlugin.dll
PowerState=STATUS
Substitute="0":"Plugged In","1":"Charging","2":"Critical","3":"Low","4":"High"
UpdateDivider=60

[BatBG]
Meter=string
solidcolor=0,0,0,120
X=3
Y=36
W=55
H=12

[batGraphic]
MeasureName=MeasurePercent
Meter=BAR
X=3
Y=36
;W=55
W=115
H=12
BarColor=255,255,255,220
BarEffect=SHADOW
BarEffectColor=40,40,40,200
BarOrientation=horizontal
Flip=0

[Text]
Meter=STRING
X=128
Y=0
FontColor=0,0,0,165
StringEffect=Shadow
FontEffectColor=255,255,255,140
StringStyle=normal
Fontsize=25
StringAlign=right
Fontface=geosanslight
Text="BATTERY"
AntiAlias=1

[Remaining]
Meter=STRING
MeasureName=MeasurePercent
X=200
Y=0
FontColor=255, 255, 255, 255
Fontsize=25
StringAlign=right
Fontface=geosanslight
StringEffect=SHADOW
FontEffectColor=0,0,0,180
AntiAlias=1
Postfix="%"

[Status]
Meter=STRING
MeasureName=MeasurePowerStatus
X=194
Y=34r
FontColor=255, 255, 255, 255
Fontsize=12
StringAlign=right
Fontface=geosanslight
StringEffect=SHADOW
FontEffectColor=0,0,0,180
AntiAlias=1

[MeasureCPU]
Measure=CPU

[MeterCPU]
Meter=String
X=135
Y=52
FontColor=40,40,40,190
FontSize=13
FontFace=geosanslight
StringEffect=SHADOW
StringStyle=bold
FontEffectColor=200,200,200,80
Text=CPU
StringAlign=right
Antialias=1

[MeterCount]
Meter=String
MeterStyle=Style
MeasureName=MeasureCPU
X=40r
Y=r
FontColor=255,255,255,255
FontSize=13
FontFace=geosanslight
StringEffect=SHADOW
StringStyle=bold
FontEffectColor=0,0,0,180
Percentual=1
Antialias=1
StringAlign=right

[MeasureRAM]
Measure=PhysicalMemory

[MeterRam]
Meter=String
X=135
Y=15r
FontColor=40,40,40,190
FontSize=13
FontFace=geosanslight
StringStyle=bold
StringEffect=SHADOW
FontEffectColor=200,200,200,80
Text=RAM
StringAlign=right
Antialias=1

[MeterPercent]
Meter=String
MeterStyle=Style
MeasureName=MeasureRAM
X=40r
Y=r
FontColor=255,255,255,255
FontSize=13
FontFace=geosanslight
StringEffect=SHADOW
FontEffectColor=0,0,0,180
Percentual=1
Antialias=1
StringAlign=right
Text="%1"
AntiAlias=1

[percent]
meter=string
x=200
y=52
FontColor=255,255,255,255
FontSize=25
FontFace=geosanslight
StringEffect=SHADOW
StringAlign=right
StringStyle=normal
FontEffectColor=20,20,20,180
Antialias=1
Text=%
In entirety, the issue revolves around

[MeasurePowerStatus]
Measure=Plugin
Plugin=Plugins\PowerPlugin.dll
PowerState=STATUS
Substitute="0":"Plugged In","1":"Charging","2":"Critical","3":"Low","4":"High"
UpdateDivider=60
User avatar
Chewtoy
Moderator
Posts: 995
Joined: June 10th, 2009, 12:44 pm
Location: Sweden

Re: Power Plugin Status Issue

Post by Chewtoy »

http://rainmeter.net/cms/Plugins-Power_beta wrote:Plugin=Plugins\PowerPlugin.dll

This plugin can be used to measure battery status and the current MHz on laptops. Note that not all laptops support this (or all the values).
So it might be that you laptop is not supported.
I don't think, therefore I'm not.
User avatar
viewfindr
Posts: 4
Joined: January 19th, 2011, 1:32 am

Re: Power Plugin Status Issue

Post by viewfindr »

Chewtoy wrote: So it might be that you laptop is not supported.
The thing is, all of the values are read correctly except for when the battery is in the mid range - I think it makes sense to say that my laptop is supported? Except for perhaps a bug or a configuration issue..
User avatar
JpsCrazy
Posts: 667
Joined: April 18th, 2010, 2:16 pm
Location: NY, USA

Re: Power Plugin Status Issue

Post by JpsCrazy »

The easiest way to test if your laptop is supported would be to make an extremely simple skin, such as:

[MeasurePowerStatus]
Measure=Plugin
Plugin=Plugins\PowerPlugin.dll
PowerState=STATUS

[MeterPowerStatus]
Meter=String
MeasureName=MeasurePowerStatus
SolidColor=AAAAAA

And see if all the numerical values are spat out when they're supposed to.
If it seemingly skips a number you're not supported.
User avatar
viewfindr
Posts: 4
Joined: January 19th, 2011, 1:32 am

Re: Power Plugin Status Issue

Post by viewfindr »

JpsCrazy wrote:The easiest way to test if your laptop is supported would be to make an extremely simple skin, such as:

[MeasurePowerStatus]
Measure=Plugin
Plugin=Plugins\PowerPlugin.dll
PowerState=STATUS

[MeterPowerStatus]
Meter=String
MeasureName=MeasurePowerStatus
SolidColor=AAAAAA

And see if all the numerical values are spat out when they're supposed to.
If it seemingly skips a number you're not supported.
Yeah it spits out numbers all the time, except that it's a zero when it's between 33% and 66%... is it a possibility that the dll is not working right?