Battery Log and Amazfit do not work on SFOS 4

My problem is, that after Update on SFOS 4 some apps not complete work and no update is available. I think it is the new sandboxing and the not exist statefs. Why ist statefs obsolate since 4.0.1.24?
For me not work follow important apps:
Battery log: no rest time possible (I also not understoud why this function not implement in SFOS 4)
Amazfish: no calendar on the watch
Can anybody give me an workarraound (maybe install the old statefs and a line to give the Amazfitapp access on the calendar)?
Some other apps are also affected in the jolla store. In my opinion should someone check before rollout a new SFOS update. :frowning:

2 Likes

re th calendar/events in Amazfish: I know @piggz is aware of it

Hi,

I have done some work with Batterylog, the results of which are currently available for testing here:

https://build.sailfishos.org/package/show/home:nephros:devel/harbour-batterylog

with source code here:

Changes to latest version:

  • read charge state from BMS sysfs files
  • ^^^ this restores the logging and the graph, BUT it now logs Charge instead of Energy
  • remove StateFS bits (which has been removed in SFOS >= 4.0)
  • compute “Energy” from charge and OCV voltage, like it was done in StateFS.
  • all references in the UI to “Energy” in [Wh] are not read from the battery but calculated using the current Charge ([mA]) and battery Voltage. ~This will be has always been somewhat inaccurate depending on how much the Voltage changes over time.
  • various small UI changes
  • use proper plurals in translations :wink:
  • added some things which can be read from the BMS in addition to Charge

Notes:

  • You MUST clear the database if you had Batterylog 1.3 one of my testing builds installed to get a meaningful graph. This is because BL now stores completely different values than previously. You can do that from the UI using Pulley Menu → Settings → Clear Logs
  • The prediction calculations have not been reviewed, they may or may not give meaningful or realistic times.
  • Tested on a couple of Xperia devices, including Xperia 10 (one), XA2, 10ii aarch64. Will probably not work on other devices which do not have /sys/class/power_supply/bms- reports of working/nonworking devices welcome.
  • The repo above is my development build space. I update it at random times with random changes. Things may break or start or stop working with each package. Also, you probably shouldn’t use any other packages from the repo…

I do not consider myself the new maintainer of this program. I merely tinkered a bit. I have not decided whether I will make a “official” release available at some point - but I will for sure not take over the version from the Jolla Store.

In case someone would like to take maintainership to do that they are more than welcome to do that, with or without my changes.

4 Likes

with the new version of Amazfish (available in Chum), the reminders of calendar entries are now also displayed. you should just be careful with all-day events to move the reminder forward. otherwise you always have fun at midnight when the clock starts to vibrate.

Thanks I had installed this since one week, but now I have problems with the GTS. If I sync the company calendar via exchange the GTS restartet some times and after this I have no events on the watch. It shows “no calendar app active”. I cannot find the reason. Maybe is the company calendar too big for this or the serial events makes trouble? No Idea. If I unshow the exchange calendar it works with the local and birthday calendar?

So my calendar/ contacts etc. is syncronized by the Nextcloud. on the GTR 8 appointments are shown in the preview. Also series appointments are included. Birthdays etc are also displayed as a reminder on the clock. As I said all my appointments are brought by the Nextcloud on my phone. These are also available after a manually triggered restart. whether it is now because the clock does not have enough memory for very very many appointments, I can unfortunately not say.

Well, let’s see, maybe in a few days. I’ve had this before with an older version on my Xperia 10 4.0 and then suddenly it worked. I’ll delete and test a few series invitations.

I have just “released” harbour-batterylog-1.4.0-1.22.1 at the above location.

This now again uses and stores “Energy”, not charge in the log and graph.
To do that I have tried to replicate the energy calculation from the StateFS source code, so in theory it should work the same as the old version (1.3.2).

IF you had one of my testing packages installed, do clean out the log database again after installing 1.4.0-1.22.1 or higher.

Known issue:

  • on XA2, /sys/class/power_supply/battery/charge_now_raw sometimes shows negative values, which approach and go above zero when charging. My own Xperia 10 does not do that. If someone knows how to correctly read sysfs on the XA2 (and similar), that info would be appreciated.
4 Likes

Thanks for your work on Battery Log @nephros. Your contributions are very nice improvements. Especially 1.4. I was unable to find if you accept donations and bug reports?

You’re welcome :slight_smile:

Donations are not required. If you want to contribute monetarily, please donate to someone like the FSF(e), EFF, NYOB or similar freedom-fighting organizations. Or buy another Sailfish OS license from Jolla - they do keep this community alive after all – despite all grievances.

I do appreciate bug reports, any other suggestions and especially patches/merge requests. For now, you can find the source code at Gitlab (linked above), which also has spaces for reporting issues and such.

1 Like

Also from me many Thanks!!! Nice that we found here so easy solutions. For me is the 1,4 not optimal because I am 50+ :rofl: :rofl: an with the biggest Font are the textes to near on the border of the display. I use the version 1.3.2. This is perfekt for a long phone like 10ii.

1 Like