Solar Energy Monitoring and Control System with ESP32
Intermediate11/6/2026- Author: IoTSpark Maker

Solar Energy Monitoring and Control System with ESP32

Build a low-voltage DC model using an ESP32 to measure solar voltage, current, and power, monitor a battery, and control a DC load over MQTT.

ESP32Solar EnergyMQTTINA219IoTDC PowerEnergy Monitoring
6 steps9 components
← Back to project
Detailed guide

Part 5: Monitoring and Control Dashboard over MQTT

Design a dashboard showing voltage, current, power, battery voltage, load status, and ON/OFF/AUTO control buttons over MQTT.

Updated 31/08/2026

Part 5: Monitoring and Control Dashboard

The dashboard lets you observe data from the ESP32 in real time and send load-control commands. For this project, the dashboard should go through MQTT rather than a web server running directly on the ESP32, since MQTT suits an IoT device model that sends telemetry and receives control commands.

Information Cards to Include

CardDisplayed DataPurpose
Solar Inputpv_voltage, pv_current_ma, pv_power_mwTracks energy from the panel.
Batterybattery_voltageTracks the storage battery's status.
Load Controlload, mode, ON/OFF/AUTO buttonsControls the DC load and switches modes.
AlertLow-battery, disconnection, or load-not-enabled noticesHelps catch issues early.

The MQTT Control Flow

When the user presses ON, OFF, or AUTO on the dashboard, the dashboard publishes the matching payload to the control topic.

Topic: iotlabs/solar01/cmd/load
Payload: ON
Payload: OFF
Payload: AUTO

The ESP32 subscribes to this topic, checks the payload, and performs the matching action. If the payload is ON but the battery is low, the ESP32 doesn't turn on the load and sends an alert to the alert topic instead.

Dashboard Design Principles

PrincipleHow to Apply It
Prioritize key readingsPlace battery voltage, PV power, and load status somewhere easy to see.
No blind controlThe ON button should only work when the system reports enough battery charge.
Show clear unitsV, mA, mW, or W must be shown next to each reading.
Show a disconnected stateIf telemetry hasn't arrived for too long, the dashboard should show OFFLINE.
Include alertsLow battery, abnormal current, and disconnection should be shown separately.

⚠️ Never use the dashboard to control a hazardous load or an AC load. This project only controls a small DC load, within the scope of the learning model.