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

Not work after upgrade to Home Assistant 2025.1.0 #267

Open
danygi79 opened this issue Jan 3, 2025 · 20 comments
Open

Not work after upgrade to Home Assistant 2025.1.0 #267

danygi79 opened this issue Jan 3, 2025 · 20 comments

Comments

@danygi79
Copy link

danygi79 commented Jan 3, 2025

hello, after upgrade to 2025.1.0 this integration stop work.

the log is:

Registratore: homeassistant.setup
Fonte: setup.py:334
Prima occorrenza: 23:38:13 (1 occorrenze)
Ultimo accesso: 23:38:13
Setup failed for custom integration 'victron': Unable to import component: No module named 'pymodbus.register_read_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/victron/init.py", line 9, in
from .coordinator import victronEnergyDeviceUpdateCoordinator as Coordinator
File "/config/custom_components/victron/coordinator.py", line 14, in
from pymodbus.register_read_message import ReadHoldingRegistersResponse
ModuleNotFoundError: No module named 'pymodbus.register_read_message'

@weide-git
Copy link

Same to me:

Logger: homeassistant.setup
Quelle: setup.py:334
Erstmals aufgetreten: 23:15:18 (1 Vorkommnisse)
Zuletzt protokolliert: 23:15:18

Setup failed for custom integration 'victron': Unable to import component: No module named 'pymodbus.register_read_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/victron/init.py", line 9, in
from .coordinator import victronEnergyDeviceUpdateCoordinator as Coordinator
File "/config/custom_components/victron/coordinator.py", line 14, in
from pymodbus.register_read_message import ReadHoldingRegistersResponse
ModuleNotFoundError: No module named 'pymodbus.register_read_message'

@neil192
Copy link

neil192 commented Jan 3, 2025

I am also having the same issue, i have had to revert back

@BMG80
Copy link

BMG80 commented Jan 3, 2025

Same problem here

@BMG80
Copy link

BMG80 commented Jan 3, 2025

Here’s a potential fix:

  1. Open the file /config/custom_components/victron/coordinator.py.

  2. Comment out line 14, which imports ReadHoldingRegistersResponse:
    # from pymodbus.register_read_message import ReadHoldingRegistersResponse

  3. Restart Home Assistant.

After making this change and restarting Home Assistant, everything seems to work fine for me.

@asmcc
Copy link

asmcc commented Jan 4, 2025

Yes, it works for me too as workaround. But the big question here is: Does the intergation work 100% without this line and without Holding Registers? Since generally Holding Registers are very important, if you use ModBus. And I do not know, if the intergation really needs this line or not.

@928stuart
Copy link

I have same sort of issues.
On trying to start Victron I get - Config flow could not be loaded: {"message":"Invalid handler specified"}
The potential fix didn't work for me

@drRax
Copy link

drRax commented Jan 4, 2025

This issue should be closed as it is an exact duplicate of #263

@asmcc
Copy link

asmcc commented Jan 4, 2025

Yes, but the workaround solution from here should be publicated in #263 too, since the solution from #263 with forked repository and manual change first to this fork and thereafter back to the "original" repository is not really a good idea. The proposed workaround with comment out of one line is better. Because, if the "original" HACS will be fixed in the next future, you do not need this disclaimer "please not forget to change back to the original repository"

@iJAY86
Copy link

iJAY86 commented Jan 4, 2025

Thanks @BMG80

@johnyhravy
Copy link

Hello. It worked perfectly for me too. Thank you very much. @BMG80

@asmcc
Copy link

asmcc commented Jan 4, 2025

Please mark this issue as duplicate, close it and let us continue the discussion in #263

@Marjaletes
Copy link

funciona con actualizacion Home Assistant
#BMG80
He aquí una posible solución:

Abra el archivo /config/custom_components/victron/coordinator.py.

Comente la línea 14, que importa ReadHoldingRegistersResponse:

from pymodbus.register_read_message import ReadHoldingRegistersResponse

Reiniciar Home Assistant.

Después de realizar este cambio y reiniciar Home Assistant, todo parece funcionar bien para mí.👍👍

@asmcc
Copy link

asmcc commented Jan 4, 2025

Can someone close this issue as duplicate, please!!!
And no comments please here!!! That is a DUPLICATE. If you have any constructive ideas or further proposals, then under #263, but not here, please! And yes, we know, that this workaround works and we do not need here further feedback about it, that it works!

@flipponweb
Copy link

Here’s a potential fix:

  1. Open the file /config/custom_components/victron/coordinator.py.
  2. Comment out line 14, which imports ReadHoldingRegistersResponse:
    # from pymodbus.register_read_message import ReadHoldingRegistersResponse
  3. Restart Home Assistant.

After making this change and restarting Home Assistant, everything seems to work fine for me.

works for me, too . Good job !

@msevestre31
Copy link

msevestre31 commented Jan 5, 2025

Also for me (done yesterday). However, there might be some hidden unwanted side effects I'm not comfortable with - thus, hope for an official fix

@vdneves
Copy link

vdneves commented Jan 5, 2025

Tha

Here’s a potential fix:

  1. Open the file /config/custom_components/victron/coordinator.py.
  2. Comment out line 14, which imports ReadHoldingRegistersResponse:
    # from pymodbus.register_read_message import ReadHoldingRegistersResponse
  3. Restart Home Assistant.

After making this change and restarting Home Assistant, everything seems to work fine for me.

Muito Obrigado... Excelent.

@remcom
Copy link

remcom commented Jan 5, 2025

Hi all! Because this repo is maintained and i also like to use my Victron equipment in HA i made a new repo that you can use: https://github.com/remcom/hass-victron

My goals:

  • process a lot of the outstanding pr's on this repo
  • have a look at the open issues here
  • code cleanup
  • Adding support for the new Victron features that are added in the last months

Feel free to make your own pr's on the new branch or make issues on stuff you running into. Also if there are fellow maintainers that want to join please send me a message

@Cirion75
Copy link

Worked! Thanks!

@aihngel
Copy link

aihngel commented Jan 12, 2025

Switched to @remcom 's repo and it's working great! Thanks! Easy instructions on how to switch too btw.

@Marjaletes
Copy link

Marjaletes commented Jan 12, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests