openhab / openhab-addons

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

[enocean] Incorrectly discovers many devices as "Enocean USB300 Dongle" because 0403:6001 is used by many (FTDI) USB to serial converters #4421

Closed wborn closed 5 years ago

wborn commented 5 years ago

Finally I had a look at how the UsbSerialDiscoveryParticipant works by inspecting the EnOceanUsbSerialDiscoveryParticipant.

Apparently it uses a very common USB vendor/product ID for matching the Dongle: https://github.com/openhab/openhab2-addons/blob/af628c6a58bf8f7334dbcb1617147ec62c08fb6d/addons/binding/org.openhab.binding.enocean/src/main/java/org/openhab/binding/enocean/internal/discovery/EnOceanUsbSerialDiscoveryParticipant.java#L40-L41

All the USB to serial devices I use with openHAB have this vendor/product ID:

With lsusb it shows up as:

Bus 001 Device 008: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC

So this greatly limits the usefulness of this kind of discovery.

Here's a screenshot of one of my Plugwise Sticks being detected as an EnOcean Dongle in Paper UI :cry: :

screenshot

kaikreuzer commented 5 years ago

This indeed seems to be a bit too generic @fruggy83 :-( . The FTDI chip is indeed widespread and its product id should not be used to identify specific dongles like the USB300.

fruggy83 commented 5 years ago

Hi @kaikreuzer, I will see if I can narrow the discovery a little more.

fruggy83 commented 5 years ago

@wborn I have created a PR, could you check this with your FTDI devices? Thanks a lot 👍