Gate and garage door status with remote pulse

Two reed switches report open and closed, a relay gives the opener a pulse, and a message tells you when the gate was left open.

Smart home Board: ESP32-C3 SuperMini Level: ●○○ ⏱ 1–2 h

⚠ Caution

Switch only low-voltage loads yourself. For mains loads use a certified isolated module in a box or call an electrician.

Did I close the gate?

Two reed switches and a magnet on the gate give you four states, not two: closed (the closed switch is active), open (the open switch is active), moving or in between (neither), and a fault if it stays in between longer than the gate needs to travel. The ESP32 reports them and tells you when the gate has been open for ten minutes.

The relay and the security

Most openers have a low-voltage input for a push button. A relay in parallel with that button, pulsed for a few hundred milliseconds, is all it takes. Never connect it to the mains side of the opener. But a remote "open" command is an access control system, so treat it as one: strong authentication, no direct exposure to the internet, preferably through a VPN or a platform with two-factor sign-in.

  • Report the status before acting, so you never open a gate that you cannot see.
  • Use a separate "close" pulse if your opener supports it; a single toggle button does the opposite of what you expect half the time.
  • Fix magnets firmly and leave a few millimetres of gap; gates shake, and misaligned reeds produce false states.

Components

  • ESP32-C3 SuperMini
  • Reed switch + magnet (door sensor) × 2
  • Relay module 1-channel 5V (opto-isolated)
  • USB charger 5V 2A
  • Dupont jumper wires (M-F, M-M)

What you need

Buy the parts kit · Estimated total: $11.50

ESP32-C3 SuperMini × 1
$2.50
Buy at AliExpress Buy at Amazon.com
Reed switch + magnet (door sensor) × 2
$2.00
Buy at AliExpress Buy at Amazon.com
Relay module 1-channel 5V (opto-isolated) × 1
$1.50
Buy at AliExpress Buy at Amazon.com
USB charger 5V 2A × 1
$4.00
Buy at AliExpress Buy at Amazon.com
Dupont jumper wires (M-F, M-M) × 1
$1.50
Buy at AliExpress Buy at Amazon.com
🇺🇦 Ukraine🌍 Other countries

Ukraine: we buy and sell these parts ourselves, order them on this site.

Some links are affiliate links: we may earn a commission at no extra cost to you.

Related ideas

⚠ Caution

Switch only low-voltage loads yourself. For mains loads use a certified isolated module in a box or call an electrician.

Router and Starlink watchdog

Pings the internet and power-cycles the router or ONU through a relay when the connection hangs, with a Telegram notice.

  • Board ESP32-C3 SuperMini
  • Level ●○○ Beginner
  • Build time 1 h
Pick parts / kit

Power-status lamp

An LED ring that shows green when power is on, red when it is off, and amber for a scheduled outage window.

  • Board ESP32-C3 SuperMini
  • Level ●○○ Beginner
  • Build time 1 h
Pick parts / kit
⚠ Caution

Switch only low-voltage loads yourself. For mains loads use a certified isolated module in a box or call an electrician.

Telegram remote control and status

A Telegram bot on the ESP32 reports status on request and switches a relay with commands from your phone, with no server and no port forwarding.

  • Board ESP32-C3 SuperMini
  • Level ●○○ Beginner
  • Build time 1–2 h
Pick parts / kit

← All module ideas →

Comments

No comments yet. Share your experience or ask a question.

Comments are moderated.