Skip to content

boscacci/laundry-done

Repository files navigation

Laundry Done

An ESP32 laundry-finished detector for apartment washer/dryer stacks. The device sticks to the outside of the machine, watches vibration with an accelerometer, and sends a phone notification when the washer, dryer, or whole stack has been quiet long enough to count as done.

The project is designed to be approachable:

  • No appliance disassembly.
  • No mains wiring.
  • Battery-bank friendly.
  • One small sensor puck on the outside of the washer/dryer.
  • A Docker relay that can run on a home server.
  • A live calibration dashboard for seeing the vibration data.

What You Build

flowchart LR
  washer["Washer/dryer body"] -->|"Vibrates"| sensor["ESP32 + accelerometer puck"]
  sensor -->|"Signed Wi-Fi POST"| relay["FastAPI relay"]
  relay -->|"Stores samples"| database["SQLite event log"]
  relay -->|"Push alert"| gotify["Gotify"]
  gotify -->|"Notification"| phone["Android phone"]
  relay -->|"Live chart"| dashboard["Browser dashboard"]
Loading

How It Works

The accelerometer samples motion for a short window and reports two plain-English numbers:

  • Vibration strength: the typical shake during the sample window.
  • Biggest jolt: the largest instant change during that same window.

The ESP32 signs each event with an HMAC secret before sending it to the relay. The relay rejects unsigned traffic, stores calibration samples locally, and asks Gotify to notify your phone for finished-cycle events.

The current production firmware keeps a 10-second telemetry cadence while it is awake, uses NTP timestamps when Wi-Fi is available, and keeps the onboard LED off except for a tiny blink when transmitting.

Documentation Map

Quick Start

  1. Order a supported I2C accelerometer and build supplies from docs/parts-guide.md.

  2. Wire the accelerometer to the ESP32 on the bench using docs/build-guide.md.

  3. Copy .env.example to .env on your home server and edit the secrets.

  4. Start the relay and Gotify:

    docker compose up -d --build
  5. Copy firmware/include/laundry_config.h.example to firmware/include/laundry_config.h, set Wi-Fi and relay values, then upload:

    pio run -e esp32dev -t upload
  6. Open the dashboard:

    http://<home-server-lan-ip>:8088/monitor
    
  7. Optional: expose the dashboard privately over trusted HTTPS with Tailscale Serve.

  8. Mount the puck on the washer/dryer, start a load, and watch the live chart.

Repo Layout

.
├── compose.yaml                 # Relay + Gotify Docker Compose stack
├── docs/                        # Build, parts, diagrams, instructable draft
├── firmware/                    # PlatformIO ESP32 firmware
├── server/                      # FastAPI relay and pytest tests
└── README.md

Development

Run the server tests:

conda run -n data python -m pytest server/tests -q

Run the firmware logic tests:

platformio test -e native

Build the ESP32 firmware:

platformio run -e esp32dev

Bench-test an attached accelerometer by mapping motion to the onboard LED:

platformio run -e accel_led_test -t upload --upload-port /dev/cu.usbserial-8
platformio device monitor --port /dev/cu.usbserial-8 --baud 115200

Safety

Do not open the appliance, modify dryer wiring, or touch the 240V/220V outlet. This project only observes vibration from the outside and powers the ESP32 from a USB power bank. Keep cables away from the door, drum, hinge, dryer exhaust, and any hot or moving parts.

References

About

ESP32 vibration detector for washer/dryer finish notifications, with a Dockerized Gotify relay.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors