Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There was a problem using two identical relays #24

Closed
webinteger opened this issue Jan 26, 2018 · 2 comments
Closed

There was a problem using two identical relays #24

webinteger opened this issue Jan 26, 2018 · 2 comments

Comments

@webinteger
Copy link

If connect two relays. then lsusb say:

Bus 004 Device 003: ID 16c0:05df VOTI
Bus 004 Device 005: ID 16c0:05df VOTI

The ID is identical but the device is different, add the option to specify which device to control, for example:

hidusb-relay-cmd ID = ID=ABCDE: 003 ON 1
or
hidusb-relay-cmd ID = ID=ABCDE: 005 ON 1

Thank you very much!

@se4n01
Copy link

se4n01 commented Jun 6, 2018

So I found an ugly workaround for people having this problem on Windows.

  1. You need to download devcon.exe from Microsoft, see here: https://superuser.com/questions/1002950/quick-method-to-install-devcon-exe
  2. Get the device ids by issuing devcon.exe restart *HID*PID_* as an administrator
  3. It may list several devices try and identify the correct ones
  4. copy the device identifiers for the devices you need to control
  5. disable all but the device you want to conrtrol with devcon.exe disable "@THEHIDNAMEYOUFOUND"
  6. issue the commands with the HID controller which is now only connected to the controller you need
  7. disable the controller you just switched and enable a new one by issuing devcon.exe ebable "@THEHIDNAMEYOUFOUND"
  8. You can now control identical devices with identical ID and names just from the HW address!

On linux the procedure is much easier than using devcon you just have to change the permissions to the correct device in /dev/

@pavel-a
Copy link
Owner

pavel-a commented Jun 15, 2018

Identical IDs should not occur. Complain to the seller/manufacturer.
If the manufacturer cannot ensure unique IDs, they must provide a way for a customer to reprogram the ID.
I could add a command to select the device by "instance path" but in Windows these are obscure and can change after reboot. Definitely not recommended.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants