|
1 | | -# Local Relay |
| 1 | +# OpenShock Local Relay |
| 2 | + |
| 3 | +A module for [OpenShock Desktop](https://github.com/OpenShock/Desktop) that relays shock, vibrate, and sound commands from the OpenShock cloud to locally-connected hubs over a serial (USB) connection — letting you use OpenShock without putting your hub on Wi-Fi. |
| 4 | + |
| 5 | +## What it does |
| 6 | + |
| 7 | +`LocalRelay` registers as a desktop module and: |
| 8 | + |
| 9 | +- Authenticates with the OpenShock API using a token with the `Devices_Auth` permission. |
| 10 | +- Subscribes to the OpenShock live control stream for your account. |
| 11 | +- Forwards incoming commands to a physical OpenShock hub connected over a serial port. |
| 12 | + |
| 13 | +The module adds two tabs to OpenShock Desktop: |
| 14 | + |
| 15 | +- **Hub** — pair the relay with a hub registered to your account. |
| 16 | +- **Serial** — pick the serial port for the connected hub and monitor the link. |
| 17 | + |
| 18 | +## Requirements |
| 19 | + |
| 20 | +- Windows, Linux, or macOS with [OpenShock Desktop](https://github.com/OpenShock/Desktop) installed. |
| 21 | +- .NET 10 runtime (bundled with OpenShock Desktop). |
| 22 | +- An OpenShock hub flashed with firmware that supports serial control, connected via USB. |
| 23 | +- An OpenShock account and an API token with the `Devices_Auth` permission. |
| 24 | + |
| 25 | +## Installation |
| 26 | + |
| 27 | +1. Grab the latest `OpenShock.LocalRelay.module.zip` from the [Releases](../../releases) page. |
| 28 | +2. Drop it into your OpenShock Desktop modules folder (or install it via the Desktop app's module manager). |
| 29 | +3. Restart OpenShock Desktop. |
| 30 | +4. Open the **Local Relay** module, pair your hub on the **Hub** tab, then select its port on the **Serial** tab. |
| 31 | + |
| 32 | +## Building from source |
| 33 | + |
| 34 | +```bash |
| 35 | +dotnet restore LocalRelay.slnx |
| 36 | +dotnet publish LocalRelay/LocalRelay.csproj --configuration Release -o publish |
| 37 | +``` |
| 38 | + |
| 39 | +The packed module ends up at `publish/OpenShock.LocalRelay.module.zip`. |
| 40 | + |
| 41 | +During local development, `copy-module-dll.cmd` can copy the built assemblies into your OpenShock Desktop module directory for quick iteration. |
| 42 | + |
| 43 | +## License |
| 44 | + |
| 45 | +See [LICENSE](LICENSE). |
0 commit comments