Integration Solar inverter huawei 2000L

Hello all,

I have been using Emilv2s integration for a while and it’s been great, finally got everything working including the energy dashboard. However I upgraded the inverter because it kept dropping the management data and everytime I logged on it wanted me to upgrade so I finally let it… I knew it would break anything.

Anyways I’ve reread the thread and it seems they have left a port open on 6607, I didn’t see that port open but it’s high. I normally connect directly to the inverter wifi AP with a RasPi anyways…

Pictures attached



Few questions-

Can I read the data with Emilv2s integration by simply upgrading the inverter and changing the port to 6607 in config.yaml?

What is a smart dongle, not sure if I have/need one?

Should I update the MBUS version?

Is it better to use the other integration, test it out on this version that I know works then update the inverter and change the port to 6607?

Anything else I should know?

hey guys, such an amazing amount of work and content in this thread, thank you.
figured i’d ask here as maybe someone has a quick answer, i could not find it in the thread but there are 1700+ replies…
i am using https://github.com/wlcrs/huawei_solar and would like to get an ever growing sensor showing my house’s total energy consumption(kWh). the available data is

and
and i can’t for the life of me figure out how to get basically this from the energy panel
image
thanks again guys

Hi all. Forgive me for possibly going over something again, but I have set up Home Assistant from scratch in a VM, it’s searched for everything on my LAN and I realised that I couldn’t see my Huawei solar there despite the installer asking for my wifi password etc. I’ve therefore done some reading of this thread and worked out that I needed to use the internal Wifi of the inverter. I’ve gone out and bought a wifi bridge, configured HA with a second NIC with DHCP and received an IP address from the Huawei. I can ping the inverter from HA although it loses about 1 packet in 10 currently (that might be the siting of the wifi bridge or the inverter being too busy to ping, but I can troubleshoot that later).

At this point I think I’m ready to integrate an add-in to see/control the solar, but i’m not sure what I’m doing there - the start of this thread mentions Emilv2’s project which required me to install HACS (managed that) and then copy some files into a location (although a button on the component seemed to handle that for me) but now I’m not sure how to kick that project into life - I’ve edited the configuration.yaml file with my own inverter’s IP address, but still nothing’s popping into life and I’m not sure how to make it happen?

Also, the end of this thread mentions wlcrs’s project which seems to be different, but maybe what I want instead - i’m not sure? is one project more advanced than the other? do you need both to co-exist? and finally what do I do next?
(TIA!)

If you can ping your inverter, it sounds like you have managed the tricky part with bridging the networks!
You should really use the wlcrs-version https://github.com/wlcrs/huawei_solar.
Emilv2 is an old version, so remove that if you have it installed.
If you can reach your inverter, you should only need to configure the huawei_solar-integration and be good to go. You do not need any configuration in your .yaml-config. You configure with the UI.

Marvellous, thanks. Got it showing details now.
Is there a reason that “Daily Yield” doesn’t show the amount of kwh i’ve put into the batteries? I’ve filled my 10kwh LUNA2000 batteries in the 6 or so hours from sunrise to now, but Daily Yield is showing ~4kwh. Are there any customisations I should be considering to show accurate figures?
Also, someone mentioned above the temperature of the inverter - I don’t see that as a returnable figure?

Check the FAQ in the readme on github.
There is a section on:

The “Daily Yield” value reported does not match with the value from FusionSolar?

About the temperature, I think you can see the temperature if you have optimizers. Not the temperature of the inverter itself.

1 Like

Thanks - I won’t bother about the inverter temps as I don’t have any. I’m a total noob with HA though (but not with networking), so i’ve read the Daily Yield section and understand why it’s a flawed calculation but I have absolutely no idea what to do with the code snippets on that wiki page (Daily Solar Yield · wlcrs/huawei_solar Wiki · GitHub) - where do I put this?

Did you solve this @colseven, I am going through the same process myself.

So, good practice (i think) is to split your configuration.yaml into a few different files. I would suggest that you add these lines to the file configuration.yaml

sensor: !include sensor.yaml

template: !include template.yaml

utility_meter: !include utility_meter.yaml

Then create those 3 files. They can be empty for a start. If you already have a
template, sensor or utility_meter-block in you configuration.yaml, I think you have to remove those (and move the contents to the corresponding file.

In the template.yaml-file, you add

- sensor:  
  - name: "input_power_with_efficiency_loss"
    unique_id: "input_power_with_efficiency_loss"
    unit_of_measurement: "W"
    device_class: power
    state_class: measurement
    state: >-
       {% set inverter_rating = 3000 %} # adjust this value to the rated power of your inverter
       {% set inpower = states('sensor.input_power')|float(0) %}
       {% if inpower < (inverter_rating*0.1) %}
         {{ inpower * 0.90 }}
       {% elif inpower < (inverter_rating*0.2) %}  
         {{ inpower * 0.95 }}
       {% else %}
         {{ inpower * 0.98 }}
       {% endif %}

In the sensor.yaml-file, you put

- platform: integration
  source: sensor.input_power_with_efficiency_loss
  name: solar_energy_riemann
  round: 3

Now you can use the “solar_energy_riemann” as the sensor for measuring your solar panel yield.

You have to restart HA to see them. Make sure to use the “Check Configuration” under Development->YAML in the UI, to make sure you do not have any errors before restarting.

1 Like

Excellent, thank you very much - I’ll report back when I get that sorted.

So my sensor.yaml file looks like this now:

 - platform: huawei_solar   
    host: '192.168.200.1'
    optimizers: false
    battery: true
    slave: 1
    port: 6607
 - platform: integration
  source: sensor.input_power_with_efficiency_loss
  name: solar_energy_riemann
  round: 3

but I get the following from a Check Configuration. I must’ve screwed up the syntax but i’m not sure what the proper syntax should be for a yaml file:

Error loading /config/configuration.yaml: mapping values are not allowed here
in "/config/sensor.yaml", line 2, column 9

2 things. Not sure why you have the huawei_solar there? Is that left from the Emilv2, maybe?
Then, make absolutely sure that the indentation is correct.
The minus-character (-) in

- platform:
should start at the first column in the file.
The source, name, and so on should be exactly under the p in platform. In your copy (if it is not the forum reformatting), it looks like they are either to the left or to the right of the platform.

That’s definitely a hangover from the Emilv2. Is it not required in the wlcrs version?

OK I’ve managed to get it to parse the files correctly - thank you for that :slight_smile:
What would I ever put in utility_meter.yaml ?

Also (and I’m sorry for bombarding you with questions!) I went to change the sensor to solar_energy_riemann and it’s not listed. How do I get it to be listed?

To keep this thread more about the huawei-integration and not HA-general questions, I have sent a private message to continue this.

Swapped over from Emilv2 to wlcrs version, will upgrade inverter soon see if it will work with port 6607. This config helped me keep my dashboard the same as before, maybe of some help to other people:

##########################
template:
   sensors:

    power_meter_load:
      friendly_name: "consumption"
      unit_of_measurement: 'W'
      icon_template: mdi:flash-alert-outline
      #value_template: "{{  states('sensor.sun2000_5ktl_l1_hv2150011134') |float(0) - state_attr('sensor.sun2000_5ktl_l1_hv2150011134', 'power_meter_active_power') |float(0) }}"
      value_template: "{{  states('sensor.active_power') |float(0) - states('sensor.grid_active_power') |float(0) }}"
    
    power_generated:
      friendly_name: "generation"
      unit_of_measurement: 'W'
      icon_template: mdi:solar-power
      value_template: "{{ states('sensor.active_power') }}"
      #value_template: "{{ states('sensor.sun2000_5ktl_l1_hv2150011134') }}"
      

    power_shipped:
      friendly_name: "shipped"
      unit_of_measurement: 'W'
      icon_template: mdi:transmission-tower
      value_template: "{{ states('sensor.grid_active_power') }}"
      #value_template: "{{ state_attr('sensor.sun2000_5ktl_l1_hv2150011134', 'power_meter_active_power') }}"
1 Like

Hello everyone,

I’m really struggling with getting my inverter connected in the home network. I can see the inverter just fine on my local network with it’s own IP address (for example 192.168.1.66). As I understand it I cannot use that IP address to read the data I need for the wlcrs verion of the integration.

Am I correct that I need to install my server close enough to the inverter to have my wifi receiver that I have available in my server to be able to connect to the wifi that’s beaming from the inverter itself? (I’m a noob, can I use 2 networks in my home assistant?)

Kind regards

yeh you need to connect to the Inverters AccessPoint - this is the same AP your installer used to connect to the inverter to tell it your wifi name and password when they installed it. You need to connect directly to the inverter (in recent versions) to be able to see the data you need.

The easiest way is to run Home Assisstant on a Raspberry Pi, connected to your LAN via ethernet, and then use the wifi adapter to connect to the Inverter AP (SUN_28376…) and use DHCP.

Then simply set HOST to 192.168.200.1 in either Huawei Solar integration and port 502 or 6607, depending on your Inverters version

1 Like

@manio (and other helpers), thanks for the wiki steer a few days ago. I ended up buying the TPLink, as it’s easier to deploy than a RPi and cheaper too. Unfortunately I’ve not been successful so far.

I have a Edgerouter X at home with the most basic single LAN config. I am in no way a networking guy…

My home LAN is 192.168.1.0/24

I have the inverter which has the access point beaming from it.

I have deployed the TP-WR802N in client mode to connect wirelessly to the inverter on it’s SSID, and then the LAN cable from the TP link is connected to my unifi edgerouter.

I have not set a static IP address for the TP Link and it has been given 192.168.1.43

I can ping 192.168.1.43 successfully to access the TP Link, and I can access the GUI using the same IP. The admin panel/GUI of the TP link says it is connected to the inverter SSID.

If I now ping 192.168.200.1 I get destination unreachable (expected until next step).

If I then add a static route in the edgerouter with destination network 192.168.200.0/24 and hop address 192.168.1.43 and then ping 192.168.200.1 again I get “TTL expired in transit”.

Tracert 192.168.200.1 gives;

1 1 ms * 1 ms 192.168.1.1

2 30 ms 6 ms 3 ms 192.168.1.43

3 31 ms 1 ms 2 ms 192.168.1.1

4 4 ms 1 ms 2 ms 192.168.1.43

5 6 ms * * 192.168.1.1

6 2 ms 1 ms 1 ms 192.168.1.43

7 3 ms 2 ms 3 ms 192.168.1.1

8 2 ms 3 ms 3 ms 192.168.1.43

9 18 ms * * 192.168.1.1

10 2 ms 2 ms 2 ms 192.168.1.43

11 3 ms 2 ms 2 ms 192.168.1.1

12 2 ms 2 ms 2 ms 192.168.1.43

etc, it’s seemingly going around in a circle

Have I missed a setting in the edgerouter (I’ve done nothing else at all bar the static route)? I am really feeling out of my depth here, this is not my expertise. It seems that using this model of TP Link in this mode is a proven solution for the inverter which is why I am thinking it’s a home router setting I am missing.

Thanks for any help you can offer.

John.