Integration Solar inverter huawei 2000L

Do you know if the integration should also work with m1 Huawei inverter ? Till now I was using inverter m0, with no issue.

I use with M1, connection Lan to dongle. I tested connection to internal ap inverter Sunā€¦, also worked.

I all,
I used the kiosk integration, and It worksā€¦ but I see that there are other way of integrationā€¦
Wich Is the Better?
I have a sun2000l inverterā€¦

ok thanks !
The problem was related to the dongle, Iā€™ve changed Inverter and previous Dongle stay in place, and to connect I needed to change slave 1 to slave 2. Now works fine.

Hi all!

First of all thank you for this thread which has been very usefull to integrate my Huawei inverter with Home Assistant.

And now the problem. All was working like a charm this morning but after a dongle & inverter firmware update, and HACS upgrade of huawei_solar to last release, all has stoped working. I always get the same error:

2021-11-14 18:14:53 ERROR (MainThread) [custom_components.huawei_solar.sensor] could not get register 'model_id': asyncio timeout

Iā€™ve tried everything but with no result always the same error.

ĀæCould someone give me a hand with this? I spent all day long with thisā€¦

Thank you so much in advance.

Are you connecting to internal inverter AP or smart dongle? If smart dongle then change firmware to spc123

Thank you for your quick response :slight_smile:

My inverter is connected trough dongle which is recently upgraded to 124, and is connected through my home wifi too. Iā€™ve already switch off dongle from ethernet and now inverter is connected through wifi. Now it works againā€¦ but not through dongleā€¦ and wifi connection is too weak thereā€¦ ĀæIs there something wrong with 124 firmware?

I recently talked to someone who updated firmware to 124 and it stopped working. Installing 123 again fixed the problem, so I think communication could be blocked in 124 but I didnā€™t test it by myself.

OKā€¦ Iā€™ll try to downgrade. Thank you vey much.

Hi,
as it is described in the docs, there should be a new parameter to enable TCP-Modbus2021-11-15 15_56_50-SDongleA-05 MODBUS TCP Guide.pdf - 1 -
2021-11-15 15_56_50-SDongleA-05 MODBUS TCP Guide.pdf - 2 -
2021-11-15 15_56_50-SDongleA-05 MODBUS TCP Guide.pdf - 3 -

but I was not able to find it in my config after dongle update to 124 and inverter to: V100R001C00SPC139
So Iā€™m back on 123 in my dongle.

HI!

Great work on the integration, thank you!

Just one issue that iā€™m experiencing. Entity name has changed few times. Have used it for a month with no issues. This morning discovered that entity (sensor.sun2000_10ktl_m1) is unavailable. Searched for sun2000 and found that it exists with a new name (sensor.sun2000_10ktl_m1_sun2000_12). Then did a update from git to latest version of the integration and after that name changed again to sensor.sun2000_10ktl_m1_sun2000_12_bt2150240752.

Would it be possible to define entity name in integration configuration so it will remain the same? I have few energy related dependencies and would be nice not to change them occasionally.

1 Like

Entity name is now unique and will not change anymore, if you want another name you can change it in the UI.

3 Likes

WT*?!??!

747kWh home consumption in 2 hours!!! XDDD

Grid export & home consumption are both stratosferic levels :-Āæ??Āæ?

Someone else?

Thank you.

Did you checked when it happened? The usage is count by template. If it happened after HA restart itā€™s mean that probably template was count before the value was read from inverter. In my case it helped adding checking if value from which itā€™s count is greater then 0. Iā€™m using newest version of integration.

    - name: "Zużycie prądu dom"
      unique_id: energy_used
      unit_of_measurement: 'kWh'
      state: >
        {% if states('sensor.total_yield') | float(0) > 0 %}
        {{ '%0.2f' | format(states('sensor.total_yield') | float(0) - 
                            state_attr('sensor.sun2000_8ktl_m0','grid_exported_energy') | float(0) + 
                            state_attr('sensor.sun2000_8ktl_m0','grid_accumulated_energy') | float(0)) }}
        {% endif %}                    
      device_class: energy

Thanks for all your work on this, Emil

Thank you. Just have the body of the ifā€¦ Iā€™ll give it a try with that if

I added also checking of other attributes, because they changed to 0 while I was upgrading firmware in router.

        {% if states('sensor.total_yield') | float(0) > 0 and state_attr('sensor.sun2000_8ktl_m0','grid_exported_energy') | float(0) > 0 and state_attr('sensor.sun2000_8ktl_m0','grid_accumulated_energy') | float(0) > 0 %}

Rafał nie wiem czy twĆ³j problem jeszcze aktualny ale podsyłam to co udało mi się ustalić na moim inwerterze Huawei SUN2000-10KTL-M1.
Wygląda na to że w sieci LAN falownik ma unit-id =1 a nie 0 jak to czytałem w wielu postach. Ponieważ falownik ten mam od paÅŗdziernika , nie wiem jak było kiedyś bo możne to po jakiś ostatnich zmianach oprogramowania tak jest jak piszę.
Poniżej wersja dla uczących się polskiego :slight_smile: i krĆ³tki skrypt w Pythonie.

Tested for Huawei SUN2000-10KTL-M1
IMPORTANT for ModbusTcpClient from pymodbus librrary
when we are connected to this inverter via his internal WiFi AP the unit_id=0
when we are connected to Huawei via LAN FE or WiFi from our home router we must set unit_id=1
bellow small example code
you can test this also using tools like ModbusMaster or GitHub - zhanglongqi/qModMaster: The maintainer's repo. https://github.com/ed-chemnitz/qmodbus/ for windows or mbpoll for Linux GitHub - epsilonrt/mbpoll: command line utility to communicate with ModBus slave (RTU or TCP)

#!/usr/bin/python
from pymodbus.client.sync import ModbusTcpClient as ModbusClient
import time
#your inverter ip
ip_inverter=ā€˜192.168.XXX.XXXā€™

client = ModbusClient(ip_inverter, port=502)
client.connect()
time.sleep(1)
if client.connect():
# The trick is use unit_id=1 not in ModbusClient() but in client.read_holding_registers()
request = client.read_holding_registers(address=40000,count= 2, unit=1)
print (request.registers[0])
print (request.registers[1])
else:
print (ā€˜if you are conected via LAN something is wrong with IP or portā€™)

English is not our native language for most of us, but is the only way for all of us to communicate.
Please, use english.

1 Like

what configuration do we have to change for that to work?
here is my sensor

which sensors to use for export and import energy?