fruggy83 / openocean

27 stars 12 forks source link

Support discovery of USB dongles #9

Closed bodiroga closed 6 years ago

bodiroga commented 6 years ago

Hi Daniel (@fruggy83)!

It would be great if we could add support for automatic discovery of Enocean USB dongles using the new USB discovery API (more information: https://github.com/eclipse/smarthome/issues/5153). I will try to provide a PR to include the Enocean USB300 controller. Device information:

idProduct = "6001" idVendor = "0403" manufacturer = "EnOcean GmbH" product = "EnOcean USB 300 DB" serial = "FT3MXEB" (Can you confirm that your device has a different serial number?)

Data taken executing the command: "udevadm info -a -n /dev/ttyUSB0"

Many many thanks for your work with the binding, I'm playing with it and it looks really really good! :+1:

Best regards,

Aitor

bodiroga commented 6 years ago

I can confirm that each USB device has a unique serial id. I have found another one laying around here and its serial id is "FT3MXJ6"

fruggy83 commented 6 years ago

Hi Aitor (@bodiroga),

very good idee 👍 Do you think we can also auto discover an enocean pi module in this or similar way? If you need any help implementing this, you can also contact me by skype (same nick).

Best regards Daniel

bodiroga commented 6 years ago

Good morning @fruggy83!

Yeah, I think so, we only need the "vendor id" and the "product id" of the enocean pi module. Do you have one? Can you run the "udevadm info -a -n /dev/ttyUSB0" command on the Raspberry Pi where you have placed it and provide the information posted on my first message? :wink:

Keep up with the good job!

fruggy83 commented 6 years ago

Good morning Aitor (@bodiroga),

the enocean pi module is connected through the gpio pins to the pi and can be used by /dev/ttyAMA0. When I run the udevadm command I do not see a vender id or product id. As it is not an USB device, I do not think that it will be found by UsbSerialDiscoveryService (an USB specific regex is used to identify devices). So we have to find another solution to discover an enocean pi module in openhab. However first step first, It would be great if you could implement the discovery for the USB300 controller and provide a PR. Thank a lot for your work 👍

Best regards Daniel

fruggy83 commented 6 years ago

Hi Aitor (@bodiroga)

I just wanted to inform you that you that the auto discovery of enocean USB dongles works in "the wild" too. Thanks again for your help and sorry that the merge took so long.

Best regards Daniel