← All power control and buttons

ESP-KVM is free, open-source firmware that turns an ESP32-P4 board into an IP-KVM: another computer's screen, keyboard and mouse in your browser, from the BIOS up. The M5Stack Unit Relay is an optional extra: it presses the target's buttons, or gives the box a button of its own. What it does → Try the demo →

M5Stack Unit Relay
Power control (optional)

M5Stack Unit Relay

One relay on a Grove cable. Its contacts go across the target's power (or reset) switch pins, and the device presses the button by closing them.

StatusWritten from the datasheet, not run on one yet
ContactsCOM, NO, NC; 3 A at 30 V DC
Wiringthe yellow Grove wire to a free GPIO; COM and NO across the switch pins
SettingSettings → Power → ATX wiring

One of the M5Stack parts ESP-KVM works with: see them all together.

M5Stack docs

A relay is the same job as the optocoupler board: two contacts that close for a moment, the way the case's own button does. The firmware needs nothing new for it.

How to wire it

  • The Grove cable to the board. The yellow wire is the signal.
  • COM and NO across the target's power switch pins on the front-panel header. Polarity does not matter to a switch.
  • In Settings → Power → ATX wiring, set Power button GPIO to the yellow wire's pin and turn Buttons active-high on: the relay closes when the pin goes high.

One relay is one button. For reset as well, a second unit on another pin, or the two-channel optocoupler board. A relay cannot sense the power LED, so the console cannot show whether the target is on.

On the M5Stack Unit PoE-P4 the Grove port is GPIO 53 (yellow) and 54, the same pair the status display uses there, so it is the relay or the display.

Good to know

  • The relay clicks on every press, and it can switch far more than a power button needs.
  • Not tried with this unit yet; the wiring is from its documentation.