wlcrs / huawei_solar

Home Assistant integration for Huawei Solar inverters via Modbus
GNU Affero General Public License v3.0
559 stars 89 forks source link

[Bug]: forcible_charge_soc service does not seem to work #385

Closed igorzavalyshyn-centrica closed 1 year ago

igorzavalyshyn-centrica commented 1 year ago

Describe the issue

First of all, thanks for working on this integration. It was a huge help for me.

While the forcible_charge() service works as expected, the forcible_charge_soc service does not. Upon execution it just sets the battery to maximum self-consumption mode instead of charging to a given SOC level.

The weird thing is that forcible_discharge_soc service works as expected. So do forcible_charge() and forcible_discharge() ones.

Does it work on your side?

Note, I'm using your code as an example to follow in my Scala code, so I can't provide HA logs unfortunately. I do follow your code precisely: I set the same registers to the same values.

Bescribe your Huawei Solar Setup

Inverter Type: SUN2000-4.6KTL-L1 Inverter Firmware version: V200R001C00SPC130 SDongle present: yes Power meter present: three phase Battery: LUNA2000 5kWh Battery Firmware version: V100R002C00SPC119

How do you connect to the inverter?

Over serial, with a serial-to-USB stick

Upload your Diagnostics File

Drag & Drop your Diagnostics File here.

Upload your relevant debug logs

n/a

Please confirm the following:

igorzavalyshyn-centrica commented 1 year ago

False alarm, sorry. I understood the cause of my problem. I was setting the target SOC value in range of 1-100% but that register value has 10 gain which means I need to set my target value multiplied by 10, i.e. 500.

I close this issue but it's probably a good idea to check whether your code does 10x multiplication as well.

Once again, thanks for working on this!