How raithmir/watermeter works
This repository provides water-meter survey and gateway firmware, plus a separate handheld survey tool. The primary workflow is to hear wireless M-Bus broadcasts, identify and decode meters, then inspect or export survey results; the gateway path sends readings to Home Assistant. The Tracker survey adds GPS-tagged walks, persistent history, hunting, and a Bluetooth phone page. Relationships for the Tracker are supported by sampled source references; basic survey, gateway, and phone-page links rely on README documentation, since their implementation was not sampled.
Main entry points: main.cpp Tracker survey app · water-meter-gateway.yaml Gateway firmware · water-meter-gateway-xiao.yaml XIAO gateway firmware · water-meter-survey.yaml Basic survey firmware
Components 16
Meter discovery
- Basic survey firmware
water-meter-survey.yaml - XIAO survey firmware
water-meter-survey-xiao.yaml - Meter ID converter
meter-id/index.html
Tracker survey
- Tracker survey app
wio-wmbus-survey/src/main.cpp - wM-Bus decoding
wio-wmbus-survey/src/wmbus.h - AES routines
wio-wmbus-survey/src/aes128.h - Survey records
wio-wmbus-survey/src/survey.h - Tracker board mapping
wio-wmbus-survey/variants/seeed_wio_tracker_L1/variant.h - Bluetooth phone page
wio-wmbus-survey/web/index.html
Survey persistence
- QSPI flash
- Snapshot ring
wio-wmbus-survey/src/snapring.h - FAT12 formatter
wio-wmbus-survey/src/fat12.h
Gateway and setup
- Gateway firmware
water-meter-gateway.yaml - XIAO gateway firmware
water-meter-gateway-xiao.yaml - Home Assistant
Other components
- wM-Bus meters
Connections 19
- wM-Bus meters → Tracker survey app: broadcasts to
README.md - Tracker survey app → wM-Bus decoding: decodes with
wio-wmbus-survey/src/main.cpp - wM-Bus decoding → AES routines: uses
wio-wmbus-survey/src/wmbus.h - Tracker survey app → Survey records: records with
wio-wmbus-survey/src/main.cpp - Tracker survey app → Snapshot ring: saves through
wio-wmbus-survey/src/main.cpp - Tracker survey app → FAT12 formatter: formats via
wio-wmbus-survey/src/main.cpp - Snapshot ring → QSPI flash: reads and writes
wio-wmbus-survey/src/snapring.h - FAT12 formatter → QSPI flash: formats
wio-wmbus-survey/src/fat12.h - Tracker survey app → Tracker board mapping: uses pin definitions
wio-wmbus-survey/src/main.cpp - Bluetooth phone page → Tracker survey app: controls and downloads
README.md - wM-Bus meters → Basic survey firmware: broadcasts to
README.md - wM-Bus meters → XIAO survey firmware: broadcasts to
README.md - Meter ID converter → Gateway firmware: supplies meter ID
README.md - Basic survey firmware → Gateway firmware: identify then configure
README.md - XIAO survey firmware → XIAO gateway firmware: identify then configure
README.md - wM-Bus meters → Gateway firmware: broadcasts to
README.md - wM-Bus meters → XIAO gateway firmware: broadcasts to
README.md - Gateway firmware → Home Assistant: sends readings
README.md - XIAO gateway firmware → Home Assistant: sends readings
README.md