- Role
- Boards, enclosure, firmware, backend and apps
- Year
- Since 2017
- Disciplines
- Electronics and PCB design, Embedded systems and firmware, Telecommunications and networking, Systems architecture, Backend engineering, Software engineering, Product development and prototyping, Research and technical experiments
- Technologies
- ESP32-S3, FreeRTOS, MCP23017, GSM SMS, Meshtastic, LoRa SX1278, MQTT over TLS, Mosquitto, TypeScript, Node.js, PostgreSQL, JSON Schema, Kotlin, Jetpack Compose, Room, Firebase Cloud Messaging, React, Docker, Cloudflare Tunnel

HUEC's alarm and monitoring platform. The X2 Pro controller watches up to 22 inputs and reports over MQTT, falls back to SMS, and since December 2026 to a LoRa mesh when both the internet and the cellular network are down. A backend, web dashboard and native Android app complete the system, in service at telecom and industrial sites since 2018.
The challenge
At a typical site, fire panels, power equipment, cooling and network monitors each raise their own alarms, in isolation. With no single place to see them, the responsible person hears late, real alarms get lost among minor ones, and there is no history to find the cause. These sites also lose grid power for long periods. When tower batteries run flat, the internet and the cellular network can fail together, exactly when an alarm matters most, so the alarm path cannot depend on either.
The solution
- The X2 Pro controller, built on an ESP32-S3, reads 22 inputs and drives 2 outputs. It takes 12 to 80 V signals directly, shows its state on an OLED display, keeps time with a real-time clock, and carries a GSM modem and Wi-Fi.
- Every alarm has three independent ways out, so it still arrives when two of them are down. It goes over MQTT to the server, by SMS to up to five phones, and across the city's LoRa mesh through a Meshtastic node.
- A versioned device-to-server contract, written as JSON Schemas, is shared by the firmware, the backend, a browser simulator and the apps. Devices describe their own hardware, so the apps render whatever is attached without an app update.
- A TypeScript backend on PostgreSQL and Mosquitto stores every command until the device acknowledges it. The native Android app and a web dashboard show live alarms, history and settings, and push alerts even when the app is closed.
- The family runs from Lite units that work on SMS alone to the X2 Pro. At industrial sites, the controller also reads PLCs over Modbus.
Features
Alarm engine
- A zone engine scans every input every 50 ms. It handles debounce, the active level, repeats with cooldown, clearing, and zones that silence an output.
- New alarms jump ahead of repeats in the queue. Events stay on the device until the server has them, and recent ones are sent again after a reconnect.
- Hardware is added as modules, up to 64 zones and 32 outputs. An MCP23017 input expander plugs in with no change to the alarm logic or the apps.
Three ways out
- MQTT over TLS to the broker, with a Last Will, so the server knows within a minute when a unit drops and tells the linked users.
- SMS over GSM to up to five numbers, in Arabic or English, sent one at a time from a queue.
- A Meshtastic node on a UART carries each alarm across the city's LoRa mesh to one recipient, retries it, and matches the acknowledgement. The server names the node and sets its hop limit and recipient.
Configured from anywhere
- Every unit has its own web page with a login, and an OLED that pages through the zones. With no known Wi-Fi it opens an access point for setup.
- The server changes settings, raises or clears alarms and reboots units with commands. Each command is stored, acknowledged and retried, and waits if the unit is offline. A command that arrives twice is answered but applied once.
- The unit reports its hardware and running settings with a revision number, so the server always knows what is really running.
Updates over the air
- Two firmware slots. A new image stays pending until it has run healthy for 60 seconds, connected to Wi-Fi and the broker, or the unit rolls back to the previous one.
- The server pushes updates. The unit downloads the image over HTTPS, checks its size and SHA-256 while writing, and the app shows each step and the release notes in Arabic and English.
- Local uploads are refused until the factory login has been changed.
Apps and hosting
- A native Kotlin and Jetpack Compose Android app. It shows live alarms over MQTT, monitors in the background, and receives Firebase push alerts. It also has pages for attachments, firmware updates and the LoRa mesh.
- The app can also receive alarms straight from a paired Meshtastic node over Bluetooth, with no server in between.
- The backend ships as a Docker Compose stack for a small server, with the API, PostgreSQL, a broker that refuses clients without a login, and a Cloudflare tunnel. It opens no ports to the internet.
Built to be tested
- The alarm logic is plain C++ with no hardware dependencies, and its tests run on a PC.
- The firmware's messages are checked against the contract's schemas, and a browser simulator stands in for a real unit.
My contribution
Designed and built the whole system. I designed the controller boards and the enclosure, and wrote all 280 commits in the GuardEye repository, from September 2025 to December 2026. They cover the firmware from its first version to the 2026 rebuild: the device-to-server contract, the layered firmware, the backend and its command layer, updates over the air, the Docker deployment, the web dashboard, the native Android app and the LoRa mesh path.
Outcomes
- Six X2 Pro units in operation: three at telecom centres in Damascus and three at industrial facilities.
- GuardEye systems in service since 2018 without failures.
- Firmware 1.6.0 (December 2026) adds settings for the LoRa mesh from the server, on top of server-pushed updates with automatic rollback.
- The two Meshtastic nodes for the mesh path were tested together on 1 December 2026. Both pair with the phone and pass channel and direct messages.
- Presented to visitors at the Damascus International Fair, 2026.
Documentation
In public2026
GuardEye shown to visitors at the Damascus International Fair.

X2 Pro and its appCurrent generation
An ESP32-S3 controller in a DIN-rail enclosure, with 22 inputs and a 12 to 80 V supply. It sends every alarm over MQTT, SMS and LoRa, and the Android app shows each device, its zones and their history.





Compact GSM board
A small board with an STM32 microcontroller, a GSM module and its own power regulators, built to send alarms by SMS with no internet at all.


Raspberry Pi Zero board
An early version. Only USB modem dongles could be bought locally, so the board was built around a Raspberry Pi Zero that could drive one, with a DC-DC converter for the site's supply and two rows of terminal blocks for the inputs. It was installed in wall enclosures on site.


The first prototype2017
Where it started. No GSM modems were sold locally, so an Arduino Uno on a breadboard used the built-in modem of a Sony Ericsson phone to send the alarm.

Site names, client names and module identifiers are left out or blurred.