Skip to content

Commit

Permalink
Merge branch 'main' of github.com:wlcrs/huawei_solar into main
Browse files Browse the repository at this point in the history
  • Loading branch information
wlcrs committed May 5, 2022
2 parents 7dacc45 + ad1dbfe commit e303f1b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,15 @@ configured to allow immediate integration into the HA Energy view.

## Installation

1. [Connect Home Assistant to the WiFi Access Point of your Huawei inverter.](https://github.com/wlcrs/huawei_solar/wiki/Connecting-to-the-inverter#getting-connectivity-between-ha-on-your-home-network-and-the-inverter-ap)
1. Install this integration with HACS, or copy the contents of this
repository into the `custom_components/huawei_solar` directory
2. Restart HA
3. Start the configuration flow:
1. Restart HA
1. Start the configuration flow:
- [![Start Config Flow](https://my.home-assistant.io/badges/config_flow_start.svg)](https://my.home-assistant.io/redirect/config_flow_start?domain=huawei_solar)
- Or: Go to `Configuration` -> `Integrations` and click the `+ Add Integration`. Select `Huawei Solar` from the list

4. Enter the IP address of your inverter (192.168.200.1 if you are connected to
its WiFi AP). The slave id is typically 0. You should only check the
`Advanced: enable parameter configuration` checkbox if you intend to dynamically
change your battery settings.
4. Enter the IP address of your inverter (192.168.200.1). The slave id is typically 0. You should only check the `Advanced: enable parameter configuration` checkbox if you intend to dynamically change your battery settings.

![](images/configuration-dialog.png)

Expand All @@ -36,9 +34,9 @@ the FusionSolar App.

## What IP-address and port should I enter?

Starting from firmware updates released in December 2021, Huawei has closed the Modbus-TCP interface on the network to which the inverter connects. ie. If the inverter is connected to your home network on `192.168.1.11`, it will no longer be possible to connect on that IP.
Starting from firmware updates released in December 2021, Huawei has closed the Modbus-TCP interface on the network to which the inverter connects. ie. If the inverter is connected to your home network on `192.168.1.11`, it will no longer be possible to connect on that IP. This also applies for connecting via the Dongle. You will need to connect to the inverter using the WiFi AP.

In this case, you must connect your Home Assistant device `SUN2000-<inverter serial number>` WiFi network, and use the Modbus-TCP interface available on `192.168.200.1`. In most cases, the port has been moved to `6607` instead of `502`.
To configure your WiFi access, connect to the WiFi SSID `SUN2000-<inverter serial number>`, and use the Modbus-TCP interface available on `192.168.200.1`. In most cases, the port has been moved to `6607` instead of `502`.


### How do I connect to the inverter WiFi?
Expand All @@ -52,6 +50,8 @@ In Settings > Communication Configuration:
- Set "Dongle Parameter Settings" → "Modbus TCP" → "Connection" to "Enabled (Unrestricted)"
- Set "Parallel system communication parameter setting" → "Parallel communication mode" to "RS485"

Note: Having an SDOngle will not remove the requirement of connecting to the WiFi AP of the inverter.

## Inverter polling frequency

The integration will poll the inverter for new values every 30 seconds. If you wish to receive fresh inverter data less (or more) frequently, you can disable the automatic refresh in the integration's system options (Enable polling for updates) and create your own automation with your desired polling frequency.
Expand Down
2 changes: 1 addition & 1 deletion number.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ async def async_setup_entry(
) -> None:
"""Huawei Solar Number entities Setup."""

if not entry.data[CONF_ENABLE_PARAMETER_CONFIGURATION]:
if not entry.data.get(CONF_ENABLE_PARAMETER_CONFIGURATION):
_LOGGER.info("Skipping number setup, as parameter configuration is not enabled")
return

Expand Down
2 changes: 2 additions & 0 deletions sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,14 @@ class HuaweiSolarSensorEntityDescription(SensorEntityDescription):
key=rn.STARTUP_TIME,
name="Startup Time",
icon="mdi:weather-sunset-up",
device_class=SensorDeviceClass.TIMESTAMP,
entity_category=EntityCategory.DIAGNOSTIC,
),
HuaweiSolarSensorEntityDescription(
key=rn.SHUTDOWN_TIME,
name="Shutdown Time",
icon="mdi:weather-sunset-down",
device_class=SensorDeviceClass.TIMESTAMP,
entity_category=EntityCategory.DIAGNOSTIC,
),
HuaweiSolarSensorEntityDescription(
Expand Down

0 comments on commit e303f1b

Please sign in to comment.