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ā¦
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:
-
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
-
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.
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.
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.
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
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?
now everything looks better. THX
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.