fruggy83 / openocean

27 stars 12 forks source link

Support discovery of USB dongles (Closes #9) #12

Closed bodiroga closed 6 years ago

bodiroga commented 6 years ago

Hi @fruggy83!

I haven't done any real test (I don't have any Enoncean USB300 with me right now), so don't merge it yet. In a couple of days I will report back with the results :wink:

Best regards,

Aitor

fruggy83 commented 6 years ago

HI Aitor (@bodiroga)

thanks a lot for your great work. A quick review seems to be ok. After merging back the OH2_3 branch back into master, I will do some tests on your pr, too.

Best regards Daniel

bodiroga commented 6 years ago

I'm having some problems with my Eclipse development installation and I'm not able to test the changes, sorry. Let's see if I can fix them as soon as possible.

Thank you Daniel!

fruggy83 commented 6 years ago

Hi Aitor (@bodiroga)

I merged the OH2_3 branch back into master yesterday however I did not found time to test your PR yet. I try to do it in the next days. If you also follow the binding thread in the openhab community, you know that I want to support other USB gateways too. For example some users requesting a wired (USB connected) setup with an Eltako FAM14. Your PR fits perfectly into this request. Do you think you can implement your discovery class in a more general form? I am thinking about a list of objects which holds the LABEL, VENDOR ID and PRODUCT ID. If you find a match in this list, you create a new bridge thing with the corresponding label. What do you think about it? I try to provide you the required IDs of my FAM14 today.

Best regards Daniel

fruggy83 commented 6 years ago

Hi Aitor (@bodiroga)

the infos about my FAM14 ATTRS{idProduct}=="6001" ATTRS{idVendor}=="0403" ATTRS{manufacturer}=="FTDI" ATTRS{product}=="FT232R USB UART"

Product and vendor ID seem to be the same as for your USB300...

Best regards Daniel

bodiroga commented 6 years ago

Hi again Daniel!

I could try to implement what you describe, but I think that it's not going to be possible. Have a look at the idProduct and idVendor published in the first message of the opened issue (https://github.com/fruggy83/openocean/issues/9). And now have a look again at your last message. Ups, both devices have the same identifiers :sob: Even if they are different devices, they share the same driver and are presented to the OS with the same product ID and vendor ID.

Could you provide more information about the FAM14 (manufacturer, product, serial...)? Let's see if we can differentiate them with the rest of the fields.

Best regards,

Aitor

fruggy83 commented 6 years ago

Hi @bodiroga

sorry for my very very late answer, I just forgot to merge your PR. Thanks a lot for your work.

Best regards Daniel

bodiroga commented 6 years ago

:+1:

Thank you for your work Daniel!