Vergus Virgil — ESP32-S3 Smart Water Monitor
with Native Zigbee, Telegram and
Home Assistant MQTT Discovery
Hi everyone,
I'm an Italian plumber who codes.
I built Vergus Virgil because I got tired
of seeing flood damage that could have
been prevented with a smarter system.
This is not a weekend project —
it's been running in production
for several months and has evolved
into something I'm proud to share
with this community.
WHAT IT DOES
Vergus Virgil monitors your water system
and automatically closes a motorized valve
when it detects an anomaly — in under 50ms.
It combines three detection layers:
-
Flow anomaly detection
EMA + Z-Score statistical algorithm
that learns your consumption patterns
and detects leaks, drips and
unusual flow behavior
-
Physical flood sensors
Native Zigbee coordinator (XIAO ESP32-C6)
supports SONOFF SNZB-05P, Aqara and any
Zigbee 3.0 IAS Zone flood sensor
— no hub, no server,
no Zigbee2MQTT needed
-
External sensors via open JSP protocol
Any ESP32/ESP8266 can send alerts via
simple HTTP POST JSON —
WiFi companion sensor included
TECHNICAL HIGHLIGHTS
- ESP32-S3 WROOM N16R8 (main controller)
- XIAO ESP32-C6 (native Zigbee coordinator)
connected via UART — standalone,
no external server required - FreeRTOS dual-core architecture:
Core 1: safety tasks (valve < 50ms)
Core 0: network tasks (Telegram, MQTT) - Multi-level watchdog
- Fail-safe valve (closes on power loss)
- UPS compatible
HOME ASSISTANT INTEGRATION
Native MQTT Discovery — zero configuration:
- Sensors: flow rate, volume, temperature,
anomaly score - Binary sensors: alarm, valve state,
frost protection - Controls: emergency valve, reset alarms
- Works alongside any existing HA setup
TELEGRAM BOT
Full control without HA:
/status — live system status
/report_week — weekly consumption stats
/report_month — monthly consumption stats
/valve_open — open valve manually
/valve_close — close valve (emergency)
/reset — reset active alarms
/zigbee pair — pair new Zigbee sensor
/holiday on|off — vacation mode
/limit on|off — consumption limit
ADDITIONAL FEATURES
- Frost protection with DS18B20
- Vacation scheduler (7 days × 3 time slots)
- Consumption limits (daily/weekly/monthly)
- Valve anti-blocking automatic cycle
- Valve fault diagnosis
- 30-day circular buffer statistics
- OTA firmware updates
- Local web interface for sensor management
- MQTT Setup page via web UI
- Telegram Setup page via web UI
- EMA Engine sensitivity presets
(Low / Medium / High + Advanced mode)
OPEN PROTOCOL — VirgilJSP
Vergus Virgil uses an open JSON sensor
protocol. Any device can integrate
with a simple HTTP POST:
POST http://vergus-virgil.local/json
{
"id": "kitchen",
"name": "Kitchen",
"alarm": 1,
"control": 1,
"battery": 87
}
Arduino library VirgilJSP is currently
in development and will be available
on GitHub soon.
Note: Vergus Virgil firmware is
closed source. The JSP protocol is
open and documented — anyone can
build compatible sensors using
the VirgilJSP library.
VERGUS ECOSYSTEM
Vergus Virgil is the first product
of Vergus — a solo maker journey
built on the idea that real problems
deserve unexpected solutions.
Four elements. Four products.
Vergus Virgil → water monitoring
(this project)
Vergus Ignis → fire & CO detection
(roadmap)
Vergus Tellus → smart chicken coop automation
(roadmap)
Vergus Aura → weather & environment
(roadmap)
STATUS
Currently in beta — looking for testers.
Coming soon:
├── VirgilJSP Arduino library
└── Full documentation
The splash screen logo was hand-crafted
pixel by pixel by Aura —
a small detail that makes it feel
like a real product. ![]()
Happy to answer questions and
hear feedback from the community.
Built with
by an Italian plumber
who codes — Vergus












