-
-
Notifications
You must be signed in to change notification settings - Fork 96
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]: No module named 'pymodbus.message' #873
Comments
Warning Users that use the native modbus-integration alongside this integration should not upgrade to Home Assistant 2025.1, as it contains an upgrade to an incompatible version 3.7.4 of the pyModbus library. Significant work has already been done to upgrade this integration to support v3.8.0 of this library. We expect this to release alongside Home Assistant 2025.2, which is expected to also upgrade to that latest pyModbus version. This will solve the compatibility issue. |
@wlcrs |
Second this bug. |
Yes, i downgrade core as well without restore a backup. |
same here. I just rollback the upgrade without any issues |
Same problem for me. |
@ablyes downgrade with the command: "ha core update --version 2024.12.5" |
Your command worked. |
Sorry for hate but this is the only integration I ever used that ask me for a downgrade. HA 2025.1 is also related to security updates. Now I can't downgrade because of others updated integration that requires now HA 2025.1 |
wlcrs is making huge effort to support this integration, your comment is untimely. If you do not like how the integration is handled you should not use it. |
@wlcrs if it works with 2025.01 version of HA if I am using network type integration via inverter wi-fi? |
Did you pay a penny for the software? Probably not. Accordingly, you have no claims whatsoever against the author. If the software is so important to you, program it yourself. Some people's sense of entitlement really pisses me off. Remember: the author created this in his free time, so we don't have to stress him out. If you can do better: Let's go. |
Hello, Maybe somebody who tryied can answer: if it works with 2025.01 version of HA if I am using network type integration via inverter wi-fi? |
So I’ve got an idea to contribute a bit. |
I believe that it does not work |
For me it fails with: Error setting up entry SUN2000-4KTL-L1 for huawei_solar Note: a similar error has been fixed in another repo - https://github.com/tggm/rointe-hacs/pull/15/files |
Never mind, I was running an old version. After upgrading to 1.4.1 it seems to work well. |
What version of HA, and what type of integration? |
#What version of HA, and what type of integration?# HA version 2025.1.0. Using integration via inverter wi-fi. |
huawei_solar 1.5.0b1 seems to work great for me with HA 2025.1.0! Thank you, @wlcrs :) Edit: Ok, sadly it doesn't. This integration works now, but my own modbus sensors do not. |
Good evening, sorry but you have to be patient 😅 |
Rolled back with your command, and not it works fine. I will skip this core version. |
Thanks for all your work on this component! 🎉 To contribute and for potential troubleshooting. I am on HA 2025.01 and using the latest 1.5.0b2, this is the error I am faced with:
|
After upgrading HA to 2025.1.1 integration not working: Setup failed for custom integration 'huawei_solar': Unable to import component: cannot import name 'ModbusRequest' from 'pymodbus.pdu' (/usr/local/lib/python3.13/site-packages/pymodbus/pdu/init.py) During handling of the above exception, another exception occurred: Traceback (most recent call last): |
I am using native pymodbus integration for my Komfovent device. SO after installed 2025.1.1 Huawei integration stop working |
Is someone on ha core actively working on this? Seems to block a lot of people now 2025.1.3 is out now |
My PR's that upgrade pyModbus to v3.8.3 and fix some compatibility issues due to pyModbus API changes in the core modbus-integration have been accepted in HA Core yesterday. These code changes will be released with HA 2025.2 . Do not expect to see any fixes in 2025.1.x releases. This will fix the compatibility issue between this integration (starting from v1.5.0) and the core modbus-integration: both will use the same pyModbus version 3.8.3, fixing the crashes due to an incompatible pyModbus version being present. Please note that if you are using another custom integration which relies on an incompatible pyModbus version (ie. 3.7.x), then that integration will need to upgrade it's pyModbus dependency to 3.8.3 to restore compatibility with the versions which HA Core and this integration expect. Side note: my contributions on HA Core have brought me into contact with some core maintainers. I have raised the issue of pyModbus version changes potentially breaking this and other integrations. While there is easy solution to this - it's a limitation of how Python libraries are installed - they are at least aware of the implications. Having a direct line will hopefully allow me to coordinate better to prevent issues like this one. |
@wlcrs Thank you for your work with this issue and this integration. It is much appreciated from my side. |
Vielen Dank für deine Arbeit. Dann hoffen wir mal, dass 2025.2 blad kommt. |
Thanks @wlcrs for going through all this trouble and resolving the issues. I can confirm that with the latest dev release from today both my huawei_solar as well as yaml defined modbus sensors work as expected again! Thank you! |
Thank you for the work behind :) |
Hi, after I had installed the latest beta 1.5.02b yesterday the integration was working again. Today I had to do some changes on a standard modbus integration and after reboot I again got the issue that the component could not be loaded. Attaching the log for further details: `Logger: homeassistant.setup Setup failed for custom integration 'huawei_solar': Unable to import component: No module named 'pymodbus.pdu.register_message' |
I'm on HA 2025.2.0b0 and 1.5.0b2 but it still does not work. |
Just an fyi for everyone who switch to the dev branch. As we are closing in on the 2025.2 stable release, be sure to switch back to the stable branch now.
|
v1.5.0 of this integration has been released. This version depends on pyModbus v3.8, restoring compatibility with the native I will close this issue once HA 2025.2 is officially released next week. Important If you are using another (custom) integration which also relies on pyModbus then the compatibility issues will persist until the other integration is also upgraded to pyModbus v3.8. So if your HA installation is still broken after upgrading to HA 2025.2 and v1.5.0 of this integration due to the error
Caution Note that the compatibility issues with other (custom) integrations can seem to be intermittent, as the pyModbus version will always be determined by the last integration with a pyModbus-dependency to be installed on your HA. |
Is this version supposed to work with HA 2025.1.4 and newer? |
Thank you for the Great work. |
Describe the issue
After the Update to 2025.1.0 I Get this error
Logger: homeassistant.setup
Quelle: setup.py:334
Erstmals aufgetreten: 21:28:29 (1 Vorkommnisse)
Zuletzt protokolliert: 21:28:29
Setup failed for custom integration 'huawei_solar': Unable to import component: No module named 'pymodbus.message'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 334, in _async_setup_component
component = await integration.async_get_component()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1035, in async_get_component
self._component_future.result()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1015, in async_get_component
comp = await self.hass.async_add_import_executor_job(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
self._get_component, True
^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 59, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/loader.py", line 1075, in _get_component
ComponentProtocol, importlib.import_module(self.pkg_path)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/util/loop.py", line 200, in protected_loop_func
return func(*args, **kwargs)
File "/usr/local/lib/python3.13/importlib/init.py", line 88, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 1026, in exec_module
File "", line 488, in _call_with_frames_removed
File "/config/custom_components/huawei_solar/init.py", line 9, in
from huawei_solar import (
...<9 lines>...
)
File "/usr/local/lib/python3.13/site-packages/huawei_solar/init.py", line 4, in
from .bridge import (
...<6 lines>...
)
File "/usr/local/lib/python3.13/site-packages/huawei_solar/bridge.py", line 34, in
from .huawei_solar import (
...<5 lines>...
)
File "/usr/local/lib/python3.13/site-packages/huawei_solar/huawei_solar.py", line 19, in
from pymodbus.message.rtu import MessageRTU
ModuleNotFoundError: No module named 'pymodbus.message'
Describe your Huawei Solar Setup
Inverter Type:
Inverter Firmware version:
sDongle present: Yes / No
sDongle Type: sDongleA-05 (WiFi / Ethernet) / SDongleA-03 (4G)
sDongle Connectivitiy: WiFi / Ethernet / 4G
sDongle Firmware:
Power meter present: three phase / single phase / no
Optimizers Present: Yes / No
Battery: LUNA2000-SO xxkWh / LUNA2000-S1 xxkWh (Released 2024) / LG RESU xxkWh / None
Battery Firmware version:
Huawei Solar integration version:
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
Please confirm the following:
The text was updated successfully, but these errors were encountered: