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 level

What 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

01

Visual water-level indication

02

Capacity and percentage readings

03

Live sensor status

04

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.

  1. 01

    A pulse flow sensor measures water movement while pump-request, bilge-high and leak inputs are monitored by the ESP32-C3.

  2. 02

    The firmware converts pulses into flow and accumulated litres, applies daily limits and leak timing, then publishes one compact JSON object.

  3. 03

    The dashboard parses that object, calculates remaining tank percentage and adds samples to its local chart.

  4. 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

q

Current flow in litres per minute

liters / daily

Lifetime and current-day consumption in litres

tankCap / tankUsed

Tank capacity and litres used since refill

over / leak

Boolean daily-limit and leak alarms

pumpRequest / bilgeHigh / pumpOn

Boolean 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
Download water-tank-source.zip