Back to feed
Dev.to
Dev.to
6/25/2026
How To Build Diy Smart Home Motion Sensor

How To Build Diy Smart Home Motion Sensor

Short summary

Build a $30 DIY motion sensor using an ESP32 and HC-SR501 PIR sensor, avoiding vendor lock-in from commercial options like Aqara or Hue. The tutorial provides a complete parts list, ESPHome YAML configuration for Home Assistant, and optional Arduino code for MQTT. Includes wiring diagrams, firmware flashing steps, and testing procedures.

  • Complete parts list under $30 with sourcing from Amazon and AliExpress
  • Two implementation paths: ESPHome (no-code YAML) or Arduino C++ (custom firmware)
  • Step-by-step wiring, flashing, and testing instructions for Home Assistant integration

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Comments

Failed to load comments. Please try again.

Explore more