Kindle Liberation (Part 3): The Home Assistant Dashboard

This whole series of posts about jailbreaking old Kindles started because I wanted a dashboard that showed a constantly updated live calendar for my office door at work.

I decided to build the pipeline myself: Home Assistant → Rendered Image of Dashboard → Kindle Screensaver.

Luckily I didn’t have to build this all from scratch. Some geniuses have already done a lot of the hard work on the individual pieces. I just needed to glue them together to get what I wanted. There are a lot of moving parts to this particular implementation, though.

1. The Setup (HACS & The Tools)

Before we build the visuals, we need the plumbing.

  • Install HACS: If you haven’t yet, install the Home Assistant Community Store. This is our gateway to community-made tools.

  • Add “Daylight Calendar” & “Kiosk Mode”: Through HACS, search for and install Daylight Calendar (for a flexible calendar) and Kiosk Mode (which we’ll use to strip away the Home Assistant header/sidebar so only your dashboard remains).

  • Connect Google Calendar: Go to Settings > Devices & Services > Add Integration > Google Calendar. Follow the prompts to authorize your account. At some point you’ll get the dreaded “Google hasn’t verified this app “warning”. To move forward you much click the tiny “Advanced” link and then “Go to home-assistant.io (unsafe)” to authorize it. If you agree that Home Assistant can access your calendar, go ahead and link the account. You now have calendar entities ready to display!

2. Building the “Office Door” Dashboard

We aren’t going to use your main dashboard for this. We want a clean slate.

  1. Create a New Dashboard in Home Assistant (go to Dashboards and click the +).

  2. Set it to “Panel (single card)” (this makes one card fill the whole screen). Give it a name and click save.

  3. At the bottom left, click “+ Add Card” and select the Daylight Calendar Card. I played around with the colors until I found something that looked nice, but also rendered to greyscale well. Here are my settings, which you can just paste in by clicking “Show code editor” at the bottom left of the Daylight Calendar card.

title: Dr. Harris's Live Availability Calendar
entities:
  - calendar.calendar
default_view: week-standard
first_day_of_week: 1
week_days:
  - 1
  - 2
  - 3
  - 4
  - 5
week_start_hour: 8
week_end_hour: 18
lock_schedule_hours: true
hide_the_past: false
past_event_mode: muted
disable_swipe_controls: false
show_all_events_month: false
show_all_details_month: false
hide_empty_days: false
agenda_compact_events: false
compact_width: false
show_current_time_bar: true
show_event_location: false
use_short_location: false
event_location_font_size: 28
background_opacity: 100
header_background_opacity: 100
event_calendar_friendly_name: false
event_title_prefix: none
combine_style: bars
combine_background: primary
event_color_mode: left-tint
event_neutral_background: "#F8F3E9"
event_tint_opacity: 0
event_color_bar_width: 18
hide_calendars: true
hide_year: true
hide_controls: true
hide_navigation_buttons: true
hide_add_event_button: true
hide_view_selector: true
hide_dark_mode_toggle: false
show_dashboard_nav_button: false
header_dashboard_path: null
header_weather_sensor: ""
calendar_person_entities: {}
color_scheme: light
enable_event_management: false
type: custom:daylight-calendar-card
compact_height: true
event_font_size: 28
event_time_font_size: 32
rolling_days_week_compact: 3
rolling_days_schedule: 3
rolling_weeks: 1
hide_calendar_names: true
compact_header: true
show_week_numbers_month: false
hide_event_calendar_bubble: false
hide_times_for_calendars: []
use_24hr_schedule: false
combine_calendars: false
colors:
  calendar.adam_sheekgeek: "#2e2e2e"
  calendar.calendar: "#2e2e2e"
background_transparent: true
header_background_transparent: true
event_font_colors:
  calendar.calendar: "#ffffff"

3. The Bridge: Snapshotting the Dashboard

Ok, so we’ve connected our Google Calendar and now have a nice calendar dashboard, we need to preprocess it, then send it to the kindle.

With this particular screensaver method, the Kindle doesn’t “know” what Home Assistant is, it just wants to download an image file from a certain web address. We need Home Assistant to take a “screenshot” of your dashboard and save it as a file. This is a multi-step process however.

  1. Lovelace Kindle Screensaver: We need to install this as an “App” in Home Assistant.

    • Go to Settings–>Apps, then click “Install App” at the bottom right and install Lovelace Kindle Screensaver. This will take a snapshot of any dashboard we want, convert it to greyscale (something appropriate for the kindle) and serve the image at port 5000 on the Home Assistant IP address. Once installed, you should see a new entry on the left side column of your Home Assistant. Don’t click it yet though, we need to set it up first.

    • Once installed, go to its Configuration tab by going to Settings–>App–>Lovelace Kindle Screensaver and then click the “Configure” icon in the top bar. Set HA_BASE_URL as http://homeassistant.local:8123
    • Set HA_SCREENSHOT_URL to the specific dashboard you want to convert. Just view your card in a new browser window to get the path. Strip out the base IP info and append ?kiosk to remove the home assistant bar. Mine is as follows:
      /work-office-door-kindle/calendar-week?kiosk
    • Get your Long-Lived Access Token by clicking your user profile icon in the bottom left of Home Assistant, selecting the Security tab, scrolling to the bottom, and creating a new token. Copy and paste that into the configuration.
    • Finally, set the cron job time to tell it how often to run this app. Use */15 * * * * for 15 minutes. (Must keep the asterisks!!!). In linux, a cron job is a task that runs automatically at certain times.
    • Change the rendering screen height and width to match your specific Kindle resolution (mine is 1448 x 1071) and set the rotation to 90 degrees if you want it in landscape. Ensure the output format is set to PNG. Save and start the add-on.
  2. The Snapshot Automation: Because Home Assistant add-ons run in isolated Docker containers, your Kindle can’t easily fetch that raw image directly from port 5000 over a secure remote connection. We need an automation that regularly grabs the image from port 5000 and drops it into Home Assistant’s local public www directory so we can securely serve it via Nabu Casa.

    • Go to Settings–>Devices & Services and Add a new integration. Search for “Downloader”
    • Then go to Settings –>Automations and crate a new automation. I called it “kindle calendar update”
    • Add a trigger and set it for every 10 minutes by entering  /10 (The slash is important, otherwise it’ll only run once an hour on the tenth minute of each hour.)
    • Add an Action and select the Downloader. For the URL, put the Home Assistant’s IP and port 5000, ( http://homeassistant.local:5000) and the filename you want it to save as. This will automatically be available at  IP/local/filename. For example the settings in the image above, the downloaded screenshot appears at http://homeassistant.local:8123/local/door_calendar.png

4. Check the Workflow

Before touching the hardware, verify that the backend pipeline actually works. Each step can tell you exactly where the pipeline is failing if it doesn’t work correctly. Follow these steps in order:

  1. Add a test event to your google calendar
  2. Visit the Home Assistant dashboard you created with Daylight Calendar and make sure it updates. (Note: Google calendar synching can take up to 15 minutes). If something fails here you know to make sure the correct calendar is checked in the daylight calendar settings.
  3. Once the event shows up, manually trigger the Lovelace Kindle Screensaver add-on to force a render. Go to Settings –> Add-ons –> Lovelace Kindle Screensaver, click Restart, and check the logs tab to make sure it shows a successful GET request. If this fails, go into configuration and make sure your URL for the dashboard is correct. You can always test this with any dashboard too, to make sure it isn’t just your calendar failing.
  4. Click the “Lovelace Kindle Screensaver” icon in the leftmost bar of home assistant and you should see a blank and white version of your calendar. Again, read the log to see what kind of failure and test with another dashboard if necessary.
  5. Next, manually test that it is being served by opening a new browser tab and visiting homeassistant.local:5000 If this loads the same picture then we can move to the next step. it might take a couple refreshes or even Ctrl+F5 to pull a new copy from the server.
  6. Now we want to test that the snapshot is running correctly, so go to Settings–>Automations and -click the three dots to the right of the “kindle calendar update” automation and “Run Action”
  7. Verify the file has moved by visitinghttp://homeassistant.local:8123/local/door_calendar.png If you only want this to work in your house, then you can stop at step 7. I needed to access this from my work, so  had to go through Nabu Casa.
  8. Since I needed this calendar to update on my office door at work, I had to access it off my home network. Turn off Wi-Fi on your phone, use cellular data, and visit your secret Nabu Casa URL with the file path appended to the end: [your_Nabu_Casa_Secret_Link].ui.nabu.casa/local/door_calendar.png If the image loads on your phone over cellular data, the backend is flawless.

5. The Kindle Connection (Linkss Screen Saver and Online ScreenSaver)

Note: We cannot use KOReader’s built-in screensaver features for this project because we need a background system script that constantly forces the Kindle to fetch the latest image from our server. Make sure to go into KOReader’s sleep settings and set it to “Leave screen as is” so it doesn’t conflict with our hack.

Part A: Installing the Screensaver Hack (linkss)

  1. Download the linkss (Screensaver Hack) extension. You will need 7zip or similar to open this filetype, so install that, then you can right-click the file and select “extract here” with 7-zip’s menu. You’ll need to do that two times because the file it gives you here is also compressed. You should be left with a Folder named “Screensaver”

  2. Go inside that folder and find the appropriate .bin file. It either ends with “…install_pw2_and_up.bin” or “…touch_pw.bin”.  Copy the correct one to your “mrpackages” folder on your kindle.

  3. Eject the Kindle, open KUAL, and go to Helper –> Install MR Packages. The screen will flash, run the installation script, and reboot the device. On startup, you should briefly see a “checking screensavers” text line under the classic boy-under-the-tree image..

    Once booted up, you should open KAUL and see “Screen Savers” in the list. If not, then reboot the kindle. If still not, then delete the files and copy them over again from scratch. Eventually you will see this entry. Click it then make sure it is enabled (you’ll see “Disable Screen Savers Hack” if it is enabled.)

    Connect the Kindle to your PC again. On the root directory, create a folder named “linkss” (with two ‘s’s). Inside that, create a folder named “screensaver”. Leave this folder completely empty. We want the Kindle to look here and find nothing so our online script can manually inject the image. Testing the power button now should turn off the backlight without showing an image.

Part B: Installing the Online Screensaver Script

  1. Download the Online Screensaver app extension compressed file. Like before, use 7zip to open it and copy the folder structure directly into your Kindle’s extensions directory.
  2. Open a text editor meant for code (like Sublime Text or Notepad++) and open the file: /extensions/onlinescreensaver/bin/config.sh. I use sublime, but lots of folks use notepad++, etc.Figure out the schedule you want this to check the server. It has to be in a pretty specific format, so I just modified what the script had. If I want this to check the server every 8 minutes between the hours of 7am and 9pm to update, and otherwise only update once an hour I would put the following:
    SCHEDULE="00:00-07:00=60 07:00-21:00=8 21:00-24:00=60"Apparently, if you leave this entry blank, it will default to the number of minutes listed in line 10 :
    DEFAULTINTERVAL=30Set the Image URL: Go to line 36 and input your public Nabu Casa image link (or your local IP link if keeping it at home): IMAGE_URI="[your Nabu Casa SecretLink].ui.nabu.casa/local/door_calendar.png"Make sure the “SCREENSAVERFOLDER” matches what you created (note, when you plug your kindle into the computer, you won’t see the “/mnt/us” part of this filename, that’s ok).
  3. Eject your Kindle, manually reboot it, and open KUAL. You will see a new entry named Online-Screensaver. Tap it and select “Update Now” to force it to download the image of your dashboard. Press the power button and give it a couple of seconds and it should show your dashboard.

The Debugging Phase:

I spent a lot of time debugging this. The method I came up with is as follows:

  • If the screen is blank: Check your image dimensions. Is your PNG file size exceeding the Kindle’s memory limit?

  • Are events lagging? Remember the loop timeline: Google Calendar takes ~15 minutes to update Home Assistant → the screensaver add-on renders every 15 minutes → the automation downloads it every 10 minutes → the Kindle wakes up every 8 minutes. If you are testing changes, speed things up by clicking “Run Actions” manually on your Home Assistant automation and clicking “Update Now” inside KUAL.

  • If the screen isn’t updating: Check your Home Assistant logs. Is the snapshot automation failing to trigger?

  • Image looks fuzzy or otherwise goofy: Make sure your screen resolution of your Lovelace Kindle Screensaver config matches your actual kindle device.
  • If the image is corrupted: Ensure you are using a dithering filter (like Floyd-Steinberg). Raw color images look terrible on black-and-white e-ink.

The “TRMNL” Reality Check

If this feels like too much “gluing,” there is the TRMNL alternative. They provide a hosted server that does all the rendering for you. You point your Kindle to their URL, and they handle the Home Assistant integration. It costs money, but it saves you the headache of managing the snapshot automations and image rendering yourself.

It comes down to this:

  • Do it yourself: You own the whole stack, you pay $0, and you learn exactly how it works.

  • Use TRMNL: You pay a subscription, and you get a “works-out-of-the-box” experience.

What’s Next?

You now have a permanent, live-updating office door calendar. You’ve gone from “old e-waste” to “custom hardware.”

This wraps up our series! You’ve jailbroken the device, installed the toolkit, optimized the display, and bridged it to your smart home. Which project are you going to tackle next? Building a writer deck, or turning another Kindle into a weather station? Let us know in the comments!

Leave a Comment

Protected by CleanTalk Anti-Spam