Utilities
Water Tank Monitor
A straightforward water tank display that turns live level data into an easy-to-understand onboard utility monitor.
Current build
H₂OTank levelWhat it does
Built for a clear view
Knowing what remains in the tank should take seconds. The monitor emphasises level, capacity and sensor state, making it useful during daily life aboard and before longer passages.
Key features
Visual water-level indication
Capacity and percentage readings
Live sensor status
Mobile and wall-display friendly design
Under the panel
How the system works
A practical map from the onboard sensor or controller to the value shown in the browser.
- 01
A pulse flow sensor measures water movement while pump-request, bilge-high and leak inputs are monitored by the ESP32-C3.
- 02
The firmware converts pulses into flow and accumulated litres, applies daily limits and leak timing, then publishes one compact JSON object.
- 03
The dashboard parses that object, calculates remaining tank percentage and adds samples to its local chart.
- 04
Settings and reset actions return as halcmd messages containing JSON, so the ESP can validate and store each change.
Wire reference
Data format
- Transport
- ESP WebSocket → HAL server → secure browser WebSocket; JSON commands return the same way
- Envelope
- JSON chat envelope whose text contains hal: watertank plus an embedded JSON object
Example payload
{
"type": "chat",
"text": "hal: watertank {\"q\":2.35,\"daily\":48.2,\"tankCap\":500,\"tankUsed\":112.4,\"leak\":false,\"pumpOn\":true}"
}Field reference
qCurrent flow in litres per minute
liters / dailyLifetime and current-day consumption in litres
tankCap / tankUsedTank capacity and litres used since refill
over / leakBoolean daily-limit and leak alarms
pumpRequest / bilgeHigh / pumpOnBoolean input and output states
Source code
Take it apart. Make it yours.
The ZIP contains the web project and its matching ESP/Arduino firmware. Passwords, private keys, tokens, logs and live location data have been removed.
Firmware: ESP32-C3 water tank firmware
- Water tank dashboard HTML
- ESP32-C3 Arduino sketch
- HAL WebSocket server
- Warning audio and package files
