Enhanced Battery Monitor
KDE Plasma 4 Extensions
Score 66%
Description:

This is the enhanced battery monitor that for now shows the battery\'s remaining time apart from the features in the default plasmoid.

EDIT: This plasmoid is no longer maintained.

tnaker

3 years ago

i think there is a bug
it cause the system to shutdow after showing a message that my battery is broken (%9)
it only occur on kde

Report

bigblondewolf

3 years ago

Hi

The applet shows a blank battery with a red cross on the bottom right on my laptop.
Everything else works fine: ac/batt status, percentage and time remaining, I just have a red cross on the battery. My battery is fine, holds for 5hrs.

OS is Arch Linux, KDE should be 4.10 something, computer is Dell Latitude with a samsung extended battery. Btw the applet doesn't show battery model, the original one does.

Report

bigblondewolf

3 years ago

Please disregard. Fixed after a system reboot

Report

nekoxmachina

3 years ago

FYI: This is an embaracing bug in UPower. Please vote this up:
https://bugs.freedesktop.org/show_bug.cgi?id=60214

Report

Winnerer

4 years ago

If there is availability to translate this plasmoid to another languages? I can make Russian translation!

Report

Myrmidon83

4 years ago

This doesn't seem to work. I have installed the plasmoid and checked the box which says 'show time' but it only shows the percentage, KDE 4.10.3. :(

Is it something I have missed? Distro? KDE version?

Report

Myrmidon83

4 years ago

Works now, didn't realise I had to click the icon, I thought hovering mouse over would show it. :P

Report

arekm

4 years ago

Recent upower + solid from kde git recognizes other type of batteries like logitech wireless mouse/keyboard/trackball batteries.

Unfortunatelly battery applet seems unable to deal with this type of batteries even with "show the state for each battery present" set.

Could support for this be added?

I guess "show the state for each battery present" should become "show the state for each battery type present" with such support.

[arekm@t400 ~]$ solid-hardware details '/org/freedesktop/UPower/devices/mouse_0003o046DoC52Bx00BC'
udi = '/org/freedesktop/UPower/devices/mouse_0003o046DoC52Bx00BC'
parent = '/org/freedesktop/UPower' (string)
vendor = 'Logitech, Inc.' (string)
product = 'M570' (string)
description = 'Unknown Battery' (string)
Battery.plugged = true (bool)
Battery.type = 'MouseBattery' (0x4) (enum)
Battery.chargePercent = 50 (0x32) (int)
Battery.rechargeable = true (bool)
Battery.chargeState = 'Discharging' (0x2) (enum)

Report

C

viranch

4 years ago

I don't have the keyboard/mouse with a battery to test it out. If the remaining time doesn't bother you, you can use the default battery plasmoid.

Report

arekm

4 years ago

The default also doesn't support this.

Report

EazyVG

4 years ago

Thanks a lot for this; I find it strange that estimated time is still not present in KDE 4.10!

Report

EazyVG

4 years ago

BTW, I will be getting my second UltraBay battery (ThinkPad T430s) in about 2 weeks and will report back on the above issue in the posts.

Report

EazyVG

4 years ago

Got my second UltraBay battery. With 2 batteries the applet correctly displays their presence but the time remaining is showed first for the UltraBay battery and once it has been exhausted then for the 2nd which is the main battery once it starts discharging.

Anyways, showing total time for both is not of critical essence for me, and as I undesratnd it might be related with tp_smapi as the same is yet not fully supported (kernel 3.4.x openSUSE 12.2) on newer ThinkPad notebooks.

Thanks again for the applet.

Report

EazyVG

4 years ago

BTW, in case of charge state it correctly displays state of total, i.e. both the batteries.

Report

cyberbeat

4 years ago

I made some modifications to show the remaining time also on the battery icon:

diff -r enbattery/contents/ui/batterymonitor.qml ../../../../../Downloads/153981-enhanced-battery/contents/ui/batterymonitor.qml
52,53d51
< property int remainingMsec: Number(pmSource.data["Battery"]["Remaining msec"])
<
90d87
< property int remainingMsec: Number(pmSource.data["Battery"]["Remaining msec"])
124c121
< text: show_remaining_time?formatDuration2(remainingMsec):i18nc("overlay on the battery, needs to be really tiny", "%1%", percent);
---
> text: i18nc("overlay on the battery, needs to be really tiny", "%1%", percent);
241,254d237
< }
<
< function formatDuration2(msec) {
< if (msec==0)
< return "";
<
< var time = new Date(msec);
< var hours = time.getUTCHours();
< var minutes = time.getUTCMinutes();
< if (minutes<10)
< minutes = "0"+minutes;
< var str = hours+":"+minutes;
<
< return str;

Report

C

viranch

4 years ago

your patch is a "reverse" one. you probably did- "diff your_plasmoid original_plasmoid" - which is wrong, you always do "diff old new", ie, "diff original_plasmoid your_plasmoid".

Report

tomchiverton

4 years ago

I'd love to see this as an option, given the KDE developers feel they know better than their users and removed this feature (even as an option) https://bugs.kde.org/show_bug.cgi?id=304510

Report

tomchiverton

3 years ago

Here is the patch updated for the latest release of this widget. Turn on 'show charge information' in the widget prefs to see the time remaining on the battery icon.

$ diff -u batterymonitor.qml.orig batterymonitor.qml
--- batterymonitor.qml.orig 2014-04-13 13:43:57.976169606 +0100
+++ batterymonitor.qml 2014-04-13 13:48:38.216181061 +0100
@@ -85,6 +85,7 @@
property bool hasBattery: view.singleBattery ? batteries.cumulativePluggedin : model["Plugged in"]
property int percent: view.singleBattery ? batteries.cumulativePercent : model["Percent"]
property bool pluggedIn: pmSource.data["AC Adapter"]["Plugged in"]
+ property int remainingMsec: Number(pmSource.data["Battery"]["Remaining msec"])

width: view.width/view.count
height: view.height
@@ -118,7 +119,7 @@

Text {
id: overlayText
- text: i18nc("overlay on the battery, needs to be really tiny", "%1%", percent);
+ text: show_remaining_time?formatDuration2(remainingMsec):i18nc("overlay on the battery, needs to be really tiny", "%1%", percent);
color: theme.textColor
font.pixelSize: Math.max(parent.size/8, 11)
anchors.centerIn: labelRect
@@ -236,4 +237,18 @@
}
}
}
+ function formatDuration2(msec) {
+ if (msec==0)
+ return "";
+
+ var time = new Date(msec);
+ var hours = time.getUTCHours();
+ var minutes = time.getUTCMinutes();
+ if (minutes<10)
+ minutes = "0"+minutes;
+ var str = hours+":"+minutes;
+
+ return str;
+}
+
}

Report

claude0001

5 years ago

Hi viranch. Many thanks for making this non-official version available.

I have a system (Lenovo T400) with two batteries. The Enhanced Battery Monitor correctly displays the total remaining time.

However, it displays only the charge state of one battery, although two ("Battery0" and "Battery1") show up correctly as sources in Plasma Engine Explorer.

The tooltip states e.g. "Battery: 93% (discharging)". Comparison with the information form Plasma Engine Explorer suggests that this corresponds to "Battery0". The information for "Battery1" is omitted.

I'm running Ubuntu 12.04.1 with Kernel 3.2.0 (amd64) and KDE 4.9.2.

Report

C

viranch

5 years ago

Did you set the "Show info for each battery" configuration option?

Report

claude0001

5 years ago

"Show info for each battery" was already set.

After some trying around I now believe that the problem is related to hibernation (aka. suspend-to-disk): Upon resume from hibernation, the plasmoid reproducibly "forgets" about one of the two batteries, although the information displayed by Plasma Engine Explorer is always correct.

After a clean reboot both batteries show up again in the plasmoid. Sending the system to sleep (suspend-to-ram) does not seem to result in "loss" of one battery.

All in all, the problem is less important than I first thought. Still, maybe things can be improved by somehow re-initialising the battery count upon resume ... ?

Report

C

viranch

5 years ago

That's odd, does the official plasmoid have the same problem?

Report

claude0001

5 years ago

At first sight, the situation with the official plasmoid seems to be worse: Right now I cannot get it to display both batteries ("show all batteries" is set of course) even after a clean boot. I will test further though ...

I was using the official plasmoid on KDE 4.8.5 til yesterday, where it always worked as it should. I do not know if it ever worked properly on KDE 4.9.2 as I immediately switched to the unofficial plasmoid to get the remaining-time-feature back.

Sorry for double posting btw. it seems to happen when Firefox refreshes the page after submission ...

Report

C

viranch

5 years ago

The official plasmoid did not support multiple batteries for a couple of releases, but was fixed in 4.9.2. So please check if the official plasmoid in 4.9.2 works as expected. Since I don't have a computer with multiple batteries I can't test it myself.

Report

claude0001

5 years ago

I now used both plasmoids side-by-side for one day.

The official plasmoid consistently displays only one battery, no matter what I do.

The unofficial plasmoid (which I downloaded using the "add new widget" function of KDE) mostly works as it should, i.e. displays total remaining time and charge states for two batteries. Only when I send the machine into hibernation it often (though not always) forgets one battery upon resume. Rebooting or cycling to sleep state and back then restores display of the second battery. The issue is not critical for me, but indicates that something is undeterminate with the battery count upon resuming from hibernation. The information shown by Plasma Engine Explorer has never been wrong up to now.

I run KDE 4.9.2 installed from the Kubuntu-Backports repo. How can I tell if the version of the battery plasmoid packaged by the Kubuntu-devs is really the most recent upstream version?

Report

File (click to download) Version Description Filetype Packagetype License Downloads Date Filesize OCS-Install DL
Details
version
0.9.1
updated Dec 28 2013
added Sep 13 2012
downloads today
0
page views today 3