Making an inkplate dashboard with home assistant
Compiling the software for the inkplate
- Clone / Download https://github.com/lanrat/homeplate
- Open it with Visual Studio
- Install PlatformIO IDE
- Open the cloned/downloaded project and click the PlatFormIO button
it will download and set up - Go over to inkplate10v2 and hit upload after adapting the config.h
My config.h (as a quick test)
#pragma once // WiFi SSID #define WIFI_SSID "IOT" // WiFi password #define WIFI_PASSWORD "" // hostname // NOTE: if using multiple homeplate devices, you MUST make the hostname unique #define HOSTNAME "homeplate" // How long to sleep between image refreshes #define TIME_TO_SLEEP_MIN 20 // How long to sleep for quick activities like e.g. showing info and qr code (default 300 / 5 min) //#define TIME_TO_QUICK_SLEEP_SEC 30 // Static IP information // If unset uses DHCP, but updates may be slower, set to use a Static IP // #define STATIC_IP "192.168.1.10" // #define STATIC_SUBNET "255.255.255.0" // #define STATIC_GATEWAY "192.168.1.1" // #define STATIC_DNS "192.168.1.1" // NTP Time server to set RTC #define NTP_SERVER "pool.ntp.org" // How often to re-sync the clock to NTP #define NTP_SYNC_INTERVAL (24*60)/TIME_TO_SLEEP_MIN // ~ once a day when updating every TIME_TO_SLEEP_MIN minutes // URL of PNG image to display #define IMAGE_URL "https://placehold.co/600x400/EEE/31343C.png" // WiFi QR Code //#define QR_WIFI_NAME "Guest WiFi Network Name" //#define QR_WIFI_PASSWORD "Guest WiFi Password" // MQTT Broker //#define MQTT_HOST "MQTT Broker IP" //#define MQTT_PORT 1883 // Set MQTT_USER & MQTT_PASSWORD if needed //#define MQTT_USER "mqtt username" //#define MQTT_PASSWORD "mqtt password" // Customize node id and device name if needed //#define MQTT_NODE_ID "homeplate" // defaults to HOSTNAME //#define MQTT_DEVICE_NAME "HomePlate" // defaults to "HomePlate" // Disables touchpads if they are overly sensitive and result in phantom touch events // Touchpads are not supported on the Inkplate10v2. This must be false if ARDUINO_INKPLATE10V2 is set #define TOUCHPAD_ENABLE false // Timezone // see timezone_config.h for options #define TIMEZONE_CE // If your Inkplate doesn't have external (or second) MCP I/O expander, you should uncomment next line, // otherwise your code could hang out when you send code to your Inkplate. // You can easily check if your Inkplate has second MCP by turning it over and // if there is missing chip near place where "MCP23017-2" is written, but if there is // chip soldered, you don't have to uncomment line and use external MCP I/O expander //#define ONE_MCP_MODE // Displays the time from the RTC whenever a new image is loaded #define DISPLAY_LAST_UPDATE_TIME true // keep this to signal the program has a valid config file #define CONFIG_H
the result (as a quick test)
Setting up home assistant
Add https://github.com/sibbl/hass-lovelace-kindle-screensaver to your home assistant addons, I have no interest in running this on a dedicated docker, I want to run this as a home assistant addon directly
My addon config
HA_BASE_URL: http://192.168.1.2:8123 HA_SCREENSHOT_URL: /lovelace/0 HA_ACCESS_TOKEN: >- xxx LANGUAGE: en CRON_JOB: "* * * * *" RENDERING_TIMEOUT: 59999 RENDERING_DELAY: "0" RENDERING_SCREEN_HEIGHT: "825" RENDERING_SCREEN_WIDTH: "1200" BROWSER_LAUNCH_TIMEOUT: "30000" ROTATION: "0" SCALING: "1" GRAYSCALE_DEPTH: "8" IMAGE_FORMAT: png COLOR_MODE: GrayScale REMOVE_GAMMA: true PREFERS_COLOR_SCHEME: light HA_BATTERY_WEBHOOK: "" ADDITIONAL_ENV_VARS: []
I wanted to get the http://supervisor url going, but failed after some quick tries, so sticking to a hardcoded IP … sigh
Start the addon, check if its working
check if the screenshot works
so you can put the URL into the inkplates config
HACS – Kiosk mode
We will need this addon via HACS https://github.com/NemesisRE/kiosk-mode
so we can run the dashboard without menu
Card mod
I’ve added card mod with HACS too so I can get rid of the boxes on the dashboard, so it looks cleaner on e-ink
card_mod: style: | ha-card { border-width: 0; --ha-card-background: transparent; color: var(--primary-color); }
I’ve had issues with the card mod not rendering consistently:
card_mod CSS values not consistently rendering see:
https://github.com/sibbl/hass-lovelace-kindle-screensaver/issues/85#issuecomment-2271603343
Creating the dashboard
Add a dashboard to home assistant and set up the URL
tweak the dashboard as you want, and update the config on kindle screensaver.
update the URL of your inkplate compile to the kindle screensaver URL