Integration Solar inverter huawei 2000L

I currently don’t use energy dashboard. I tested it but it is not useful for me.

https://github.com/home-assistant/core/pull/56564 this might fix spike reading issue in 2021.10.x
and this too https://github.com/home-assistant/core/pull/56609

I don’t know why, but for a few days I can’t connect to the dongle anymore.
I do a “ncmli device wifi” and it shows me SUN2000-HV20C0028779 for some time. Then it wifi AP disappears, and maybe reappear.
When I try to connect “nmcli d wifi connect SUN2000-HV20C0028779 password xxx” it gives me “Error: Connection activation failed: (53) The Wi-Fi network could not be found.” or after 1 minute or so “Error: Connection activation failed: (7) Secrets were required, but not provided.”

Any idea what’s going wrong here? It was working fine for the last 2 month since I got it. Dongle fw version seems to have auto-updated to v123

Hello, someone know how reduce the data collecting time ? Now with 30 secs I have problmens

hi from yesterday have a 2 strings of panels .in data I receive for any string power in A and Voltage for string .how is easiest way to calculculate sensor which show kwh or wh for string in that moment .like to see in real time separate for every string

Thanks

Hello

  1. /config/configuration.yaml

sensor: !include sensor.yaml

  1. /config/sensor.yaml

     - platform: template
         sensors:
           pv_01_power:
             friendly_name: "PV 01 Power"
             unit_of_measurement: 'W'
             value_template: >
               {{ '%0.2f' | format (states('sensor.pv_01_voltage') | float *  
                                            states('sensor.pv_01_current') | float ) }}
    
           pv_02_power:
             friendly_name: "PV 02 Power"
             unit_of_measurement: 'W'
             value_template: >
               {{ '%0.2f' | format (states('sensor.pv_02_voltage') | float *  
                                            states('sensor.pv_02_current') | float ) }}

save and restart HA :wink:

many thanks , pleas help me wit this line which going in configuration.yamal

can save them , all time is error message for this line

part in sensor.yaml is ok but for now no any numbers until I fix this part in configuration.yaml I think.

thanks on help

It is because you probably are using other sensors in configuration.yaml and sensor: include means that all you sensors will be in sensor.yaml file. If your sensors are in configuration files you can add it to sesnsor section:

sensors:
  - platform: template
      sensors:
        pv_01_power:
          friendly_name: "PV 01 Power"
          unit_of_measurement: 'W'
          value_template: >
            {{ '%0.2f' | format (states('sensor.pv_01_voltage') | float *  
                                         states('sensor.pv_01_current') | float ) }}
 
        pv_02_power:
          friendly_name: "PV 02 Power"
          unit_of_measurement: 'W'
          value_template: >
            {{ '%0.2f' | format (states('sensor.pv_02_voltage') | float *  
                                         states('sensor.pv_02_current') | float ) }}

Thanks lewusek0 and Rafal

Works like charm.

Hi, any way to modify the spript to reduce from 30 to 20 seconds ?

You don’t need to modify script, just add scan_interval in config like this:

- platform: huawei_solar   
  host: 192.168.8.1
  scan_interval: 20

Siema, potrzebuję pomocy, połączyłem się z HA i odczytuje dane, ale mam problem z dostosowaniem wyglądu, czy można się z Tobą jakoś inaczej skontaktować żeby nie denerwować użytkowników że nie piszę do angielsku? mój angielski jest bardzo słaby…

Thansk, wow… simple. Could be good if it is included in the doc as “option” in the configuration space

Hello guys, I would like to ask you for help.

I have the latest firmware upgrade to V100R001C00SPC136 for the inverter and V100R001C00SPC123 for the dongle.
I am using a Raspberry pi 4b with an additional TP-Link TL-WN725N WiFi adapter

What I did:

  1. I searched and connected via: Supervisor-> System-> Network Settings, searched for the WiFi network SUN2000-BT2140057495
  2. I am connected to the SUN2000-BT2140057495 WiFi network
    wifi
  3. I have received the address 192.168.200.2.
  4. Ping responds to 192.168.200.1
  5. Then I installed the huawei_solar add-on
  6. In configuration.yaml I added the configuration:
sensor:
  - platform: huawei_solar
    host: '192.168.200.1'
    optimizers: false
    battery: false
    slave: 1
  1. I restarted HA.
  2. I have the following message in my logs:

log1

First:

Logger: huawei_solar.huawei_solar
Source: /usr/local/lib/python3.9/site-packages/huawei_solar/huawei_solar.py:311
First occurred: 2:09:39 PM (1 occurrences)
Last logged: 2:09:39 PM

could not read register value, is an other device already connected?

Second:

Logger: homeassistant.components.sensor
Source: custom_components/huawei_solar/sensor.py:135
Integration: sensor (documentation, issues)
First occurred: 2:09:39 PM (1 occurrences)
Last logged: 2:09:39 PM

Error while setting up huawei_solar platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 249, in _async_setup_platform
    await asyncio.shield(task)
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/huawei_solar/sensor.py", line 120, in setup_platform
    HuaweiSolarSensor(inverter, config[CONF_OPTIMIZERS], config[CONF_BATTERY])
  File "/config/custom_components/huawei_solar/sensor.py", line 135, in __init__
    self._name = self._inverter.get("model_name").value
  File "/usr/local/lib/python3.9/site-packages/huawei_solar/huawei_solar.py", line 265, in get
    response = self.read_register(reg.register, reg.length)
  File "/usr/local/lib/python3.9/site-packages/huawei_solar/huawei_solar.py", line 312, in read_register
    raise ReadException(message)
huawei_solar.huawei_solar.ReadException: could not read register value, is an other device already connected?

Please let me know what is the reason why I do not receive data to HA.
I don’t have any additional device connected.
How to check if something is connected and how to remove it?

When starting the Dongle, another SDongleA-HV2080035511 network appears. The network is visible for 3 minutes - I understand that I am not joining this? What is this network?


Thank you for your help.

You are connecting to AP in inverter so you should use slave: 0 or comment this line. Slave: 1 should be used when you are connecting to smart dongle by WiFi or by LAN cable.

thank you Rafał,
I changed as you suggested, but I don’t have a visible new sensor.

sensor:
  - platform: huawei_solar
    host: '192.168.200.1'
    optimizers: false
    battery: false
#    slave: 0

I reloaded HA and restarted the system.

What else can I do?

Is it day or night when your tried adding the sensor?

Did you try to read data using python?

sudo pip3 install huawei-solar==1.1.0
python3
import huawei_solar
inverter = huawei_solar.HuaweiSolar('192.168.200.1')
inverter.get("model_name")

If it will work then maybe there are missing some dependency in HA if not, then I think could be problem with communication.

Why add # sign before slave :0?