Back to Projects

Walegaset

IoT energy monitoring for solar battery installations

Walegaset is a full-stack IoT energy monitoring platform built for solar battery installations in South Africa. Raspberry Pi edge devices auto-detect and collect operational metrics from SCG batteries via RS-232 serial protocol and generic inverters via HID, uploading through an MQTT pipeline to EMQX with TLS encryption.

Data flows through Apache Kafka with 5 dedicated topics (logger, cell, balancer, kWh, fault) into InfluxDB for time-series storage. A Django web application serves both a REST API with JWT authentication and server-rendered dashboards via HTMX, featuring hierarchical multi-tenant permissions from system-wide access down to individual site level.

A standout feature is bidirectional MQTT communication: operators can send commands (restart, update, reboot, status checks) directly to field devices from the dashboard, with results tracked in real time. The fault alerting system sends immediate Telegram notifications with detailed battery diagnostics.

Walegaset screenshot
14
ArgoCD Apps
5
Kafka Topics
1k+/min
Throughput
2 GB
Offline Buffer

Screenshots

A closer look at the application

Dashboard with site overview cards, battery banks, and device status

Dashboard with site overview cards, battery banks, and device status

Site drilldown with battery serial details, bank-level voltage and temperature monitoring

Site drilldown with battery serial details, bank-level voltage and temperature monitoring

Telemetry charts: voltage, power, max demand, and energy consumption over time

Telemetry charts: voltage, power, max demand, and energy consumption over time

Bank-level detail with per-cell voltage and temperature charts

Bank-level detail with per-cell voltage and temperature charts

The Challenge

Solar battery installations need cell-level monitoring using proprietary protocols, bidirectional device control, and real-time fault alerting across sites with unreliable connectivity.

Custom RS-232 protocol integration
Real-time fault detection
Remote bidirectional device control
Offline operation with data persistence
Hierarchical multi-tenant access control

System Architecture

How the system is structured from edge to interface

Edge Devices
Raspberry Pi
RS-232 Serial
HID Protocol
2GB Disk Queue
MQTT over TLS
Message Broker
EMQX
Kafka Bridge
Stream Processing
Apache Kafka
5 Topic Handlers
Consumer Groups
Data Storage
InfluxDB
PostgreSQL
Queries + MQTT Commands
Application
Django REST API
HTMX Dashboard
MQTT Commands
REST + Server-Rendered
Alerting
Telegram Bot
Fault Diagnostics
Platform
GKE
ArgoCD
Cloudflare Tunnel
Tailscale VPN
Strimzi Kafka

1,000+ Messages/Minute

Connection pool architecture with 1-3 dynamic workers achieving 100x throughput improvement.

14 ArgoCD Applications

Declarative GitOps on GKE with Cloudflare Tunnel ingress, automated sync, and rollback.

Automated Fleet Updates

Ansible-driven updates over Tailscale VPN with automatic rollback on failure.

Engineering Decisions

Why we chose specific technologies and patterns

Tech Stack

Technologies and tools powering this project

Backend
Django
Django REST Framework
Gunicorn
Frontend
HTMX
Data
PostgreSQL
InfluxDB
Apache Kafka
EMQX
Infrastructure
Kubernetes
ArgoCD
Cloudflare
Edge
Raspberry Pi
RS-232 Serial
MQTT

Interested in a project like this?

We build custom platforms tailored to your business needs. Let us know how we can help.