As it is now allowed in germany to use "plug-and-play" photovoltaic systems with limit of 800 Watt, I decided to build this on my garage. The hardware I used is listed here: HARDWARE.md.
After installing the PV, I decided to integrate this into a new home automation system. The possibilites I found, are described here: INTEGRATION.md.
Last but not least I decided to use "Home Assistant". Details are described here HOMEASSISTANT.md
The aim of this documentation is, to delivery the sources, and describe the decisions and some experience.
The content:
- In src folder you could find working YAML files for integration into Home Assistant.
- In examples folder you could find json data generated by my devices (some data are anonymized)
- In docs folder you could find background informations
The implementation uses the REST API of the OpenDTU as described here: https://www.opendtu.solar/firmware/web_api/.
The following APIs are covered by the YAML file:
- http://192.168.178.15/api/eventlog/status?inv=123456789001
- http://192.168.178.15/api/limit/status
- http://192.168.178.15/api/livedata/status
- http://192.168.178.15/api/mqtt/status
- http://192.168.178.15/api/network/status
- http://192.168.178.15/api/ntp/status
- http://192.168.178.15/api/power/status
- http://192.168.178.15/api/system/status
The following APIs are not covered by the YAML file:
- http://192.168.178.15/api/prometheus/metrics
- All APIs which require authentication (as I do not need them currently)
- All POST APIs.
The Integration of the OpenDTU is described here:
How to use my work?
- You could read what I did, just for experience.
- You could get the "opendtu.yaml" file and use it
- Change the IP addresses inside the file to your addresses.
- Change the numbers of the inverters to your inverter numbers.
- If you have not exactly 3 inverters, you need to delete or copy some parts of the YAML files.
- If you have not exactly 1 string per inverter, you need to delete or copy some parts of the YAML files.
- The configuration.yaml is only an example, you have your own.
- Add the last row. You need the "rest:" line.
- If the "rest:" line is in configuration.yaml, you do not need it in opendtu.yaml.
- There are two versions:
- The opendtu.yaml contains the whole REST API for my OpenDTU, with all data. It is include by the "rest:" line in configuration.yaml.
- The opendtu_small.yaml contains only the energy values, a minimum set of data.
- Contact me in case of questions, I will try to answer. Please give me time for that.
This work is based on the following guides, which I could recommend and for which I thank a lot:
- Shelly
- Shelly Parts and good video descriptions: https://shellyparts.de/
- Synology
- Synology DS224+ RAM upgrade by Daniel Medic: https://www.youtube.com/watch?v=PdeafJfMXdw
- OpenDTU
- OpenDTU: https:/tbnobody/OpenDTU
- OpenDTU Web API: https://www.opendtu.solar/firmware/web_api/
- The OpenDTU Soldering Tutorial: https://binary-kitchen.github.io/SolderingTutorial/OpenDTU_Breakout/manual/OpenDTU_Breakout_de.pdf
- Ready-to-use OpenDTU Hardware: https://shop.blinkyparts.com/de/OpenDTU-NRF-Deine-Auswertung-fuer-deine-Balkonsolaranlage-kompatibel-zu-Hoymiles-HM-Serie-NRF-Modul/blink237542
- Home Assistant
- Tutorial by Simon42 https://www.simon42.com/home-assistant-template-sensoren-hilfsentitaten/#wechselrichter-anbinden-mit-restapi
- Home Assistant Integration REST API: https://www.home-assistant.io/integrations/rest/
- Home Assistant Device Classes: https://www.home-assistant.io/integrations/sensor#device-class
- Debug Tool for JSON data: https://jsonpath.com/
My daily work is as an IT architect in different software projects, mainly programming with Java. I do use different cloud solutions, most of the time kubernetes based. So ELK, Grafana, and so on is not new to me. Home automation is new, and just a hobby.
I am living in germany, so the sources are sometimes in german language. Beg you pardon. :-)