This is an automated archive made by the Lemmit Bot.
The original was posted on /r/homeassistant by /u/bukaro on 2026-03-22 12:46:35+00:00.
I kept forgetting my pills. Not dramatically, just the "it's 11pm and oh shit" kind. So I spent way more time building a fix than the problem deserved.
An ESP32 in a 3D printed case sits in my bathroom, hooked up to Home Assistant. A Zigbee vibration sensor on the pill box detects when I take them. Miss 10pm and the LED goes red, HA fires a notification. There's a physical button on the case too for when the sensor misses it.
https://codeberg.org/Buckaroo/PillsReminder/raw/branch/main/img/PXL_20260322_114526910.MP.jpg
https://codeberg.org/Buckaroo/PillsReminder/raw/branch/main/img/PXL_20260322_114532463.MP.jpg
How it works
The ESP32 runs ESPHome and subscribes directly to HA entities. Primary detection is a Zigbee vibration sensor on the pill box. ESPHome picks it up via platform: homeassistant and sets a taken_today flag in NVS so it survives reboots.
LED colours: blue = waiting, off = taken, red = missed. An HA automation triggers at my phone's next alarm time. If pills aren't taken, it turns the LED red and waits 30 minutes. Still not taken, it sends a Pushbullet notification and a Pixel Watch alert. Flag resets at midnight.
Two physical buttons on the case. The OK button is a fallback for when the vibration sensor misses a light touch — press it and taken_today gets set, LED turns off, same as the sensor. The Reset button undoes a false positive: knocked the pill box, something set it off by accident, press Reset and the flag clears, LED goes back to blue. Both fire events to HA so automations stay in sync.
Things I picked up building this:
- ESPHome (love it)
- Basic soldering (survived)
- Fusion360 for the enclosure (still scared of it)
- I will absolutely forget my pills without external intervention
Q: Which sensor? A cheap Tuya Zigbee vibration sensor from AliExpress.
Q: Why the box and buttons if the sensor does the job? Why not. Also buttons.
Code: ESPhome yaml, HA yaml, STLs, wiring, etc: codeberg.org/Buckaroo/PillsReminder
EDIT: PillBox picture https://codeberg.org/Buckaroo/PillsReminder/raw/branch/main/img/pillbox.jpg