wills106 / homeassistant-solax-modbus

SolaX Power Modbus custom_component for Home Assistant (Supports some AlphaESS, Growatt, Sofar, Solinteg, Solis, SRNE, Swatten)
320 stars 102 forks source link

[FR] Add support for SolaX Gen5 X1-IES / X3-IES / X3-Ultra Hybrid Inverters #813

Open wills106 opened 8 months ago

wills106 commented 8 months ago

Solax X3 Ultra 25k > H3BC25...

Originally posted by @simowNgithub in https://github.com/wills106/homeassistant-solax-modbus/discussions/520#discussioncomment-8790368

Add support for SolaX Gen5 X1-IES / X3-IES / X3-Ultra Hybrid Inverters

2024.03.5 adds support for Battery 2 and MPPT 3

It looks like quite a few of the Selects and Number entities have moved to different registers on the Gen5 Inverters. So I wouldn't make any changes to those yet.

Originally posted by @wills106 in https://github.com/wills106/homeassistant-solax-modbus/discussions/520#discussioncomment-8829590

wills106 commented 8 months ago

I have just released 2024.03.6 which corrects the Generator Control as the registers have moved to a different location.

I have removed the Following from the Gen5: https://github.com/wills106/homeassistant-solax-modbus/blob/176d15b889b29635aa1980ecf5c03690c03ee733/custom_components/solax_modbus/plugin_solax.py#L3259-L3382 I'm not sure if they are present on the Gen5.

simowNgithub commented 8 months ago

@wills106 big thanks! I updated and checked your new implementation, following entities getting wrong values:

The example with the battery capcatiy is really confusing, because you map the same register to solax_battery_1_capacaty and solax_battery_capacaty. One mapping is working and the other mapping is not working.

image
wills106 commented 8 months ago

It looks like you have a mix of new and old entities there. Did you manually add your Inverter like https://github.com/wills106/homeassistant-solax-modbus/discussions/520#discussioncomment-8814618 I would remove the Inverter from the Integration page, restart HA and add it back in again. it should then configure itself correctly. We can then look at which entities need scaling correctly.

simowNgithub commented 8 months ago

I always add a second Inverter„SolaxTest“ with the same IP address. I think then everything is on a clean setup, correct?

Krawuzzi commented 7 months ago

removed inverter, restarted and added ti back again,

my battery is at 20% but shows 158%

Screenshot 2024-03-20 222400
Krawuzzi commented 7 months ago

now restored from backup to old version again

so battery input/output energy show 5.3 and 5.4 kWh with the old version which is correct new version shows 33.0 and 11,7kWh

Screenshot 2024-03-20 224933
wills106 commented 7 months ago

I don't understand how Battery 1 Capacity can be different from Battery Capacity in the old version.

They are the same register just renamed in the new version.

Although Battery Total Capacity is returning the correct 20%

https://github.com/wills106/homeassistant-solax-modbus/blob/176d15b889b29635aa1980ecf5c03690c03ee733/custom_components/solax_modbus/plugin_solax.py#L4142-L4159

Same with Battery Input / Output Energy Today they are the same register on both versions of the Integration

simowNgithub commented 7 months ago

@wills106 what input do you need to fix this issues, at the moment im testing every release, but still same issue and do a failover to the 2024.03.4.

Krawuzzi commented 7 months ago

I updated to 2024.04.1 because the older version did not work with the April update of HomeAssistant. I tried a few things but ended up changing it back to Gen4 by editing this line:

elif seriesnumber.startswith('H3BC25'): invertertype = HYBRID | GEN4 | X3

Whenever i change versions of this addon, or just changing from GEN5 to GEN4 I need to restart Homeassistant and also the Solax inverter. Is this normal behavior? My guess is that something is messing up the Solax inverter when GEN5 is activated.

wills106 commented 7 months ago

Restarting HA is normal if changes to the code takes place.

I can't test reading registers that don't exist. My Inverter just return 0.

I have released 2024.04.2 does it now give any ModbusIO errors when it tries to read registers that don't exist?

simowNgithub commented 7 months ago

Restarting HA is normal if changes to the code takes place.

I can't test reading registers that don't exist. My Inverter just return 0.

I have released 2024.04.2 does it now give any ModbusIO errors when it tries to read registers that don't exist?

Does it help if i open you the modbus port for some hours?

Krawuzzi commented 7 months ago

with 2024.04.2

image

image

image

image

image image image
KOPRajs commented 7 months ago

I'm trying to get 2x SolaX X3-ULT-30K (master-slave) to work with HA and I can provide another information if needed.

Serial: H3BC30JC...... HA: 2024.4.2

Also I've got a PDF with the Modbus documentation v3.29 from the SolaX support, but I'm not sure if it can be uploaded directly here. Let me know where should I send it, if needed.

Krawuzzi commented 6 months ago

I now have all my PV panels installed and I'm using all three MPPTs. The workaround of disguising the Ultra as a Gen4 is no longer working as it only uses the first two MPPTS for PV power total value.

I have some of the most important parameters working now, except battery energy input/output and battery charge.

@KOPRajs I would be very interested in the Modbus documentation, can you upload it here or send it to the following email: modbussolaxultra@magspam.net

Thank you

simowNgithub commented 6 months ago

image image image

I created a pull request which fixed the issue on my HA 2024.04.4. https://github.com/wills106/homeassistant-solax-modbus/pull/877

Could you test it by changing the file on your installation? to give @wills106 feedback that the changes are correct?

Krawuzzi commented 6 months ago

@simowNgithub Which values have been corrected by your changes? Just tested and still had wrong values. Maybe i did something wrong, will try again tomorrow.

simowNgithub commented 6 months ago

@simowNgithub Which values have been corrected by your changes? Just tested and still had wrong values. Maybe i did something wrong, will try again tomorrow.

Measured_Power, House_Load, Battery_1_* dropped values are: Battery_*

wills106 commented 6 months ago

I have just released 2024.05.2 containing these changes.

Krawuzzi commented 6 months ago

Just tested 2024.05.2, looking very good now. Thank you very much!

The only thing i found is that house load has a value of 0 W.

wills106 commented 6 months ago

I'm just working on adding more info to the Device info page.

image

On the Gen3 and Gen4 it only displays the part after the decimal point. ie 32 and 28 I have had to manually add in the '3.'

On the Gen5's can you let me know which of the Firmware Versions return values that match the Firmware version of the Arm and DSP? The version on the LCD might be fixed at an old number.

For the X3-Ultra the known versions are: ARM:V009.07 DSP: V007.01 ARM:V008.04 DSP: V007.02 ARM: V010.03 DSP: V008.02 ARM: V011.03 DSP: V009.06 ARM: V012.00 DSP: V010.07

Krawuzzi commented 6 months ago

Not sure if that is what you are asking for: 2024-05-14 13 53 372551 2024-05-14 13 53 402552

wills106 commented 6 months ago

That's the version I mentioned fixed at an old number. I have the same on my older Gen3. I think it must be for the boot loader.

There will be sensors disabled by default under Diagnostic. They will look something like: image

Are you able to enable them and provide a screenshot of what they show.

You can see a list here:

https://github.com/wills106/homeassistant-solax-modbus/blob/b9d5b8acf9523a727789bb4d6c42e61c630d3317/custom_components/solax_modbus/plugin_solax.py#L2245-L2326

Anything with GEN5 at the end of allowedtypes =

Krawuzzi commented 6 months ago

image

wills106 commented 6 months ago

It looks like you could be on ARM 11.03, but DSP doesn't match 9.6. It would appear to be 4.6? Will have to wait and see if we get more feedback from others.

@simowNgithub Does your Inverter report "Inverter Temperature" in the hundred degrees region as well like @Krawuzzi ?

I can scale it down if it's the same for both of you on the Gen5.

Could you all let me know what "Inverter Rated Power" returns in the Integration and what your Inverter is rated at. For example if your Inverter is a SolaX X3-ULT-30K does it return 30,000 or just 30?

simowNgithub commented 6 months ago

It looks like you could be on ARM 11.03, but DSP doesn't match 9.6. It would appear to be 4.6? Will have to wait and see if we get more feedback from others.

@simowNgithub Does your Inverter report "Inverter Temperature" in the hundred degrees region as well like @Krawuzzi ?

I can scale it down if it's the same for both of you on the Gen5.

Could you all let me know what "Inverter Rated Power" returns in the Integration and what your Inverter is rated at. For example if your Inverter is a SolaX X3-ULT-30K does it return 30,000 or just 30?

Yes, same issue on my side

You mean: Enable the entity by changing your the custom script and give you the value of this entity? At the moment the entity is deactivated.

image

wills106 commented 6 months ago

"Inverter Temperature"

I can easily split that off for a Gen5 specific one to scale it to 34.5oC in Krawuzzi case above.

wills106 commented 6 months ago

You mean: Enable the entity by changing your the custom script and give you the value of this entity? At the moment the entity is deactivated.

If you click on it, there is an option to enable it when you press the cog / gear icon.

Krawuzzi commented 6 months ago

image i have the Ultra with 25kW

wills106 commented 6 months ago

image i have the Ultra with 25kW

Thanks, I can start to replicate https://github.com/wills106/homeassistant-solax-modbus/issues/813#issuecomment-2109473775 for the Gen5 (Device Info)

I'll also fix "Inverter Temperature"

Krawuzzi commented 5 months ago

I think the firmware of my inverter has been updated today. Now, the "charger upper limit" setting is working as intended, this never worked until today.

image image

simowNgithub commented 2 months ago

@wills106 today I tested a lot and found some unclear values over the solax inverter modbus interface....

The solax cloud tells me, that i have a at night sleep power on the house of 200-300w. I think this is / could be a correct value.

IMG_1381

The modbus interface show me the real power value of 500-1000w in the night. This is not correct I think?

IMG_1383

What could be the correct value is the sum of the three Inverter Power Sensors, but the "Inverter Power" is always set to 0 W?

IMG_1384