Battery Buddy

Rating: 
4.86207
Your rating: None Average: 4.9 (29 votes)

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

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.

Important: Battery Buddy 3.6-1 and later releases require SailfishOS 3.3. The legacy version that supports SailfishOS 2.2.0.18 and later can be downloaded manually from GitHub releases page.

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¹
  • Jolla Phone
  • Sony Xperia 10
  • Sony Xperia X
  • Sony Xperia X Compact
  • 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-3.11-1.aarch64.rpm114.97 KB27/04/2021 - 21:49
File harbour-batterybuddy-3.11-1.armv7hl.rpm110.85 KB27/04/2021 - 21:49
File harbour-batterybuddy-3.11-1.i486.rpm118.87 KB27/04/2021 - 21:49
File harbour-batterybuddy-3.12-3.aarch64.rpm118.18 KB01/05/2021 - 00:06
File harbour-batterybuddy-3.12-3.armv7hl.rpm113.77 KB01/05/2021 - 00:06
File harbour-batterybuddy-3.12-3.i486.rpm121.86 KB01/05/2021 - 00:06
File harbour-batterybuddy-3.13-1.aarch64.rpm129.69 KB23/05/2021 - 16:27
File harbour-batterybuddy-3.13-1.armv7hl.rpm125.48 KB23/05/2021 - 16:27
File harbour-batterybuddy-3.13-1.i486.rpm135.5 KB23/05/2021 - 16:27
File harbour-batterybuddy-3.14-1.aarch64.rpm130.32 KB30/05/2021 - 21:23
File harbour-batterybuddy-3.14-1.armv7hl.rpm126 KB30/05/2021 - 21:23
File harbour-batterybuddy-3.14-1.i486.rpm136.14 KB30/05/2021 - 21:23
File harbour-batterybuddy-3.15-1.aarch64.rpm129.34 KB25/07/2021 - 21:15
File harbour-batterybuddy-3.15-1.armv7hl.rpm125.55 KB25/07/2021 - 21:15
File harbour-batterybuddy-3.15-1.i486.rpm135.04 KB25/07/2021 - 21:15
Changelog: 

3.15-1

  • Implement BackgroundActivity timed events
  • Drop keepalive-tool

3.14-1

  • Special pi version release :D
  • Use keepalive-tool to mitigate deep sleep
  • Update translators and credits
  • Update Polish translation (thanks, atlochowski)
  • Update Deutch translation (thanks, nephros)

3.13-1

  • Show battery temperature and condition (thanks, nephros)
  • Show notifications about abnormal temperature and condition (thanks, nephros)
  • Fix broken notifications on SFOS 3.4 and earlier
  • Bring back SFOS 2.2 support

Full changelog in GitHub.

Comments

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.

direc85's picture

Thank you for your kind words!

Battery temperature is a great idea, although I think it has to be implemented per-model. I'll see what I can do!

direc85's picture

There was a typo in the translation files, which caused version 3.12-2 to be released without any translations at all. This is fixed in 3.12-3, and I pulled the broken version. Sorry for any inconvenience.

vansid's picture

Is Sailfish 4.0.1 Koli supported in the current release?

direc85's picture

Yes, it is tested and supported! Even multi user devices are supported - every user gets their own charging settings :)

nthn's picture

Hello, please consider applying for translation hosting at https://hosted.weblate.org/, this will make it easier for people to translate your application.

direc85's picture

Thanks for the suggestion. I actually used Weblate when I participated in an another project a few days ago, and it sure looks nice!

moses_s's picture

The app still doesn't work properly on Sony Xperia 10 Plus (mine is the dual-sim model i4213) there is a bug since the Sailfish 3.4 updade (I am running v3.4.0.24 Pallas-Yllastunturi). The app does not stop the charging of the phone once "Pause charging limit" setting is met. Thanks.

direc85's picture

This should be fixed in 3.8-1. Is it fixed for you now?

moses_s's picture

Yes. Charging control works fine now in version 3.8-1, just like it used to in the old days :)

Thanks a lot Matti. Is there a way to support your efforts via contributions/donations?

Moses.

huggymann's picture

Yes, check the app description and lood for

buy me a coffee
huggymann's picture

Hello, i am using xperia x compact phone. the notifications are working fine but the automatic charging control does not. I restarted the service multiple time and restarted my phone as well. It always charges up to 100% . Any ideas what i am doing wrong?

i have sailfish 3.4.0.24

Regards

direc85's picture

This should be now fixed in version 3.8-1. Does it work for you?

Pages