Skip to content

Instantly share code, notes, and snippets.

@cyyself
Last active March 20, 2024 07:07
Show Gist options
  • Save cyyself/a88eca3009fa8dcd9e33a0c1f9251759 to your computer and use it in GitHub Desktop.
Save cyyself/a88eca3009fa8dcd9e33a0c1f9251759 to your computer and use it in GitHub Desktop.

Hardware: https://item.jd.com/100019632536.html

Tear down the wired controller and connect each button to RPi GPIO.

Add this configuration to /etc/kvmd/override.yaml:

kvmd:
    gpio:
        drivers:
            my_gpio:
                type: gpio
        scheme:
            host1:
                pin: 5
                mode: output
                switch: false
                inverted: true
            host2:
                pin: 6
                mode: output
                switch: false
                inverted: true
            host3:
                pin: 16
                mode: output
                switch: false
                inverted: true
            host4:
                pin: 26
                mode: output
                switch: false
                inverted: true
        view:
            header:
                title: "KVM Switches"
            table:
                - ["#Host1:", host1]
                - ["#Host2:", host2]
                - ["#Host3:", host3]
                - ["#Host4:", host4]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment