A fun little extremely low power device to track who last scooped the litterbox and who has the high score. I wanted to 'gamify' one of our house chores. 🐱
This device uses no binary sensor for buttons. It gets woken up from deep_sleep, and then parses the gpio number that woke it up, updates the screen & home assistant, and goes back to sleep ASAP.
Parts used:
- LilyGO TTGO T5 V2.3 ESP32 - with 2.13 inch E-paper E-ink
- 2 clicky buttons
- 2 100ohm resistors
- some holed prototyping board
- a LiPo battery
- a bit of 3d printing magic
The magic of extreme low power comes from these two tricks:
deep_sleep:
id: deep_sleep_1
run_duration: 30s
esp32_ext1_wakeup:
mode: ANY_HIGH
pins:
- GPIO25
- GPIO26
and on startup:
esphome:
on_boot:
- priority: -100
then:
- lambda: |-
switch (esp_sleep_get_ext1_wakeup_status()) {
case 1 << 25:
ESP_LOGD("custom", "GPIO 25 woke me up");
break;
case 1 << 26:
ESP_LOGD("custom", "GPIO 26 woke me up");
break;
default:
ESP_LOGD("custom", "Something I dont know woke me up");
}
- component.update: t5_display