Hi SilverAzide
I have a question.
If the battery is fully charged, does the plugin report chargerate/currentcharge/maxcharge values?
This is what I get with a fully charged (pc) battery:
It is currently April 24th, 2024, 2:48 am
Can't get Battery Status from UsageMonitor
-
- Posts: 1366
- Joined: September 7th, 2020, 2:24 pm
- Location: QLD, Australia
Re: Can't get Battery Status from UsageMonitor
You do not have the required permissions to view the files attached to this post.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
-
- Rainmeter Sage
- Posts: 2604
- Joined: March 23rd, 2015, 5:26 pm
Re: Can't get Battery Status from UsageMonitor
Your screenshot is a little concerning, but it could be simply a difference in how your system reports data to Windows when the battery is fully charged. Here is what mine looks like:
The charge/discharge rate is obviously zero, but all the other data has a non-zero value. If you'd like to investigate, try running the following PowerShell command:
Code: Select all
Get-WmiObject -Namespace root\wmi -Class BatteryStatus | Format-List InstanceName, ChargeRate, DischargeRate, RemainingCapacity, Voltage
Code: Select all
InstanceName : ACPI\PNP0C0A\1_0
ChargeRate : 0
DischargeRate : 0
RemainingCapacity : 99900
Voltage : 12788
InstanceName : ACPI\PNP0C0A\2_0
ChargeRate : 0
DischargeRate : 0
RemainingCapacity : 0
Voltage : 0
Edit
P.S.: I forgot to add: The plugin only reports batteries where the Voltage is greater than zero. So if your battery is reporting zero voltage, the plugin will act as if there is no battery at all. That might be what is happening. Your machine may be supplying zero volts when the battery is full, causing the plugin to not see your battery. The plugin works this way to allow machines that have multiple batteries to detect when one is not present, but perhaps in your case this logic is flawed.
You do not have the required permissions to view the files attached to this post.
-
- Posts: 1366
- Joined: September 7th, 2020, 2:24 pm
- Location: QLD, Australia
Re: Can't get Battery Status from UsageMonitor
Sorry to be a pain.
This is what came back when entering into powershell:
This is what came back when entering into powershell:
Code: Select all
Get-WmiObject -Namespace root\wmi -Class BatteryStatus | Format-List InstanceName, ChargeRate, DischargeRate, RemainingCapacity, Voltage
Code: Select all
Get-WmiObject : Invalid class "BatteryStatus"
At line:1 char:1
+ Get-WmiObject -Namespace root\wmi -Class BatteryStatus | Format-List ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidType: (:) [Get-WmiObject], ManagementException
+ FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
-
- Rainmeter Sage
- Posts: 2604
- Joined: March 23rd, 2015, 5:26 pm
Re: Can't get Battery Status from UsageMonitor
I think we found the problem! Looks like your OS does not have this class (it *is* an undocumented class, after all, so...). I assume it is not present in your PerfMon app either. What version of Windows are you using? Also, if you have HWiNFO, is anything visible there?CodeCode wrote: ↑December 1st, 2020, 9:42 pm Sorry to be a pain.
This is what came back when entering into powershell:Code: Select all
Get-WmiObject -Namespace root\wmi -Class BatteryStatus | Format-List InstanceName, ChargeRate, DischargeRate, RemainingCapacity, Voltage
Code: Select all
Get-WmiObject : Invalid class "BatteryStatus" At line:1 char:1 + Get-WmiObject -Namespace root\wmi -Class BatteryStatus | Format-List ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidType: (:) [Get-WmiObject], ManagementException + FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
-
- Posts: 1366
- Joined: September 7th, 2020, 2:24 pm
- Location: QLD, Australia
Re: Can't get Battery Status from UsageMonitor
I have os build 19042 updated last night with the latest updates.SilverAzide wrote: ↑December 1st, 2020, 10:52 pm I think we found the problem! Looks like your OS does not have this class (it *is* an undocumented class, after all, so...). I assume it is not present in your PerfMon app either. What version of Windows are you using? Also, if you have HWiNFO, is anything visible there?
Hwinfo shows the exact same thing.
I havent tried yet, but I am going to try running off battery in a while - just cant shut things off right the moment due to work commitment.
I have a battery skin that shows the basics and the battery IS connected with a usb, the old skin shows just the basics as expected - charged/ing, bat percentage, and if on ac or not. So the new hoped for info wouldve been nice, but if i am in a shallow well here, there are no major worries.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
-
- Rainmeter Sage
- Posts: 2604
- Joined: March 23rd, 2015, 5:26 pm
Re: Can't get Battery Status from UsageMonitor
Oh sorry, I meant which flavor of Windows? I'm using Windows 10 Pro and Windows 10 Enterprise, and both have the BatteryStatus class. In fact, I think every flavor of Windows since XP has had this, except for maybe the Server versions.
Do you mean you are using an external battery, like a UPS?
-
- Posts: 1366
- Joined: September 7th, 2020, 2:24 pm
- Location: QLD, Australia
Re: Can't get Battery Status from UsageMonitor
Erm, heh. Im using win10 pro 64 bit.SilverAzide wrote: ↑December 2nd, 2020, 4:03 am Oh sorry, I meant which flavor of Windows? I'm using Windows 10 Pro and Windows 10 Enterprise, and both have the BatteryStatus class. In fact, I think every flavor of Windows since XP has had this, except for maybe the Server versions.
Do you mean you are using an external battery, like a UPS?
It is an external battery, yes, a ups.
I was a bit surprised that the batterystatus class is not present given pro implies all of those extras are included. Would you think that searching for a download of some kind would be warrented? given that it was not inherent, i wouldnt really know what to search for, such as some package or similar.
Is it possible that - excuse me if this sounds oblique - visual studio pro would be a segue to acquiring that class and/or package, if it exists?
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
-
- Rainmeter Sage
- Posts: 2604
- Joined: March 23rd, 2015, 5:26 pm
Re: Can't get Battery Status from UsageMonitor
Interesting, Win10 Pro should have it, not sure why it isn't there for you. I have no idea how to "acquire" this WMI class, it should be part of the OS. It has been since Windows XP days at least.CodeCode wrote: ↑December 2nd, 2020, 6:35 am Erm, heh. Im using win10 pro 64 bit.
It is an external battery, yes, a ups.
I was a bit surprised that the batterystatus class is not present given pro implies all of those extras are included. Would you think that searching for a download of some kind would be warrented? given that it was not inherent, i wouldnt really know what to search for, such as some package or similar.
Is it possible that - excuse me if this sounds oblique - visual studio pro would be a segue to acquiring that class and/or package, if it exists?
Perhaps the issue is that it is a UPS battery instead of an internal one? If so, that might be a different sort of thing. A couple of PowerShell queries you can try:
Code: Select all
Get-WmiObject -Namespace root\cimv2 -Class Win32_Battery
Get-WmiObject -Namespace root\cimv2 -Class Win32_PortableBattery
-
- Posts: 1366
- Joined: September 7th, 2020, 2:24 pm
- Location: QLD, Australia
Re: Can't get Battery Status from UsageMonitor
This is what i got:
Not sure what that info can be used for though
Get-WmiObject -Namespace root\cimv2 -Class Win32_PortableBattery Returned with no info.
Code: Select all
PS C:\Users\Sapient> Get-WmiObject -Namespace root\cimv2 -Class Win32_Battery
__GENUS : 2
__CLASS : Win32_Battery
__SUPERCLASS : CIM_Battery
__DYNASTY : CIM_ManagedSystemElement
__RELPATH : Win32_Battery.DeviceID="000000000EATON5E"
__PROPERTY_COUNT : 33
__DERIVATION : {CIM_Battery, CIM_LogicalDevice, CIM_LogicalElement, CIM_ManagedSystemElement}
__SERVER : SAPIENT
__NAMESPACE : root\cimv2
__PATH : \\SAPIENT\root\cimv2:Win32_Battery.DeviceID="000000000EATON5E"
Availability : 2
BatteryRechargeTime :
BatteryStatus : 2
Caption : Internal Battery
Chemistry : 3
ConfigManagerErrorCode :
ConfigManagerUserConfig :
CreationClassName : Win32_Battery
Description : Internal Battery
DesignCapacity :
DesignVoltage : 27000
DeviceID : 000000000EATON5E
ErrorCleared :
ErrorDescription :
EstimatedChargeRemaining : 100
EstimatedRunTime : 15
ExpectedBatteryLife :
ExpectedLife :
FullChargeCapacity :
InstallDate :
LastErrorCode :
MaxRechargeTime :
Name : 5E
PNPDeviceID :
PowerManagementCapabilities : {1}
PowerManagementSupported : False
SmartBatteryVersion :
Status : OK
StatusInfo :
SystemCreationClassName : Win32_ComputerSystem
SystemName : SAPIENT
TimeOnBattery :
TimeToFullCharge :
PSComputerName : SAPIENT
Get-WmiObject -Namespace root\cimv2 -Class Win32_PortableBattery Returned with no info.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
-
- Rainmeter Sage
- Posts: 2604
- Joined: March 23rd, 2015, 5:26 pm
Re: Can't get Battery Status from UsageMonitor
Yeah, that's pretty useless info. I think you might be out of luck. Sorry about that...