Hi DEV community,
We are currently architecting an edge computing pipeline for a multi-zone perimeter intrusion detection system deployed across an industrial perimeter facility.
The Problem
The physical boundary relies on an array of fence-mounted accelerometer/vibration sensors and buried acoustic cables reporting to distributed edge micro-controllers (ESP32 / ARM Cortex nodes running FreeRTOS). These nodes push telemetry to a centralized on-prem Linux edge gateway over an isolated RS-485 / Modbus bus and MQTT broker (Mosquitto).
During high environmental noise (gusty winds, heavy rain, or nearby freight activity), several sensor zones begin "flapping"โfiring rapid threshold transition states within milliseconds:
json
{
"zone_id": "zone-north-04",
"sensor_type": "piezo_vibration",
"trigger_val": 842,
"threshold": 750,
"timestamp": 1716982410214,
"state": "ALERT"
}
This burst triggers a telemetry storm that saturates our local broker queue and causes processing latency spikes when correlating sensor data with PTZ video verification streams.
What We've Tried
Sliding-window debounce: Implemented a leaky-bucket counter on the edge gateway (Python / AsyncIO service), requiring 3 sustained triggers within 1.5 seconds before publishing an intrusion event.
QoS adjustment: Lowered sensor-level MQTT messages to QoS 0 while keeping confirmed zone alarms at QoS 1.
Local FFT filtering: Testing basic on-node bandpass filtering to discard low-frequency wind sway before the packet leaves the micro-controller.
My Questions
How do you handle debouncing and event deduplication at the edge when raw sensor data is noisy but dropped real-world intrusions cannot be tolerated?
Would you recommend moving the sensor fusion logic entirely to edge microcontrollers (TinyML / embedded DSP), or handling aggregation centrally on the gateway via a lightweight time-series stream processor (like eKuiper or Faust)?
Any insights from folks running industrial IoT or physical security telemetry pipelines would be greatly appreciated!
Top comments (1)
QoS will not debounce this. In MQTT, QoS 0 is at most once and QoS 1 is at least once. Dropping the sensor stream to QoS 0 only changes delivery guarantees. It does not collapse repeated ALERT transitions, and a burst can still fill the Mosquitto queue.
The 3 triggers in 1.5 seconds rule has the failure you said you cannot accept. A real crossing that does not repeat three times inside that window is thrown away by the rule itself. Use two thresholds (trip above one value, clear only below a lower value) and a minimum time in the new state before you publish. That kills wind chatter without requiring a burst.
Do the first deadband on the node, before the packet hits RS 485 or MQTT, because the gateway cannot unclog a bus that is already full. Keep the correlation with the PTZ stream on the gateway. A single ESP32 does not see the other zones or the camera.