/washermonitor

MicroPython script for Raspberry Pi Pico to monitor washer/dryer vibration, track cycles, and send notifications via ntfy.sh.

Primary LanguagePythonMIT LicenseMIT

Washer Monitor

MicroPython script for Raspberry Pi Pico to monitor washer/dryer vibration, track cycles, and send notifications via ntfy.sh.

Features

  • Detects vibration to monitor washer/dryer cycles
  • Sends notifications via ntfy.sh
  • Tracks weekly cycle counts
  • Monitors system voltage
  • Night mode (sleeps 10 PM–8 AM PDT)
  • WiFi connectivity with NTP time sync

Hardware

  • Raspberry Pi Pico
  • Vibration sensor
  • Note: Verify pin assignments in script (e.g., vibration sensor VCC on GPIO20, voltage sensor on Pin 29, ADC3).

Setup

  1. Install MicroPython on Raspberry Pi Pico.
  2. Configure config.json:
    {
        "ssid": "your_wifi_ssid",
        "password": "your_wifi_password",
        "ntfy_url": "https://ntfy.sh/your_topic"
    }
  3. Verify pin connections
  4. Upload config.json and script to Pico (next to main.py).
  5. Connect hardware and verify pin configurations.

Usage

  • Powers on, syncs time, connects to WiFi.
  • Monitors vibration to detect cycles.
  • Sends notifications on start, completion, and weekly summaries.
  • Enters night mode (10 PM–8 AM PDT).

Security Notes

  • Sensitive Data: WiFi credentials and ntfy.sh URL stored in config.json. Ensure this file is not publicly shared or committed to the repository (use .gitignore).
  • Potential Risks:
    • Hardcoded NTP server (time.google.com). Consider configurable NTP for flexibility.
    • No encryption for config.json. Store securely or use encrypted storage if supported.
    • Unauthenticated ntfy.sh endpoint. Anyone with the url can view the content.

Dependencies

  • MicroPython with machine, network, urequests, ntptime
  • Hardware: Raspberry Pi Pico, vibration sensor, LED

License

MIT License