Integration Solar inverter huawei 2000L

Before installing the beta, delete the previous version and clear the cache of the browser.
Close and reopen the browser, after that install the beta and you will see the option.
This was the solution for me…

Can you share your code :)?

I’ve just updated @wlcrs integration from ad27b90 to 0.5.1 and 1.0.0a3 and both are showing a large Grid Active Power value, anyone else seen this before? I have reverted back to ad27b90 as its show the correct Active Power value

I’m running core 2022.2.6

version ad27b90
image

version 0.5.1 and 1.0.0a3
image

Doesn’t help. I deleted. Cleared the cache. Restarted HA. Checked the logs which are clear. Deleted also the emilv2 directory manually. Cleared cache again. Installed and restarted. Same behavior and same logs.

0.5.1 is just the (more readable) name that I gave ad27b90. HACS shows this as an upgrade, but in reality, exactly the same code is being downloaded. I’m thus a bit confused that you can already see that bug appear by doing this faux upgrade.

wrt the bug: this looks like an overflow bug (ie. the maximum number that can be represented in that modbus register is 2147483647). For the moment, it’s unclear for me where that error can come from. The data-type is setup correctly as a signed 32-bit integer. I’ll add more logging in the next version in the hope that I can find the culprit. Are you willing to do some testing for me?

What version of HA are you running? I develop at the bleeding edge, and you need HA 2022.2 for everything to work correctly.

Happy to do any testing, i have a test rig that i can test with.

1 Like

Same issue for me:

Home Assistant 2022.2.6
Huawei Solar Sensors 0.5.1

SUN2000-5KTL-L1
Luna2000
Power meter
----

Most solar panel would have a wireless or wired dongle installed at the home where panels are installed. The dongle helps establishes a communication link from home LAN to solar service provider, the data exchanged is typically a JSON object that is published as a REST API at the IP address of the solar panel.

I’ve Enphase and all the stats from my solar panels are published at http://<ip_address>/info.xml and
http://<ip_address>/api/v1/production.

In absolute worst case you can extract the information using a simple python script from the login page of your service provider.

If you search online there is more than a likely chance that some has already written a HACS repository or AppDaemon code for you :grinning: :+1:

I tried with my HUAWEI dongle and does not work at least with the firmware version it has. In fact with Fing 502 is the only port it shows as available. But I do agree if that feature were made available in future versions of the firmware it would be the ideal solution to build an integration in an much more standard fashion.

With Google search, the first result seems promising:

Thanks a lot, will take a look. Honestly it was just late Friday when my install was made and since them I have only found different problems firstly loosing connectivity with the management control center simply because I define static Ip, lately because wired the dongle is not exposed to the home LAN and need to be wifi and now I will start a proper digging. I do agree an API-CLI es the first step to build a HA proper integration. I have seen this for many others. But personally I do not have skillls to do so, will need to wait until someone in this wonderful community do it. But I am sure if not yet in there it will be soon. As I said will start to investigate more deeply and follow up this thread

Hi, thanks for your response. I was running 2021 version. After updating to 2022 version, it is working correctly. I have a current modbus tcp integration accomplished with Node-Red. So I’ll start comparing data and keep best of 2 worlds. Thank for the good work.

It is not possible to have multiple Modbus TCP connections to the inverter. If a new connection is made to the inverter, it stops the old one. You will see constant disconnects/reconnects in your logs. This will cause all kinds of issues, so I cannot recommend doing this.

It is possible to have multiple connection (I doing it sometimes to test new versions) but one connection must be to internal AP and second to smart dongle.

1 Like

It seems to work indeed. One connection to inverter internal AP (192.168.200.1) port 6607 and the other connection to dongle (modbus TCP on port 502 via LAN). No issues so far.

or maybe it isn’t. After more than an hour working without any data loss, the HA integration stopped now.

Logger: async_upnp_client.ssdp
Source: /usr/local/lib/python3.9/site-packages/async_upnp_client/ssdp.py:195
First occurred: 12:46:37 (8 occurrences)
Last logged: 12:52:37

Received error: [Errno 101] Network unreachable, transport: <_SelectorDatagramTransport fd=45 read=polling write=<idle, bufsize=0>>

  template:
    - sensor:
      - name: "Solar South Power"
        state: >-
          {{ states('sensor.solar_pv_1_voltage') | float(0) *
            states('sensor.solar_pv_1_current') | float(0) /
            1000 | round(2)
          }}
        availability: >-
          {{
            [ states('sensor.solar_pv_1_voltage'),
              states('sensor.solar_pv_1_current'),
            ] | map('is_number') | min
          }}
        state_class: measurement
        unit_of_measurement: kW
        device_class: power
      - name: "Solar West Power"
        state: >-
          {{ states('sensor.solar_pv_3_voltage') | float(0) *
            states('sensor.solar_pv_3_current') | float(0) /
            1000 | round(2)
          }}
        availability: >-
          {{
            [ states('sensor.solar_pv_3_voltage'),
              states('sensor.solar_pv_3_current'),
            ] | map('is_number') | min
          }}
        state_class: measurement
        unit_of_measurement: kW
        device_class: power
1 Like

Thanks, you have only one string?

Two strings per inverter (One to the south cluster of panels, other to west cluster of panels), one string per MPP

1 Like