Remote control KVM with ESPHome, why not work?

With ESPHome 2026.10.0 tinyusb got added, and with https://github.com/esphome/esphome/pull/16079 there is tinyusb_keyboard component available as well.

And it works great, as long as I use a regular USB port. When connected to the HID port, nothing happens: Doesn’t show in lsusb, no beeps, no passthrough, no nothing.

What does the HID port require to make this work? Sadly, a similar post from @laucien didn’t get an answer, so I’m asking again because I couldn’t find it explained anywhere.

Hm? What is the context here? What KVM do you have?

I have a DP 1.4 2-Monitor 2-PC 10Gbps-USB Dock. But i figured the HID-Port would behave the same on all of them

I have never used ESPHome so I’m not sure what you’re trying to do in the HID port. Is it an Arduino like in the post you linked?

When I tried to use tinyusb via the Adafruit library in Arduino IDE, I had to be very careful to make it a pure HID connection.

#include "Adafruit_TinyUSB.h"
#include <Adafruit_NeoPixel.h>
#include <Wire.h>
#include <Adafruit_NeoKey_1x4.h>

#define MY_USB_VID          0x239A   // Adafruit VID
#define MY_USB_PID          0x8115   // TRRS Trinkey PID
#define MY_USB_MANUFACTURER "Custom"
#define MY_USB_PRODUCT      "TRRS Trinkey Keyboard"
#define MY_USB_SERIAL       "TRRSHID0002"

uint8_t const desc_hid_report[] = {
  TUD_HID_REPORT_DESC_KEYBOARD()
};

Adafruit_USBD_HID usb_hid;

…

void setup() {
  Wire.begin();

  if (!neokey.begin(NEOKEY_ADDR)) {
    while (1) {
      delay(500);
    }
  }

  for (uint8_t i = 0; i < 4; i++) {
    neokey.pixels.setPixelColor(i, COLOR_BOOT);
  }
  neokey.pixels.show();
  delay(300);
  refreshIdlePixels();

  TinyUSBDevice.setID(MY_USB_VID, MY_USB_PID);
  TinyUSBDevice.setManufacturerDescriptor(MY_USB_MANUFACTURER);
  TinyUSBDevice.setProductDescriptor(MY_USB_PRODUCT);
  TinyUSBDevice.setSerialDescriptor(MY_USB_SERIAL);

  TinyUSBDevice.clearConfiguration();

  usb_hid.setPollInterval(2);
  usb_hid.setBootProtocol(HID_ITF_PROTOCOL_KEYBOARD);
  usb_hid.setReportDescriptor(desc_hid_report, sizeof(desc_hid_report));
  usb_hid.setStringDescriptor(MY_USB_PRODUCT);
  usb_hid.begin();

  TinyUSBDevice.detach();
  delay(500);
  TinyUSBDevice.attach();
}

ESPHome abstracts the code generation to a YAML file which makes writing code for automating stuff easier. Because I don’t write the code.

The important bit I seem to get from your post is:

There is only one HID on the port, but currently it is no boot protocol port. I’ll see if the ESPHome developers are willing to add this.