Battery Buddy

Rating: 
4.82353
Your rating: None Average: 4.8 (17 votes)

New feature: Background process for charger control and alerts! You can now simply install and configure this app and then just close it!

Fully discharging a battery and charging it back to full charge again wears it out sooner than you might expect. Battery Buddy can help you increase the battery lifetime by automatically pausing and resuming charging. You can set alerts for low and full enough charge levels, too.

You can better see what's going on by running the application or daemon with --verbose or --debug options. Help is available with --help option.

Please note that the charger control mechanism may not work for every device out there. So far it has been successfully tested with the following devices:

  • F(x)tec Pro¹
  • Jolla Phone
  • Sony Xperia 10
  • Sony Xperia X
  • Sony Xperia XA2
  • Sony Xperia XA2 Ultra
  • Sony Xperia Z3 Compact Tablet

Please let me know if it works for your device, or if it doesn't work!

Bug reports and translations are most welcome!

If you like my work and would like to support me, you can now buy me a coffee.

Source code can be found in GitHub.

Screenshots: 
Application versions: 
AttachmentSizeDate
File harbour-batterybuddy-2.1-2.armv7hl.rpm68.54 KB22/03/2020 - 22:22
File harbour-batterybuddy-2.1-2.i486.rpm70.77 KB22/03/2020 - 22:22
File harbour-batterybuddy-2.2-2.armv7hl.rpm72.43 KB28/03/2020 - 11:55
File harbour-batterybuddy-2.2-2.i486.rpm74.84 KB28/03/2020 - 11:55
File harbour-batterybuddy-3.0-1.armv7hl.rpm102.74 KB31/05/2020 - 21:55
File harbour-batterybuddy-3.0-1.i486.rpm108.55 KB31/05/2020 - 21:55
File harbour-batterybuddy-3.1-1.armv7hl.rpm102.8 KB01/06/2020 - 19:01
File harbour-batterybuddy-3.1-1.i486.rpm108.68 KB01/06/2020 - 19:01
Changelog: 

3.1-1

  • Update Chinese translation (thanks, dashinfantry)
  • Don't alert on "100% idle" (e.g. emulator)

3.0-1

  • Reimplemented systemd service controls charging and notifications
  • GUI doesn't have to be open for proper operation
  • Added Ko-Fi donation link
  • Translation fixes
  • Identical with 2.99-1 / v3.0 beta 1

2.2-2

  • Fix broken notifications timer
  • Add Swedish translation (thanks, eson57)
  • Add --debug, --verbose, --help and -v parameters

2.1-2

  • Fix crash on startup after upgrade
  • Fix missing systemd service after upgrade

2.1-1

  • Add landscape orientation support
  • Update Chinese translation (thanks, dashinfantry)

2.0-1

  • First release in OpenRepos
  • New feature: pause and resume charging (automatically/manually)
  • Implemented systemd service for charger control permissions
  • Massive code cleanup, many parts improved or rewritten
  • Don't use deprecated /run/state/namespaces/Battery/
  • Audio tests moved to Settings page
  • Use "right to left" slider highlight
  • Use separate license page

Full changelog in GitHub.

Comments

michl's picture

Also workson F(x)tec Pro¹!

Nice Job! Thank you!

It uses /sys/class/power_supply/battery/input_suspend

direc85's picture

Great! Thanks for the info! I'll add it to the description!

dumol's picture

Charge control is really cool, thanks! Please don't forget about adding a donation link. ;-]

UiPo1goo's picture

Very nice idea to use github. I opened two issues: Charging won't suspend after upper limit reaches.
Notification interval should be splitted.

direc85's picture

Thanks, noted!

direc85's picture

Hello Sailors!

I rewrote the systemd service, which was a huge task! It's in the famous state "works for me", but I decided to first release it only on GitHub to avoid accidental installation. Please proceed with care and let me know how it works for you and your specific device! Thanks!

Edit: The front page still says that it is required to be kept opened for working properly, but that's no longer true. I'll fix it in the next beta release :)

objectifnul's picture

Seems that some notification should be amended: "Please disconnect the charger" would make more sense than "Please connect the charger" when the upper limit is reached.

babba22's picture

Hi direc, wonderful app! There's only one thing I would like to ask you: at the moment, when the battery reaches the pause charging limit, not only the battery isn't charged anymore (excellent!), but the phone use the battery power. Is it possible to make it use the AC power instead? This way the battery would be preserved even more

direc85's picture

I looked into it while I implemented the charger mechanism, but it looks like it's not possible with the current, uh, adaptation layer? Binary driver blobs? I don't know, but there doesn't seem to be any control over that.

The best you can get is to set start and stop percentages close to one another, say 80% and 79% so that the charge stays as constant as possible.

babba22's picture

Ok, I understand. Thank you very much for the app!

zipotron's picture

Dude, amazing app! Thanks a lot for that!!! Just a consideration, if you could deamonize the app is going a be just perfect !

direc85's picture

Thanks! I'll implement the service at some point for sure!

oxygenh's picture

I have issue: I'm not receiving notification, when charge below low limit or higher upper limit.
( http://prntscr.com/rn0vff )
ps: but charging control work good.
My settings: Sailfish X 3.2.1.20 (Sony xperia x compact)
console log:

[nemo@Sailfish ~]$ harbour-batterybuddy
[I] unknown:0 - Starting Battery Buddy...
[I] unknown:0 - Loaded lowAlert 39
[I] unknown:0 - Loaded highAlert 85
[I] unknown:0 - Loaded interval 300
[I] unknown:0 - Loaded limitEnabled 1
[I] unknown:0 - Loaded notificationsEnabled 1
[I] unknown:0 - Loaded lowLimit 76
[I] unknown:0 - Loaded highLimit 85
[I] unknown:0 - Loaded limitEnabled 1
[I] unknown:0 - Reading capacity from "/sys/class/power_supply/ba
ttery/capacity"
[I] unknown:0 - Reading charge state from "/sys/class/power_suppl
y/battery/status"
[I] unknown:0 - Reading charger status from "/sys/class/power_sup
ply/usb/present"
[I] unknown:0 - Controlling charging via "/sys/class/power_supply
/battery/charging_enabled"
[W] unknown:0 - Theme dir "/usr/share/themes/jolla/meegotouch/z1.
25/" does not exist
[I] unknown:0 - Launching GUI...
[W] unknown:518 - file:///usr/lib/qt5/qml/Sailfish/Silica/private
/PulleyMenuBase.qml:518:29: Unable to assign [undefined] to float
[W] unknown:518 - file:///usr/lib/qt5/qml/Sailfish/Silica/private
/PulleyMenuBase.qml:518:29: Unable to assign [undefined] to float

direc85's picture

Thanks for the --debug output below (you can remove it now so that there's less clutter).

I tested it, too, and it looks like I managed to break the notifications at some point. I'll fix it and release a new version soon (hopefully today).

EDIT: I deleted the debug output comment.

oxygenh's picture

Thank you very much! My issue absolutely fixed with last release. It's cool! Superbe!

direc85's picture

You're welcome!

direc85's picture

Try to run the application using "harbour-batterybuddy --debug". Its actually not documented yes. Whoops. And I still have to add debug stuff.

oxygenh's picture

Thank you very much for vry usefull app. Do you have plan built in system setting (like battery notifier), and make daemon?

direc85's picture

Thanks! Most likely I will do that in a month or so; I suddenly managed to rid myself of all free time for a month '-.-

oxygenh's picture

It will be cool! I will wait. Thank you.
Where do i send little donat? ;)

direc85's picture

TBH I'm working on it. Thank you for asking :)

PawelSpoon's picture

Great with Situations ! Starts on cable plugin

enrish's picture

Genius! I hoped for this new feature for long, as i often missed notifications when in another room. Thanks a lot. I also had problems after the very last update, and uninstalling-reinstalling did it.

mz_i_norge's picture

Why is it not possible to charge the battery up to 100% with automatic charging control? That stops at 95%.

direc85's picture

Thanks for feedback! That's just an arbitrary maximum value I chose. I have to revisit the sliders, too, because it's quite hard to get the value exactly right on Jolla Phone with its small display. I'll fix both of these in a future release.

t0t3u's picture

Fixed by reinstalling it.

t0t3u's picture

Oups!
Don't know if it's related but it failes to start after last update:
[nemo@Sailfish ~]$ harbour-batterybuddy
[I] unknown:0 - Starting Battery Buddy...
[I] unknown:0 - Loaded lowAlert 30
[I] unknown:0 - Loaded highAlert 76
[I] unknown:0 - Loaded interval 60
[I] unknown:0 - Loaded limitEnabled 0
[I] unknown:0 - Loaded notificationsEnabled 1
[I] unknown:0 - Loaded lowLimit 50
[I] unknown:0 - Loaded highLimit 70
[I] unknown:0 - Loaded limitEnabled 0
[I] unknown:0 - Reading capacity from "/sys/class/pow
er_supply/battery/capacity"
[I] unknown:0 - Reading charge state from "/sys/class
/power_supply/battery/status"
[I] unknown:0 - Reading charger status from "/sys/cla
ss/power_supply/usb/present"
Segmentation fault
[nemo@Sailfish ~]$

direc85's picture

Thanks for reporting. I'll have a look at the issue. Good to know that reinstalling helped, too...

t0t3u's picture

Great work!
I confirm that the automated part works on X10.

fllp's picture

Version 2.0 is a wonderful update. Thank you!
Automatic change limit works on Xperia X. Like a charm.

Pages