Skip to content

Building a Cloud-Free Solar Energy Controller with ESP32-S3 and W5500

Zendure SolarFlow 2400 Pro — lokale Regelung (ESP32-S3 + W5500) (미국, 태양광 하이브리드 에너지, 제어시스템)

sophia

Published November 09, 2026

Original author: ReinhardJesolowitz24Original source (new tab)

Building a Cloud-Free Solar Energy Controller with ESP32-S3 and W5500

Components

Hardware components

WIZnet parts

Project description

Building a Cloud-Free Solar Energy Controller with ESP32-S3 and W5500

Overview

Can a home solar energy system manage battery charging and discharging without depending on cloud services?

This open-source project demonstrates a local energy control system for the Zendure SolarFlow 2400 Pro, built using two ESP32-S3 boards equipped with WIZnet W5500 Ethernet controllers.

By combining wired Ethernet, Wi-Fi-connected energy devices, and MQTT communication, the developer created a control architecture that operates within a local network.

The goal is to adjust battery charging and discharging according to household power consumption and solar energy availability, reducing unwanted grid feed-in.

How the System Works

The system connects four main components:

Shelly Pro 3EM: Measures household grid power consumption and export.

ESP32-S3 + W5500 Controller: Reads power data and calculates the required charging or discharging power.

ESP32-S3 + W5500 MQTT Broker: Relays MQTT commands and telemetry between the controller and energy storage device.

Zendure SolarFlow 2400 Pro: Adjusts battery operation according to the received commands.

The controller and MQTT broker use wired Ethernet through W5500, while the Shelly and Zendure devices connect to the same local network over Wi-Fi.

Communication Flow

Shelly Pro 3EM → Controller → MQTT Broker → Zendure SolarFlow 2400 Pro

Telemetry from the Zendure device returns through the MQTT broker to the controller, completing the feedback loop.

This architecture allows the control logic to operate locally without requiring a cloud-based control service.

Hardware and Software

ComponentSpecificationFunction
Controller boardWaveshare ESP32-S3-ETHEnergy control logic
MQTT broker boardWaveshare ESP32-S3-ETHLocal MQTT messaging
Ethernet controllerWIZnet W5500 (2 units)Wired Ethernet connectivity
Energy meterShelly Pro 3EMGrid power measurements
Battery systemZendure SolarFlow 2400 ProBattery charging and discharging
CommunicationEthernet, Wi-Fi, MQTTLocal network integration

Each Waveshare ESP32-S3-ETH board includes an ESP32-S3R8 MCU, onboard W5500, and a 10/100 Mbps RJ45 Ethernet port.

The developer also documents the W5500 SPI pin assignments:

SCK: GPIO13

MISO: GPIO12

MOSI: GPIO11

CS: GPIO14

IRQ: GPIO10

RST: GPIO9

The implementation uses the ESP32 Arduino core's ETH.h interface for W5500 connectivity, with PubSubClient for MQTT client communication and PicoMQTT for the broker.

Why W5500 Matters

The W5500 provides the wired network interfaces for both ESP32-S3 control devices.

While the Shelly energy meter and Zendure battery system communicate over Wi-Fi, the controller and broker remain connected through Ethernet.

This creates a hybrid network architecture in which wired and wireless devices work together within the same local control system.

The W5500's hardware TCP/IP capabilities provide network connectivity while the ESP32-S3 microcontrollers handle MQTT messaging, control calculations, and application-level safety logic.

Separating the controller and MQTT broker also allows the developer to implement independent checks rather than relying on a single microcontroller for every control decision.

Local Control and Safety Features

According to the developer, the system has been tested in operation with bidirectional battery control.

The software includes several mechanisms intended to support controlled operation:

A PI controller that adjusts charging and discharging according to grid power measurements.

Battery state-of-charge limits to reduce the risk of excessive charging or discharging.

Watchdog and stale-data checks to detect missing communication or control updates.

Independent command validation by the MQTT broker before forwarding control values.

Read-only JSON status endpoints at GET /status for monitoring and diagnostics.

The developer reports approximately 1.5 W combined operating power consumption for the two ESP32-S3 Ethernet boards.

However, the project is still evolving. External alarm functionality remains under development, and the author specifically recommends verifying safe-state behavior before unattended operation.

The broker also uses anonymous MQTT access for compatibility with the Zendure implementation, so the system should be evaluated within an appropriately isolated and trusted local network.

Why This Project Is Interesting

As solar power and residential battery storage become more common, local energy management is an increasingly relevant application for embedded networking.

This project demonstrates that a W5500-based Ethernet connection can be part of a distributed energy control system involving multiple devices and communication technologies.

It also provides an example of hybrid networking: wired Ethernet supports the local control devices, while Wi-Fi connects the existing energy equipment.

For developers building energy monitoring, building automation, or industrial IoT applications, the project offers a practical reference for combining embedded Ethernet, MQTT, and local control logic.

Project Resources

Original project: https://github.com/ReinhardJesolowitz24/zendure-regler-broker

Controller source: https://github.com/ReinhardJesolowitz24/zendure-regler-broker/tree/main/regler

MQTT broker source: https://github.com/ReinhardJesolowitz24/zendure-regler-broker/tree/main/mqtt_broker

W5500 documentation: https://docs.wiznet.io/Product/iEthernet/W5500/overview

Comments

Similar projects you might like

Comments