grimmpp / home-assistant-eltako

Integration for Eltako 14 series in Home Assistant
MIT License
28 stars 5 forks source link

Integration not started after update #82

Open SteffenS27 opened 3 months ago

SteffenS27 commented 3 months ago

After Update following log attemps

Logger: homeassistant.setup Quelle: setup.py:296 Erstmals aufgetreten: 17:31:50 (1 Vorkommnisse) Zuletzt protokolliert: 17:31:50

Setup failed for custom integration 'eltako': Unable to import component: cannot import name 'UTETeachInPacket' from 'enocean.protocol.packet' (/usr/local/lib/python3.12/site-packages/enocean/protocol/packet.py) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/setup.py", line 296, in _async_setup_component component = await integration.async_get_component() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/loader.py", line 894, in async_get_component comp = self.get_component() ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/loader.py", line 921, in get_component ComponentProtocol, importlib.import_module(self.pkg_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/importlib/init.py", line 90, 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 995, in exec_module File "", line 488, in _call_with_frames_removed File "/config/custom_components/eltako/init.py", line 6, in from .eltako_integration_init import * File "/config/custom_components/eltako/eltako_integration_init.py", line 10, in from .schema import CONFIG_SCHEMA File "/config/custom_components/eltako/schema.py", line 12, in from .gateway import GatewayDeviceType File "/config/custom_components/eltako/gateway.py", line 29, in from .esp3_serial_com import ESP3SerialCommunicator File "/config/custom_components/eltako/esp3_serial_com.py", line 13, in from enocean.protocol.packet import Packet, RadioPacket, RORG, PACKET, UTETeachInPacket ImportError: cannot import name 'UTETeachInPacket' from 'enocean.protocol.packet' (/usr/local/lib/python3.12/site-packages/enocean/protocol/packet.py)

grimmpp commented 3 months ago

looks like it doesn't find the enocean library for USB300.

I was not able to reproduce the situation. Can you please test it again?

SteffenS27 commented 3 months ago

Tested again. I have a usb300 but do not use it for eltako Integration.

Logger: homeassistant.setup Quelle: setup.py:296 Erstmals aufgetreten: 06:57:52 (1 Vorkommnisse) Zuletzt protokolliert: 06:57:52

Setup failed for custom integration 'eltako': Unable to import component: cannot import name 'UTETeachInPacket' from 'enocean.protocol.packet' (/usr/local/lib/python3.12/site-packages/enocean/protocol/packet.py) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/setup.py", line 296, in _async_setup_component component = await integration.async_get_component() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/loader.py", line 894, in async_get_component comp = self.get_component() ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/loader.py", line 921, in get_component ComponentProtocol, importlib.import_module(self.pkg_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/importlib/init.py", line 90, 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 995, in exec_module File "", line 488, in _call_with_frames_removed File "/config/custom_components/eltako/init.py", line 6, in from .eltako_integration_init import * File "/config/custom_components/eltako/eltako_integration_init.py", line 10, in from .schema import CONFIG_SCHEMA File "/config/custom_components/eltako/schema.py", line 12, in from .gateway import GatewayDeviceType File "/config/custom_components/eltako/gateway.py", line 29, in from esp2_gateway_adapter.esp3_serial_com import ESP3SerialCommunicator File "/usr/local/lib/python3.12/site-packages/esp2_gateway_adapter/esp3_serial_com.py", line 13, in from enocean.protocol.packet import Packet, RadioPacket, RORG, PACKET, UTETeachInPacket ImportError: cannot import name 'UTETeachInPacket' from 'enocean.protocol.packet' (/usr/local/lib/python3.12/site-packages/enocean/protocol/packet.py)

FloCodeRian commented 3 months ago

Same here,

only workaround is downgrading to …1.3.7

i‘m not using an usb 300 neigther.

What can i help you with getting this Problem solved?

Greets Flo

grimmpp commented 3 months ago

Hello guys,

I've tried to update from 1.3.7 and 1.3.8 to 1.4.0 and both is working for me fine.

With 1.4.0 a new library/dependencies is introduced which needs to be downloaded from HA in the background. But this already happened in earlier versions and shouldn't be a problem. Dependencies are declared in the manifest: https://github.com/grimmpp/home-assistant-eltako/blob/0e3a077cae90e950d3464b79ecbc1c7a8d02863c/custom_components/eltako/manifest.json#L12

In your case the library enocean is not available.

Can you try to completely remove the eltako folder in /homeassistant/custom_components and install it newly. You can also try to follow this instruction to install the latest version: https://github.com/grimmpp/home-assistant-eltako/blob/main/docs/install-specific-version-or-branch.md (This method is also compatible with HACS.)

SteffenS27 commented 3 months ago

I tried with removing the folder, but with 1.4.0 not working... downgraded to 1.3.7 is working again

Even the same with the 2nd option updating it with the manual way..

SteffenS27 commented 3 months ago

Perhaps as an additional comment - but I do not know if this problem is an extra one: In 1.3.4 the covers work very proper after bringing them into a state (e.g. 57%) - since 1.3.7 the cover is, when it is acted to a position which is not "open" or "close" still like it is opening and also the state ist "opening" and closing" grafik

grimmpp commented 3 months ago

Yes, in 1.3.7 I've introduced that the integration remembers the latest state so that it shows e.g. after HA restart the latest known states. In that step I changed the behavior of covers because I thought it was wrong. In version 1.3.8 this is already reverted to the old behavior. I try to track every change in the releases and changes.md

Does your HA has Internet access and is it allowed to download python packages? I think this is the issue we have: https://www.home-assistant.io/faq/problems-with-dependencies/ Is there any log about the installation of the integration? The logs you've provided were written while the integration tried to start.

SteffenS27 commented 3 months ago

This is from the *.log file:

2024-03-25 14:44:51.714 ERROR (MainThread) [homeassistant.setup] Setup failed for custom integration 'eltako': Unable to import component: cannot import name 'UTETeachInPacket' from 'enocean.protocol.packet' (/usr/local/lib/python3.12/site-packages/enocean/protocol/packet.py) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/setup.py", line 296, in _async_setup_component component = await integration.async_get_component() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/loader.py", line 894, in async_get_component comp = self.get_component() ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/loader.py", line 921, in get_component ComponentProtocol, importlib.import_module(self.pkg_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/importlib/init.py", line 90, 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 995, in exec_module File "", line 488, in _call_with_frames_removed File "/config/custom_components/eltako/init.py", line 6, in from .eltako_integration_init import * File "/config/custom_components/eltako/eltako_integration_init.py", line 10, in from .schema import CONFIG_SCHEMA File "/config/custom_components/eltako/schema.py", line 12, in from .gateway import GatewayDeviceType File "/config/custom_components/eltako/gateway.py", line 29, in from esp2_gateway_adapter.esp3_serial_com import ESP3SerialCommunicator File "/usr/local/lib/python3.12/site-packages/esp2_gateway_adapter/esp3_serial_com.py", line 13, in from enocean.protocol.packet import Packet, RadioPacket, RORG, PACKET, UTETeachInPacket ImportError: cannot import name 'UTETeachInPacket' from 'enocean.protocol.packet' (/usr/local/lib/python3.12/site-packages/enocean/protocol/packet.py)

SteffenS27 commented 3 months ago

you mentioned this:

Does your HA has Internet access and is it allowed to download python packages? I think this is the issue we have: https://www.home-assistant.io/faq/problems-with-dependencies/ Is there any log about the installation of the integration? The logs you've provided were written while the integration tried to start.

is there anything could be done ??

grimmpp commented 3 months ago

mh, wierd.

Have you tried to install it with this instruction. Just leave out step 4. This always works for me and is the fastest way to test things.

SteffenS27 commented 3 months ago

mh, wierd.

Have you tried to install it with this instruction. Just leave out step 4. This always works for me and is the fastest way to test things.

--> yes tested it even with the last 1.4.1 - it is not working always assuming:

Unable to import component: cannot import name 'UTETeachInPacket' from 'enocean.protocol.packet' (/usr/local/lib/python3.12/site-packages/enocean/protocol/packet.py)

Is it possible to integrate that manually ?

grimmpp commented 3 months ago

There seems to be a way for installing dependencies manually but I'm not sure if it will survive a restart of HA.

You can also try to replace in the manifest file the binary library enocean==0.60.1 through the code representation git+https://github.com/kipe/enocean.git@0.60.1.

Can you please once again check the logs if there are more information about it: less /homeassistant/home-assistant.log | grep UTETeachInPacket, less /homeassistant/home-assistant.log | grep enocean and errors in general less /homeassistant/home-assistant.log | grep ERROR.

SteffenS27 commented 3 months ago

You can also try to replace in the manifest file the binary library enocean==0.60.1 through the code representation git+https://github.com/kipe/enocean.git@0.60.1.

--> Tried this - ERROR again - this are all logs regarding enocean/ERROR and UTETeachINPacket integration

2024-04-02 16:57:46.860 ERROR (SyncWorker_2) [homeassistant.util.package] Invalid requirement 'git+https://github.com/kipe/enocean.git@0.60.1' 2024-04-02 16:57:46.860 INFO (SyncWorker_2) [homeassistant.util.package] Attempting install of git+https://github.com/kipe/enocean.git@0.60.1

2024-04-02 16:58:07.240 ERROR (MainThread) [homeassistant.setup] Setup failed for custom integration 'eltako': Unable to import component: cannot import name 'UTETeachInPacket' from 'enocean.protocol.packet' (/usr/local/lib/python3.12/site-packages/enocean/protocol/packet.py) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/setup.py", line 296, in _async_setup_component component = await integration.async_get_component() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/loader.py", line 894, in async_get_component comp = self.get_component() ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/loader.py", line 921, in get_component ComponentProtocol, importlib.import_module(self.pkg_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/importlib/init.py", line 90, 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 995, in exec_module File "", line 488, in _call_with_frames_removed File "/config/custom_components/eltako/init.py", line 6, in from .eltako_integration_init import * File "/config/custom_components/eltako/eltako_integration_init.py", line 10, in from .schema import CONFIG_SCHEMA File "/config/custom_components/eltako/schema.py", line 12, in from .gateway import GatewayDeviceType File "/config/custom_components/eltako/gateway.py", line 30, in from esp2_gateway_adapter.esp3_serial_com import ESP3SerialCommunicator File "/usr/local/lib/python3.12/site-packages/esp2_gateway_adapter/esp3_serial_com.py", line 13, in from enocean.protocol.packet import Packet, RadioPacket, RORG, PACKET, UTETeachInPacket ImportError: cannot import name 'UTETeachInPacket' from 'enocean.protocol.packet' (/usr/local/lib/python3.12/site-packages/enocean/protocol/packet.py)

File "/config/custom_components/eltako/init.py", line 6, in from .eltako_integration_init import * File "/config/custom_components/eltako/eltako_integration_init.py", line 10, in from .schema import CONFIG_SCHEMA File "/config/custom_components/eltako/schema.py", line 12, in from .gateway import GatewayDeviceType File "/config/custom_components/eltako/gateway.py", line 30, in from esp2_gateway_adapter.esp3_serial_com import ESP3SerialCommunicator File "/usr/local/lib/python3.12/site-packages/esp2_gateway_adapter/esp3_serial_com.py", line 13, in from enocean.protocol.packet import Packet, RadioPacket, RORG, PACKET, UTETeachInPacket

grimmpp commented 3 months ago

I assume also in the case of specifying the lib instead of code (git repo) the installation process seems to be the problem. On which version of HA are you running? Can you try to update HA?

SteffenS27 commented 3 months ago

I have Current Version: 2024.3.3

SteffenS27 commented 3 months ago

Ok now I have 2024.4.0 but unfortunately the same...

grimmpp commented 3 months ago

I'm really puzzled. I assume you have made any config change so that HA doesn't like this library.

Maybe something like that could be a workaround: https://community.home-assistant.io/t/how-to-install-python-pillow-library-in-home-assistant-os/444086/5

SteffenS27 commented 2 months ago

I installed that Custom deps deployment But now I am lost, what packages do I need ?

grimmpp commented 2 months ago

You need what's in the manifest file under requirements. Currently it is complaining because of esp2-gateway-adapter is missing.

SteffenS27 commented 2 months ago

I tried to do that - I do not know if this is right - but it is not working:

[09:48:22] INFO: Installing python package 'https://github.com/grimmpp/esp2_gateway_adapter' ERROR: Cannot unpack file /tmp/pip-unpack-4e0tlmp5/esp2_gateway_adapter (downloaded from /tmp/pip-req-build-6tsnc6ld, content-type: text/html; charset=utf-8); cannot detect archive format ERROR: Cannot determine archive format of /tmp/pip-req-build-6tsnc6ld [09:48:24] ERROR: Can't install https://github.com/grimmpp/esp2_gateway_adapter! [09:48:24] ERROR: Collecting https://github.com/grimmpp/esp2_gateway_adapter Downloading https://github.com/grimmpp/esp2_gateway_adapter

grimmpp commented 2 months ago

this is odd. I would assume the package should be called only esp2_gateway_adapter which should come from here.

SteffenS27 commented 2 months ago

no unfortunately this did not work - I mentioned today that there is (/usr/local/lib/python3.12/site-packages/enocean/protocol/packet.py) in the Protokolldetails (FEHLER) on my folder there is only /usr/local/lib/python3.11/site-packages/enocean/protocol/packet.py

--> could this be the problem?

grimmpp commented 2 months ago

Yes, that needs to be present. Can you try to install the enocean package with pip install enocean==0.60.1

SteffenS27 commented 2 months ago

this I installed already

grimmpp commented 2 months ago

Can you try to reinstall it with pip install enocean==0.60.1 --force-reinstall

Usually the integrations run in separated containers I'm not really sure if they share the python libs. My assumption is that they have there dedicated instances.

SteffenS27 commented 2 months ago

Ok I tried that also.. unfortunately not working

Yes this is a seperate one.. it is always the UTETeachIn..

FloCodeRian commented 2 months ago

Hi there, Tried the most recent update of your integration to version 1.4.2 But unfortunately it’s still not working- so I have to downgrade back to -1.3.7 Im running on: Core 2024.4.2 Supervisor 2024.04.0 Operating System 12.2 Frontend 20240404.1

Logger: homeassistant.setup Quelle: setup.py:316 Erstmals aufgetreten: 06:58:24 (1 Vorkommnisse) Zuletzt protokolliert: 06:58:24 Setup failed for custom integration 'eltako': Unable to import component: cannot import name 'UTETeachInPacket' from 'enocean.protocol.packet' (/usr/local/lib/python3.12/site-packages/enocean/protocol/packet.py)Traceback (most recent call last):  File "/usr/src/homeassistant/homeassistant/loader.py", line 979, in async_get_component    comp = await self.hass.async_add_import_executor_job(           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run    result = self.fn(*self.args, self.kwargs)             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File "/usr/src/homeassistant/homeassistant/loader.py", line 1037, in _get_component    ComponentProtocol, importlib.import_module(self.pkg_path)                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File "/usr/local/lib/python3.12/importlib/init.py", line 90, 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 995, in exec_module  File "", line 488, in _call_with_frames_removed  File "/config/custom_components/eltako/init.py", line 6, in     from .eltako_integration_init import   File "/config/custom_components/eltako/eltako_integration_init.py", line 10, in     from .schema import CONFIG_SCHEMA  File "/config/custom_components/eltako/schema.py", line 12, in     from .gateway import GatewayDeviceType  File "/config/custom_components/eltako/gateway.py", line 30, in     from esp2_gateway_adapter.esp3_serial_com import ESP3SerialCommunicator  File "/usr/local/lib/python3.12/site-packages/esp2_gateway_adapter/esp3_serial_com.py", line 13, in     from enocean.protocol.packet import Packet, RadioPacket, RORG, PACKET, UTETeachInPacketImportError: cannot import name 'UTETeachInPacket' from 'enocean.protocol.packet' (/usr/local/lib/python3.12/site-packages/enocean/protocol/packet.py)During handling of the above exception, another exception occurred:Traceback (most recent call last):  File "/usr/src/homeassistant/homeassistant/setup.py", line 316, in _async_setup_component    component = await integration.async_get_component()                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File "/usr/src/homeassistant/homeassistant/loader.py", line 997, in async_get_component    self._component_future.result()  File "/usr/src/homeassistant/homeassistant/loader.py", line 989, in async_get_component    comp = self._get_component()           ^^^^^^^^^^^^^^^^^^^^^  File "/usr/src/homeassistant/homeassistant/loader.py", line 1037, in _get_component    ComponentProtocol, importlib.import_module(self.pkg_path)                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File "/usr/local/lib/python3.12/importlib/init.py", line 90, 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 995, in exec_module  File "", line 488, in _call_with_frames_removed  File "/config/custom_components/eltako/init.py", line 6, in     from .eltako_integration_init import   File "/config/custom_components/eltako/eltako_integration_init.py", line 10, in     from .schema import CONFIG_SCHEMA  File "/config/custom_components/eltako/schema.py", line 12, in     from .gateway import GatewayDeviceType  File "/config/custom_components/eltako/gateway.py", line 30, in     from esp2_gateway_adapter.esp3_serial_com import ESP3SerialCommunicator  File "/usr/local/lib/python3.12/site-packages/esp2_gateway_adapter/esp3_serial_com.py", line 13, in     from enocean.protocol.packet import Packet, RadioPacket, RORG, PACKET, UTETeachInPacketImportError: cannot import name 'UTETeachInPacket' from 'enocean.protocol.packet' (/usr/local/lib/python3.12/site-packages/enocean/protocol/packet.py)Am 12.04.2024 um 06:28 schrieb SteffenS27 **@.***>: Ok I tried that also.. unfortunately not working Yes this is a seperate one.. it is always the UTETeachIn..

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

SteffenS27 commented 2 months ago

It seems to be the same problem

SteffenS27 commented 2 months ago

Is here anything that could be tried so far ?

FloCodeRian commented 1 month ago

So just tried one more time with new most recent homeassisstant:

Core 2024.5.2 Supervisor 2024.05.1 Operating System 12.3 Frontend 20240501.1

BUT UNFORTUNATELY doesn't work either!

Logger: homeassistant.setup Quelle: setup.py:322 Erstmals aufgetreten: 23:24:04 (1 Vorkommnisse) Zuletzt protokolliert: 23:24:04

Setup failed for custom integration 'eltako': Unable to import component: cannot import name 'UTETeachInPacket' from 'enocean.protocol.packet' (/usr/local/lib/python3.12/site-packages/enocean/protocol/packet.py) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/loader.py", line 981, in async_get_component comp = await self.hass.async_add_import_executor_job( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, *self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/loader.py", line 1041, in _get_component ComponentProtocol, importlib.import_module(self.pkg_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/util/loop.py", line 144, in protected_loop_func return func(args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/importlib/init.py", line 90, 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 995, in exec_module File "", line 488, in _call_with_frames_removed File "/config/custom_components/eltako/init.py", line 6, in from .eltako_integration_init import File "/config/custom_components/eltako/eltako_integration_init.py", line 10, in from .schema import CONFIG_SCHEMA File "/config/custom_components/eltako/schema.py", line 12, in from .gateway import GatewayDeviceType File "/config/custom_components/eltako/gateway.py", line 30, in from esp2_gateway_adapter.esp3_serial_com import ESP3SerialCommunicator File "/usr/local/lib/python3.12/site-packages/esp2_gateway_adapter/esp3_serial_com.py", line 13, in from enocean.protocol.packet import Packet, RadioPacket, RORG, PACKET, UTETeachInPacket ImportError: cannot import name 'UTETeachInPacket' from 'enocean.protocol.packet' (/usr/local/lib/python3.12/site-packages/enocean/protocol/packet.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/setup.py", line 322, in _async_setup_component component = await integration.async_get_component() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/loader.py", line 1001, in async_get_component self._component_future.result() File "/usr/src/homeassistant/homeassistant/loader.py", line 993, in async_get_component comp = self._get_component() ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/loader.py", line 1041, in _get_component ComponentProtocol, importlib.import_module(self.pkg_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/util/loop.py", line 144, in protected_loop_func return func(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/importlib/init.py", line 90, 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 995, in exec_module File "", line 488, in _call_with_frames_removed File "/config/custom_components/eltako/init.py", line 6, in from .eltako_integration_init import File "/config/custom_components/eltako/eltako_integration_init.py", line 10, in from .schema import CONFIG_SCHEMA File "/config/custom_components/eltako/schema.py", line 12, in from .gateway import GatewayDeviceType File "/config/custom_components/eltako/gateway.py", line 30, in from esp2_gateway_adapter.esp3_serial_com import ESP3SerialCommunicator File "/usr/local/lib/python3.12/site-packages/esp2_gateway_adapter/esp3_serial_com.py", line 13, in from enocean.protocol.packet import Packet, RadioPacket, RORG, PACKET, UTETeachInPacket ImportError: cannot import name 'UTETeachInPacket' from 'enocean.protocol.packet' (/usr/local/lib/python3.12/site-packages/enocean/protocol/packet.py)

SteffenS27 commented 1 month ago

For me the same Situation..

FloCodeRian commented 1 month ago

Still the same, even with V1.4.3

Help wanted, please

SteffenS27 commented 1 month ago

@grimmpp is there a possiblity to enable a next version without UTETeachIn like it was in 1.3.7 ? The last thing was I created manually the folder the installation wanted and put the wanted fils into it, but this was also not successful

SteffenS27 commented 1 month ago

Just one more.. with the new version it is not possible to downgrade to 1.3.7...

grimmpp commented 1 month ago

Hello @SteffenS27,

I personally think this must be a side effect with something else in HA and I actually don't want to introduce workarounds into the code because at some point in time you dont know anymore why there is a strange case in the code and maintenance becomes hell. ... Because this lib is "only" used by the ESP3 gateways like USB300 or FAM-USB515, which are quite a lot of people are using, I've tried to import the lib only when such a gateway shall be used.

NO GUARANTEE THAT THIS LOGIC CAN BE KEPT FOREVER!!!

https://github.com/grimmpp/home-assistant-eltako/blob/e52b662be63a967a9e5f65b199ee3d8dcfe3a856/custom_components/eltako/gateway.py#L132

Can you try it out if it works for you? Currently it is available in feature-branch.

Here is how to install the a specific branch: https://github.com/grimmpp/home-assistant-eltako/blob/main/docs/install-specific-version-or-branch.md

grimmpp commented 1 month ago

What is the issue with downgrading? Can you maybe use the install link for v1.3.7-restore-device-states-after-ha-restart?

FloCodeRian commented 1 month ago

Yes, updating / downgrading shouldn't be any problem! I've experienced no problems at all with this docs.

https://hacs.xyz/docs/entities/update_entities/

SteffenS27 commented 1 month ago

Yes, updating / downgrading shouldn't be any problem! I've experienced no problems at all with this docs.

https://hacs.xyz/docs/entities/update_entities/

yes okay - number of releases could changed - now I know :-)

Hello @SteffenS27,

I personally think this must be a side effect with something else in HA and I actually don't want to introduce workarounds into the code because at some point in time you dont know anymore why there is a strange case in the code and maintenance becomes hell. ... Because this lib is "only" used by the ESP3 gateways like USB300 or FAM-USB515, which are quite a lot of people are using, I've tried to import the lib only when such a gateway shall be used.

NO GUARANTEE THAT THIS LOGIC CAN BE KEPT FOREVER!!!

https://github.com/grimmpp/home-assistant-eltako/blob/e52b662be63a967a9e5f65b199ee3d8dcfe3a856/custom_components/eltako/gateway.py#L132

Can you try it out if it works for you? Currently it is available in feature-branch.

Here is how to install the a specific branch: https://github.com/grimmpp/home-assistant-eltako/blob/main/docs/install-specific-version-or-branch.md

Look here :-)

grafik

SteffenS27 commented 1 month ago

It seems that it worked out - I installed it with the branch option not via hacs - So I do not see it in hacs now as a integration

FloCodeRian commented 1 month ago

It seems that it worked out - I installed it with the branch option not via hacs - So I do not see it in hacs now as a integration

Worked out for what?

Downgrading or UTETeachIN?

SteffenS27 commented 1 month ago

It seems that it worked out - I installed it with the branch option not via hacs - So I do not see it in hacs now as a integration

Worked out for what?

Downgrading or UTETeachIN?

Worked out for no setup failure for version 1.4.4

FloCodeRian commented 1 month ago

sry, I had no luck so far. still the same problem even with terminal and feature-branch install ...

Logger: homeassistant.setup Quelle: setup.py:322 Erstmals aufgetreten: 22:19:51 (1 Vorkommnisse) Zuletzt protokolliert: 22:19:51

Setup failed for custom integration 'eltako': Unable to import component: cannot import name 'UTETeachInPacket' from 'enocean.protocol.packet' (/usr/local/lib/python3.12/site-packages/enocean/protocol/packet.py) Traceback (most recent call last): .... File "/usr/local/lib/python3.12/site-packages/esp2_gateway_adapter/esp3_serial_com.py", line 13, in from enocean.protocol.packet import Packet, RadioPacket, RORG, PACKET, UTETeachInPacket ImportError: cannot import name 'UTETeachInPacket' from 'enocean.protocol.packet' (/usr/local/lib/python3.12/site-packages/enocean/protocol/packet.py)

..... File "/usr/local/lib/python3.12/site-packages/esp2_gateway_adapter/esp3_serial_com.py", line 13, in from enocean.protocol.packet import Packet, RadioPacket, RORG, PACKET, UTETeachInPacket ImportError: cannot import name 'UTETeachInPacket' from 'enocean.protocol.packet' (/usr/local/lib/python3.12/site-packages/enocean/protocol/packet.py)

grimmpp commented 1 month ago

Hello @FloCodeRian,

Also here the enocean lib is missing. It looks like you installed successfully new changes but it is trying to load the enocean lib. ...

What gateway are you using? USB300?

FloCodeRian commented 1 month ago

managed it by simply unplugging physically the (in the moment) unused usb300 adapter.

but don't understand it, because configured was and still is only the fam usb...

gateway:

grimmpp commented 1 month ago

Maybe cache was not cleared. Nice to hear that it's working.