Tech Deciphers — Software Development & M-Pesa Integration in Kenya

Water Vending Solution

IoT & Hardware Integration · Utility Provider · 2022

Smart water ATM system with token-based dispensing, USSD interface, M-Pesa collection, and revenue analytics.

Overview

A smart water vending system deployed across affordable housing estates in Nairobi. Residents purchase water via USSD or M-Pesa, receive a token, and dispense a measured quantity from the ATM unit. The system runs entirely offline-capable with a central sync server.

The challenge

Many Nairobi housing estates lacked a reliable way to manage communal water access. Manual water collection created queues, revenue was lost to theft, and utility providers had zero visibility into water consumption or machine faults.

The solution

We built an IoT stack from scratch: Python on Raspberry Pi controls the solenoid valve and token validation. Africa's Talking USSD provides the interface for feature phones (dominant in the estate). M-Pesa C2B handles payment. A Laravel API receives payment confirmations, generates tokens, and provides a web dashboard for the utility provider to monitor revenue and machine health.

Results

  • Deployed across 15 estates in Nairobi within 8 months
  • Revenue leakage reduced to near-zero from an estimated 40% manual loss
  • Monthly water revenue per estate increased 60% after deployment
  • Zero cash handling required by estate management
  • Machine fault alerts sent via SMS to maintenance team within 2 minutes of detection

Technologies used

Python (hardware controller)Laravel 9Africa's Talking USSDM-Pesa C2BMySQLRaspberry PiArduinoReact Admin Panel

Screens

  • Water vending ATM unit — Solar-powered water ATM unit installed in a Nairobi estate
  • USSD purchase flow — USSD menu flow for purchasing water tokens
  • Revenue analytics dashboard — Utility provider revenue dashboard with per-unit analytics
  • Hardware controller board — Raspberry Pi controller integrated with solenoid valve

Build something similar →

More projects