05-28-2024, 10:43 PM | #1336 |
Member
Posts: 17
Karma: 164
Join Date: Sep 2010
Device: Kindle Oasis/Kobo Libra Colour
|
Love this little app - I have a quick question: In my settings, I have wifi on/off -- it takes a while for the wifi to make a connection with my saved WiFi networks. Is this normal behavior in NickelMenu? It's PDQ when not using NickelMenu and simply turning on the Wifi option.
Also, is there a string to be used to auto-connect when I click the sync button or whenever I use something that needs wifi, similar to auto USB connect without the prompt? |
05-30-2024, 05:19 PM | #1337 |
Wizard
Posts: 1,159
Karma: 13621998
Join Date: Sep 2022
Device: Kobo Libra 2
|
I made an update for my battery statistics calculation script. It now also calculates the remaining percentage from the battery's voltage, which I've found to be a more reliable capacity indicator than either the mAh-based estimate or Nickel's built-in estimate. I removed some trailing zeroes on the voltage line to make more room for displaying the extra statistic. Here's the new script:
Code:
# Battery Statistics Calculator 1.1 (2024-05-25) by Aleron Ives # # This script calculates battery statistics for the Kobo Libra 2. # Check the contents of /sys/class/power_supply/ if you use a different # model to ensure that the statistics you want to track are available. # # You can use NickelMenu to invoke this script like so: # menu_item :main :Battery :cmd_output :500 :/mnt/onboard/.adds/battcalc.sh # Gather the necessary statistics meter=$(cat /sys/class/power_supply/battery/capacity) v_now=$(cat /sys/class/power_supply/battery/voltage_now) v_min=$(cat /sys/class/power_supply/battery/voltage_min) v_max=$(cat /sys/class/power_supply/battery/voltage_max) c_now=$(cat /sys/class/power_supply/battery/charge_now) c_full=$(cat /sys/class/power_supply/battery/charge_full) c_dfull=$(cat /sys/class/power_supply/battery/charge_full_design) # Format the statistics let v_pct=$v_max-$v_now; let v_pct/=7000 # Calculate charge percentage from V let v_pct=100-$v_pct # " let v_now/=1000; let v_min/=10000; let v_max/=10000 # Convert to V let c_now/=1000; let c_full/=1000; let c_dfull/=1000 # Convert to mAh let v_nowr=$v_now%1000; let v_now/=1000 # Simulate floating-point arithmetic let v_minr=$v_min%100; let v_min/=100 # " let v_maxr=$v_max%100; let v_max/=100 # " let charge=$c_now*100/$c_full # Calculate charge percentage from mAh let c_health=$c_full*100/$c_dfull # Calculate health percentage from mAh # Display the results echo Capacity: $c_now mAh / $charge% / $meter% echo Voltage: $v_min.$v_minr V / $v_now.$v_nowr V / $v_max.$v_maxr V / $v_pct% echo Health: $c_full mAh / $c_dfull mAh / $c_health% |
05-30-2024, 06:15 PM | #1338 | |
Connoisseur
Posts: 76
Karma: 348662
Join Date: Jan 2023
Location: Indonesia
Device: Kobo Clara 2E
|
Quote:
What number of v_pct divisor for Clara 2E (3.7 V)? Thanks Last edited by hatuluang; 05-30-2024 at 07:05 PM. |
|
05-30-2024, 07:01 PM | #1339 |
Wizard
Posts: 1,159
Karma: 13621998
Join Date: Sep 2022
Device: Kobo Libra 2
|
Enable telnet with devmodeon, cd into /sys/class/power_supply/ and use the ls command to see what's there. You can use cat to view the contents of the various statistics.
|
05-30-2024, 08:42 PM | #1340 | |
Connoisseur
Posts: 76
Karma: 348662
Join Date: Jan 2023
Location: Indonesia
Device: Kobo Clara 2E
|
Quote:
I am using your nm syntax (https://www.mobileread.com/forums/sh...&postcount=993) to get /sys/class/power_supply/ and compare to your latest battery calculation (image attached) The difference in current voltage is 4.11 vs 4.10, while the calculated percentage by dividing (current capacity / maximum capacity) is 81% So it is ok to use battery calculation for Libra to Clara 2E or does it need to be changed? Thanks |
|
05-30-2024, 08:50 PM | #1341 |
Wizard
Posts: 1,159
Karma: 13621998
Join Date: Sep 2022
Device: Kobo Libra 2
|
Oh nice, it seems the Clara 2E has all the statistics, too.
It looks like v_max is the same (4.2 V), but v_min is not (3.6 instead of 3.5 V). You should change the v_pct divisor from 7000 to 6000. I do wonder if the Libra 2 reports v_min incorrectly. I've noticed that the charge drops off rapidly below 3.6 V, so perhaps 3.52 V is not the real minimum. |
05-30-2024, 09:50 PM | #1342 | |
Connoisseur
Posts: 76
Karma: 348662
Join Date: Jan 2023
Location: Indonesia
Device: Kobo Clara 2E
|
Quote:
Please find the results with v_pct divisor = 6000 Last edited by hatuluang; 05-30-2024 at 10:00 PM. |
|
05-30-2024, 10:38 PM | #1343 |
Wizard
Posts: 1,159
Karma: 13621998
Join Date: Sep 2022
Device: Kobo Libra 2
|
It's good to see that the Clara 2E also reports nonsensical voltage values sometimes. If your battery were really at 4.6 V, your Clara would probably be on fire. The middle value should always be between 3.6 and 4.2, but sysfs doesn't always report real numbers, especially during charging.
|
05-30-2024, 10:51 PM | #1344 | |
Connoisseur
Posts: 76
Karma: 348662
Join Date: Jan 2023
Location: Indonesia
Device: Kobo Clara 2E
|
Quote:
|
|
06-02-2024, 02:43 PM | #1345 | |
Junior Member
Posts: 5
Karma: 10
Join Date: May 2024
Device: Kobo Clara BW
|
Hello,
I've been poring over the NM guides, but I haven't been able to find a clear answer: is there a way to display a confirmation dialog in NickelMenu before an action takes place? For example, with the "power : reboot" command, is there a way to display a dialog that asks you to confirm or cancel the reboot, and then have a chain_success/chain_failure that then takes (or doesn't take) the action? Something like this: Quote:
|
|
06-02-2024, 02:49 PM | #1346 |
Wizard
Posts: 2,762
Karma: 6990705
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
|
Not in the current form where all actions are synchronous. For now, the recommended way is to use NickelDBus with a shell script and cmd_spawn.
|
Yesterday, 08:58 AM | #1347 |
Addict
Posts: 204
Karma: 20980
Join Date: Oct 2020
Device: Kobo Aura One, Aura HD (R.I.P.) :(
|
But it would be awesome if you could have a start sync in NickelDBus...
Last edited by Rid; Yesterday at 09:18 AM. |
Yesterday, 10:29 AM | #1348 | |
Connoisseur
Posts: 76
Karma: 348662
Join Date: Jan 2023
Location: Indonesia
Device: Kobo Clara 2E
|
Quote:
However, for this sample, the objective of having a reboot command in Nickelmenu is for the user to be able to reboot their device easily rather than take a manual reboot with the power button. |
|
Yesterday, 10:41 AM | #1349 | |
Connoisseur
Posts: 76
Karma: 348662
Join Date: Jan 2023
Location: Indonesia
Device: Kobo Clara 2E
|
Quote:
Last edited by hatuluang; Yesterday at 10:47 AM. |
|
Yesterday, 05:42 PM | #1350 | ||
Junior Member
Posts: 5
Karma: 10
Join Date: May 2024
Device: Kobo Clara BW
|
Quote:
I'm attempting to create a shell script like you mentioned, but i can't seem to get NickelDBus to actually *do* anything after the dialog box appears. Here's the text of the script as I've got it: Quote:
(Sorry if this is the wrong thread--the NickelDBus thread hasn't been posted in for like two years, and I didn't want to necropost...) |
||
Tags |
kobo, launcher, ldpreload, nickel |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Kobo eReaders and Heat | PeterT | Kobo Reader | 13 | 08-02-2014 04:35 AM |
kobo arc launcher not working | lana loves books | Kobo Tablets | 8 | 03-21-2014 06:40 AM |
Orginization on kobo ereaders | crochetgeek2010 | Kobo Reader | 7 | 09-03-2013 02:13 PM |
Kobo Announces eReaders Available for Purchase on Kobo.com in Canada and US | markemark | News | 1 | 04-02-2013 01:46 PM |
Ereaders with Integrated Dictionary | poohbear_nc | Which one should I buy? | 4 | 04-08-2010 06:42 AM |