Hoymiles grid tie inverter

I just got my PV system with Hoymiles inverters and I was able to get data into HA. Crucial part of this solution is the DTU-MI (LAN version of the monitoring system).

My process so far:

First take in use the DTU-MI with the inverters and configure your system into the DTU-MI: Just fill in you inverters ID’s via menu Device Id → Manual config. Wait for a while and the system will automatically add these devices in to the configuration. Refreshing the site might help.

With some research I found a .xml file under the DTU-MI website interface. More precisely
hometable.xml [Fill in your DTU-MI ip] 192.168.x.x/hometable.xml which is semicolon ; -seperated table. The table includes all inverters and separate temperature, voltage and power for each inverter and/or inverter input. Also some total energy readings seems to exist.

The hometable.xml updates periodically so I figured I could try to read it in to HA and I succeeded with this:

sensor:

  • platform: command_line
    name: PV_panel_1
    command: ‘curl -k -s --http0.9 --output - “http://192.168.x.x/hometable.xml”’
    value_template: ‘{{ value.split(“;”)[80] | replace(“W”,“”) | replace(" “,”") | float }}’
    unit_of_measurement: W
    scan_interval: 5

So basically this command line sensor
1 reads the .xml,
2 parses it to ;-separated values (table),
3 picks index 80 from the separated values which for my system is the power for panel 1
4 and then cleans up the value of unnecessary W and extra space and then tells it a number (float).

Bad thing is that with this method an individual query for each panel has to be made every 5 seconds. I have only 9 panels and I pick only power values and so far my DTU-MI has been able to handle the stress. Well actually I have “redundant” HA-system so two identical servers are making the queries… So at least 18 queries per 5 seconds has been working nicely.

Next step could be something more sophisticated…

1 Like

Update on this: Now I’m picking power, voltage and temperature values from 9 panels with 2 servers every 5 seconds = 9x3x2 = 54 queries per 5 seconds and so far no problems with DTU-MI handling this.

But maybe next evolution could be something like this:
1 Only 1 curl per server every 5 second to read the .xml to host file system
2 Use file -sensor in home assistant to read the values from the file.

This should be a lot more efficient…

Hi.
Does anyone know this curl command work with DTU W-100?
And the second Q.
Did anyone hear about the new version DTU PRO?

I tried to search these both but couldn’t get much information from internet.

I found only DTU W100 manual and I think it doesn’t have same kind of own web interface to inspect system performance. The interface seems to be only for configuring WLAN/WIFI properties for the DTU W100.

So for DTU W100 I think this method is not possible. But maybe you could fetch the cloud -service website in a similar method. You could try to inspect the website code with Google chrome by pressing CTRL+SHIFT+I or mouse button 2 -> inspect. You should search the website code for hometable.xml or any similar file which the website uses as data “source”… I was not able to find this but I’m not too familiar with coding.

I’ve managed to create new process for this which eases the network/DTU traffic a lot:

  1. Fetch hometable.xml as whole to hassio folder as hoymiles.log. On ubuntu+hass.io -system I’m running on ubuntu terminal:
    sudo watch -n 5 wget -O /usr/share/hassio/homeassistant/hoymiles.log http://192.168.8.208/hometable.xml

  2. Home assistant file -sensor to read the individual panel values from file:

  - platform: file
    name: PV-panel_1_power
    file_path: '/config/hoymiles.log'
    value_template: '{{ value.split(";")[80] | replace("W","") | replace(" ","") | float }}'
    unit_of_measurement: W
    scan_interval: 5

Hi, matti

Thx for your help. So I 'm not familiar with coding just like you. And I will be waiting for any solution. Maybe sometimes any code guru finds a solution on how to get data from www.hoymiles.com to HA.

1 Like

Hi, I just made my first version of my HoyMiles Solar Data Gateway Add-on [https://github.com/dmslabsbr/hoymiles] (https://github.com/dmslabsbr/hoymiles)

My solar panel also uses the Hoymiles DTU-W100.

And I guess that this add-on should work for everyone that use the Hoymiles Website to view your solar data.

I invite everyone to help in the this tool development.

4 Likes

Hi, you can use this add-on with ou without home assistant.
For use with home assistant, see this docs inside github - hoymiles/DOCS.md at e67cc1d10768ad628dc7f8a19b6a1c9f3ebd8489 · dmslabsbr/hoymiles · GitHub

Hi Daniel. THX for your reply. I know this doc. After point 1d I get the install option as we can in the picture.
image
But after click install, nothing happens and finally, I get the same screen as previously.

Hi, After upgrade home-assistant to last version, I’m receiving an error to: The command ‘/bin/ash -o pipefail -c apk add --no-cache python3 py3-pip’ returned a non-zero code: 2.

What kind of hass instalation do you use? OS or Supervised ?

Hi, Daniel

Wersja core-2021.4.6
Typ instalacji Home Assistant Supervised
Wersja deweloperska false
Supervisor true
Docker true
Środowisko wirtualne false
Wersja Pythona 3.8.7
Rodzina systemu operacyjnego Linux
Wersja systemu operacyjnego 5.10.17-v7l+

Home Assistant Supervisor

ZARZĄDZAJ

System operacyjny hosta Raspbian GNU/Linux 10 (buster)
Kanał aktualizacji stable
Wersja Supervisora supervisor-2021.04.3
Wersja Dockera 20.10.6

Update
Currently I have latest version

Wersja core-2021.5.3
Typ instalacji Home Assistant Supervised

For now, when I was trying to install the add-on I didn’t get any info
Now I have the same message as you described earlier

The command ‘/bin/ash -o pipefail -c apk add --no-cache python3 py3-pip’ returned a non-zero code: 2

Hi, sorry for late answer. But I don’t know what is happening.

Could you try to install this add-on ? GitHub - dmslabsbr/smsUps: Application to read data from SMS BRASIL UPS

Just to test if it could install in your system. It use the same structure.

Hi, have you tried the last add-on version? “0.19” ?

Hi, Your add-on works on my HA from version 0.18. Good job and thx.
BTW Solardata consumes sometime almost 40% CPU%. Is it normal? How much CPU% does it consume in your installation?

Is it? 8.7% ?

now everything looks better. THX

image

Hi there,
I also found the DTU-MI manual accessible from here.
Now starting to understand what has to be done to integrate this DTU with HA.

Daniel congratulations I managed to install . But I’m in doubt about the id of the plant (would it be the last 4 numbers or the complete oink? ) and the Mqtt host, username and password.

Hi,

The plant id is the last 4 or 5 link numbers. Like S-Miles Cloud - Hoymiles Power Electronics Inc. - The plant id is 11111.

The MQTT_host, password and user is used only if you are using an external mqqt server.

If any problem you could send the app log.

The github link is GitHub - dmslabsbr/hoymiles: Hoymiles ADD-ON for Home Assistant