Integration Solar inverter huawei 2000L

Hi Rafal,

But wow do you do that if build in wifi works in AP mode not client mode?

Regards
Maciej

Where do you have HA? If on Pi :

I will not be able to do either. I am running my HA on Dell Wise Client without wifi and with only one ethernet card. Just thinking if I connect DD-WRT router as client to the SUN2000 and WAN port on DD-WRT to my home network with 1:1 NAT between my home network IP address and SUN2000 build in IP address that could work. It is pity that Huawei doesn’t allow pull this info via dongle wifi.

You can connect wifi usb card to Dell Wise and use it only to communicate with Sun2000. Or as you wrote any router with Client Ap mode and connect it to your home network.
In my case after connecting it to my home network I added second IP to linux so HA could connect to both LAN networks.

    inet 192.168.5.29/24 brd 192.168.5.255 scope global eth0
    inet 192.168.8.29/24 brd 192.168.8.255 scope global eth0:1

Hello
How the router should be set up ?
My local network is 192.168.1.1-192.168.1.254, Home assistant is 192.168.1.10, Gateway 192.168.1.1.
I connected the second router and connected to the inverter. What should I do next to make the inverter visible on the local network or in the hassio itself? Does the second router have to have a different addressing, e.g. 192.168.2.1? The router has openwrt loaded

My home network is 192.168.5.1/24. Ubuntu with Home Assistant has 2 IP addresses. First 192.168.5.29 and second (virtual) 192.168.8.29. Router connected to inverter(wifi) and home network by Lan cable has this config:

Thank you for the quick reply.
I have one more question: The main router is mikrotik - can it be routed in such a way that the 192.168.8 subnet … is seen in the 192.168.1 subnet …

Hello, could you please post all the code of your integration. I have the same inverter and settings from this description.

Sorry for the newbie question but would I add the edited sensor template

pv_total_yield:
      friendly_name: "PV Total Generated"
      entity_id: sensor.sun2000l_5ktl
      unit_of_measurement: 'kw'
      icon_template: mdi:solar-power
      value_template: "{{ state_attr('sensor.sun2000l_5ktl', 'total_yield') }}"

straight under the

sensor:
  - platform: huawei_solar   
    host: '192.168.xx.xx'

entry in my config file?

It should be under sensors

- platform: template
  sensors:
    pv_total_yield:
      friendly_name: "PV Total Generated"
      entity_id: sensor.sun2000l_5ktl
      unit_of_measurement: 'kw'
      icon_template: mdi:solar-power
      value_template: "{{ state_attr('sensor.sun2000l_5ktl', 'total_yield') }}"

i recently installed the SUN2000L-3KTL

Question @Emilv2 :
The integration https://github.com/Emilv2/huawei_solar is working fine but the update frequentie is to high (the green light is blinking all the time) is there a way to configure the update interval to 30sec?

I like to share the kios api, maybe it’s helpful to someone, it is for me

I discover that Huawei has a kios api, you can easy use it in you configuration.yaml file.
(there is a small latency)

  1. Sign in to your huawei portal https://eu5.fusionsolar.huawei.com
  2. Click on the β€œKiosk” button
  3. You should replace β€œreplace_with_your_kios_id” in the script below with your own kios_id you can find it in the kiosk url.
  4. Check out my GitHub Readme
    https://github.com/NLfrans/FusionSolar/blob/main/README.md
  5. Restart Home Assistant
1 Like

The default update interval is 60 seconds. Why do you think the update frequency is too high if the green light is blinking? According to the explanation on the side that just means there is a modbus connection.

Looks good! That seems to be new, or I just overlooked it before. It does seem to have most of the important values, but not all of them. I prefer using a local api when it’s available, but especially for those who have older models that need to connect to the inverter with an extra device this can be useful.

I was a worried that interval was 1 sec (afraid there are lot of WiFi traffic, because of the blinking light) but 60 sec is good. I also prefer the local api. I will try that setup

Hi, can someone help me with the configuration file?
I’m running HA on docker, debian 10.5, file with configuration:
configuration_yaml
After start I get this message in HA:

The following integrations and platforms could not be set up:
    huawei_solar
Please check your config.

My folder structure:

root@debian10:/usr/share/hassio/homeassistant# 
.
β”œβ”€β”€ automations.yaml
β”œβ”€β”€ configuration.yaml
β”œβ”€β”€ custom_components
β”‚   β”œβ”€β”€ hello_world.py
β”‚   β”œβ”€β”€ huawei_solar
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”œβ”€β”€ LICENSE.md
β”‚   β”‚   β”œβ”€β”€ manifest.json
β”‚   β”‚   β”œβ”€β”€ __pycache__
β”‚   β”‚   β”‚   β”œβ”€β”€ __init__.cpython-38.pyc
β”‚   β”‚   β”‚   └── sensor.cpython-38.pyc
β”‚   β”‚   β”œβ”€β”€ README.md
β”‚   β”‚   β”œβ”€β”€ sensor_async.py
β”‚   β”‚   └── sensor.py
β”‚   └── __pycache__
β”‚       └── hello_world.cpython-38.pyc
β”œβ”€β”€ deps
β”œβ”€β”€ groups.yaml
β”œβ”€β”€ home-assistant.log
β”œβ”€β”€ home-assistant_v2.db
β”œβ”€β”€ scenes.yaml
β”œβ”€β”€ scripts.yaml
β”œβ”€β”€ secrets.yaml
└── tts

6 directories, 18 files
root@debian10:/usr/share/hassio/homeassistant# pico configuration.yaml

I tried to launch some simple hello-world.py, and it wokrs just fine.
Have no idea where is the problem.
I copied files from https://github.com/Emilv2/huawei_solar
I haven’t changing anything in this files, only in configuration.yaml
Thanks in advance.

Why do you have
huawei_solar:
after

sensor:
  - platform: huawei_solar   
    host: '10.6.0.101'

I was thinking that sensor is only for β€œshowing a way” to device, for example on TCP/IP Protocol. Second was a trigger huawei solar: to launch a instance.
After removing huawei solar:, nothing appears in developer tools.
How can I get access to this sensor?

Do you have anything in logs from huawei_sensor? Can you connect to inverter from python?

import huawei_solar
inverter = huawei_solar.HuaweiSolar('10.6.0.101')
inverter.get("model_name")

I got this message, after typing abowe commands.
py