OpenDTU: Reading PV inverters
Tags: solar, photovoltaik, tools, software
Published: 2023-12-12 22:19:06

---
title: OpenDTU: Reading PV inverters
published: true
date: 2023-12-12 20:31:43 UTC
tags: Solar,Photovoltaik,tools,Software
canonical_url: 
---

 ![OpenDTU: Reading PV inverters](https://blog.disane.dev/content/images/2023/12/opendtu_reading-pv-inverters_banner.jpeg)

I've also had a small balcony power plant for about six months now because I was really interested in the topic and wanted to know what potential it offers.

## Components of my balcony power plant ☀️

To be honest, I don't have a classic off-the-shelf balcony power plant, such as those offered by ALDI and the like from time to time. Instead, I did a lot of research on the internet to find out which components are good and which inverters do a good and effective job.

Not so long ago, Alternate had some really good offers. There was the [Trinasolar solar panel TSWM-DE09R.08W](https://www.alternate.de/Trinasolar/Solarpanel-TSM-DE09R-08W-425-Watt-0-/html/product/1909290?ref=blog.disane.dev) with 425W for just under 146€. I then bought a [Hoymiles HM-800 from Offgridtec](https://www.offgridtec.com/hoymiles-hm-800-microinverter-modulwechselrichter.html?ref=blog.disane.dev) for just under €169. After I had set everything up, I naturally wanted to read out the inverter via Home Assistant and automate it if necessary.

![OpenDTU: Reading PV inverters](https://blog.disane.dev/content/images/2023/11/IMG_1740.jpeg)

Hoymiles offers a solution to do just that with the DTU (pro). There are two variants. One is the DTU-WLite for just under 59€ (incl. VAT) or the DTU-Pro for 249€ (incl. VAT).

![OpenDTU: Reading PV inverters](https://blog.disane.dev/content/images/2023/11/giphy-3.gif)

Wow, I had to let that sink in. Both variants require access to the S-Miles Cloud. Uncool and definitely too expensive.

## Open source to the rescue 🆘

And that's exactly why I love the developer community. They don't put up with overpriced products that have a meagre range of functions. They reverse-engineer the product and simply build their own software. This is exactly how the OpenDTU software was created. The nice thing about OpenDTU is that you can not only use it to read out data, you can also use it to set the limit of the inverter, which some suppliers/grid operators require.

[

GitHub - tbnobody/OpenDTU: Software for ESP32 to talk to Hoymiles Inverters

Software for ESP32 to talk to Hoymiles Inverters. Contribute to tbnobody/OpenDTU development by creating an account on GitHub.

 ![OpenDTU: Reading PV inverters](https://github.githubassets.com/assets/pinned-octocat-093da3e6fa40.svg)GitHubtbnobody

 ![OpenDTU: Reading PV inverters](https://opengraph.githubassets.com/fe59096ff13fd05d2b8d3c2dcc949cf570199da2c5bd96c1b94ff9b04476c013/tbnobody/OpenDTU)
](https://github.com/tbnobody/OpenDTU?ref=blog.disane.dev)

Only a few parts are needed:  
- A microcontroller (ESP32 is best)  
- A radio antenna ([NRF24L01+](https://github.com/tbnobody/OpenDTU?ref=blog.disane.dev#nrf24l01-radio-board-see-inverter-table-above-for-supported-inverters) or [CMT2300A](https://github.com/tbnobody/OpenDTU?ref=blog.disane.dev#cmt2300a-radio-board--see-inverter-table-above-for-supported-inverters) depending on the inverter)  
- Soldering iron, stranded wires etc. (or for those who are not so DIY-savvy). (or for people who are not so DIY-minded, a ready-made [kit](https://shop.blinkyparts.com/en/OpenDTU-Your-evaluation-for-your-balcony-solar-system/blink237542?ref=blog.disane.dev))  
- A housing (or a kit with a housing)

All in all, you should spend around €20 on DIY including a housing from the 3D printer. If you want everything ready-made, you might have to spend 30-60€, depending on the supplier. But it's still cheaper than the official "garbage".

## Wiring and soldering: DIY is the order of the day 🥽

Unfortunately, you won't be able to avoid assembling and soldering. Whether you order a kit or all parts individually.

❗

Soldering such parts requires some experience and, above all, care. If you've never done this before, ask a friend or someone who can. You can very quickly completely destroy the components here.

Thanks to the instructions in GitHub, however, this can be done quickly and easily if you can solder and already have some experience in this area.

The pin assignments are all very well described here (e.g. for the NRF24L01+):

![OpenDTU: Reading PV inverters](https://github.com/tbnobody/OpenDTU/raw/master/docs/Wiring_ESP32_Schematic.png)

![OpenDTU: Reading PV inverters](https://github.com/tbnobody/OpenDTU/raw/master/docs/Wiring_ESP32_Symbol.png)

Please take a very thorough look at this data and the assignments in the documentation and check everything again. I can only warmly recommend it to you:

[

GitHub - tbnobody/OpenDTU: Software for ESP32 to talk to Hoymiles Inverters

Software for ESP32 to talk to Hoymiles Inverters. Contribute to tbnobody/OpenDTU development by creating an account on GitHub.

 ![OpenDTU: Reading PV inverters](https://github.githubassets.com/assets/pinned-octocat-093da3e6fa40.svg)GitHubtbnobody

 ![OpenDTU: Reading PV inverters](https://opengraph.githubassets.com/fe59096ff13fd05d2b8d3c2dcc949cf570199da2c5bd96c1b94ff9b04476c013/tbnobody/OpenDTU)
](https://github.com/tbnobody/OpenDTU?tab=readme-ov-file&ref=blog.disane.dev#wiring-up-the-nrf24l01-module)

For the little bit of soldering I do, a 30€ planer from Amazon is enough, it doesn't have to be a whole Weller soldering station. But make sure that your solder does not contain lead. Lead vapors are not very healthy and can be really nasty.

Once you have soldered everything together, you can go straight to the software.

## The microcontroller only tastes fried 🥩

So that the microcontroller now knows what it needs to do, it needs the firmware.

❗

You also need to be very careful when flashing the firmware. If you do something wrong, it can happen that your microcontroller is "bricked". Therefore, please familiarize yourself well with flashing the controller and check everything in advance.

There are several variants for flashing, which are described very well at OpenDTU. Here you should decide on a variant. I personally prefer the variant via the ESP flash tool.

[

GitHub - tbnobody/OpenDTU: Software for ESP32 to talk to Hoymiles Inverters

Software for ESP32 to talk to Hoymiles Inverters. Contribute to tbnobody/OpenDTU development by creating an account on GitHub.

 ![OpenDTU: Reading PV inverters](https://github.githubassets.com/assets/pinned-octocat-093da3e6fa40.svg)GitHubtbnobody

 ![OpenDTU: Reading PV inverters](https://opengraph.githubassets.com/fe59096ff13fd05d2b8d3c2dcc949cf570199da2c5bd96c1b94ff9b04476c013/tbnobody/OpenDTU)
](https://github.com/tbnobody/OpenDTU?tab=readme-ov-file&ref=blog.disane.dev#flashing-and-starting-up)

## He's alive! 🧟

If everything went well, OpenDTU will now set up an access point with the SSID `OpenDTU-*`. You can simply use this with the device of your choice and access the OpenDTU web interface in the browser via the URL [http://192.168.4.1](http://192.168.4.1/?ref=blog.disane.dev).

You must then enter your WLAN and password under `Settings` -> `Network`. The access point will then be terminated after 3 minutes and OpenDTU will connect to the specified WLAN.

You can then return to the admin interface via the assigned IP address.

💡

OpenDTU requires an NTP server, as this is needed to keep the time and this time is sent to the inverter with every request. So please do not switch off all external traffic for OpenDTU (unless you have an internal NTP server).

## Configure inverter 🛠️

An inverter can then be configured in the admin interface under Settings:

![OpenDTU: Reading PV inverters](https://blog.disane.dev/content/images/2023/11/image-25.png)

This is absolutely necessary, because without it, the inverter cannot be read out. You can find the serial number on the device itself. As far as I know, this is used to enable practical authentication on the device and to validate that communication with the device is permitted. Otherwise, any neighbor could read your inverter.

The serial number is also used to determine which type of inverter it is and what specifications it has. Once the inverter has been created, you can edit it and make a few more settings here. My settings for the HM-800 look like this:

![OpenDTU: Reading PV inverters](https://blog.disane.dev/content/images/2023/11/image-26.png)
_General settings of the inverter_

![OpenDTU: Reading PV inverters](https://blog.disane.dev/content/images/2023/11/image-27.png)
_String settings_

Please adjust the data according to your string/panel. OpenDTU will then need a few minutes to establish the connection with your inverter. If everything went well, it should look like this:

![OpenDTU: Reading PV inverters](https://blog.disane.dev/content/images/2023/11/image-28.png)

I am currently in the evening, which is why no connection to the inverter can be established. This is completely normal, as the inverter is only powered by the current from the panels.

That's actually all there is to it. Now you have successfully connected your inverter digitally and can always read the values.

## Integrate OpenDTU into Home Assistant

As also described in my article "[Making analog gas and water meters smart](https://blog.disane.dev/analoge-gas-und-wasserzahler-smart-machen)", OpenDTU also offers an MQTT interface. Here, too, there is a Home Assistant Discovery that can be switched on. Simply enter the data of the MQTT broker and that's it:

![OpenDTU: Reading PV inverters](https://blog.disane.dev/content/images/2023/11/image-29.png)
_MQTT settings_

After this, the inverter should now appear as a device in the Home Assistant and have all parameters created as entities:

![OpenDTU: Reading PV inverters](https://blog.disane.dev/content/images/2023/11/image-30.png)

This can then be used to run useful automations and also record the generation/feed-in in the Home Assistant energy dashboard. This way, you always have a good overview of what your system is doing and what energy costs you are saving with the electricity you produce yourself:

![OpenDTU: Reading PV inverters](https://blog.disane.dev/content/images/2023/11/image-31.png)

![OpenDTU: Reading PV inverters](https://blog.disane.dev/content/images/2023/11/image-32.png)

## Dedicated tab in the Home Assistant for the PV system

So that I always have all the parameters in view, I have also built a nice dashboard in the Home Assistant for it:

![OpenDTU: Reading PV inverters](https://blog.disane.dev/content/images/2023/11/image-33.png)

For the yield forecast I use the integration "Forecast.Solar":

[

Forecast.Solar

Instructions on how to integrate Forecast.Solar within Home Assistant.

 ![OpenDTU: Reading PV inverters](https://www.home-assistant.io/images/favicon-192x192.png)Home AssistantHome Assistant

 ![OpenDTU: Reading PV inverters](https://www.home-assistant.io/images/default-social.png)
](https://www.home-assistant.io/integrations/forecast_solar?ref=blog.disane.dev)

Everything else should be possible to implement with Home Assistant board tools. I have exported the dashboard for you and stored it as a Gist on GitHub if you are interested.

<!--kg-card-begin: html--><script src="https://gist.github.com/Disane87/64c8a0abde1c5a251e6879a14288b024.js"></script><!--kg-card-end: html-->
* * *

Have you managed the setup and now have your inverter visible in the WLAN at all times? Let me know in the comments 👇