Battery Buddy

Rating: 
4.894735
Your rating: None Average: 4.9 (38 votes)

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.

Note: Update to 3.15 resets all intervals to 24h, so please check the settings!

New! Version 4.1.0 brings initial support for Jolla Tablet, but it has not yet been tested on a real device.

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:

  • F(x)tec Pro¹
  • Fairphone 2
  • Jolla Phone
  • Sony Xperia 10 / 10 II / 10 III
  • Sony Xperia X / X Compact
  • Sony Xperia XA2 / XA2 Plus / 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-3.16.2-1.aarch64.rpm128.95 KB24/11/2021 - 23:09
File harbour-batterybuddy-3.16.2-1.armv7hl.rpm125.24 KB24/11/2021 - 23:09
File harbour-batterybuddy-3.16.2-1.i486.rpm134.58 KB24/11/2021 - 23:09
File harbour-batterybuddy-3.17.0-1.aarch64.rpm129.5 KB20/03/2022 - 00:52
File harbour-batterybuddy-3.17.0-1.armv7hl.rpm126.65 KB20/03/2022 - 00:52
File harbour-batterybuddy-3.17.0-1.i486.rpm135.81 KB20/03/2022 - 00:52
File harbour-batterybuddy-4.0.0-1.aarch64.rpm127.77 KB20/03/2022 - 21:53
File harbour-batterybuddy-4.0.0-1.armv7hl.rpm124.93 KB20/03/2022 - 21:53
File harbour-batterybuddy-4.0.0-1.i486.rpm134.15 KB20/03/2022 - 21:53
File harbour-batterybuddy-4.1.0-1.aarch64.rpm174.43 KB28/08/2022 - 01:34
File harbour-batterybuddy-4.1.0-1.armv7hl.rpm172.03 KB28/08/2022 - 01:34
File harbour-batterybuddy-4.1.0-1.i486.rpm181.84 KB28/08/2022 - 01:34
File harbour-batterybuddy-4.1.1-1.aarch64.rpm174.7 KB28/08/2022 - 10:45
File harbour-batterybuddy-4.1.1-1.armv7hl.rpm172.31 KB28/08/2022 - 10:45
File harbour-batterybuddy-4.1.1-1.i486.rpm182.25 KB28/08/2022 - 10:45
Changelog: 

4.1.1-1

  • Fixup! Use correct colors in battery graphic
  • Fixup! Enable low battery animation
  • Move all subpages to MainPage pull down menu
  • Update Swedish translation (thanks, eson57)
  • Update Polish translation (thanks, wetab73)
  • Update copyrights

4.1.0-1

  • Initial Jolla Tablet support (beta)
  • Redesign the logo and battery graphic
  • Search for control files using loops
  • Don't try to use non-existent files
  • Remove unused signals from service
  • Update Swedish translation (thanks, eson57)
  • Use ColumnView to show the log contents with formatting (thanks, nephros!)
  • Log charging/discharging current
  • Log temperature changes with resolution of one degree Celsius
  • Assume the charge current value always changes
  • Print correct log file name
  • Invert the charge current sign if necessary
  • Print changelog at the end of the build script
  • Use custom ImageButton in About page
  • Remove unused files
  • Rename internal logging functions for clarity
  • Built with Sailfish OS SDK 3.9 for 4.4.0.68

4.0.0-1

  • Enable sandboxing with appropriate permissions (GUI only)
  • Use QML DBusInterface for user service manipulation
  • Drop support for SFOS 4.2 and older
  • Clean up systemd service handling during install/update/uninstall
  • Built with Sailfish OS SDK 3.8 for 4.3.0.12

3.17.0-1

  • Disable sandboxing
  • Fix install/upgrade/uninstall scriptlets
  • Service binary consumes less resources
  • Don't try to close notifications if they are not open

3.16.2-1

  • Fix .spec bin file path (thanks, leon and nephros)
  • Built with Sailfish OS SDK 3.7 for 4.3.0.12

Full changelog in GitHub.

Comments

fingus's picture

Beatiful new Design!

Meminga's picture

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's picture

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's picture

Hi!

App works on Fairphone 2, running sailfish 4.3.0.15.

Thanks for the good work!

so long

hanky

 

 

direc85's picture

Thanks, I added the model to the description!

ric9k's picture

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's picture

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's picture

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's picture

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's picture

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's picture

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's picture

That indeed would make sense, both feature-wise and battery-wise. I'll add an issue about it!

direc85's picture

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's picture

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's picture

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's picture

As mentioned, an XA2 (Sony).

nephros's picture

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's picture

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's picture

Thanks for the information. I'll dig deeper then .

w_oe's picture

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.

direc85's picture

You could stop the service by running `systemctl --user stop harbour-batterybuddy-daemon.service` and start it manually by running `harbour-batterybuddy-daemon`.

If this really turns out to be the issue I'm having (high CPU usage on lipstick after random uptime), I'll have to revert the change...

w_oe's picture

I have written a one line shell script that replaces the tool and simply exec's the command line, so I'm fine now. Maybe make the usage of the keepalive-tool configurable?

direc85's picture

What device do you have?

Please see this thread, too: https://forum.sailfishos.org/t/screenshot-leads-to-lipstick-high-cpu-and...

w_oe's picture

On my XA2 battery life is about halve since I have updated battery buddy. At the same time I have also updated a few other apps, but I don't blame them for now. Using SystemDataScope, I see that CPU sleep has gone from near 100% to 0%. Might this be related to battery buddy and the keepalive tool? How can I disable this new feature short of uninstalling?

direc85's picture

I haven't personally experienced any issues with `keepalive-tool`, but that's no definitve proof.

The easiest way to disable it at the moment is to downgrade Battery Buddy.

shults's picture

Why the voltage is not shown? Does it work on 64bit sfos4.1?

direc85's picture

Voltage display isn't added yet, but I can add it later on.

Battery Buddy should work just as well on aarch64 devices, at least there haven't been any reports. I don't have any such devices, but at least the community hasn't reported any issues yet :)

direc85's picture

Version 3.14 is the first one in which I use keepalive-tool to, well, keep alive the daemon while the phone is in suspend (the display is off and power consumption is minimal). This may and will increase battery consumption - please monitor your charge extra carefully and report back how well it works now, and if there is any difference in battery consumption.

I sure tested it myself, and didn't really notice any difference, but it is worth mentioning anyway.

nephros's picture

Possible, but the values usually are right next to the charge states in e.g. sysfs. So it should be really similar in handling.

nephros's picture

Wonderful app, I use it constantly. Thanks for making it!
I have a feature request/wish: monitor and warn about battery temperature similar to full and empty notifications.

Pages