• Stars
    star
    301
  • Rank 138,451 (Top 3 %)
  • Language
    Shell
  • License
    MIT License
  • Created almost 4 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

How to build your own Kindle 4 photo frame displaying your Home Assistant Lovelace panel

Kindle 4 Non Touch Home Assistant Lovelace Dashboard

This repository gives details about how I built my own Home Assistant dashboard using an old Kindle 4 non touch.

A lovelace UI panel of your Home Assistant instance is rendered to an image and polled from a jailbroken Kindle 4 on a regular basis.

Outside photo

Software

I keep this short as I think this should be pretty straight forward.

  1. Set up Home Assistant on the platform of your choice.
  2. Set up the rendering software i.e. using docker, see my hass-lovelace-kindle-screensaver repository.

Hints:

  1. there's an eink HA theme inside the rendering software repository which you can configure for your newly created panel.
  2. I recommend installing this kiosk mode extension (i.e. via HACS) to remove the UI app header bar.

Finally, You should end up with a URL pointing to the exposed port of the rendering docker container to configure this on your kindle as described in the following section.

This URL needs to be plain HTTP as no TLS or SSL is supported by the Kindle 4. If your server is HTTPS only (which is a good thing!), I recommend using a free CDN like Hostry.

Hardware

While the software part should be the same for other Kindle models like the newer Paperwhites, the following section specifically addresses the Kindle 4 non touch. I've also primarily built it for an always powered device, but I assume it might be easily adapted to a battery powered use. PRs are welcome!

If you're using a Paperwhite, it's probably better to use the online screensaver extension. It uses features like rtcwake and upscript which are not available on the Kindle 4 NT out of the box.

Thus, a bit more work was necessary to get a reliable solution for a good Kindle 4 experience.

  1. Jailbreak your Kindle 4 Non Touch as described here.
  2. Install USBNetwork so that you can SSH into your device. See download including instructions here.
  3. Install Mobileread Kindle Kit (MKK) so that KUAL can be used. See download including instructions here.
  4. Copy KUAL v1 azw file into /mnt/us/documents as described here.
  5. Install kite so that we can start our script on each boot. See download including instructions here - you can simply use this prebuilt package for K4 OR SSH into your device and run the kite.sh from the kite.gz download.
  6. Clone this repository. Important for Windows users: ensure that the *.sh files have LF line endings and NOT CRLF.
  7. Set the variables inside this repository's extensions/homeassistant/config.sh.
    • If you want to run the device on battery, I recommend increasing the INTERVAL (so that it suspends longer) and decrease DELAY_BEFORE_SUSPEND so that the (artificial) delay between drawing the image and suspending is as low as possible. But please keep in mind that this wasn't what I've built the script for. E.g. the online screensaver extension supports configuring a scheduler to run less frequent at night and save battery.
  8. Copy homeassistant and kite folders from this repository into /mnt/us/ on the device.
  9. Reboot your device and the script should run 2 minutes after booting up via kite. That's it.

Changing config or debugging

There are two possibilities to SSH into your Kindle to change your config or debug if something didn't work as expected.

  1. The extensions/homeassistant/startup.sh sleeps 2 minutes until it starts the daemon on boot. On boot, you have time to SSH into your kindle.
  2. After drawing the image, the extensions/homeassistant/script.sh sleeps a short time until it suspends - see the DELAY_BEFORE_SUSPEND config option. This gives you time to SSH into your device and stop the daemon using sh /mnt/us/extensions/homeassistant/daemon.sh stop.

For debugging purposes, LOGGING can be configured to 1 so that an extended log is written to extensions/homeassistant/homeassistant.log.

Photo frame

Similarly to this project, I've bought a 13x18 cm photo frame from an online store over here in Germany.

My wife and I removed the front cover of the Kindle 4 and also decided to remove the mainboard from the frame as there wasn't enough space to plug a Micro USB cable into the device's bottom while keeping it centered. A 90 degree adapter might be a better choice, also depending on the exact size of the frame.

The following photo should demonstrate it. The connectors beetween the battery and screen are the most important, the ones of the side buttons are not required. Of course, the photo also clearly indicates that we're both software developers...

Inside photo

My sources and similar projects

The following two projects were my inspiration and I've also used them for quite some time. However, manually rebooting or charging the device was necessary too often and would've never gotten an approval by my parents.

More Repositories

1

hass-lovelace-kindle-screensaver

This tool generates a png from a Home Assistant Lovelace view, which can be displayed on a Kindle device which has the Online Screensaver plugin installed.
JavaScript
315
star
2

hass-kindle-screensaver

This server generates a png with content fetched from Home Assistant, which can be displayed on a Kindle device which has the Online Screensaver plugin installed.
JavaScript
57
star
3

wohnung-scraper

A web application which scrapes several German real estate listing websites and visualizes offers in a map.
JavaScript
54
star
4

sachsen-impfnotifier

Tool that checks the vaccination portal of Saxony for available appointments for specified vaccination centres.
JavaScript
35
star
5

ParkenDD

ParkenDD for Windows 10
C#
19
star
6

fitbit-qrcodes

Fitbit app to display QR codes, which can either be generated or imported from screenshots.
JavaScript
9
star
7

Windows-Phone-Page-Flyout-Animations

This animation helper allows you to easily embed the animations, known from the Windows Phone mail app when submitting, editing or deleting an email.
C#
8
star
8

SynGestures

A tool to bring more gestures to your Synaptics touchpad.
C#
8
star
9

OneNoteMathType

This C# application replaces all $$\mathcal{E}quation \in TeX$$ with their MathML code in the current OneNote 2010/2013 page via MathType SDK.
C#
5
star
10

Pushalot-PHP

PHP Class for Pushalot.com
PHP
5
star
11

home-assistant-chatgpt-plugin

ChatGPT plugin for Home Assistant
Python
3
star
12

WolframCortana

This app is basically a connection between Cortana and the Wolfram Alpha app for Windows. It forwards Cortana queries to the Wolfram Alpha app, as the app has no own Cortana integration unfortunately.
C#
2
star
13

blinkist-podcast-server

Access Daily Blinks from Blinkist in a Podcast feed provided by this server.
JavaScript
2
star
14

airbnb-review-summarizer

This tool fetches the user reviews from Airbnb listings and summarizes it using a LLM.
JavaScript
2
star
15

matrix-bot-media-fetcher

A Matrix bot which downloads all media from the rooms it's invited to.
JavaScript
1
star
16

My-Packages

These scripts help installing and updating specific packages by using the PackageManagement of Windows 10's PowerShell
PowerShell
1
star
17

realtime-planning

JavaScript
1
star