pascalw / kindle-dash Goto Github PK
View Code? Open in Web Editor NEWPower efficient dashboard for Kindle 4 NT devices
License: MIT License
Power efficient dashboard for Kindle 4 NT devices
License: MIT License
Thank you for all the work on the project so far
I need to temporarily disable kindle-dash and get the regular kindle functionality, how would I go about doing that?
Is it possible to add support for other Linux based e-readers such as Pocketbook 903 and 912?
They run Linux
Just tried the latest release, all was fine, but it failed to download the image
This line appears to be incorrect: $(dirname "$0")/../ht"
Logs are as follows:
Partial screen refresh
eips: paint_image> cannot open "./dash.png":can't fopen
Going to suspend, next wakeup in s
Wed May 25 12:06:42 UTC 2022 Battery level: 97%.
./dash.sh: line 111: ./next-wakeup: Permission denied
sh: 3600: unknown operand
Refreshing dashboard
Wi-Fi connected
./local/fetch-dashboard.sh: line 4: ./local/../ht: not found
Partial screen refresh
eips: paint_image> cannot open "./dash.png":can't fopen```
Hello,
You mention:
In my case I use a dashbling dashboard that I render into a PNG screenshot on a server.
What do you use to render the dashbling output to PNG?
Thank you very much for this project!
Cheers,
Kiru
Currently if my Kindle loses power while running the script it will go to the standard "Kindle Out Of Power - Please Recharge Now" screen. Then when I recharge the Kindle, it does not turn on and automatically run this script. Instead it goes back to standard 'book mode' (hopefully this makes sense!)
The functionality I would like in low-battery.sh is:
sudo shutdown -h now
in low-battery.sh inside a conditional with a threshold of, say 5?)As I've written this I feel I've answered some of my own questions but I'll leave this here as I'm interested to know if this sounds like the best approach and what the right way of turning off the kindle is
Thanks!
When my kindle is in RTC sleep it cannot be charged. It is charging only when is wakeup.
So please implement feature that kindle is not going to RTC sleep when it is charging and allow sleep only in memory (like in DEBUG)
power status - if it is charging can be determine by this command:
lipc-get-prop com.lab126.powerd status
Related to #2, someone on HN mentioned that you may be able to increase battery life by checking the ETag and not running eips
if the tag has not changed.
I really appreciate this project. Thank you for sharing! If you have a second I'm really curious what the battery life has been doing this? Or have you kept it plugged in?
First of all: excellent software!
I created a simple python script to create images to display. Unfortunately, the image is somehow morphed:
I tried to load it directly from my python script aswell as directly from nginx and in both cases the image was morphed.
Would be nice if you have an idea on how to fix this :)
I'm trying to set this up on my Kindle Keyboard running a 3.4.3 (recently jailbroken).
Running from your latest release v1.0.0-beta.4
.
From the kindle, if I try to use xh -o outfile url
I get a Segmentation Fault. I believe I've tried it will all the options you use in your example download script in local
. I can run 'xh --help` and the binary does run, it just fails when I try to download. I can see if there is a verbose option that might help, but what is your source for xh? I wonder if there are other / newer / different versions that might be more compatible with my older device.
I wrote a small python script to verify I CAN download PNGs, at least from a local server via http
. Maybe your 'xh' isn't compatible with Kindle 3.x devices? If I get this all running, I can share my python download script to possibly replace xh
which is likely a bit more cross-device compatible.
The example cron schedule is 0 2,32 8-17 * * 2-6
, but... this has six columns, where a cron schedule is usually 5 columns.
Plugging this into crontab.guru results in a red mark and no text output.
I think the leading 0 is the issue here. If we erase that, then we get a cron schedule that sounds reasonable for a dashboard.
First of all, thanks for this cool utility! I've had a lot of fun setting it up and playing around with the possibilities.
I'm using a Kindle Keyboard 3G (k3g, US model) and I noticed some strange behavior around the wait-for-wifi.sh
script. For some reason, only when called in the context of dash.sh
, it hangs and never makes it to the point of downloading the dashboard.
It seems like something is funky in the while
statement in wait-for-wifi.sh
. I tossed in some debug statements:
ping -c 1 $WIFI_TEST_IP >/dev/null 2>&1
while [ $? -ne 0 ]; do
echo $?
...
echo "Trying again"
sleep 1
/bin/ping -c 1 $WIFI_TEST_IP >/dev/null 2>&1
done
But when I tail the logs, I see this:
[root@kindle dashboard]# tail -f logs/dash.log
Starting dashboard with 0 2,32 9-19 * * * refresh...
system: I framework:def:stopping booklet framework
Sun Jan 31 15:44:57 2021 INFO:battery charge: 91%
Sun Jan 31 15:44:57 EST 2021 Battery level: 91%.
Refreshing dashboard
0
Trying again
0
Trying again
What's really strange here is that calling the script directly yields no issues:
[root@kindle dashboard]# ./wait-for-wifi.sh
./wait-for-wifi.sh
Wi-Fi connected
For now I'm working around this by just stopping wait-for-wifi.sh
from being called inside dash.sh
which is totally fine, but I'd be curious if you have any ideas of what might be going on.
Thanks!
Please move next_wakeup_secs
method to local
directory for user/kindles (like fetch-dashboard.sh
that cannot use next-wakeup
binnary (eg. my kindle DXG). So users can implement own logick for next wakeup (e.g. hadcoded interval)
Maybe i will post PR for this issue later
Just an idea, but it would probably be nice to be able to see the battery percentage on the kindle dashboard... at which point, I thought "why not have the last update time shown as well?"
I added this to the refresh_dashboard
function locally:
/usr/sbin/eips 1 39 "last update: $(date -Iminutes) battery: $(gasgauge-info -c | sed 's/%//g')"
Unfortunately, the built-in busybox
date
utility is extremely limited, so this is printing in UTC time (and not in a very nice format to begin with) and I also discovered that eips
can't print the %
symbol, apparently, so I'm using sed
to strip that out.
Obviously a lot of room for improvement, which is why I didn't open a PR, but I figured I'd at least mention the idea.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.