Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request]: add support for SDongle registers #912

Open
5 tasks done
hedkvist opened this issue Jan 31, 2025 · 2 comments
Open
5 tasks done

[Feature request]: add support for SDongle registers #912

hedkvist opened this issue Jan 31, 2025 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed on-hold Don't close when stale

Comments

@hedkvist
Copy link

Describe the issue

I'm using 2 Inverters in cascade. (11+11Kw)
In the Huawei GUI i can set 14.5kw maximum feed to grid under
Dongle -> Configuration -> Active Power Control -> Max grid feed in power.

When i'm trying from HA, i cant set greater then 11000. (11kw)

Describe your Huawei Solar Setup

Inverter Type: Huawei Sun2000-10KTL-M1 and Sun2000-10KTL-M0
Inverter Firmware version: V100R001C00SPC167
sDongle present: Yes
sDongle Type: sDongleA-05 WIFI/Ethernet
sDongle Connectivitiy: Ethernet
sDongle Firmware: V200R022C10SPC126
Power meter present: three phase
Optimizers Present: No
Battery: LUNA2000-SO None
Battery Firmware version: N/A
Huawei Solar integration version: 1.4.1

How do you connect to the inverter?

Please select your connection method

Upload your Diagnostics File

config_entry-huawei_solar-743c45dd48b53cc263c0bae5948c3ef3.json

Upload your relevant debug logs

File "/config/custom_components/huawei_solar/services.py", line 458, in set_maximum_feed_grid_power
    power = await _validate_power_value(service_call.data[DATA_POWER], bridge, rn.P_MAX)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/huawei_solar/services.py", line 274, in _validate_power_value
    raise ValueError(f"Power cannot be more than {maximum_active_power}W")
ValueError: Power cannot be more than 11000W

Please confirm the following:

  • I'm running the latest release of Home Assistant.
  • I'm running the latest release of this integration.
  • I did not find an existing issue describing this problem.
  • I did upload the diagnostics-file that I could retrieve from the 'Devices & Services Page'
  • I did upload the relevant debug logs (via 'Enable Debug Logging'-feature or by manually configuring HA logging)
@hedkvist hedkvist added the bug Something isn't working label Jan 31, 2025
@wlcrs
Copy link
Owner

wlcrs commented Feb 1, 2025

You are trying to change a different setting than in FusionSolar. This integration does not provide dongle values/settings, only inverters and EMMA device are supported.

I don't own an SDongle, and don't want to add code I cannot test. If you are willing to contribute, you can add SDongle detection logic and registers to the underlying huawei-solar Python library. We can then add these SDongle sensors in this HA integration.

If you or anybody else wants to help: please let me know and I will provide some pointers to get you started.

@wlcrs wlcrs added enhancement New feature or request help wanted Extra attention is needed on-hold Don't close when stale and removed bug Something isn't working labels Feb 1, 2025
@wlcrs wlcrs changed the title [Bug]: Not possible to set max feed to grid greater then 11000W (11Kw) 2 Inverters in Cascade. [Feature request]: add support for SDongle registers Feb 1, 2025
@hedkvist
Copy link
Author

hedkvist commented Feb 1, 2025

I would love to help, but don't think i got the knowledge to do so. I'm not so good at Python.
If i can help with something that isn't to advanced, I'm happy to do so.

By the way: If i set feed to grid to e.g. 4000w. the value appears in the dongel.
But a value greater than 11000 isn't possible from HA. therefore I thought it would be enough to remove the 11000w limit in HA if you have e.g. 2 inverters. See pictures.

I looked in the code how to remove the 11000W limit but wasent sure how to do so.

`async def set_maximum_feed_grid_power(
hass: HomeAssistant, service_call: ServiceCall
) -> None:
"""Set Active Power Control to 'Power-limited grid connection' with the given wattage."""
bridge, uc = get_inverter_bridge(hass, service_call)
power = await _validate_power_value(service_call.data[DATA_POWER], bridge, rn.P_MAX)

await bridge.set(rn.MAXIMUM_FEED_GRID_POWER_WATT, power)
await bridge.set(
    rn.ACTIVE_POWER_CONTROL_MODE,
    rv.ActivePowerControlMode.POWER_LIMITED_GRID_CONNECTION_WATT,
)

await uc.async_refresh()`

Image
Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed on-hold Don't close when stale
Projects
None yet
Development

No branches or pull requests

2 participants