![]() |
#1 | |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 523
Karma: 64554
Join Date: Aug 2013
Device: Kobo Glo, GloHD
|
Mesure battery duration for KSM
The goal was, as I wrote at an older Koreader's forum post:
Quote:
And since nobody improved the original script, I had to learn a bit about bash and try to improve it myself. So I did, and this is the outcome. DISCLAIMER - USE AT YOUR OWN RISK I'm using this with Kobo Glo (non-HD), KSM7 and Koreader v2015.11-11-g16509e2. It should work with other configurations too, but I can't be sure about the KSM8 before someone else try it. UPDATE: For KSM8 files and instructions, please read the 2nd post from tshering. INSTALL FOR KSM7 There is a KoboRoot.tgz in the KSM07_uptimeX_0x.zip The steps are:
The KoboRoot.tgz archive contains a modified poweroff.sh script that will be copied to the "\.adds\kbmenu\onstart\" directory and the show_uptime.sh and delete_uptime.sh scripts that will be copied to the "\.adds\kbmenu\scripts_intern\returntests\" directory. That's it! After that, every time you shut down the device (really shut down, not suspend) it will add a line to a uptime.txt file that it will be created in the "\.adds\kbmenu\logs\" directory. This line will be in the form of: Code:
2016:03:08_19:59, 0:00:11:58 total: 52992 bat: 78 Whenever you want to check the status you have to goto KSM and navigate to scripts>tests>returntests.msh and execute the "show uptime.sh" script. You will get a reading of: Uptime: 0:00:01:56 Total time: 0:14:06:23 Battery charge: 65 Battery spend: 22 If you want to restart the measurements (after a partial or complete charge) you have to execute the "delete uptime.sh" (found in the same place) which deletes the uptime.txt. You have to restart the device after that to start fresh. The "Battery charge" and the "Battery spend" sum is the battery level of the device when the uptime.txt was re-created. If anybody that is more knowledgeable than me with bash (almost everybody ;o) can improve the scripts, please do so and post the updates here. After two complete battery cycles, I'm in a happy position to announce that my Glo's battery is enough for more than 2 days of continuous reading: 2 days with 76 shutdowns and 2 days and 4 hours with 56 shutdowns. I'll keep on measuring a bit more before coming to a conclusive number, but its much better than I thought. ...and have a nice read too... Edit1: Uploaded a zip file, since .7z files are not supported ... Edit2: Instruction for Koreader support. Last edited by embryo; 09-21-2017 at 04:02 PM. |
|
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
|
embryo, thank you for the nice contribution!
Here is the version for KSM 08. How to install:
The navigation path to the two scripts is: (KSM home) "user scripts" > "tests" > "returntests user.msh" I renamed show_uptime.sh and delete_uptime.sh to uptime_show.sh and uptime_delete.sh so that they are displayed next to each other in the list. These two files should work on KSM 07 too (at least when started via the menu; when starting them from telnet one has to set and export the variable "ksmroot"). The KSM 08 version of the script poweroff.sh must not be used under KSM 07 however! Note: Looking at the screen shot again I notice that "battery spend" sounds strange. Last edited by tshering; 05-13-2016 at 03:58 PM. |
![]() |
![]() |
Advert | |
|
![]() |
#3 | |||
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 523
Karma: 64554
Join Date: Aug 2013
Device: Kobo Glo, GloHD
|
Quote:
I'll link your post from the first post Quote:
I think its dangerous to have the delete script next to the script that you use all the time. Its a mistake waiting to happen... Quote:
Remember this is measuring the consumption of the "Total time" not how much is missing from the 100% It should change. If it doesn't, then there is something different in the environment variables of the touch (which I highly doubt) BTW Do you thing I should provide a KoboRoot.tgz for installation? Last edited by embryo; 05-12-2016 at 07:02 PM. |
|||
![]() |
![]() |
![]() |
#4 | |||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
|
Quote:
Quote:
Quote:
Update: I modified poweroff.sh. I expect it to work on 07 (update 4) and 08. I did not test it, since I do not have a Kobo with me. I will test it under 08 this evening. We could use the same installation package for 07 and 08, if we do not care that poweroff.sh will be copied to two different locations. -We could get rid of the unnecessary file afterwards with the help of udev/rules.d, but I do not care for the moment. Last edited by tshering; 05-13-2016 at 04:49 AM. |
|||
![]() |
![]() |
![]() |
#5 | |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 446
Karma: 1084584
Join Date: Aug 2007
Location: Sisak, Croatia
Device: Kobo Aura H2O, Kobo Aura ONE
|
Quote:
Shutting device off in a way is "safe" to maximize battery life, you can't have more than that. But, suspending device could have problems, device maybe wouldn't go completely to sleep, or whatever is reason that battery drains much faster than normal. |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |||
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 523
Karma: 64554
Join Date: Aug 2013
Device: Kobo Glo, GloHD
|
Quote:
Its more logical. I changed it after an "accident" happened. Quote:
I like the "discharge" version. Maybe some native English speaker can enlighten us? Quote:
I tried the poweroff.sh and it works with my KSM7 Glo. I agree to use one package for everything. It makes things easier for everybody. I can rename the scripts the more "logical" way. The existence of an extra file that nobody uses is no problem I think. But maybe there is a difference in the other script's location too. From your KoboRoot.tgz structure I can see that they must be copied to the kbmenu_user folder and not to the kbmenu that the KSM7 uses. Is this going to impose any more problems? |
|||
![]() |
![]() |
![]() |
#7 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 523
Karma: 64554
Join Date: Aug 2013
Device: Kobo Glo, GloHD
|
|
![]() |
![]() |
![]() |
#8 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
|
Quote:
As for suspend, we could use preventfreeze.sh to log this and whether nickel, KOReader or PbChess was running. |
|
![]() |
![]() |
![]() |
#9 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 523
Karma: 64554
Join Date: Aug 2013
Device: Kobo Glo, GloHD
|
Updated the archive for the KSM7 installation with the tshering's newer poweroff.sh script (1st post).
|
![]() |
![]() |
![]() |
#10 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
|
Updated the archive for the KSM8 (2nd post).
|
![]() |
![]() |
![]() |
#11 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 446
Karma: 1084584
Join Date: Aug 2007
Location: Sisak, Croatia
Device: Kobo Aura H2O, Kobo Aura ONE
|
If you find way for measuring suspended time, please inform and update script.
And about message, battery spent is correct. But it can be also discharged, it isn't that important. Last edited by Alan_S; 05-14-2016 at 11:51 AM. |
![]() |
![]() |
![]() |
#12 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 523
Karma: 64554
Join Date: Aug 2013
Device: Kobo Glo, GloHD
|
Koreader support
I wrote some instructions for using the uptime.sh script with KoReader.
I tested them with KSM7 and it *should* work with KSM8, but if someone try it, please post the results. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
USB identification with KSM | Jellby | Kobo Developer's Corner | 4 | 01-09-2015 07:30 AM |
Greetings from KSM | ksmurali | Introduce Yourself | 4 | 05-25-2011 04:35 AM |
iPad What battery duration do you experience? | mgmueller | Apple Devices | 29 | 06-03-2010 05:25 PM |
DR800 battery duration (and message deleted in iRex Forums) | rfog | iRex | 3 | 01-19-2010 09:13 AM |
Iliad battery duration is better? | fdojose | iRex | 1 | 02-08-2008 02:37 PM |