StealthChesnut / HA-FoxESS-Modbus

Home Assistant Modbus Integration setup for Fox ESS H1 and AC Inverters
76 stars 37 forks source link

H3 Register Tables #60

Closed rsaemann closed 1 year ago

rsaemann commented 1 year ago

I have a 3-Phase inverter H3-8.0-E and I want to share my register findings for Modbus over Serial with you. The default Modbus device ID (Slave ID) is 247. This can be adjusted in the inverter menu Settings->Communication->RS485->DeviceID.

I put all findings to my fork of this project for 3-phase inverters

LAN RS485 Name data_type scale unit device class Description Validated with display values
? 31000 PV1-Voltage int16 0.1 V Y
? 31001 PV1-Current int16 0.1 A Y
? 31002 PV1-Power int16 W Y
? 31003 PV2-Voltage int16 0.1 V Y
? 31004 PV2-Current int16 0.1 A Y
? 31005 PV2-Power int16 W Y
? 31006 Grid-Voltage-Phase-R int16 0.1 V suggested
? 31007 Grid-Voltage-Phase-S int16 0.1 V suggested
? 31008 Grid-Voltage-Phase-T int16 0.1 V suggested
? 31009 Grid-Current-Phase-R int16 0.1 A Y
? 31010 Grid-Current-Phase-S int16 0.1 A Y
? 31011 Grid-Current-Phase-T int16 0.1 A Y
? 31012 Grid-Power-Phase-R int16 W suggested
? 31013 Grid-Power-Phase-S int16 W suggested
? 31014 Grid-Power-Phase-T int16 W suggested
? 31015 Grid-Frequency int16 0.01 Hz suggested
? 31016 EPS-Voltage-Phase-R int16 0.1 V Y
? 31017 EPS-Voltage-Phase-S int16 0.1 V Y
? 31018 EPS-Voltage-Phase-T int16 0.1 V Y
? 31019 EPS-Current-Phase-R int16 0.1 A Y
? 31020 EPS-Current-Phase-S int16 0.1 A Y
? 31021 EPS-Current-Phase-T int16 0.1 A Y
? 31022 EPS-Power-Phase-R int16 W Y
? 31023 EPS-Power-Phase-S int16 W Y
? 31024 EPS-Power-Phase-T int16 W Y
? 31025 EPS-Frequency int16 0.01 Hz Frequency (island mode) Y
? 31026 Smart-Meter-Power-Phase-R int16 W smart-meter negative=consumption/import Y
? 31027 Smart-Meter-Power-Phase-S int16 W smart-meter negative=consumption/import Y
? 31028 Smart-Meter-Power-Phase-T int16 W smart-meter negative=consumption/import Y
? 31029 Load-Power-Phase-R int16 W Main+EPS out
? 31030 Load-Power-Phase-S int16 W Main+EPS out
? 31031 Load-Power-Phase-T int16 W Main+EPS out
? 31032 Temperature Inverter int16 0.1 °C Y
? 31033 Temperature Inner int16 0.1 °C Y
? 31034 Battery-Voltage int16 0.1 V battery Y
? 31035 Battery-Current int16 0.1 A battery Y
? 31036 Battery-Power int16 W battery Negative=charging Y
? 31037 Battery-Temperature int16 0.1 °C battery Y
? 31038 Battery-SoC int16 % battery Y
? 32001 PV-Energy-total int16 0.1 kWh inverter total_increase Y
? 32002 PV-Energy-daily int16 0.1 kWh inverter total_increase, daily reset Y
? 32004 Battery-Charge-Energy-total int16 0.1 kWh battery total_increase Y
? 32005 Battery-Charge-Energy-daily int16 0.1 kWh battery total_increase, daily reset Y
? 32007 Battery-Discharge-Energy-total int16 0.1 kWh battery total_increase Y
? 32008 Battery-Discharge-Energy-daily int16 0.1 kWh battery total_increase, daily reset Y
? 32013 Smart-Meter-Import-total int16 0.1 kWh smart-meter total_increase, daily reset Y
? 32014 Smart-Meter-Import-daily int16 0.1 kWh smart-meter total_increase Y
? 32016 Smart-Meter-Export-total int16 0.1 kWh smart-meter total_increase, daily reset Y
? 32017 Smart-Meter-Export-daily int16 0.1 kWh smart-meter total_increase Y
? 32022 Load-Energy-total int16 0.1 kWh inverter total_increase Y
? 32023 Load-Energy-daily int16 0.1 kWh inverter total_increase, daily reset Y

Address Bankand 30000 (RS485)
30000-30011 - Model name in hex - 'H3-8.0-E'

adamelo1 commented 1 year ago

Hello, I assume this wont work for the ETH connection as well, right? As I have H3-10-E connected via eth port to my HA but I struggle with pairing it up

rsaemann commented 1 year ago

Hello, I assume this wont work for the ETH connection as well, right? As I have H3-10-E connected via eth port to my HA but I struggle with pairing it up

I first tried the same: Bought the LAN adapter and tried to reach via Modbus-LAN, but no success (port 502 not visible). In a facebook post they said that a new firmware would enable this feature but I did not get it from the support. The support said that Modbus over LAN is not intended and that they do not want to give information about the registers to end-users. So I had to go via RS485-Modbus using a 3€ adapter device to my Raspberry Pi (EAN 9900002427830 USB-RS485).

As for the H1 inverters the register adress are different between LAN and 485 Modbus transaction. If you manage to get the newest firmware for your H3 then it would be great to see, if the register adresses are the same. I used QModbus to read everything and then compared with the inverter display.

wranglatang commented 1 year ago

Cumulative: 32001 PV Energy total "kWh" x0.1 32002 PV Energy daily "kWh" x0.1

32003 Charge Energy total "kWh" x0.1 32004 Charge Energy daily "kWh" x0.1

32007 Discharge Energy total "kWh" x0.1 32008 Discharge Energy daily "kWh" x0.1 ** No direct grid connection yet, therefore these vlues 32009-32021 are missing here because they are zero. Seems to handle the Grid in and out connection" 32022 EPS Energy total "kWh" x0.1 32023 EPS Energy daily "kWh" x0.1

I am reading data from my hybrid inverter via the lan port and would really like to get the Cumulative data! Happy to do some tests if any has any suggestions as to what the setting for the Slave and Address would be! :)

adamelo1 commented 1 year ago

I have updated FW on 1.33 but I am kinda noob to RPI and modbus for now, @wranglatang would you mind sharing your yaml files for the reading the data via LAN port? It would be really appreciated 🥇

wranglatang commented 1 year ago

Im not using an esp / serial converter. My Inverter has a lan port that im able to plug straight into. So i just used the configuration that @StealthChesnut has provided in his code.

adamelo1 commented 1 year ago

I also have inverter with LAN port, but I guess you have H1 type? As the configuration from @StealthChesnut does not work for AIO H3 inverters, or am I wrong?

rsaemann commented 1 year ago

I created a fork to add support of H3 inverters

markopeter1973 commented 1 year ago

H3 12kw , works with RS485 to Eth Bridge,

williamjeccles commented 1 year ago

@rsaemann if you can create a new config file for h3 and submit it as a pull request, i'll review and merge.