{"id":21163190,"url":"https://github.com/timgws/kvm-switch","last_synced_at":"2025-07-09T15:34:59.446Z","repository":{"id":70355123,"uuid":"497157530","full_name":"timgws/kvm-switch","owner":"timgws","description":"Control hardware KVM/Matrix devices when your mouse moves to the edge of the screen","archived":false,"fork":false,"pushed_at":"2022-06-05T04:03:52.000Z","size":37,"stargazers_count":15,"open_issues_count":7,"forks_count":1,"subscribers_count":3,"default_branch":"development","last_synced_at":"2024-06-22T18:48:02.537Z","etag":null,"topics":["automation","barrier","blustream","hdmi-device-automation","kvm","startech","synergy"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/timgws.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-27T22:49:06.000Z","updated_at":"2024-06-09T12:59:53.000Z","dependencies_parsed_at":"2023-03-23T03:32:16.119Z","dependency_job_id":null,"html_url":"https://github.com/timgws/kvm-switch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timgws%2Fkvm-switch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timgws%2Fkvm-switch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timgws%2Fkvm-switch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timgws%2Fkvm-switch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timgws","download_url":"https://codeload.github.com/timgws/kvm-switch/tar.gz/refs/heads/development","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225566608,"owners_count":17489376,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","barrier","blustream","hdmi-device-automation","kvm","startech","synergy"],"created_at":"2024-11-20T13:41:30.639Z","updated_at":"2024-11-20T13:41:31.347Z","avatar_url":"https://github.com/timgws.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fence\n## What is Fence?\nFence allows you to automate switching hardware devices when the mouse moves\nto the edge of the screen. The functionality is similar to Synergy, but we don't\npass through mouse clicks and key presses.\n\nSometimes also known as 'Glide and Switch', the Fence client runs on each PC connected to external\ndevices through the Fence server. When the mouse moves to the edge of the screen, the client tells\nthe server the name of the device (ie, the computer name), and the direction of the switch\n(left, right, top, bottom). The server then calculates the actions that needs to be performed.\n\nBoth the server and the client are cross-platform.\n\nThis gives you the convenience of Synergy (move your mouse to the edge of the screen\nto swap the computer receiving the inputs) with the stability of using USB DDM\nto redirect input devices. Lower latency, better(ish) security and much better\napplication compatibility.\n\nFence allows you to design your switching on a per-direction, per-device level,\nallowing full control over your switching layout.\n\n## Where does it run?\n* macOS 11\n* Windows 10\n* Archlinux (with X11 - not Wayland)\n\n## What devices can be controlled?\n* KVM controllers (such as the Startech SV431DVIUDDM or ConnectPRO UDP2-14AP)\n* HDMI matrix switches (such as the Blustream CMX44AB)\n\n## How do I get up and running?\nCurrently, the configuration is hardcoded into the `server` binary at build time.\n\n### Step 1: Configure a server\nA Fence server is required to run on a machine that has access to all of the devices that\nare wanted to be controlled.\n\nA Raspberry Pi or similar low-powered device is ideal for this.\n\nFor my setup, I use a SV431DVIUDDM and CMX44AB.\n\n* Update the `registerDrivers()` function inside `server/main.go` to register drivers for the devices you want to\n  control.\n* Update the serial port in `server/drivers/startech_kvm/startech_kvm.go`\n  and/or `server/drivers/blustream/blustream.go`\n* Define the correct layout in `server/layout.go` describing what you want performed when the mouse moves between\n  screens\n\nNote that multiple instances of the matrix and KVM drivers can be started at the same time (see `server/main.go`),\nallowing for chains if control of a larger range of devices at once is desired.\n\nStart the server:\n```shell\n# cd server\n# go build\n# ./server -addr :8787\n2022/05/29 13:03:23 Started driver: Startech SV431DVIUDDM\n2022/05/29 13:03:23 Started driver: Blustream\n2022/05/29 13:03:23 [startech_kvm] Command #1/1: ERROR\n2022/05/29 13:03:23 Ignore the first error, we are just initializing our state - looks like this device is correct\n2022/05/29 13:03:23 [blustream]: New driver name is: Blustream CMX44AB\n2022/05/29 13:03:23 [blustream]: New driver name is: Blustream CMX44AB v2.22\n2022/05/29 13:03:24 [startech_kvm] Command #1/1: SV431DVIUDDM F/W Version :H2K B4.1\n2022/05/29 13:03:24 [startech_kvm]: New driver name is: Startech.com SV431DVIUDDMH2K B4.1\n```\n\nTo see if the server is running successfully, you can use one of the [API Endpoints](docs/API_Endpoints.md)\n\n### Step 2: Install client on all machines\n```shell\n# cd client\n# go build\n# ./client -addr 10.2.2.2:8787 -name left\n2022/05/29 13:06:23 [GUI] The application has booted\n2022/05/29 13:06:23 [Websocket] Starting Client\n2022/05/29 13:06:23 [Glide] get screen size:  3360x1890\n```\n\n## TODO/Upcoming Features\n* [x] Improve switching solution for Blustream devices.\n* [x] [#1](https://github.com/timgws/kvm-switch/issues/1)\n  Fix the client, so that it reconnects when the server's connection goes away.\n* [ ] [#2](https://github.com/timgws/kvm-switch/issues/2)\n  Enable using hotkeys to lock the current screen/not send glide commands to the server.\n* [ ] [#3](https://github.com/timgws/kvm-switch/issues/3)\n  Use DDC/CI to control the monitor inputs, so a hardware matrix is not required.\n* [ ] [#3](https://github.com/timgws/kvm-switch/issues/3)\n  Support Synergy, so DDC/CI commands can be issued for additional hardware-free solution.\n* [ ] [#4](https://github.com/timgws/kvm-switch/issues/4)\n  Web interface to define the edges of different devices.\n* [ ] [#5](https://github.com/timgws/kvm-switch/issues/5)\n  Implement SSL for connections.\n* [ ] [#6](https://github.com/timgws/kvm-switch/issues/6)\n  Implement authentication for connections.\n* [ ] [#7](https://github.com/timgws/kvm-switch/issues/7)\n  Investigate whats required to pass keypresses and mouse movements to the client.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimgws%2Fkvm-switch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimgws%2Fkvm-switch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimgws%2Fkvm-switch/lists"}