mletenay / home-assistant-goodwe-inverter

Experimental version of Home Assistant integration for Goodwe solar inverters
https://discord.gg/TaXyWXT
MIT License
149 stars 43 forks source link

Goodwe 6000-DT, E_total does not indicate the correct value. #49

Closed supergroover closed 3 years ago

supergroover commented 3 years ago

In home assistant "sensor.goodwe_e_total" gives a value of 240,8 kWh but according to the semsportal it should be 13.348,10 kWh. The value of "sensor.goodwe_e_day" seems good. There is no e_month sensor. I cannot trace the value of e_total stated in Home assistant to something that is stated in the semsportal.

Goodwe 6000 DT

I've also installed the addon "goodwe Sems api to MQTT" and it gives me the following values:

Solar Goodwe produced 13.348,1 kWh
sems_battery_soc 200,0 %
sems_battery_soh -0,100000000000364 %
sems_grid_current 1,8 IAC
sems_grid_frequency 50,01 Hz
sems_grid_voltage 226,4 VAC
sems_inverter_status Online
sems_inverter_temperature 40,8 °C
sems_inverter_type GW6000-DT
sems_produced_this_month 704,6 kWh
sems_produced_today 4,1 kWh
sems_solar_power 1.213,0 W
sems_str_1_current 2,1 VDC
sems_str_1_voltage 322,8 VDC
sems_str_2_current 2,2 VDC
sems_str_2_voltage 327,2 VDC

How can i help you ?

Values of sensor.goodwe_inverter:

timestamp: '2021-08-31T11:12:32'
vpv1: 310.8
ipv1: 3.3
ppv1: 1026
vpv2: 317.2
ipv2: 3.4
ppv2: 1078
xx14: -1
xx16: -1
xx18: -1
xx20: -1
xx22: -1
xx24: -1
xx26: -1
xx28: -1
vline1: -0.1
vline2: -0.1
vline3: -0.1
vgrid1: 230.4
vgrid2: 228.2
vgrid3: 231
igrid1: 2.8
igrid2: 2.7
igrid3: 2.8
fgrid1: 49.99
fgrid2: 50.01
fgrid3: 49.99
pgrid1: 645
pgrid2: 616
pgrid3: 647
xx54: 0
ppv: 1910
work_mode: 1
work_mode_label: Normal
xx60: 0
xx62: 0
xx64: 0
xx66: -1
xx68: -1
xx70: -1
xx72: -1
xx74: -1
xx76: -1
xx78: 0
xx80: -1
temperature: 40.8
xx84: -1
xx86: -1
e_day: 4.8
xx90: 2
e_total: 241.8
xx94: 0
h_total: 8451
safety_country: 20
safety_country_label: Holland
xx100: 0
xx102: -1
xx104: 0
xx106: -1
xx108: 0
xx110: -1
xx112: 0
xx114: -1
xx116: -1
xx118: -1
xx120: -1
xx122: -1
funbit: 0
vbus: 602.9
vnbus: 306.1
xx130: -1
xx132: -1
xx134: 207
xx136: 351
xx138: 752 (This one seems the monthly produced, e_month?)
xx140: 0
xx142: 0
xx144: 100
model: GW6000-DT
serial_number: ***censored***
software_version: 22.22.10
unit_of_measurement: W
friendly_name: PV Inverter
icon: mdi:solar-power

xx138: 752 (This one seems the monthly produced, e_month?)

mletenay commented 3 years ago

These two sems/mqtt values do not sound very reliable :-D sems_battery_soc 200,0 % sems_battery_soh -0,100000000000364 %

I'll check the code, problem might be we read just 2 bytes instead of 4 in e_total.

supergroover commented 3 years ago

These two sems/mqtt values do not sound very reliable :-D sems_battery_soc 200,0 % sems_battery_soh -0,100000000000364 %

No, you are right, :-) I've no battery :-)

mletenay commented 3 years ago

Indeed, if xx90 is included into e_total as upper two bytes, the e_total is 13349.0 kWh. But is it realistic ? e_total/h_total = cca 1.8kW average permanent output ? Maybe yes, although on sample data from XS inverter e_total will get from 201kWh to 13 198 950kWh. That's odd. Either the sample data are wrong or DT uses 4 bytes and XS only 2 ??

mletenay commented 3 years ago

Actually it would help if you can provide the raw hex value of the inverter data response (from the debug output of the plugin, see troubleshooting in readme how to enable it). I'll then include it to unit tests to ensure future correctness of the code ...

supergroover commented 3 years ago

You mean this code?

2021-08-31 12:03:04 DEBUG (MainThread) [custom_components.goodwe.goodwe.protocol] Connection made to address ('192.168.1.193', 8899)
2021-08-31 12:03:04 DEBUG (MainThread) [custom_components.goodwe.goodwe.protocol] Sent: 7f0375940049d5c2
2021-08-31 12:03:05 DEBUG (MainThread) [custom_components.goodwe.goodwe.protocol] Received: aa557f039215081f0c03020c88001f0ca90020ffffffffffffffffffffffffffffffffffffffffffff08d008f90906001b001a001b1386138613860000072b0001000000000000ffffffffffffffffffffffff0000ffff019dffffffff003c0002097e0000210300140000ffff0000ffff0000ffff0000ffffffffffffffffffff0000177c0beeffffffff00cf016302f00000000000649f03

e_total by Sems portal = 13350.30 kWh e_day by Sems portal = 6,10 kWh ppv = 1.955kW

mletenay commented 3 years ago

Exactly, that's what will help. I'll fix the code, but I need to make XS specific tweak back to 2 bytes, so it I'll do it later evening...

supergroover commented 3 years ago

Glad I could help. Thank you.

mletenay commented 3 years ago

DT's e_total was fixed in v0.8.5