Found some unused kindles while cleaning my house, so I decided to give them a new life.

Despite being old after many years, they still have very good batteries and displays – could be great devices for displaying informations, since it requires little to no power to display.

Kindle Wall Calendar

First idea came into my mind was about calendar – a wall calendar! Really a sweet memory when I was a kid, looking at the calendar everyday and learning new things from quotes written on it.

I was playing with my Kindles years ago – and for “playing” I mean hacking them. I’ve jailbroken all of them, installing custom softwares, controlling the display with eips and fbink, … so it shouldn’t be hard for me to transform a Kindle into a Wall Calendar.

Here you can find the tutorials and tools needed for jailbreaking Kindle ebooks, thanks for great efforts from those developers!

After jailbreaking, I can SSH into my Kindle. I also installed USBNetwork to access it via USB cable.

First things to do, since the calendar will be displayed in fullscreen, so we will need to hide the System UIs:

stop lab126_gui
stop x
stop otaupd
stop phd
stop tmd
stop todo
stop mcsd
stop archive
stop dynconfig
stop dpmd
stop appmgrd
stop stackdumpd

Doing that also helps reducing power consumption, keeping the ebook to run faster and last longer.

Getting the current date is quite easy, using the builtin date. I use also sed to take the week days, months,.. from text files, so I could change them easily later.

DAY=`sed "$(date +%u)q;d" weekdays.txt`
MONTH=`sed "$(date +%-m)q;d" months.txt`

Now the harder part: getting a random quotes from a text file, I take random data from /dev/urandom, and process it a little

RANDOM=`</dev/urandom sed 's/[^[:digit:]]\+//g' | head -n2 | tr -dc '0-9' | sed 's/[^0-9]*//g'`
QUOTE=`sed "${RANDOM}q;d" quotes.txt`

After that, we have everything to display. Just need to use fbink to draw them:

fbink -C GRAYE -O -m -t regular=$FONT,format "$DAY"
fbink -C BLACK -O -m -t regular=$FONT,format $(date +%-d)
fbink -C GRAYE -O -m -t regular=$FONT,format "$MONTH $(date +%Y)"
fbink -C GRAYE -O -m -M -t regular=$FONT,format "$QUOTE"

To lower battery usage, I’d like to re-draw the screen every 6 hours = 21600 seconds. With rtcwake, we can schedule it to wake up and re-draw.

rtcwake -d /dev/rtc1 -m no -s 21600

Finally, just put the device into sleep mode after scheduling

echo "powersave" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "mem" > /sys/power/state

Here is the result, from what I measured, it’s consuming about 1% battery everyday – So I only need to recharge it every 3 months!

Kindle Home Dashboard

It’s winter now, so it’s important not only to keep the house warm but also to heat only rooms I need. Especially when we’re having very expensive gas price right now.

In every room, I’ve installed a smart valve controller from Tado, and also placed thermometers from Govee. All thoses devices are connecting into my Home Assistant server. So basically, I could query informations from Home Assistant API, and display them on Kindle screen.

Re-using the script above, on each re-drawing, I tell Kindle to turn on wifi, connect to my network, then taking and displaying data from Home Assistant, and finally turn off wifi to save battery.

lipc-set-prop com.lab126.cmd wirelessEnable 1
udhcpc -i wlan0
STATUS=`lipc-get-prop com.lab126.wifid cmState`

Since it’s querying data from Home Assistant API, I could also taking weather forecast data, seems a pretty cool dashboard now!

PS: Source code could be found here on my GitHub