openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.88k stars 3.59k forks source link

[enocean] USB 300 cannot be set up in OH4 #15181

Closed jtjart closed 1 year ago

jtjart commented 1 year ago

Expected Behavior

The USB 300 gateway should get initialized after it has been added as a thing.

Current Behavior

When I add the USB 300 gateway as a thing (via UI or .thing-file) the status stays OFFLINE with the comment "trying to get bridge base id...". It is working with the same hardware when I install the openHABian image 1.7.5 running openHAB 3 instead of openHABian 1.8 running openHAB 4. I have also already tried using different USB Ports for the gateway, without success. I attached the log file with Debug/Trace level of detail. enocean-error.log

Possible Solution

I suggest some changes in openHABian 1.8 or openHAB 4 has caused the issue

Steps to Reproduce (for Bugs)

  1. Install openHABian 1.8 on a Raspberry Pi 4
  2. Insert the USB 300 gateway
  3. Add the binding "enocean"
  4. Scan for the bridge in "Things" and add the autmatically detected enocean bridge
  5. RESULT: Status: OFFLINE

Context

Your Environment

jlaur commented 1 year ago

@lovery, @fruggy83 - is the binding still working for you, or do you think this is some specific scenario?

lovery commented 1 year ago

I had some strange issue recently - the power went down for few hours and after that the bridge stayed in "trying to get bridge base id". I tried multiple things - restarting the machine, restarting openhab, unplug the dongle. I had the bridge definition in a file and I moved it to the UI, unpluged the dongle and restart the openhab and at some point it worked.

I remember that my error log looked similar to uploaded one. Currently I am using openHAB 3. I will install openHAB 4 and try to reproduce the error the following weeks.

JensDollenbacher commented 1 year ago

I observe the same behaviour:

The add-on runs without issues on 3.44

openhab-bot commented 1 year ago

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/openhab-4-0-release-discussion/147957/12

openhab-bot commented 1 year ago

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/enocean-usb300-initialization-fails-with-oh-4-0-0-m3-and-oh-4-0-0-3512/147466/7

unf commented 1 year ago

Same error picture with "enoceanpi" bridge on Raspberry 4 running openhabian, after updating to OH4 release packages, OS does initialize bridge correctly:

[ 1.570848] fe201000.serial: ttyAMA0 at MMIO 0xfe201000 (irq = 35, base_baud = 0) is a PL011 rev2

But afterwards, looping messages:

==> /var/log/openhab/openhab.log <==
2023-07-24 23:11:52.894 [INFO ] [ernal.transceiver.EnOceanTransceiver] - Transceiver shutdown
2023-07-24 23:11:52.904 [INFO ] [ernal.transceiver.EnOceanTransceiver] - EnOceanSerialTransceiver initialized
2023-07-24 23:11:52.908 [INFO ] [ernal.transceiver.EnOceanTransceiver] - EnOceanSerialTransceiver RX thread started
2023-07-24 23:11:52.909 [INFO ] [nternal.handler.EnOceanBridgeHandler] - EnOceanSerialTransceiver RX thread up and running

==> /var/log/openhab/events.log <==
2023-07-24 23:11:52.896 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'enocean:bridge:enoceanpi' changed from OFFLINE (CONFIGURATION_PENDING): trying to get bridge base id... to OFFLINE (CONFIGURATION_PENDING): opening serial port...
2023-07-24 23:11:52.908 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'enocean:bridge:enoceanpi' changed from OFFLINE (CONFIGURATION_PENDING): opening serial port... to OFFLINE (CONFIGURATION_PENDING): starting rx thread...
2023-07-24 23:11:52.911 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'enocean:bridge:enoceanpi' changed from OFFLINE (CONFIGURATION_PENDING): starting rx thread... to OFFLINE (CONFIGURATION_PENDING): trying to get bridge base id...
unf commented 1 year ago

Some more details here:

https://community.openhab.org/t/enocean-usb300-initialization-fails-with-oh-4-0-0-m3-and-oh-4-0-0-3512/147466/11?u=fnu

@fruggy83 You have any idea on that? Due to the forced update to OH4 my setup is actually useless as home automation.

jlaur commented 1 year ago

It is now suspected that the regression might be caused by #14023 - see https://community.openhab.org/t/enocean-usb300-initialization-fails-with-oh-4-0-0-m3-and-oh-4-0-0-3512/147466/20

lsiepel commented 1 year ago

@lovery @jtjart are you able to test the PR @dalgwen created?

jtjart commented 1 year ago

I have tested the PR from @dalgwen today, and it is working with these changes. Thank you! Will this be implemented in the next hotfix?