Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: TypeError: AsyncModbusTcpClient.__init__() got an unexpected keyword argument 'trace_connect' #957

Closed
3 of 5 tasks
florianrenner opened this issue Feb 26, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@florianrenner
Copy link

Describe the issue

my Huawei Solar integration is not working anymore
I removed it completely and tried to setup it again - "no connection"
it seems, that the integration does no even try to connect to my Huawei EMMA2

Core: 2025.2.5
Huawei: v1.5.4

Logger: huawei_solar.huawei_solar
Quelle: /usr/local/lib/python3.13/site-packages/huawei_solar/huawei_solar.py:185
Erstmals aufgetreten: 20:14:21 (3 Vorkommnisse)
Zuletzt protokolliert: 20:14:35

Aborting client creation due to error
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/huawei_solar/huawei_solar.py", line 178, in create
client = AsyncHuaweiSolarModbusTcpClient(host, port, timeout)
File "/usr/local/lib/python3.13/site-packages/huawei_solar/modbus.py", line 65, in init
super().init(host, port=port, timeout=timeout, reconnect_delay=RECONNECT_DELAY)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/huawei_solar/modbus.py", line 28, in init
super().init(*args, **kwargs, trace_connect=self._trace_connect) # forward all unused arguments
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: AsyncModbusTcpClient.init() got an unexpected keyword argument 'trace_connect'

Describe your Huawei Solar Setup

Inverter Type: SUN2000MB0
Inverter Firmware version: V200R023C10SPC208
Huawei Solar integration version: v1.5.4
EMMA: SmartHEMS (100R024C10SPC100)
connection: wired

How do you connect to the inverter?

Via the SDongle, wired connection

Upload your Diagnostics File

Drag & Drop your Diagnostics File here.

Upload your relevant debug logs

Protokolldetails (FEHLER)
Logger: huawei_solar.huawei_solar
Quelle: /usr/local/lib/python3.13/site-packages/huawei_solar/huawei_solar.py:185
Erstmals aufgetreten: 20:14:21 (3 Vorkommnisse)
Zuletzt protokolliert: 20:14:35

Aborting client creation due to error
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/huawei_solar/huawei_solar.py", line 178, in create
    client = AsyncHuaweiSolarModbusTcpClient(host, port, timeout)
  File "/usr/local/lib/python3.13/site-packages/huawei_solar/modbus.py", line 65, in __init__
    super().__init__(host, port=port, timeout=timeout, reconnect_delay=RECONNECT_DELAY)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/huawei_solar/modbus.py", line 28, in __init__
    super().__init__(*args, **kwargs, trace_connect=self._trace_connect)  # forward all unused arguments
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: AsyncModbusTcpClient.__init__() got an unexpected keyword argument 'trace_connect'

Please confirm the following:

  • I'm running the latest release of Home Assistant.
  • I'm running the latest release of this integration.
  • I did not find an existing issue describing this problem.
  • I did upload the diagnostics-file that I could retrieve from the 'Devices & Services Page'
  • I did upload the relevant debug logs (via 'Enable Debug Logging'-feature or by manually configuring HA logging)
@florianrenner florianrenner added the bug Something isn't working label Feb 26, 2025
@wlcrs
Copy link
Owner

wlcrs commented Feb 27, 2025

This error signifies that you have an incompatible pyModbus version on your HA installation. Please disable any other integration using modbus connections to diagnose the problem and restart your HA. Ask the author of the other integration to upgrade to the latest pymodbus version.

@wlcrs wlcrs closed this as not planned Won't fix, can't repro, duplicate, stale Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants