GithubHelp home page GithubHelp logo

pascalw / kindle-dash Goto Github PK

View Code? Open in Web Editor NEW
1.2K 17.0 34.0 1.12 MB

Power efficient dashboard for Kindle 4 NT devices

License: MIT License

Makefile 15.02% Shell 69.10% Rust 15.88%
kindle jailbreak

kindle-dash's Issues

How to disable kindle-dash?

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?

Failed to download image

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```

Render to png

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

Changing low-battery.sh to turn off the kindle and then ensure dash.sh/start.sh runs on boot

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:

  1. a message appears when the battery is low (this seems ok following this advice #13)
  2. if battery is very low, the kindle powers down, leaving the image currently on the screen in place (can I just use sudo shutdown -h now in low-battery.sh inside a conditional with a threshold of, say 5?)
  3. dash.sh/start.sh runs at startup (can I use standard linux commands such as crontab? if so I would just run /mnt/us/dashboard/start.sh at reboot - based on this thread it seems that crontab works on the Kindle 3 so hopefully 4 as well https://www.mobileread.com/forums/showthread.php?t=156472)

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 kindle is in RTC sleep it cannot be charged

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

fetch_dashboard.sh to check ETag?

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.

Question: Battery life?

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?

Image aspect ratio morphed/incorrect

First of all: excellent software!

I created a simple python script to create images to display. Unfortunately, the image is somehow morphed:
IMG_20210216_220700

This is the displayed file:
db

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 :)

xh segfaults on download

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.

Cron format has an unusual number of columns

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.

wait-for-wifi.sh not working reliably when called from dash.sh

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!

Move next_wakeup_secs to local

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

Print last updated time and battery percentage onto the dashboard locally

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.