Skip to content

davidanderle/HA-eink-display

Repository files navigation

State of project (26 Aug 2024)

  • LVGL can render any objects on the E-Ink screen through the IT8951
  • HA ESPHome BLE Proxy ready to send data
  • PC to ProS3 BLE data exchange works
  • BLE Rx data written to SPLIFFS as a JSON
  • LVGL can dinamically display the RX'd BLE data
  • UI draft created on iPad
  • HACS component is being prepared here (no clue what I'm doing):

Introduction

This project contains the necessary BOM and software files to build a Home Assistant E-Ink Display I've been developed through the past years. This display is a thin, light-weight, battery-driven, E Ink Home Assistant display that acts as a BLE peripheral (GATT server) and displays data from my Home Assitant instance. The displayed data at is

  • Next 7 days of calendar events from 2 different calendars
  • Our home's daily energy/water consumtion
  • Real-time commuting time to 2 locations (like work)
  • A QR code for the guest WiFi network
  • Battery status
  • Week number of the year
  • House chores/extra TODOs
  • Daily weather forecast
  • Current weather
  • Last refresh time
  • Location of users (Home/Work/Away or other named locations)

I started this project on 27 Aug 2023 and is a work in progress. My original attempt was to write the firmware in MicroPython using the LVGL graphics library, but alas after painful trials it turned out that LVGL's MicroPython port is not yet ready to to run on the ESP32-S3 chip. One legacy of this experiment is that now there is a MicroPython driver for the IT8951 chip to drive eink displays on one of the project's branches (TODO link).

Hardware setup

  1. Set the dip-switches into a 0b001 position (sw3 at ON position) to enable the SPI Slave communication. This is counter-intuitive as sw1 should've been bit0...
  2. Ensure that the board is powered from a 5V line as the EPD PMIC needs this voltage. On the e-ink ICE driving board, I had to solder a wire on a resistor under the USB connector as the 5V line was not broken out on any of the pins... image
  3. Download the CP210x Universal Windows Driver and install it to allow you to upload code on the ProS3.
  4. Connect the SPI_SCK, SPI_MOSI, SPI_MISO, SPI_CS and HRDY pins to the ICE board.

Hellow, world!

I am using a Visual Studio Code setup with PowerShell.

Espressif setup through Platform-IO

  1. Download the PlatformIO extension
  2. Clone this repository. Once you open the folder, platformio should automatically recognise it as a project and pull in the required libraries and build tools. Now build the project
  3. Put the ProS3 in download mode:
    • Press & hold the BOOT button
    • Press the RST button
    • Release the BOOT button
  4. Upload the code on the ProS3 ESP32-S3 has a bug where the bootloader is not always entered/exitted on command, therefore the manual programming step is required...

To upload the last binary without building

pio run -t nobuild -t upload

Special character support

  1. Convert ttf/wooff fonts here to LVGL format (see ext_montserrat_14.c as example)
  2. Display uses Montserrat extended with Noto emoji as its default font.
  3. Supported emojies: 0x203C-0x3299 and 🤖🎃😀😁😂🤣😍🥰😘🥺🥚🐸👀🍆🥹😊🙂
  4. The emoji set can easily be extended but it quickly eats up the flash
  5. Check the encoding of characters on UTF-8 tool

Test setup

Examine BLE and write to characteristics from WebBluetooth Unity tests running on the ProS3

HA Bluetooth proxy

ESPHome Bluetooth proxy

BOM

Reading the external SPI NOR flash from the ICE board

Using a J-Link Ultra+, download the SEGGER J-Flash SPI tool and go Target > Read back > Entire chip. Ensure that your SPI speed is sufficiently low to cope with the wiring's length. At 1MHz it took me 34sec to download. image

UI design

I used SquareLine Studio to aid my UI design, but I soon ran into limitations. Therefore many elements were simply adjusted by hand. Some extra widgets were generated by AIs to suit my needs.

References

ICE driving board image

About

An eink diplay for Home Assistant. Must be used with HA-eink-display-HACS

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages