Espresso Shot Timer for the Rocket Appartamento (ESPHome, LVGL, Waveshare 1.8" AMOLED)

Title: Espresso Shot Timer for the Rocket Appartamento (ESPHome, LVGL, Waveshare 1.8" AMOLED)

Tags: esphome, lvgl, esp32-s3, waveshare, coffee, display


What is it?

A small touch display next to my espresso machine that does two things:

  1. Shows the weather (outdoor temperature, condition, humidity) plus time and date while idle.
  2. Times my espresso shots. Tap the screen and the timer counts up from 0.0 s. The color tells me how the shot is going:
    • 0-24 s: green
    • 24-35 s: green, then yellow, then red
    • 35 s and more: red

Preview of the weather view and the timer view

Preview (simulation): weather view on the left, running timer on the right.

It is built on ESPHome with LVGL. Everything is configurable from Home Assistant, and the timer can be driven by automations.

Hardware

Features

  • Drift-free timer with 0.1 s precision (based on millis(), exact across pause and resume)
  • STOP/START toggle and RESET buttons on screen
  • Weather view fed by Home Assistant entities (I use OpenWeatherMap, any weather sensors work)
  • Time and date synced from Home Assistant, timezone and DST handled automatically
  • Display auto-off (0-300 s) and wake on touch. It stays on while a shot is running.
  • Background image with adjustable opacity

Home Assistant integration

All of this is exposed as entities, so you can tune things without reflashing:

Type Entities
Numbers Brightness, auto-off timeout, perfect shot time, maximum shot time, weather update interval, background opacity (weather and timer view)
Buttons Start Timer, Stop Timer, Reset Timer
Binary sensor Timer Running
Sensors Last Shot Time, Display Off In (diagnostic)
Light Display on/off

Some ideas that work well:

  • Use Last Shot Time for history graphs and statistics of your shots.
  • Use Timer Running as a trigger, for example to turn on a light or pause a media player while the pump runs.
  • Start the timer from a smart plug or a power sensor on the machine, so you don’t have to touch the screen at all.
  • Presets: Ristretto (18 s / 25 s), Espresso (24 s / 35 s), Lungo (30 s / 45 s).
action: button.press
target:
  entity_id: button.espresso_shot_timer_start_timer

Tip: exclude the “Display Off In” sensor from the Recorder. It updates every second and only bloats the database.

recorder:
  exclude:
    entity_globs:
      - sensor.espresso_shot_timer_display_off_in*

Get it

Full config, setup guide and troubleshooting:

Quick start:

git clone https://github.com/IamTheLoki/espresso-shot-timer.git
cd espresso-shot-timer
cp secrets.yaml.example secrets.yaml   # add your WiFi and API key
esphome run espresso-shot-timer.yaml

Tested with ESPHome 2026.9.0 and ESP-IDF 5.5.5. Firmware is about 1.64 MB (20% flash), RAM about 113 KB.

Known issue

After a reboot the touch controller (FT5x06) sometimes doesn’t respond. Flashing once more fixes it. I’m happy about any hint on a proper fix.

Credits

Thanks to the people in this thread, which was the starting point:

Background image: “Latte art and blueberries” by Toa Heftiba (CC0, via Wikimedia Commons).

MIT licensed. Feedback, issues and PRs are welcome!