From 862992ab1d932bd8754e9bded413ed965f17f928 Mon Sep 17 00:00:00 2001 From: bstenborg <97537859+bstenborg@users.noreply.github.com> Date: Wed, 6 Apr 2022 22:56:41 +0200 Subject: [PATCH 1/4] Handle missing CONF_ENABLE_PARAMETER_CONFIGURATION Don't throw exception if CONF_ENABLE_PARAMETER_CONFIGURATION is not set in configuration entry. --- number.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/number.py b/number.py index e4b48b5..9bc2ec0 100644 --- a/number.py +++ b/number.py @@ -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 From a14fd9a81852850948fc378669276f1441d3472d Mon Sep 17 00:00:00 2001 From: Tomasz Date: Thu, 14 Apr 2022 12:00:57 +0200 Subject: [PATCH 2/4] missing to add `to` --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 92b9863..76f77ee 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ the FusionSolar App. 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. -In this case, you must connect your Home Assistant device `SUN2000-` 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`. +In this case, you must connect your Home Assistant device to `SUN2000-` 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`. ### How do I connect to the inverter WiFi? From 8bbe195c95dc1246c17cb1da3e0f86b16d033bd7 Mon Sep 17 00:00:00 2001 From: Malte Gerken Date: Sun, 24 Apr 2022 13:47:53 +0200 Subject: [PATCH 3/4] Add missing device_class to time sensors Closes #46 --- sensor.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sensor.py b/sensor.py index 317a824..e40c987 100644 --- a/sensor.py +++ b/sensor.py @@ -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( From de0c87ae9b5381a88244867a77e71666ac3057a1 Mon Sep 17 00:00:00 2001 From: John McLear Date: Wed, 27 Apr 2022 15:59:51 +0100 Subject: [PATCH 4/4] Clarify WiFi AP connectivity requirements --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 76f77ee..973d28a 100644 --- a/README.md +++ b/README.md @@ -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) @@ -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 to `SUN2000-` 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-`, 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? @@ -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.