This is a follow-up to my earlier HLK-LD2412 firmware project — same radar, but now in a single-cable PoE form factor, with a second independent sensor on top: passive WiFi CSI. Current stable release is v5.0.0, with the firmware already running on production nodes.
What makes this different from the previous firmware
The radar gives you presence (target detected, distance, energy). On top of that, the ESP32 also passively listens to WiFi CSI (Channel State Information) from a nearby AP and runs a small MLP (17 features → 18 → 9 → 1) that scores human-motion turbulence. Both signals are fused into one state machine — IDLE, MOTION, HOLD, TAMPER — and each fused decision exposes a fusion_source attribute (radar, csi, both, ml) so you can build automations around the level of confidence. When one sensor is degraded (weak RSSI, AP rebooting, radar UART glitch), the other carries the decision.
A site-learning step calibrates the CSI baseline for the specific room over ≥ 48 h, so the MLP adapts to your environment instead of relying purely on training data.
Home Assistant integration
MQTT auto-discovery — the device appears in HA the first time it connects to the broker. Out of the box you get fused presence + radar-only motion as binary sensors, plus distance, CSI turbulence score, alarm state, RSSI, free heap, uptime, packets/sec, and the fusion source attribute. No custom integration, no YAML.
The web UI is fully localized (CZ/EN), exposes the full configuration, and includes a Pull-OTA endpoint so you can update many nodes from a single dashboard button or a CI loop once you have more than two of these.
Hardware & cost
| Part | Approx. price | Notes |
|---|---|---|
| Prokyber ESP32-Stick-PoE-A | ~20 € | ESP32-WROOM + LAN8720A PHY + Si3404 PoE PD |
| HLK-LD2412 | ~7 € | 24 GHz FMCW radar, UART |
| Cat6 + 802.3af injector | ~5 € | Or any PoE switch port you already have |
A single Cat6 drop powers and connects the device. Idle draw is well below the PoE budget — no fan, no battery, no client-WiFi for the device itself. Wiring diagram and STL files for a 3D-printed enclosure are in the repo.
Honest limitations
- CSI needs a single, stable AP — not a meshed multi-AP environment switching channels under your feet.
- Range is room-scale (~10 m). Through-wall works but degrades fast.
- Site learning takes time. Don’t expect production-quality classification on day one.
- Requires PoE — by design, no battery variant.
Credits
The CSI processing pipeline (NBVI, MLP, adaptive threshold) is a port of espectre by Francesco Pace — GPLv3, hence the firmware’s CSI subsystem is GPLv3 too. The rest of the firmware is MIT.
Links
- GitHub repo: GitHub - PeterkoCZ91/HLK-LD2412-POE-WiFi-CSI-security: Dual-sensor intrusion detection: ESP32 + HLK-LD2412 24 GHz mmWave radar + WiFi CSI passive motion detection over wired Ethernet (PoE). Home Assistant, Telegram, dark-mode dashboard. · GitHub
- Latest release (v5.0.0): Release v5.0.2 — OTA reliability, ARM_HOME, auth stability · PeterkoCZ91/HLK-LD2412-POE-WiFi-CSI-security · GitHub
(Hardware: search “ESP32-Stick-PoE-A” from Prokyber.)
Happy to answer questions, share screenshots, or help anyone trying to get CSI working on a different ESP-based board. Feedback and PRs welcome.