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.
New! Version 4.3.0 adds support for PineTab, developed by nephros! Thank you!
New! Version 4.2.0 adds support for setting maximum charge current for selected devices.
New! Version 4.1.0 adds initial support for Jolla Tablet.
Important: Sailjail support is enabled in Battery Buddy 4.0.0-1, which means it requires at least Sailfish OS 4.3 to work properly. For Sailfish OS 3.3 and up you should be able to use Battery Buddy 3.17-1. For older versions Battery Buddy 3.15-1 should work fine. For Sailfish OS 2.2 you have to download the legacy build.
The application comes with a service component that takes care of charger control and alerts. This means that the application doesn't have to be opened for alerts and limits to work - which is against Jolla Store policy, and hence worth mentioning here. You can control the service from the application (start/stop and enable/disable on boot).
There is now a logging option, which can be accessed via the Settings page pulley menu, with three logging options. You can copy the log contents, too, so submitting the service log for debugging purposes is now a lot more convenient! Using --verbose and --debug flags still work as before.
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:
For some devices there's partial support:
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.
4.3.2-1
4.3.1-1
4.3.0-1
4.2.5-1
4.2.4-1
4.2.3-1
4.2.2-1
4.1.1-1
4.1.0-1
4.0.0-1
3.17.0-1
3.16.2-1
Full changelog in GitHub.
Comments
simosagi
Mon, 2023/04/24 - 11:19
Permalink
Copypaste typo :) : the changelog entry for 4.3.1-1 is marked as 4.3.0-1
direc85
Mon, 2023/04/24 - 15:32
Permalink
Thanks, fixed!
objectifnul
Sat, 2023/03/04 - 22:25
Permalink
As from release 4.2.3-1, it says "battery not detected or faulty". Previous releases OK (Sony Xperia X)
direc85
Sun, 2023/03/05 - 12:30
Permalink
Thanks for reporting, fixed in 4.2.4!
rob_k
Sun, 2023/01/08 - 10:49
Permalink
Very happy with this update. Battery life is so much better now on X10ii!
carmenfdezb
Sun, 2022/12/04 - 15:40
Permalink
Does this app support jolla tablet? I'm on sfos 4.2 and I've installed 3.15-1 version, but the app always says that charge is 100%.
Log:
[13:33:18] harbour-batterybuddy-daemon 3.15-1
[13:33:18] Using /home/nemo/.config/harbour-batterybuddy/harbour-batterybuddy.conf
[13:33:18] Load: highNotificationsInterval 13
[13:33:18] Load: lowNotificationsInterval 13
[13:33:18] Load: healthNotificationsInterval 13
[13:33:18] Capacity file: /sys/class/power_supply/battery/capacity doesn't exist
[13:33:18] Charge state file: /sys/class/power_supply/battery/status doesn't exist
[13:33:18] Charger status file: /sys/class/power_supply/usb/present doesn't exist
[13:33:18] Temperature file: /sys/class/power_supply/battery/temp doesn't exist
[13:33:18] Battery health file: /sys/class/power_supply/battery/health doesn't exist
[13:33:18] Charger control file not found!
[13:33:18] Please contact the developer with your device model!
direc85
Sun, 2022/12/04 - 15:47
Permalink
Support for Jolla Tablet is partially in version 4.1.0+, but it's untested as I don't have a device to test with, and no one from the forums hasn't yet tested it either. Can you install the newest version? If not, send me the error messages it gives and I'll build a compatible version.
There's an issue for this in GitHub; any help with testing and making it run on Jolla Table is most appreciated :)
carmenfdezb
Mon, 2022/12/05 - 00:15
Permalink
It seems that it works for Jolla Tablet (I've answered you in Github):
[21:42:51] harbour-batterybuddy-daemon 3.16.2-1
[21:42:51] Using /home/nemo/.config/harbour-batterybuddy/harbour-batterybuddy.conf
[21:42:51] Load: highNotificationsInterval 13
[21:42:51] Load: lowNotificationsInterval 13
[21:42:51] Load: healthNotificationsInterval 13
[21:42:51] Battery charge file: /sys/class/power_supply/dollar_cove_battery/capacity
[21:42:51] Status file: /sys/class/power_supply/dollar_cove_battery/status
[21:42:51] Charger status file: /sys/class/power_supply/dollar_cove_charger/present
[21:42:51] Battery temperature file: /sys/class/power_supply/dollar_cove_battery/temp
[21:42:51] Battery health file: /sys/class/power_supply/dollar_cove_battery/health
[21:42:51] Charger control file not found!
[21:42:51] Please contact the developer with your device model!
[21:42:52] Battery: 65%
[21:42:52] Charger: connected
[21:42:52] State: charging
[21:42:52] Temperature: 29°C
[21:42:52] Health: good
[21:43:39] Battery: 66%
[21:44:39] Temperature: 30°C
[21:46:09] Battery: 67%
[21:46:09] Temperature: 29°C
[21:48:39] Battery: 68%
[21:50:39] Battery: 69%
[21:52:29] Load: highLimit 75
[21:52:30] Load: highLimit 80
[21:52:32] Load: highLimit 85
[21:52:36] Load: highLimit 90
[21:52:38] Load: lowLimit 80
[21:52:39] Load: lowLimit 85
[21:52:39] Temperature: 28°C
[21:52:56] Load: highAlert 80
[21:52:58] Load: highAlert 95
[21:53:39] Battery: 70%
[21:53:39] Temperature: 29°C
[21:55:39] Battery: 71%
[21:56:39] Temperature: 28°C
[21:57:09] Temperature: 29°C
[21:57:39] Temperature: 28°C
[21:58:09] Battery: 72%
[22:00:39] Battery: 73%
[22:03:09] Battery: 74%
[22:05:39] Battery: 75%
[22:08:09] Battery: 76%
direc85
Mon, 2022/12/05 - 00:15
Permalink
Awesome! Thank you!
carmenfdezb
Mon, 2022/12/05 - 00:28
Permalink
Thanks for your quick answer! At the moment I don't want to update to 4.4.0.72, because gps is broken since sfos 4.3, and I need my maps working in my tablet. I will take a look your code this afternoon and I'll tell you if it works. Thank you very much for your help!
fingus
Mon, 2022/08/29 - 14:49
Permalink
Beatiful new Design!
Meminga
Sat, 2022/06/25 - 19:51
Permalink
Battery Buddy works fine in my XA2 plus - just one thing is a bit irritating: I replaced the old battery. Now CSD tool shows "good" health. Status in battery buddy is just "ok". Is that a remainder from the old battery?
direc85
Sun, 2022/06/26 - 13:31
Permalink
Battery Buddy only shows the information the system provides to it. I can have a look at if there are multiple places to get the battery health information from. There is a reason the CSD shows different information than Battery Buddy - but what it is and how to fix it, is another thing altogether.
hanky
Sun, 2022/05/15 - 12:52
Permalink
Hi!
App works on Fairphone 2, running sailfish 4.3.0.15.
Thanks for the good work!
so long
hanky
direc85
Thu, 2022/05/19 - 01:18
Permalink
Thanks, I added the model to the description!
ric9k
Fri, 2022/03/04 - 08:24
Permalink
Hi, thanks for this app. Cool being able to longen the batt life.
On my XA2, the xharge stops at 69%. Is that intended? Cheers
direc85
Thu, 2022/05/19 - 01:17
Permalink
You may have to set the sliders to your preferred values in the settings page, and in the worst case, stop and start the background service again.
nas
Mon, 2021/09/13 - 21:18
Permalink
Ahoy direc!
Thank you for the battery-buddy app! I installed it in sailfish 3, worked for a while, I updated it and wasn't working anymore (to stop the charge) even I downgraded. Now that I updated to sailfish 4 started working its own again !
I got the temprature in "F", and I noticed that there wasn't any option in settings page. In the source code I saw that it checks the locale, which is set by choosing the language. From English US I choosed English UK and I got temprature in "C" !
direc85
Thu, 2022/05/19 - 01:16
Permalink
When you updated to SFOS 4, it pulled the newest version from OpenRepos, if you had the repo installed. That's the most likely explanation.
prometheos
Tue, 2021/09/07 - 18:55
Permalink
2021/08/3 - After new install of SFOS-4.1on my xperia10 Plus Double Sim,harbour-batterybuddy-3.15-1.armv7hl does not start from screen/interactively (starting icon/w. rotating arrow appears for some seconds, then disappears).- starting from terminal with:/usr/bin/harbour-batterybuddy &works ok.I tried installing both interactively and also by CLI, with:sudo pkcon install-local /home/defaultuser/Downloads/harbour-batterybuddy-3.15-1.armv7hl.rpmI tried the same with 3.14 and 3.13, with the same result.Is my first post here, so I apologize in case this is the wrong place for it.Comment on 2021-09-07 Meanwhile the problem "automagically" disappeared, both on Xperia (sfos-4.1) and on Jolla1 (sfos-3.3). Well done, thanks!
lal883
Tue, 2021/08/10 - 14:24
Permalink
Hi, would it be easy to add an option to disable charging if battery temperature overshoots a certain threshold and restart charging after it falls back? My battery often gets very hot that I have to temporarily stop charging for a while to have the temperature settled.
direc85
Tue, 2021/08/10 - 17:21
Permalink
That indeed would make sense, both feature-wise and battery-wise. I'll add an issue about it!
direc85
Mon, 2021/07/26 - 10:47
Permalink
I pushed the vew version yesterday, and I can now confirm that the current timer method works as expected!
Please report any issues you may encounter, and don't forget to update the intervals after update!
direc85
Sun, 2021/07/25 - 17:40
Permalink
Just a quick update!
I finally got around this again, and managed to get libkeepalive signals working within Battery Buddy service. The big update is quite close now, so that that 1) the CPU should get some sleep, and 2) the service should receive a kick from the OS side periodically. Still a lot of actual implementation to do, and GUI needs to be updated, too, because custom intervals are now gone. Oh well, I'll take it!
direc85
Fri, 2021/07/02 - 18:09
Permalink
I just noticed that the CPU doesn't enter sleep mode at all while the device is plugged in to a charger. That is the reason the app has worked seemingly fine this far - preventing 100% charge.
I will still update the timer code to survive CPU sleep mode, it's a good exercise :)
w_oe
Thu, 2021/07/01 - 14:13
Permalink
As mentioned, an XA2 (Sony).
nephros
Thu, 2021/07/01 - 11:30
Permalink
Can confirm on X10 (not two) that cpu sleep according to sysmon is 0 when the daemon is active. Stopping it lets the cpu sleep again.
I do not see particularly high CPU usage either way though.
direc85
Fri, 2021/07/02 - 09:21
Permalink
I noticed the same behavior; CPU doesn't enter sleep at all when the service with keepalive-tool is running. I'll revert the change and start implementing the non-workaround method. It may take some time, though...
direc85
Thu, 2021/07/01 - 14:21
Permalink
Thanks for the information. I'll dig deeper then .
w_oe
Tue, 2021/06/29 - 01:11
Permalink
I have killed the harbour-batterybuddy-daemon (child process of keepalive-tool) and started it again without the tool. Since then CPU sleep is high again and battery usage is low, hooray.
Pages