[enocean.communicators.SerialCommunicator] Serial port exception! (device disconnected or multiple access on port?)

Hi,

I am using home assistant with the enocean integration. It works just fine for some time, but often multiple times a day, I get the following exception: ERROR (Thread-3) [enocean.communicators.SerialCommunicator] Serial port exception! (device disconnected or multiple access on port?). After that the enocean/eltako sensors don’t work any more.

I thought that it is an issue of the following library [enocean.communicators.SerialCommunicator] Serial port exception! (device disconnected or multiple access on port?) · Issue #133 · kipe/enocean · GitHub, but know I am not sure anymore. Also, in the meantime I am attaching the USB devices from unraid and not anymore from within home assistant.

My setting is as follows:

  • unraid on a HP micro server, running HA on VMS
  • on unraid level the USB is attached to HA: 2-3.4.4 Interface Future Technology Devices International, Ltd:FT232 Serial (UART) IC FT5OI4Z
  • I am using such a range extender " deleyCON 10m USB 2.0 Verlängerungkabel Repeater-Kabel Aktiv" to put the enocean USB into a better position. At some point I thought the issue is coming from a power shortage because of which I installed a trafo “ALSISK Universal DC Multifunktionales Netzteil,100-240V auf 3V/4.5V/5V/6V/7.5V/9V/12V,MAX 2A(2000mA)”. Without success.
  • also without any success: I removed all enocean devices from Configuration.yaml. Still the error occurs.
  • the logs I have activated are the following ones:
    logs:
    homeassistant.components.enocean: debug
    homeassistant.components.sensor: debug
    homeassistant.components.serial: debug
    homeassistant.components.sensor.serial: debug
  • after the exception I see the enocean USB under …local:8123/hassio/system as follows:
    Device path:/dev/ttyUSB0
    ID: /dev/serial/by-id/usb-EnOcean_GmbH_EnOcean_USB_300_DC_FT5OI4ZR-if00-port0

To get the enocean USB back working I need to “Reload” the Enocean integration under …local:8123/config/integrations.

I am not sure what to check in order to get enocean reliably working. So far I have read and found the following: on home assistant community
…/enocean-key-tcm310-problem/247868
…/reading-from-serial-port/234942

Has anyone the enocean integration reliably running and/or has an idea what else I can check/do?

By the way: the same setup I have with a zigbee stick - works like a charm, since months.

Thanks in advance &
Best regards Martin

Yesterday I put the enocean stick directly - without extension cable into the USB slot. Then after some hours, again I got the serial exception.

I deleted the enocean integration and did this EnOcean - Home Assistant again. Then after some hours again a serial exception.

I can really only guess in the meantime.

Does anybody have the enocean integration working without the serial exception and can share the setting (HA version, devices…)?

Another update:

I got a personal tip to use the following config:
enocean:
device: /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_ XYZABC-if00-port0
This I tried before, without success.

Today, with the setup USB300 in 15m USB extension cable: No encocean sensors… in config. Then after half a day the following happened.

log in home-assistant.log
2022-04-18 18:31:57 ERROR (Thread-3) [enocean.communicators.SerialCommunicator] Serial port exception! (device disconnected or multiple access on port?)

log in 8123/hassio/system
22-04-18 18:31:57 INFO (MainThread) [supervisor.hardware.monitor] Detecting HardwareAction.REMOVE hardware /dev/ttyUSB0 - /dev/serial/by-id/usb-EnOcean_GmbH_EnOcean_USB_300_DC_FT5OI4ZR-if00-port0
22-04-18 18:31:57 INFO (MainThread) [supervisor.hardware.monitor] Detecting HardwareAction.REMOVE hardware /dev/gpiochip0 - None
22-04-18 18:31:57 INFO (MainThread) [supervisor.hardware.monitor] Detecting HardwareAction.REMOVE hardware /dev/bus/usb/002/002 - None
22-04-18 18:32:01 INFO (MainThread) [supervisor.hardware.monitor] Detecting HardwareAction.ADD hardware /dev/bus/usb/002/003 - None
22-04-18 18:32:01 INFO (MainThread) [supervisor.hardware.monitor] Detecting HardwareAction.ADD hardware /dev/gpiochip0 - None
22-04-18 18:32:01 INFO (MainThread) [supervisor.hardware.monitor] Detecting HardwareAction.ADD hardware /dev/ttyUSB0 - /dev/serial/by-id/usb-EnOcean_GmbH_EnOcean_USB_300_DC_FT5OI4ZR-if00-port0

From supervisor.hardware.monitor remove hardware I found this Why is supervisor.hardware.monitor removing and adding USB devices.

But what it also shows it that 3 devices are removed at the same time:
REMOVE hardware /dev/ttyUSB0 - /dev/serial/by-id/usb-EnOcean_GmbH_EnOcean_USB_300_DC_FT5OI4ZR-if00-port0
REMOVE hardware /dev/gpiochip0 - None
REMOVE hardware /dev/bus/usb/002/002 - None

Maybe these are the reason for multiple access on port?

I try again a test with putting the enocean stick directly - without extension cable into the USB slot. And then let’s see.

Other then the last time, when the enocean USB300 was directly plugged in, this time no exception for 48h. Setting is enocean integration in home assistant is running, but no devices at all are configured in config.

Since directly plugged in is not option, since the server is in the cellar, I focus again on the power consumption.

HPE ProLiant MicroServer Gen10 Plus

  • using USB 3.2 Gen1 Type-A ports (USB 2.0 and 3.2 compatible)

deleycon active USB 2.0 extension
10m
DC power port 5V/2A (max) which optionally can be used with a trafo when high power requirements are needed.

USB300

After an interaction with the very helpful product support from enocean it became clear that the “USB extension cable is recommended for best performance” is true but only up to 2m are recommended. Since I have used 10m and also tried 15m USB 2.0, I got this problem.

Now, I am using and USB 3.0 extension cable with 2m length and since 2 weeks I didn’t have one serial port exception.

The downside is that the enocean is not at the very best position, but I found my way around using an enocean repeater.