wlcrs / huawei_solar

Home Assistant integration for Huawei Solar inverters via Modbus
GNU Affero General Public License v3.0
543 stars 88 forks source link

Connection lost during request #168

Closed hkusulja closed 1 year ago

hkusulja commented 1 year ago

Hello,

I have new Huawei SUN2000-6KTL-1 , I have used Huawei FusionSolar android app to setup it. The integrated WiFi is connected to my house WiFi. Firmware is updated (software version V200R001C00SPC124 and MBUS firmware is to V100R001C00SPC320). Modbus tcp is enabled unrestricted. Installater password is set. I can open TCP connection from computer to port 6607. Slave ID is 1. Additional Huawei power sensor is connected and visible in the app.

After HACS and wlcrs/huawei_solar installation. I am unable to connect - Reading from the inverter failed.

In logs I see:

logger: custom_components.huawei_solar.config_flow Source: custom_components/huawei_solar/config_flow.py:114 Integration: huawei_solar

Could not read register value, has another device interrupted the connection? Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/huawei_solar/huawei_solar.py", line 356, in _do_read response = await self._client.protocol.read_holding_registers( File "/usr/local/lib/python3.10/site-packages/pymodbus/client/asynchronous/async_io/init.py", line 35, in execute resp = await asyncio.wait_for(req, timeout=self._timeout) File "/usr/local/lib/python3.10/asyncio/tasks.py", line 445, in wait_for return fut.result() pymodbus.exceptions.ConnectionException: Modbus Error: [Connection] Connection lost during request

What other devices / connections is possible to have / how to disable them? Should I disable Huawei cloud connection inside FusionSolar app (“Management System” connection to EU / global servers)? I can use the mobile app and device commissioning as installer with password on the same/home network. If this “device commissioning” needs to be disabled, how to do it?

wlcrs commented 1 year ago

You do not need to disable the connection to the Huawei cloud servers for this integration to work.

Make sure that the integration is the only thing connecting to the inverter. This error only occurs when the modbus connection is stolen from the integration. I have nothing else to add/suggest tbh.

hkusulja commented 1 year ago

@wlcrs thank you, this is a new device / inverter in existing network, except android app for configuration nothing was ever connected. Does somebody have more experience with the mentioned inverter and what else could be? maybe some additional setting? newer firmware issue/limitation, or something else.

xm4rcell0x commented 1 year ago

have you already tried on port 502 ?

hkusulja commented 1 year ago

have you already tried on port 502 ?

this port was never opened on my device, and is still not.

I tried for days, and seems something inside device is interrupting communication so i can not get modbus tcp to get working (still the same / original error as described above). Maybe something from Huawei, but i do not know what.

xm4rcell0x commented 1 year ago

For me the exact opposite...port 502 open and 6607 closed.