Using 2 of the Same USB Keyboard Devices

A few days ago I setup a USB keypad to use as a smart remote after following this tutorial: https://www.youtube.com/watch?v=YV0DFPBQbWQ

Everything worked amazingly well.

Now I want to add a second keypad, but since it’s the exact same keypad, I think it’s complicating things, and not only is the 2nd keypad not working, adding the 2nd prevents the 1st keypad from working.

As soon as I unplug the USB for the 2nd keypad, everything works well again.

Without getting too long winded in this post, I was just wondering if anyone has any insight into what my problem could possible be?

I’m running VirtualBox on a windows machine, and correctly passing over the Keypad device via the USB settings in VirtualBox.

The config YAML that works when having 1 device is:


keyboard_remote:
    device_descriptor: '/dev/input/event6'
    type: "key_down"
    emulate_key_hold: true
    emulate_key_hold_delay: 0.25
    emulate_key_hold_repeat: 2.0

I used the following code when adding the second device:


keyboard_remote:
  - device_descriptor: '/dev/input/event6'
    type: "key_down"
    emulate_key_hold: true
    emulate_key_hold_delay: 0.25
    emulate_key_hold_repeat: 2.0

  - device_descriptor: '/dev/input/event12'
    type: "key_down"
    emulate_key_hold: true
    emulate_key_hold_delay: 0.25
    emulate_key_hold_repeat: 2.0

So any ideas, or directions I can be pointed in?

Check that each keyboard work by themself.

Then check that they identify differently in the USB detection process. I think it is called the host logs in the HA log system.
If they identify themself the same, then you need to use a port path to distinguish them. Device by id is not possible.

Ok I appreciate the help!

Thanks a lot!