📡 DIY Motion Sensor with Phone Notifications Using Spare Parts | No Hub, No Home Assistant! 🚨📱


🚨 Introduction

Want to receive a notification on your phone whenever someone enters your home, garage, or workshop? You don't need an expensive security system, Zigbee hub, or complicated smart home setup!

In this project, I build a simple DIY motion detection system with smartphone notifications, using spare electronic components I already had.

The idea is simple: take a motion sensor from an old alarm system, connect it to a Sonoff smart socket, and use its cloud notification functionality to alert your phone whenever motion is detected.

No Home Assistant, no Zigbee coordinator, and no additional gateway required!

🔧 What This Project Can Do

  • 🚶 Detect movement near a door, entrance, or other monitored area.
  • 📱 Send instant push notifications to your smartphone.
  • 🏠 Work independently without a dedicated smart home hub.
  • 💡 Switch on a connected lamp when motion is detected.
  • ⏱️ Automatically turn the output off using Sonoff inching mode.
  • ♻️ Reuse old alarm sensors and other spare components.

🧩 Parts and Components

Here is what I used to build this project:

  • Sonoff smart socket.
  • PIR motion sensor from an alarm system.
  • Inverted relay for signal adaptation.
  • 12V power supply for the motion sensor.
  • 220V power connection for the Sonoff.
  • Enclosure for the electronics.
  • Wires, connectors, and basic tools.

Most of these components can be found in old alarm installations or leftover electronics projects.

⚙️ How It Works

The motion sensor detects movement and changes its output state.

The signal is connected through an inverted relay, which adapts the sensor output to the switching logic required by the Sonoff device.

When motion is detected:

  1. The PIR sensor activates.
  2. The relay changes its state.
  3. The Sonoff receives the switching signal.
  4. The Sonoff activates and sends a cloud notification to the mobile application.
  5. If configured, the connected lamp switches on.
  6. The inching mode automatically switches the output off after the configured delay.

This makes it possible to build a basic motion alert system without installing a complete smart home platform.

📱 Why Use Sonoff?

Sonoff devices are useful for simple DIY automation projects because they provide:

  • Smartphone control through the mobile application.
  • Cloud-based push notifications.
  • Configurable switching timers.
  • Inching mode for automatic shutoff.
  • Relatively inexpensive hardware.

Instead of buying a complete security system, you can reuse equipment you already have.

💡 Possible Applications

This simple project can be adapted for several applications:

  • 🚪 Entrance and hallway motion alerts.
  • 🚗 Garage and workshop monitoring.
  • 📦 Storage room movement detection.
  • 🏡 Basic home security notifications.
  • 💡 Automatic lighting in utility rooms.
  • 🔔 Notifications when somebody enters a restricted area.

⚠️ Safety Notes

Be careful when working with mains voltage (220–230V). Use an insulated enclosure, proper cable connections, and suitable protection.

The low-voltage motion sensor circuit should be kept electrically isolated from mains wiring. Never connect a PIR sensor output directly to a mains-voltage circuit.