---
title: "OpenDTU-OnBattery"
url: "https://maker.wiznet.io/irina/projects/opendtu-onbattery/"
markdown_url: "https://maker.wiznet.io/irina/projects/opendtu-onbattery/md"
type: "UCC: User Created Content"
author: "hoylabs"
author_url: "https://github.com/hoylabs/OpenDTU-OnBattery"
editor: "WIZnet"
editor_url: "https://maker.wiznet.io/"
original_author: "hoylabs"
original_url: "https://github.com/hoylabs/OpenDTU-OnBattery"
license: "Apache License 2.0 (Apache-2.0)"
published: "2025-05-07"
language: "en"
tags: ["Arduino Ethernet inverter"]
likes: 0
views: 1726
comments: 0
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# OpenDTU-OnBattery

> ESP32 and W5500-Based Smart Solar Inverter Controller for Energy Management

Original author: hoylabs (source: https://github.com/hoylabs/OpenDTU-OnBattery)

## Documents and links

- [github](https://github.com/markusdd/OpenDTUFusionDocs) (code)

## Article

## **🔍 Overview**

OpenDTU-OnBattery is an open-source firmware project that helps homeowners optimize energy usage in their solar power systems.
By integrating an **ESP32 microcontroller** and the **WIZnet W5500 Ethernet chip**, this system enables reliable and real-time dynamic control of solar inverters, smart meters, and battery storage.

The **OpenDTU** board is an open hardware platform designed to control and monitor Hoymiles solar inverters, battery systems, and smart meters. When combined with the **WIZnet W5500 Ethernet chip**, the system ensures rock-solid communication—even in industrial or RF-hostile environments.

This article focuses on how **W5500** enhances OpenDTU Fusion deployments, particularly in use cases where Wi-Fi is unstable, static IPs are required, or network recovery must be fast and reliable.

---

## **🔧 Key Features of OpenDTU-OnBattery**

- **Dynamic Power Limiter (DPL)**: Reduce power feedback to the grid by adjusting inverter output

- **Web-Based UI**: Access via browser for configuration, monitoring, and OTA updates

- **Battery Management System (BMS) Support**: Compatible with JK BMS, Daly, Victron, and more

- **Smart Meter Integration**: Works with Shelly 3EM, SDM series, and PZEM meters

- **MQTT/Home Assistant Support**: Ideal for smart home automation

- **Reliable Wired Networking**: W5500 chip offers hardware-based TCP/IP for Ethernet

---

## **⚙️ Hardware Configuration**

| **Component** | **Role/Function** |
| --- | --- |
| ESP32 | Main microcontroller, Arduino-compatible |
| WIZnet W5500 | Ethernet interface via hardware TCP/IP stack |
| Inverter | Solar inverter (Hoymiles, TSUN, Solenso) |
| Power Meter | Shelly 3EM, SDM120/630, PZEM |
| Battery BMS | JK, Daly, Pylontech, Victron |

### **SPI Wiring Between ESP32 and W5500**

```plaintext
ESP32     ↔     W5500
--------------------------
GPIO18    ↔     SCK
GPIO23    ↔     MOSI
GPIO19    ↔     MISO
GPIO5     ↔     CS
GND       ↔     GND
3.3V      ↔     VCC
```

---

## **⚙️ System Architecture with W5500**

```plaintext
[PV Panel]
    ↓
[Hoymiles Inverter] ←→ [OpenDTU Fusion Board]
                             ↓
                     [ESP32-S3 MCU]
                             ↓
                     [WIZnet W5500]
                             ↓
                        [Ethernet]
                             ↓
             [MQTT Broker / Home Assistant / Grid Monitor]
```

## **📷 Example Images📷 Example Images**

![ESP32-S3 based OpenDTU Fusion board](https://opendtu-onbattery.net/assets/images/3rd_party/opendtu_fusion/overview_PoE.png)

## **💡 Why Choose W5500?**

- Built-in **hardware TCP/IP stack**

- **Reliable Ethernet** connectivity, no DHCP dependency

- Perfect for **static IP applications**

- Recovers network connection after power loss without MCU intervention

## **🛠 Firmware & Configuration**

1. Flash OpenDTU-OnBattery firmware with W5500 support

2. In Web UI, upload a `pin_mapping.json` that defines:

```plaintext
"w5500.cs": 5,
"w5500.rst": 15,
"w5500.int": 14
```

1. Use DHCP or assign static IP via Ethernet config

2. MQTT settings can remain the same as with Wi-Fi

---

## **✅ Use Cases**

- Smart solar inverter control with DPL

- Monitoring power flow in residential systems

- Integration with smart home automation platforms (e.g., Home Assistant)

- Battery energy storage monitoring with open protocol

---

## **🔗 References**

- 📘 [OpenDTU Fusion Overview](https://opendtu-onbattery.net/3rd_party/opendtu_fusion)

- 🧪 [GitHub - OpenDTU-OnBattery](https://github.com/hoylabs/OpenDTU-OnBattery)

- 🌐 [WIZnet W5500 Datasheet](https://wiznet.io/product-item/w5500)

---

## **🛒 Recommended Hardware**

- [OpenDTU Fusion Board (Community Edition)](https://shop.allianceapps.io/products/opendtu-fusion-community-edition)

- [WIZnet W5500 Module or W5500-EVB-Pico](https://www.wiznet.io/product-item/w5500)

- Optional: PoE injector or switch, weatherproof enclosures

---

## **📷 Example: OpenDTU Fusion + W5500 in Action**

- Used in industrial environments where wired networking is a must

- Powered via PoE + communicates over Ethernet without Wi-Fi dependency

---

## **✅ Conclusion**

For those building resilient, always-on smart solar systems, adding **W5500 to OpenDTU Fusion** turns it into an industrial-grade controller.
This setup is ideal for:

- ⚙️ Off-grid battery-backed PV systems

- 🏭 Industrial rooftops or metal-structure houses

- 🧠 Smart energy applications with low tolerance for downtime

Don't rely on Wi-Fi when **Ethernet is king**—especially when W5500 makes it this easy.

---

## **📈 Keywords (SEO)**

`OpenDTU`, `W5500 Ethernet`, `ESP32 solar inverter`, `smart grid energy`, `MQTT Home Assistant solar`,
`OpenDTU OnBattery tutorial`, `ESP32 with W5500 wiring`, `Arduino Ethernet inverter`,
`dynamic power limiter solar`, `solar inverter BMS integration`

---

Source: https://maker.wiznet.io/irina/projects/opendtu-onbattery/
