u/Dense-Log-168

Image 1 — 2G was shut down in France and left my alarm panel deaf and mute — so I built my own IP gateway (ESP32)
Image 2 — 2G was shut down in France and left my alarm panel deaf and mute — so I built my own IP gateway (ESP32)
Image 3 — 2G was shut down in France and left my alarm panel deaf and mute — so I built my own IP gateway (ESP32)
Image 4 — 2G was shut down in France and left my alarm panel deaf and mute — so I built my own IP gateway (ESP32)
Image 5 — 2G was shut down in France and left my alarm panel deaf and mute — so I built my own IP gateway (ESP32)
Image 6 — 2G was shut down in France and left my alarm panel deaf and mute — so I built my own IP gateway (ESP32)
Image 7 — 2G was shut down in France and left my alarm panel deaf and mute — so I built my own IP gateway (ESP32)
▲ 360 r/esp32

2G was shut down in France and left my alarm panel deaf and mute — so I built my own IP gateway (ESP32)

I'd been wanting to do an ESP32 project for a long time, but I was waiting for the right use case. I finally got it.

I own an alarm panel whose GSM module sent alerts and let me control it by SMS — handy and reliable for years.

With the 2G shutdown in France (June 2026), the panel went deaf and mute: no more alerts, no more remote control. And no possible upgrade, since the manufacturer had gone bankrupt in the meantime. The only "official" option was to switch brands and replace the whole installation : panel, detectors, sirens etc… even though everything still works perfectly.

So I built my own IP gateway.

The panel lends itself well to this

It has a terminal block on the back that makes it easy to interface with.

A programmable output (PGM) delivers 12 V / 100 mA and can be configured as:

  • alarm output
  • armed output
  • power fault
  • detector communication fault
  • manual trigger / control

And several wired detection zones are configurable:

  • perimeter with delay
  • perimeter
  • interior
  • panic
  • 24h / permanent
  • fire
  • key zone

Stack

Hardware

  • DFRobot FireBeetle 2 DFR1140 — chosen for the built-in charger and the external antenna connector
  • 3.7 V 1000 mAh LiPo battery
  • External Wi-Fi antenna
  • Custom PCB

Backend

  • Cloudflare Worker
  • Custom PWA

What the ESP32 does

The board interfaces with the panel through PC817 optocouplers.

Reading — it reads the actual state of the panel, so it stays in sync even when I use the remotes or the keypad:

  • Alarm directly from the built-in piezo siren signal (~1 kHz oscillation)
  • Armed / disarmed via the PGM output (12 V) — since the alarm is detected from the siren, the PGM stays free to report this state
  • Mains / battery — the ESP32 measures its own supply voltage

Commands:

  • Arm / disarm via zone Z39 configured as a key zone
  • Trigger the siren via Z40 in permanent-detection mode — a feature that didn't even exist in the original app!

I made my own PCB to put it all together cleanly.

Backend / app

No server: everything runs on a Cloudflare Worker (free tier), acting as a mailbox. The ESP32 drops off its state and picks up pending commands; the app reads the state and writes my commands. The Worker keeps the current state and an event history .

The key point is that the ESP32 only makes outbound requests: it calls the Worker every few seconds, but never accepts an incoming connection. That's what makes the whole thing simple:

  • nothing to configure on the network side — no open ports, no port forwarding, no dynamic DNS.
  • nothing is exposed on the alarm side — the only thing visible from the internet is the Worker. The panel itself isn't reachable.

I chose this polling approach over a persistent connection (WebSocket/MQTT): a few seconds of latency on commands isn't noticeable in practice, and more importantly the intrusion alert itself is instant — it doesn't depend on polling, the ESP32 pushes the notification as soon as it detects the siren.

The app is a PWA on my own domain. It shows real-time state, command buttons, history and settings — and it's served by the Worker itself, with no dedicated server. I use native web push notifications (intrusion, power loss, gateway unreachable).

On the security side :

  • the app is protected by a 256-bit token + Cloudflare Access;
  • the ESP32 has its own secret, separate from the app's;
  • electrical fail-safe: an ESP32 failure can never disarm the panel. When the ESP loses power, the key-zone loop can only open (or stay open) — and an open loop arms the system. So a gateway failure leaves the house at least as protected as before, never less;
  • watchdog: automatic reboot if the firmware hangs, with resync to the panel's actual state on restart;
  • heartbeat: the Worker knows when the ESP32 last checked in. If it goes quiet for too long, I get a "gateway unreachable" notification.
  • the ESP32 and the panel each have their own backup battery, and the connection runs through a 4G router on a UPS.

This is my first ESP32 project and I'm pretty happy with the result. It's up and running, and it seems reliable. What do you think? Any criticism or improvement ideas welcome.

If you're interested in the schematic or the code, I'm happy to share.

u/Dense-Log-168 — 1 day ago