The full engineering story
Where it started: Aquagate
Property owners needed to open, close and schedule their water supply remotely, in places with no Wi-Fi and patchy mobile coverage. The device had to recover on its own, because nobody drives out to reboot a valve.
Firmware (Zephyr on RP2040).
- Connects over LTE Cat-1 with a SIMCom A7670E modem, using PPP, then MQTT to the broker, with protobuf messages.
- Drives two valve outputs and an AC switch.
- Has per-thread watchdogs and a four-level recovery ladder: restart the data link → re-attach to the network → reset the modem → power-cycle it.
- A soak-test rig runs devices for days at a time, with a target of at least 90% link uptime on real networks.
Hardware. I designed the controller PCB, and then a SolidWorks enclosure around it. The enclosure went through two casing revisions. It’s 3D-printed, with labelled terminals, so an installer can wire it without the manual.
Backend and app.
- A Go service handles accounts, device ownership and roles (JWT and Casbin).
- An ingester writes device data to InfluxDB, with Grafana dashboards for the whole fleet.
- A React and Capacitor app on the Play Store: scan the QR code to claim a device, see live status, send commands.
- One protobuf schema runs end to end, so the firmware, backend and app can’t drift apart.
How it grew into SQMeter
Aquagate proved the hard parts: cellular links that heal themselves, device claiming, fleet telemetry, and an app people actually use. SQMeter builds on that platform and adds metering and credit. It’s a prepaid sub-meter for electricity and water, for landlords with several tenants on one supply.
- Metering: an energy-metering IC on an isolated mains front end, with a latching relay to cut supply and a motorized valve for water.
- Prepaid credit: tenants load tokens by keypad or over LoRa radio. The meter deducts usage and cuts off at zero.
- Security: the credit tokens and keys are what the meter depends on. The firmware is built around protecting them, and production units lock their flash against read-out.
In the field
Five SQMeter pilot units are deployed in Rwanda. They’re measuring real consumption under real tenants, on real networks.





