# Developer & API Docs (/dev)
## Backend Architecture [#backend-architecture]
## OpenAPI Documentation [#openapi-documentation]
You can find the [OpenAPI Documentation here](https://api.openshock.app/scalar/viewer)
Note that there is both a Version 1 & Version 2 at the left top in the viewer.
You might notice that Version 2 does not contain all the endpoints that are in Version 1. That is
because version 2 only contains endpoints that actually make a version 1 equivalent obsolete and
there for deprecated. TL;DR; Prefer endpoints in Definition Version 2 over 1
The OpenAPI documentation contains all HTTP endpoints, but does not document the WebSockets and
SignalR hubs.
### User Agent [#user-agent]
In order to be able to access `openshock.app`, you need to have a `User-Agent` header set.\
Empty User-Agents are blocked and result in a 403. So make sure to set this to something meaningful that represents your application.\
E.g. `User-Agent: MyExampleApplication/1.0 (example@example.org)`
### Authentication [#authentication]
Authentication for applications is done via a API Token which are to be sent as a header with the name/key `Open-Shock-Token`.
You can generate a API Token on the website. [New API Token UI](https://next.openshock.app/settings/api-tokens)
### WebSockets [#websockets]
There is a few different WebSocket endpoints. Most of them use json. The Hub (previously named Device) websocket uses flatbuffers binary serialization.
GW = Gateway or LiveControlGateway (e.g. de1-gateway.openshock.app)\
API = Main API (e.g. api.openshock.app)
* `[GW]/1/ws/live/{deviceId}` # Live Control Websocket, json
* `[GW]/1/ws/device` # Hubs (devices) websocket, flatbuffers
* `[API]/1/ws/device` # Legacy Hubs (Deprecated, not implemented anymore as of 31.08.2024)
## SignalR [#signalr]
SignalR is a Realtime Messaging Framework developed by Microsoft. The transport way we use is only WebSocket with JSON.
* `[API]/1/hubs/user`
* `[API]/1/hubs/share/link/{id}`
# Using SignalR WebSockets (/dev/signalr)
OpenShock exposes real-time events and control channels through [SignalR](https://learn.microsoft.com/aspnet/core/signalr). The hubs use WebSocket transport with JSON payloads.
## Endpoints [#endpoints]
* `https://api.openshock.app/1/hubs/user`
*Receive device status, logs and OTA updates for an authenticated user and send control commands.*
* `https://api.openshock.app/1/hubs/share/link/{id}`
*Interact with a public share link. Replace `{id}` with the share link UUID.*
## Connecting [#connecting]
Use a SignalR client and provide the required headers:
* `User-Agent`: A meaningful identifier for your application.
* `Open-Shock-Token`: API token created in account settings.
```ts
import { HubConnectionBuilder, LogLevel } from "@microsoft/signalr";
const connection = new HubConnectionBuilder()
.withUrl("https://api.openshock.app/1/hubs/user", {
headers: {
"User-Agent": "MyExampleApp/1.0",
},
})
.withAutomaticReconnect()
.configureLogging(LogLevel.Information)
.build();
await connection.start();
```
## Server methods [#server-methods]
The user hub exposes the following methods that can be invoked with `connection.invoke`:
| Method | Definition | Description |
| --------------- | -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `Control` | `Control(IReadOnlyList shocks)` | Send one or more control commands to shockers. Each command requires `id`, `type`, `intensity`, `duration` and optional `exclusive`. |
| `ControlV2` | `ControlV2(IReadOnlyList shocks, string? customName)` | Same as `Control` but allows an optional custom sender name to appear in logs. |
| `CaptivePortal` | `CaptivePortal(Guid deviceId, bool enabled)` | Enable or disable captive portal on a device. |
| `EmergencyStop` | `EmergencyStop(Guid deviceId)` | Immediately stop a device. |
| `OtaInstall` | `OtaInstall(Guid deviceId, SemVersion version)` | Trigger firmware update for a device to a specific version. |
| `Reboot` | `Reboot(Guid deviceId)` | Reboot a device. |
Example control message:
```json
[
{
"id": "00000000-0000-0000-0000-000000000000",
"type": 1,
"intensity": 50,
"duration": 1000,
"exclusive": false
}
]
```
## Client methods [#client-methods]
Listen for server calls with `connection.on("MethodName", handler)`.
### User hub methods [#user-hub-methods]
| Method | Definition | Description |
| --------------------- | --------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| `Welcome` | `Welcome(string connectionId)` | Fired after connecting and returns the SignalR connection ID. |
| `DeviceStatus` | `DeviceStatus(IList deviceOnlineStates)` | Provides online status and firmware version for devices accessible to the user. |
| `Log` | `Log(ControlLogSender sender, IEnumerable logs)` | Emits control log entries generated by device actions. |
| `DeviceUpdate` | `DeviceUpdate(Guid deviceId, DeviceUpdateType type)` | Notifies when a device is updated or removed. |
| `OtaInstallStarted` | `OtaInstallStarted(Guid deviceId, int updateId, SemVersion version)` | A firmware update began on the device. |
| `OtaInstallProgress` | `OtaInstallProgress(Guid deviceId, int updateId, OtaUpdateProgressTask task, float progress)` | Progress update for an ongoing firmware install. |
| `OtaInstallFailed` | `OtaInstallFailed(Guid deviceId, int updateId, bool fatal, string message)` | Firmware install failed. `fatal` indicates rollback. |
| `OtaRollback` | `OtaRollback(Guid deviceId, int updateId)` | Firmware install rolled back to previous version. |
| `OtaInstallSucceeded` | `OtaInstallSucceeded(Guid deviceId, int updateId)` | Firmware install finished successfully. |
### Public share hub methods [#public-share-hub-methods]
| Method | Definition | Description |
| --------- | ------------------------------------------- | ------------------------------------------------------------------- |
| `Welcome` | `Welcome(PublicShareHub.AuthType authType)` | Indicates whether the connected client is authenticated or a guest. |
| `Updated` | `Updated()` | Share link configuration changed. |
These methods deliver typed payloads matching the backend models. Refer to the [OpenShock API](https://github.com/OpenShock/API) for structure details.
## Share link hub [#share-link-hub]
To connect to a share link hub, use the share link identifier and optionally provide a `name` query parameter for guest connections:
```ts
const shareConn = new HubConnectionBuilder()
.withUrl(
"https://api.openshock.app/1/hubs/share/link/01234567-89ab-cdef-0123-456789abcdef?name=Guest",
)
.build();
await shareConn.start();
```
Guests can call `Control` to interact with the devices shared via the link. Authenticated users may also be notified through the user hub when share link activity occurs.
## Disconnecting [#disconnecting]
Call `connection.stop()` when your application shuts down to gracefully close the WebSocket.
```ts
await connection.stop();
```
This page describes the basics for working with OpenShock's SignalR hubs. For full type definitions consult the server source code or OpenShock community resources.
# Hardware Overview (/hardware)
This section covers all physical components that make up an OpenShock setup β from the control board ("Hub") and transmitter modules, to the shockers (collars) themselves.
Supported microcontroller boards, compatibility and feature matrix
433 MHz transmitter modules and assembly guidance
Supported receiver/shocker models and safety info
## Choosing Your Path [#choosing-your-path]
| Goal | Start Here | Why |
| --------------------------------------------------- | ---------------------------------------- | ------------------------------------------------- |
| I want the simplest working hub | [Boards](/hardware/boards) | Pick a fully maintained board for fewer surprises |
| I already own a collar and want to know if it works | [Shockers](/hardware/shockers) | Lists supported shocker models and status |
| Ready to get started? | [Guides β OpenShock](/guides/openshock) | End-to-end setup instructions |
| I plan to self-host everything | [Guides β Selfhost](/guides/selfhosting) | Best selfhost practice and examples |
## Recommended Starting Hardware [#recommended-starting-hardware]
If you are new and buying fresh parts today:
1. A fully maintained board (e.g. Seeed Studio XIAO ESP32S3, Wemos Lolin S3, or OpenShock Core V2)
2. A 433 MHz transmitter module listed in the Transmitter section
3. A recommended shocker (CaiXianlin) β see supported list
Recommended: cables and a soldering iron to connect the ESP32 and transmitter.
## Safety First [#safety-first]
Before powering anything or placing a collar on a person, read the core [Safety Rules](/home/safety-rules). Improper use can cause injury. Never place electrodes near the heart or neck; avoid simultaneous contact with both shocker pins.
## Firmware and Flashing [#firmware-and-flashing]
Once you have your board selected, head to:
Flash the OpenShock firmware
Configure your hub after flashing
OTA and version upgrade workflow
## Need Help? [#need-help]
Hub connectivity and pairing issues
Shocker pairing problems
Ask in the community ([Discord](https://discord.gg/OpenShock)) with board + firmware version + logs if available.
# Frequently Asked Questions (/home/faq)
## What is OpenShock? [#what-is-openshock]
OpenShock is a free and open source software and hardware project for controlling shocking devices via the internet (or locally).
## Is OpenShock free? [#is-openshock-free]
Yes OpenShock is free and open source. Even the officially hosted instance at `OpenShock.app` is free to use!
If you want to support us you can do so via [GitHub Sponsors](https://github.com/sponsors/OpenShock)
## How can I build/get my own? [#how-can-i-buildget-my-own]
You can either buy a pre-built Hub from on of our [Community Vendors](../vendors/hardware) or build your own [(DIY)](../guides/diy).
# Welcome to OpenShock (/home)
We're proud to present our fully open-source software solution, compatible with off-the-shelf hardware, to get you started in the world of shocking!
## Getting Started [#getting-started]
Everything you need to get started with OpenShock
Buy parts and build your own hub
Flash the OpenShock firmware to your board
Configure your hub and pair your shocker
## Safety [#safety]
Please read the [Safety Rules](/home/safety-rules) before using OpenShock.
# Safety Rules (/home/safety-rules)
Information provided on this wiki does not constitute or imply endorsement and is provided purely
for informational purposes. OpenShock does not claim any liability for misuse of the information
on this site.
The electricity could flow through your heart.
## Consequences [#consequences]
Wearing the shocker near any of these Zones can cause:
* Heart Attack
* Irregular heartbeat
* Breathing irregularities or difficulty
* Vision or hearing issues
* Loss of consciousness
If you notice any of these symptoms contact emergency services immediately.
## Handling the Shocker [#handling-the-shocker]
You are playing with Electricity, always handle it with care.
* Do not not touch the pins of the shocker while it's on, it may not cause permanent damage to your hand but it is extremely painful.
## Consent [#consent]
Please keep in mind that this is an adult toy (18+) with the purpose of inflicting pain on your partner and should only be used with consent.
# Troubleshooting: Hub (/troubleshooting/hub)
## Shocker not pairing [#shocker-not-pairing]
This could be due to 3 main reasons:
* The Hub is offline
* The RF TX pin is not configured correctly
* The transmitter is not connected properly
### Hub is offline [#hub-is-offline]
Make sure the Hub is online on the Website, you can confirm this by checking if the dot next to the name of it is green.
If you're unsure about the reflected status, refresh the page to check if it's changed.
### RF TX pin is not configured correctly [#rf-tx-pin-is-not-configured-correctly]
If you bought a pre-built Hub this is unlikely, but might be the case especially after a re-flash.
The RF TX (SIG) pin is the GPIO pin on your ESP32 that controls the signal/command to the antenna.
Therefore, you want to configure the pin number to match what's wired up to the SIG pin of your
transmitter.
Usually you set this pin during the first time setup of your Hub. If you have already done Setup and your Hub is online, there are two ways to change the pin:
1. Re-enable the Captive Portal via the website (`Hubs -> Three dots -> Remote Debug -> Captive Portal On`), then 4.3.2.1 etc.
2. Connect a serial terminal to the ESP (via USB UART) and use the `rftxpin` command followed by the number of your GPIO pin.
Best effort list of web serial terminals available for your convenience:
* [https://serial.namelessnanashi.dev/](https://serial.namelessnanashi.dev/)
* [https://serial.huhn.me/](https://serial.huhn.me/)
* [https://www.serialterminal.com/](https://www.serialterminal.com/)
* [https://webserialterminal.com/](https://webserialterminal.com/)
### Transmitter is not connected properly [#transmitter-is-not-connected-properly]
Run through all common trouble-shooting with TX Board connections:
1. Make sure your GND and VCC are properly connected. You can use a multimeter to make sure the TX Board VCC pin is receiving 3.3v, and to run a continuity test from TX GND to ESP GND.
2. It's recommended to use 3.3v for the transmitter's VCC (voltage input), as using 5V may result in inoperation or hardware damage (if precautions aren't taken - ie. logic-level shifters).
3. Ensure you've soldered the header pins onto the ESP board, so they are not just resting. As the TX board doesn't acknowledge commands, `rftransmit` will show success regardless of reality.
4. Verify that signal (SIG) is connected to a GPIO pin that isn't blacklisted. When setting a pin in the Setup or via serial console, the firmware will warn you if you try to use an invalid pin.
5. Note that the numbers on the PCB may not always match the actual GPIO pin number! Refer to the datasheet of your particular board to ensure you're connecting to the correct GPIO pin number.
6. Additionally, make sure you are using a Transmitter module! The Receiver modules are not used at this time so you can leave them in the packet, if you bought a transceiver (TX+RX) kit.
If you've tried the above, open a serial terminal & run a test while the Shocker is in pairing mode:
`rftransmit {"model":"caixianlin","id":12345,"type":"vibrate","intensity":99,"durationMs":500}`
# Troubleshooting: Shocker Pairing (/troubleshooting/shocker-pairing)
## Shocker Pairing Mode [#shocker-pairing-mode]
Make sure you shocker is in Pairing Mode when trying to send a command. It can be any command, at any intensity, and any duration.
Recommended command is Vibrate at 2-5 seconds.
### Caixianlin Shocker [#caixianlin-shocker]
For the Caixianlin shockers that is done by holding the power button down for 2-3 seconds. It will beep and start to flash its led fast. While it is flashing fast send your command.
### Petrainer [#petrainer]
Depending on what Petrainer model you have this might be a bit different.
For the 998DR you should just be able to press the power button once, that should put it into pairing mode by default.
*If anyone has more information for other models feel free to contribute or leave a message on our discord*
## Hub Radio Transmitter Pin (RFTX Pin) [#hub-radio-transmitter-pin-rftx-pin]
Your Hub's RFTX GPIO Pin might not be set correct. This can be especially the case for DIY.
[See here for more information](hub#rf-tx-pin-is-not-configured-correctly)
# Troubleshooting: ShockOSC (/troubleshooting/shockosc)
## OSC active? [#osc-active]
Check if you have OSC enabled in your VRChat action menu.
## Reset OSC [#reset-osc]
Go ahead and click reset config in the VRChat action menu. This should reload your avatar.
or
If it doesn't, navigate to `%userprofile%\appdata\locallow\VRChat\VRChat` and delete `OSC` folder.
Then reload your avatar again.
# Backend Development Setup (/dev/contributing/backend)
## Requirements [#requirements]
* Docker or Podman with Compose ([Docker Linux](https://github.com/docker/docker-install) [Docker Desktop Windows](https://www.docker.com/products/docker-desktop/) [Podman](https://podman.io/docs/installation) [Podman Desktop](https://podman-desktop.io/))
* [NET 10.0 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/10.0)
* git (+ git bash if on [Windows](https://git-scm.com/downloads))
## Recommendations [#recommendations]
* Jetbrains Rider
## Setup [#setup]
Open a shell in the `dev` directory. (Git Bash on Windows)
### Postgres, Dragonfly (Redis Compatible Cache), WebUI [#postgres-dragonfly-redis-compatible-cache-webui]
Run the following command to start the local development databases.
```bash
docker compose up -d
```
This starts Postgres and Dragonfly as a container on your local machine.
Additionally, it starts the OpenShock WebUI in a container for easier access to the localhost backend.
Its accessible at `http://localhost:8080`.
There shouldn't be any errors in the output.
**Tips:**
* You can use `docker ps` to check if the containers are running.
* To update the images you need to run `docker compose pull` and then `docker compose up -d` again.
* To stop the containers, run `docker compose down`.
### Setting up environment secrets [#setting-up-environment-secrets]
Make sure you are in the `dev` directory and your terminal is a linux like bash terminal (Git Bash on Windows will work).
Run the `setupUsersecrets.sh` script to setup dotnet user secrets for the projects.
```bash
./setupUsersecrets.sh
```
It will prompt you for your local machines ipv4 address. You can find this by running `ipconfig` on Windows or `ifconfig` on Mac/Linux.
We need this to be able to connect hubs to this locally running openshock instance.
### Running API [#running-api]
If not already done, open the OpenShockBackend solution in Rider.
Give it some time to index and restore nuget.
When everything is done you should be able to select the `API` launch config at the top right and click the green play button to start the API.
It's important to do this to run the initial migrations against the database.
### Seeding Test Data [#seeding-test-data]
Run the `setupTestData.sh` script to create a test user account.
```bash
./setupTestData.sh
```
The user has the following credentials:
Email: `test@openshock.org`
Username: `OpenShock-Test`
Password: `OpenShock123!`
PS: The locally started WebUI is available at `http://localhost:8080`.
### Running the other projects [#running-the-other-projects]
### Connecting a Hub to this locally running instance [#connecting-a-hub-to-this-locally-running-instance]
### Creating migrations [#creating-migrations]
# Compiling Firmware (/dev/contributing/compile-firmware)
This article heavily under development; expect frequent changes.
## Requirements [#requirements]
* [Git](https://git-scm.com/downloads)
* [VSCode](https://visualstudio.microsoft.com/#vscode-section)
* [PlatformIO IDE](https://platformio.org/install/ide?install=vscode)
Clone [OpenShock/Firmware](https://github.com/OpenShock/Firmware) to a folder on your PC.
```
git clone https://github.com/OpenShock/Firmware.git
```
Open the folder you just downloaded with VSCode. Allow time for PlatformIO to initialize the IDE. Once it has completed, pick the project environment based on the board you would like to compile for under the new PlatformIO icon.
First, run the `PlatformIO > Project Tasks > General > Upload` task, then run `Platform > Upload Filesystem Image`. These tasks auto-build the latest changes and then upload the code to a connected micro-controller. This may require pressing the reset button on your micro-controller, refer to the documentation for your specific board for more information.
# Contributing (/dev/contributing)
Sorry, we haven't *quite* gotten around to writing this set of articles just yet. **In the
meantime, feel free to hit us up on [Discord](https://discord.gg/OpenShock).**
# User (/dev/signalr/user)
URL: `https://api.openshock.app/1/hubs/user`
## Endpoint [#endpoint]
## Connecting [#connecting]
Use a SignalR client and provide the required headers:
* `User-Agent`: A meaningful identifier for your application. Browsers do this automatically
* `Open-Shock-Token`: API token created in account settings.
```ts
import { HubConnectionBuilder, LogLevel } from "@microsoft/signalr";
const connection = new HubConnectionBuilder()
.withUrl("https://api.openshock.app/1/hubs/user", {
transport: HttpTransportType.WebSockets,
skipNegotiation: true,
})
.withAutomaticReconnect()
.configureLogging(LogLevel.Information)
.build();
await connection.start();
```
## Server methods [#server-methods]
The user hub exposes the following methods that can be invoked with `connection.invoke`:
| Method | Definition | Description |
| --------------- | -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `Control` | `Control(IReadOnlyList shocks)` | Send one or more control commands to shockers. Each command requires `id`, `type`, `intensity`, `duration` and optional `exclusive`. |
| `ControlV2` | `ControlV2(IReadOnlyList shocks, string? customName)` | Same as `Control` but allows an optional custom sender name to appear in logs. |
| `CaptivePortal` | `CaptivePortal(Guid deviceId, bool enabled)` | Enable or disable captive portal on a device. |
| `EmergencyStop` | `EmergencyStop(Guid deviceId)` | Immediately stop a device. |
| `OtaInstall` | `OtaInstall(Guid deviceId, SemVersion version)` | Trigger firmware update for a device to a specific version. |
| `Reboot` | `Reboot(Guid deviceId)` | Reboot a device. |
Example control message:
```json
[
{
"id": "00000000-0000-0000-0000-000000000000",
"type": 1,
"intensity": 50,
"duration": 1000,
"exclusive": false
}
]
```
## Client methods [#client-methods]
Listen for server calls with `connection.on("MethodName", handler)`.
### User hub methods [#user-hub-methods]
| Method | Definition | Description |
| --------------------- | --------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| `Welcome` | `Welcome(string connectionId)` | Fired after connecting and returns the SignalR connection ID. |
| `DeviceStatus` | `DeviceStatus(IList deviceOnlineStates)` | Provides online status and firmware version for devices accessible to the user. |
| `Log` | `Log(ControlLogSender sender, IEnumerable logs)` | Emits control log entries generated by device actions. |
| `DeviceUpdate` | `DeviceUpdate(Guid deviceId, DeviceUpdateType type)` | Notifies when a device is updated or removed. |
| `OtaInstallStarted` | `OtaInstallStarted(Guid deviceId, int updateId, SemVersion version)` | A firmware update began on the device. |
| `OtaInstallProgress` | `OtaInstallProgress(Guid deviceId, int updateId, OtaUpdateProgressTask task, float progress)` | Progress update for an ongoing firmware install. |
| `OtaInstallFailed` | `OtaInstallFailed(Guid deviceId, int updateId, bool fatal, string message)` | Firmware install failed. `fatal` indicates rollback. |
| `OtaRollback` | `OtaRollback(Guid deviceId, int updateId)` | Firmware install rolled back to previous version. |
| `OtaInstallSucceeded` | `OtaInstallSucceeded(Guid deviceId, int updateId)` | Firmware install finished successfully. |
### Public share hub methods [#public-share-hub-methods]
| Method | Definition | Description |
| --------- | ------------------------------------------- | ------------------------------------------------------------------- |
| `Welcome` | `Welcome(PublicShareHub.AuthType authType)` | Indicates whether the connected client is authenticated or a guest. |
| `Updated` | `Updated()` | Share link configuration changed. |
These methods deliver typed payloads matching the backend models. Refer to the [OpenShock API](https://github.com/OpenShock/API) for structure details.
## Share link hub [#share-link-hub]
To connect to a share link hub, use the share link identifier and optionally provide a `name` query parameter for guest connections:
```ts
const shareConn = new HubConnectionBuilder()
.withUrl(
"https://api.openshock.app/1/hubs/share/link/01234567-89ab-cdef-0123-456789abcdef?name=Guest",
)
.build();
await shareConn.start();
```
Guests can call `Control` to interact with the devices shared via the link. Authenticated users may also be notified through the user hub when share link activity occurs.
## Disconnecting [#disconnecting]
Call `connection.stop()` when your application shuts down to gracefully close the WebSocket.
```ts
await connection.stop();
```
This page describes the basics for working with OpenShock's SignalR hubs. For full type definitions consult the server source code or OpenShock community resources.
# Assembling (/guides/diy/assembling)
This guide mainly focuses on the parts listed in the [Hardware Buy guide](hardware-buying).
## Hub Hardware Requirements [#hub-hardware-requirements]
* ESP32 board
* 433 MHz transmitter (ASK/OOK)
* Soldering station (potentially optional)
* Hookup wire (optional, depending on whether the pins line up)
## What/Where to buy? [#whatwhere-to-buy]
See the [hardware buying guide here](hardware-buying). For the hub assembly you'll need an ESP32 and a 433 MHz transmitter.
## Figuring out the pins [#figuring-out-the-pins]
You will need to connect the 433MHz transmitter's signal input pin to one of the ESP32's IO pins, and you can optionally connect an Emergency Stop button/switch to another pin.
*Most* of the GPIO pins on any given ESP32 board should work for both RF TX and E-Stop, however some pins are reserved for special usage and will return an error if you attempt to use them during setup. If you run into that error, adjust your setup to use a different pin with a higher number.
Note down which GPIO pins you soldered to, as you will need to enter them during setup in a later step.
For example, if you bought a [Wemos Lolin S3](../../hardware/boards/wemos/lolin-s3) and a [Open Smart Transmitter](../../hardware/transmitter/china/open-smart), simply connect the 3.3V to VCC, ground to ground, and any numbered GPIO pin to data, for example the pin 12, to your transmitter.
You will need to set your RF TX pin during setup. If the pin is incorrect the transmitter wont be able to send any signals to the shockers.
If you already went through the setup process, you can change the pin via a serial terminal with the command `rftxpin #` where `#` is your pin number.
You can change E-Stop pin with `estop pin #` where `#` is your pin number.
Or, you can re-enable the Captive Portal on the website under the Hub's "..." menu and connect to it again with your phone.
Please note that all ESP32s operate at 3.3V logic levels. To avoid overvolting your ESP's IO pins, it is recommended to either: connect your transmitter's power input to a 3V supply pin on the ESP's board, or use a logic-level shifter if your transmitter ***really* requires** more than 3V power to operate.
How to wire up a E-stop can be found [Here](e-stop)
**Next step is [flashing the firmware!](../openshock/how-to-flash-your-board)**
# E-Stop (/guides/diy/e-stop)
This guide mainly focuses on adding an E-Stop to a DIY Hub.
## What you need [#what-you-need]
* A Button or mommentary switch
* a resistor (anything between 10k to 200k will work well)
* Soldering station
* Hookup wire (optional, depending on whether the pins line up)
## Figuring out the pins [#figuring-out-the-pins]
You will need to connect the button and resistor in a pullup or pulldown configuration to one of the ESP32's IO pins.
Either pullup or pulldown will work use which ever is easier for your board.
*Most* of the GPIO pins on any given ESP32 board should work for E-Stop, however some pins are reserved for special usage and will return an error if you attempt to use them during setup. If you run into that error, adjust your setup to use a different pin with a higher number.
Note down which GPIO pins you soldered to, as you will need to enter them during setup in a later step.
For example, if you bought a [Wemos Lolin S3](../../hardware/boards/wemos/lolin-s3) , simply connect the 3.3V to one of the switch legs, Connect the resistor and a short wire to the other switch Leg, Connect the wire to Pin 10, Lastly connect the resistor to the Ground pin.
Best effort list of web serial terminals available for your convenience:
* [https://serial.namelessnanashi.dev/](https://serial.namelessnanashi.dev/)
* [https://serial.huhn.me/](https://serial.huhn.me/)
* [https://www.serialterminal.com/](https://www.serialterminal.com/)
* [https://webserialterminal.com/](https://webserialterminal.com/)
Using A serial Console `estop enabled true` to enable the E-Stop function, Not doing so will mean the E-Stop will not work when pressed!
You can change E-Stop pin with `estop pin #` where `#` is your pin number.
**That's it.**\
You can press the E-Stop to Stop all Shock, Viberations, and Beeps. π
# DIY Hardware (/guides/diy/hardware-buying)
Not interested in building your own OpenShock hub? Head over to the [Hardware
vendors](../../vendors/hardware/index).
These are the **recommendations** of the OpenShock maintainers. This list is **not** exhaustive. For
a much more *wiki-style* information base, head to the [Hardware](../../hardware/boards/index)
section.
## Board [#board]
### Existing hardware [#existing-hardware]
If you already own a PiShock or another ESP32, please check the [Boards compatibility
list](../../hardware/boards/index).
### ESP32-S3 [#esp32-s3]
We recommend the `ESP32-S3` chip, specifically the `N16R8` variant for its 16 MiB of flash. The [Wemos Lolin S3](../../hardware/boards/wemos/lolin-s3) board satisfies all these criteria.
Requirements for the ESP are:
* Needs to be a **ESP32** specifically, including -S and -C variants! ESP8266 is **NOT** supported!
* Minimum flash size: 4MB
## 433 MHz Transmitter [#433-mhz-transmitter]
See the [Transmitter](../../hardware/transmitter/index) page for a quick one-stop shop.
## Shockers [#shockers]
See the [Shockers](../../hardware/shockers/index) page for (yet another) one-stop shop.
## Assembly [#assembly]
Next, head over to [Assembly](assembling).
# Do-It-Yourself (/guides/diy)
### As a User [#as-a-user]
What to buy to build your own hub
Put together your hub step by step
Add an emergency stop button for safety
### As a Host [#as-a-host]
Set up your own OpenShock server instance
# Using the E-Stop 101 (/guides/openshock/e-stop-guide)
Emergency-Stop is a physical button or switch that can be triggered to stop all current and
pending shocks, vibrations, and beeps.
## What you need [#what-you-need]
* [OpenShock account](https://openshock.app/)
* [A connected shocker](first-setup)
* [A Hub with an E-Stop Button](../diy/e-stop)
## How to Use the E-stop [#how-to-use-the-e-stop]
1. **How to activate the E-Stop**
Press the E-stop button for half a second.
All shocks, vibrations and beeps will be halted, and the hub will reject all commands until the E-stop is reset.
**That's it.**
2. **How to reset the E-Stop**
Press and hold the E-Stop button for 10 seconds. This will release the E-Stop and allow new commands to be sent to the shockers.
The E-Stop is a safety system to protect you and those around you. If you're having an emergency
or can not handle the shocks, pressing it is a safe way to give yourself some time to recover.
# First time setup (/guides/openshock/first-setup)
**Don't wear the shocker somewhere near your neck or your heart.** Check out
[Safety](../../home/safety-rules) for more information.
**Do not touch the pins of the shocker with both hands at the same time.** The electricity could
flow through your heart.
## What you need [#what-you-need]
* USB cable suitable for your OpenShock hub.
* A stable power source. Try to avoid cheap power bricks β they can cause the device to crash under certain loads.
* A smartphone with a web browser (Chrome, Firefox, etc.)
* Your router's Wi-Fi password.
* [OpenShock hub](../../hardware/boards/index)
* [Shocker](../../hardware/shockers/index)
* [OpenShock account](https://openshock.app/)
## Setup the OpenShock hub [#setup-the-openshock-hub]
### Step 1: Wirelessly connect your phone to the hub [#step-1-wirelessly-connect-your-phone-to-the-hub]
1. Plug your hub in and ensure it has power.
2. On your phone, search for a Wi-Fi network named similar to `OpenShock-XX:XX:XX:XX:XX:XX` and connect to it.
### Step 2: Connect to the hub via the network [#step-2-connect-to-the-hub-via-the-network]
1. A web page should automatically pop up on your phone. If it does, skip to step 3 below.
2. If the page does **not** appear automatically:
* Open your browser and go to `http://4.3.2.1`
* If that doesn't work, try `http://10.10.10.10` instead
3. In the web interface, find your router's Wi-Fi network.
4. Press the green button next to it, enter your Wi-Fi password, and press **Submit**. *A green pop up should appear if it connected successfully.*
### Step 3: Set the RF TX Pin (if needed) [#step-3-set-the-rf-tx-pin-if-needed]
**DO NOT** change the RF TX Pin **UNLESS IT IS NOT AUTOMATICALLY DETECTED** *or* you are using a
DIY hub. This is an advanced feature. It should be set correctly by default after flashing the
OpenShock firmware if you are using a known board. If the pin is not automatically selected, you
can open a Serial terminal and send the command `rftxpin #` where `#` is your pin number. If you
do not know how to do this, you can also re-enable the captive portal (hotspot of the Hub) to
re-configure it. For more information see the page dedicated to your micro-controller under
[boards](../../hardware/boards/index).
### Step 4: Create a hub on the website [#step-4-create-a-hub-on-the-website]
1. **On your PC** open [openshock.app](https://openshock.app/).
2. Create an account *(if you don't have one already)*.
3. Navigate to **Hubs**.
4. Click the **green plus icon** at the lower right corner to create a new hub.
5. Give it a name:
* Open the context menu of the hub *(the three dots next to the newly created hub)*.
* Select **edit**.
* Type in a name *(your name, for example)* into the name field.
* Press **save**.
### Step 5: Pair the hub [#step-5-pair-the-hub]
1. Open the context menu of your hub again.
2. Select **pair** and press **get pair code** β this will generate a new pair code.
3. On your phone, type the code into the account linking field of the hub's web interface, then press **pair**. After you link the hub to your account, it should shut down its own Wi-Fi network.
### Step 6: The hub is now connected! [#step-6-the-hub-is-now-connected]
If everything went well, it should show a **green icon** next to the device name on the website.
## Pairing shockers [#pairing-shockers]
### Step 1: Prerequisites [#step-1-prerequisites]
1. Ensure the shocker is sufficiently charged.
2. Ensure your hub is connected to the website. ([Setup the OpenShock hub](#setup-the-openshock-hub))
### Step 2: Create a Shocker [#step-2-create-a-shocker]
1. Go to [openshock.app](https://openshock.app/).
2. Log in if you are not already.
3. Navigate to **Shockers**.
4. Press the **green plus icon** at the bottom right corner.
5. Select the hub you created earlier.
6. Give your new shocker a name.
7. Select the **model** of shocker.
8. Click **Create**.
### Step 3: Pair your Shocker [#step-3-pair-your-shocker]
1. Grab your shocker and turn it on (press the power button once β it should beep once).
2. Hold the power button again until it beeps and the LED flashes fast. *This means pair mode is active.*
3. On the website, click the ***speaker icon*** of your shocker. If your shocker beeps in response, the pairing was successful.
4. You must click the icon before the shocker's pairing mode times out (while the shocker's LED is flashing quickly).
**Everything should work now, have fun!** π
If you need additional help, join our [Discord](https://discord.gg/OpenShock).
Your shocker will remember the hub β there is no need to pair it every time.
# How to flash the firmware (/guides/openshock/how-to-flash-your-board)
## What you need [#what-you-need]
* [OpenShock hub](../../hardware/boards/index)
* A Chromium based web-browser (Chrome, Edge, Opera, etc.) **Firefox will not work since it doesn't support Web Serial**
* [Our Flashtool](https://next.openshock.app/flashtool)
Ensure you have a cable that supports data transfer, and neither the port nor cable is damaged.
If you received your hub from an OpenShock hardware vendor, you can likely **skip this step**! Any
updates can be [performed wirelessly](../openshock/how-to-update) after the initial setup.
## Flashing the firmware [#flashing-the-firmware]
### Connect your hub [#connect-your-hub]
Plug your hub into your PC using a USB cable.
### Open the Flashtool [#open-the-flashtool]
Open the [Flashtool](https://next.openshock.app/flashtool) and click "Select Device", then select your hub in the popup window. If your hub is not showing up, click "Install Drivers" first, then retry.
### Configure settings [#configure-settings]
Ensure you have the "Stable" channel selected and the correct [board](../../hardware/boards/index) is selected.
### Flash [#flash]
Press Flash and let it do its thing. Keep the window open β it will tell you when it's done.
### First Setup [#first-setup]
When everything went well, your board will restart and you should be able to run through the [First Setup](../openshock/first-setup) steps to configure your hub and link it to your shocker.
(Optional) If you have issues after flashing, try again with "Erase everything before flashing" enabled.
## Troubleshooting [#troubleshooting]
### (Re-)Install Driver [#re-install-driver]
1. Download drivers from here [CP210x Universal Windows Driver](https://download.openshock.org/drivers/CP210x_Universal_Windows_Driver.zip)
2. Extract the zip file
3. Run the `CP210xVCPInstaller_x64.exe` installer file
### Different Cable [#different-cable]
Try a couple of different USB cables, USB ports on your computer and if available on a different machine entirely.
### Manually start bootloader [#manually-start-bootloader]
Depending on the driver or board, your computer may fail putting the ESP32 into a flashable state.
Most boards will have a pair of buttons. The first button labelled "Boot", "IO0", or even just "B". The second labelled "Reset", "RST", or "EN".
First, attempt flashing **while holding down "Boot"**.
If that doesn't work, try holding down "Boot" and then tapping "Reset". That will reboot the ESP32, and also enter the bootloader, making it ready to receive new firmware!
Sometimes, you may need to both enter the bootloader manually *and* hold down "Boot" while starting the flashing process.
If you don't have a button, you can still usually short GPIO `0` to Ground while booting to enter the bootloader (for *most* ESP32s).
### Extra tip for ESP32-S and -C boards! [#extra-tip-for-esp32-s-and--c-boards]
On some boards without firmware, you won't see a Serial port until you enter the Bootloader manually using the two-button steps above!
Example pins for the Wemos D1 Mini
### Manually flash using `esptool.py` [#manually-flash-using-esptoolpy]
1. [Download esptool](https://github.com/espressif/esptool/releases/latest) (for windows the file is called something like `esptool-vx.x.x-win64.zip`)
2. [Download firmware .bin](https://github.com/OpenShock/Firmware/releases/latest) for your board
3. Extract the esptool zip file
4. Move the downloaded firmware `.bin` file into the folder with `esptool.exe`
5. Open a command line (`cmd` or `powershell`) in that folder
6. Execute the command `esptool write_flash 0x0 OpenShock_xxx-name-xxx.bin`. Replace firmware name with your actual file name.
7. Wait for it to complete flashing and you should be ready to go!
### Manually flash using `espflash` (alternative to `esptool.py`) [#manually-flash-using-espflash-alternative-to-esptoolpy]
1. Download via [GitHub here](https://github.com/esp-rs/espflash/releases) (or if you have Rust's [cargo](https://doc.rust-lang.org/cargo/) installed, you can run `cargo install espflash`).
2. [Download firmware .bin](https://github.com/OpenShock/Firmware/releases/latest) for your board
3. Extract espflash
4. Move the downloaded firmware `.bin` file into the folder with `espflash.exe`
5. Open a command line (`cmd` or `powershell`) in that folder
6. Execute the command `espflash write-bin 0x0 OpenShock_xxx-name-xxx.bin`. Replace firmware name with your actual file name.
7. Wait for it to complete flashing and you should be ready to go!
Try again, if you still got problems after following this guide join our
[discord](https://discord.gg/OpenShock) and we will see how we can help you!
# How to Update the Hub (/guides/openshock/how-to-update)
## What you need [#what-you-need]
* [Fully setup Openshock hub](../openshock/first-setup)
* [OpenShock account](https://openshock.app/)
* [**OpenShock Firmware 1.1.0 or newer**](https://github.com/OpenShock/Firmware)
## Over the Air Update (Recommended) [#over-the-air-update-recommended]
1. Login to the [website](https://openshock.app/)
2. Connect your hub to a power source and make sure it appears as online in the Device section.
3. Open the context menu of your hub.
4. Select "OTA Update".\
5. Now you can see 3 different branches of firmware, these are "Develop", "Stable" and "Beta". **We recommend that you only use the Stable branch if you don't know what you're doing.**
6. If your firmware version is older than the one displayed on the "Stable" button, you should update.\
7. Click the "Stable" button.
8. Confirm the update.
9. Your hub should now update automatically, don't close the website during this.\
After it has completed the hub should restart and everything should just workβ’.
If the update is not successful the updater will not overwrite anything and your hub should just
stay on the old version. Ask on the [Discord](https://discord.gg/OpenShock) for help.
## Using a Flash tool [#using-a-flash-tool]
This basically means re-flashing your firmware with a newer version, like it is explained in the [How to flash the firmware](how-to-flash-your-board) guide.
**Doing it this way will also reset all your configuration.**
# OpenShock Platform Guides (/guides/openshock)
Step-by-step guides for setting up and using the OpenShock platform.
Flash the OpenShock firmware to your board
Initial hub configuration and shocker pairing
Keep your hub up to date over-the-air
Share control of a shocker via a link β no account required for the recipient
Share control of a shocker with another OpenShock user via a share code
# Offline Remote Setup (/guides/openshock/offline-remote-setup)
## What you need [#what-you-need]
* [Fully setup OpenShock Hub](first-setup)
* [OpenShock Account](https://openshock.app/)
* A compatible offline remote with its ID
Only the first channel on the remote will work. This is because the channel is not yet
configurable on OpenShock's side.
If you bought an offline remote from a vendor, it might already have been decoded and the
**Offline Remote ID** might be present as a sticker on the remote. You can also decode this ID
yourself using a 433 MHz receiver module with an ESP32 β check out the [rf-playground
repo](https://github.com/OpenShock/rf-playground).
## Setup the Offline Remote [#setup-the-offline-remote]
1. Log in to the [website](https://openshock.app/).
2. Connect your hub to a power source and make sure it appears as online in the Hubs section.
3. Go to the **Shockers** section.
4. Edit the Shocker to use with the Offline Remote:
* Open the context menu of the Shocker.
* Select **Edit**.
* Set the Shocker **RfId** field to the **Offline Remote ID**.
* Save.
5. Re-pair the Shocker.
**Everything should work now, have fun!** π
# Share codes (/guides/openshock/sharecodes)
Share codes make it possible for someone with an openshock.app account to directly control your
shocker with their account.
You need to generate a new code every time you want to share the controls of your shocker with a
new person. Shares are permanent until unshared/deleted by the owner of the shocker.
## What you need [#what-you-need]
* [OpenShock account](https://openshock.app/)
* [A connected shocker](first-setup)
## Create a share code [#create-a-share-code]
1. Go to [openshock.app](https://openshock.app/) and log in.
2. Switch to the **Shockers** section.
3. Open the context menu of the shocker you want a share code for *(the three dots next to the name)*.
4. Select **Shares**.
5. Click on the **green plus icon** to generate a new share code.
6. Send this code to a person you trust.
## Use a share code [#use-a-share-code]
1. Go to [openshock.app](https://openshock.app/) and log in.
2. Switch to the [Shockers shared section](https://openshock.app/#/dashboard/shockers/shared).
3. Click on the **green plus icon**.
4. Type in the share code you received from someone.
**Now the shocker is linked to your account and you can control it.** π
You can find all shockers you added with a share code on the same page in your account under
**Shockers** β [**Shared**](https://openshock.app/#/dashboard/shockers/shared).
## Edit share code limits [#edit-share-code-limits]
You can also set limits on every share code.
For this step to work, someone has to [use your share code](#use-a-share-code) first.
1. Go to [openshock.app](https://openshock.app/) and log in.
2. Switch to the **Shockers** section.
3. Open the context menu of the shocker you want to edit the code for.
4. Select **Shares**. After someone added your share code, you should be able to see their account in the list.
5. Open the context menu next to the person's account name.
6. Select **Edit**.
7. Set the max ***intensity*** and ***duration***, and also select what kind of ***commands*** the person can send.
8. Press **Save** β you are done. π
## Pause/Unpause a share code [#pauseunpause-a-share-code]
For this step to work, someone has to [use your share code](#use-a-share-code) first.
1. Go to [openshock.app](https://openshock.app/) and log in.
2. Switch to the **Shockers** section.
3. Open the context menu of the shocker you want to pause the code for.
4. Select **Shares**. In this list there are *pause icons* next to the account names.
5. Press the *pause icon* next to the person you want to pause the shocker for. *(Press the **play icon** next to the person's name to unpause the code again.)*
6. You are done. π
## Unshare/Delete a share code [#unsharedelete-a-share-code]
For this step to work, someone has to [use your share code](#use-a-share-code) first.
1. Go to [openshock.app](https://openshock.app/) and log in.
2. Switch to the **Shockers** section.
3. Open the context menu of the shocker you want to unshare.
4. Select **Shares**.
5. Open the context menu next to the person you want to unshare.
6. Select **Unshare**.
7. You are done. π
You can also pause a specific share to temporarily stop the person from using this shocker. Inside
the share list, click the pause button in front of their account name β do the same again to
un-pause it.
# Share links (/guides/openshock/sharelinks)
Share links are a great way to give people control of your shockers without the need of an
OpenShock account.
## What you need [#what-you-need]
* [OpenShock account](https://openshock.app/)
* [A connected shocker](first-setup)
## How to create a Share link [#how-to-create-a-share-link]
1. Open [OpenShock.app](https://openshock.app/).
2. Go to the **Share Links** section.
3. Click **Add new share link!**
4. Give it a **name** (and optionally set an expiry date).
5. Press **Create**. Your new share link should pop up as a new entry on the page.
### Add a Shocker to the Link [#add-a-shocker-to-the-link]
1. Click on the newly created link.
2. Open the **context menu** *(the three dots on the right side of the link)*.
3. Click on **Add shocker**.
4. Select your Shocker.
5. Press **Add** *(repeat to add more shockers)*. You should be able to see the shocker controls now.
**That's it.** Everyone you send the share link to can now control your shocker. π
Create multiple share links for different people to have better control over who can shock you!
## Customize your Share link [#customize-your-share-link]
You can set limits to **intensity**, **duration** or what kind of **command** someone can use for
each share link. You can also **Pause** the link so nobody can send commands with this link.
### Edit the limits [#edit-the-limits]
1. Go to your [share link page](https://openshock.app/#/dashboard/shares/links) and select the share link you want to edit.
2. Open the share link's **context menu**.
3. Select **Edit Mode**. The shocker controls should change to orange, indicating **Edit Mode**.
4. Set the maximum ***intensity***, ***duration*** and choose what kind of ***command*** can be sent.
5. To exit Edit Mode, open the context menu and select **Edit Mode** again. This will return the controls to their normal color.
**That's it.** π
### Pause your Share link [#pause-your-share-link]
A paused link will not accept any commands.
1. Go to your [share link page](https://openshock.app/#/dashboard/shares/links) and select the share link you want to ***pause***.
2. Click on the little pause icon next to the share link's name. It should now ***blur*** the shocker controls, telling you it's paused.
3. To un-pause the share link again, simply click on the `Play Icon`.
# What you need (/guides/quickstart/what-you-need)
If you've found yourself here, chances are you're either looking to get shocked, or shock a friend or partner! We've written this quick start guide to help you get shocking as fast as possible.
## Requirements [#requirements]
To get started with OpenShock, you need three things:
### An OpenShock server [#an-openshock-server]
This can be either a public or private OpenShock server. We recommend the [openshock.app](https://openshock.app) public OpenShock instance.
Interested in hosting your own server? Check out the [Self-hosting](../selfhosting/index) guide.
### An OpenShock hub [#an-openshock-hub]
A hub connects OpenShock to the shock device via a micro-controller and a 433 MHz transmitter.
Browse hardware vendors for ready-made hubs
DIY buying guide for building your own hub
### Shockers [#shockers]
See [Shockers](../../hardware/shockers/index). We recommend the [CaiXianlin](../../hardware/shockers/caixianlin) shockers.
# Self Hosting (/guides/selfhosting)
## Requirements [#requirements]
Hardware:
1. A server / computer to run linux containers on. Docker Desktop with WSL also works, but isn't really recommended.
Software:
1. `docker` and `docker compose` installed on the server. You can use the [Docker install script](https://github.com/docker/docker-install) for linux, or [Docker Desktop](https://www.docker.com/products/docker-desktop/) on Windows.\
Alternatively podman or podman desktop with compose addon.
Other:
1. A domain or subdomain is recommended.
2. HTTPS - required for cookies to work securely. You can use cloudflare for lets encrypt for example.
## Preparing the server [#preparing-the-server]
Install software from the [Requirements](#requirements) on the server.
### Docker compose setup [#docker-compose-setup]
Make a new folder in a known location.
Add two files with the names `docker-compose.yml` and `.env`. Paste their contents from below.
```yaml
# This file is a minimal plug and play working example of a runnable OpenShock stack.
#
# Configuration lives in the .env file next to this compose file. You edit simple
# KEY=value knobs there (host, port, per-service paths, DB password, mail...). This
# file maps those onto the OPENSHOCK__* / PUBLIC_* config the containers read.
#
# Topology: the whole stack runs on ONE host (OPENSHOCK_HOST) and ONE port
# (OPENSHOCK_PORT, default 443), and the services are told apart by path:
# https://host/ -> frontend
# https://host/api/... -> api (OPENSHOCK_API_PATH)
# https://host/gateway/.. -> gateway (OPENSHOCK_GATEWAY_PATH)
# Because everything is one origin, the login cookie is shared with no extra setup.
# Each app owns its path prefix (UsePathBase); Traefik routes by PathPrefix and does
# NOT strip. Shared OPENSHOCK__* config lives in x-openshock-env, merged into each
# service; the `:-default` fallbacks keep the stack booting with almost no config.
# ---------------------------------------------------------------------------
# Shared application config. Every OpenShock service (api, cron, lcg) reads the
# same OPENSHOCK__* schema, so it is defined once here and merged into each
# service with `<<: *openshock-env`. Values come from the knobs in .env; the
# `:-default` fallbacks keep the stack booting with almost no configuration.
# The `${OPENSHOCK_PORT:+:...}` bits append ":port" only when a custom port is set,
# so default (443) deployments keep clean https://host URLs.
# ---------------------------------------------------------------------------
# Core infrastructure
x-openshock-env: &openshock-env
OPENSHOCK__DB__CONN: Host=db;Port=5432;Database=${PG_DB:-openshock};Username=${PG_USER:-openshock};Password=${PG_PASS}
OPENSHOCK__REDIS__HOST: dragonfly
# Frontend URLs β API uses them for cookies/redirects, Cron for e-mail links.
# BASEURL/SHORTURL point at the web UI (host + optional port + frontend path).
# COOKIEDOMAIN is the bare host; since the whole stack is one origin the login
# cookie is shared with every service automatically.
OPENSHOCK__FRONTEND__BASEURL: https://${OPENSHOCK_HOST:-openshock.local}${OPENSHOCK_PORT:+:${OPENSHOCK_PORT}}${OPENSHOCK_FRONTEND_PATH:-}
OPENSHOCK__FRONTEND__SHORTURL: https://${OPENSHOCK_HOST:-openshock.local}${OPENSHOCK_PORT:+:${OPENSHOCK_PORT}}${OPENSHOCK_FRONTEND_PATH:-}
OPENSHOCK__FRONTEND__COOKIEDOMAIN: ${OPENSHOCK_HOST:-openshock.local}
# Feature flags
OPENSHOCK__TURNSTILE__ENABLE: ${OPENSHOCK_TURNSTILE_ENABLE:-false}
OPENSHOCK__ACCOUNT__REGISTRATIONENABLED: ${OPENSHOCK_REGISTRATION_ENABLED:-true}
# E-mail (delivered by the Cron service). TYPE is required by the app; leave it
# as None to run without outbound mail, or set MAIL_TYPE=Smtp / Mailjet in .env
# and fill in the matching block below.
OPENSHOCK__MAIL__TYPE: ${MAIL_TYPE:-None}
OPENSHOCK__MAIL__SENDER__NAME: ${MAIL_SENDER_NAME:-OpenShock}
OPENSHOCK__MAIL__SENDER__EMAIL: ${MAIL_SENDER_EMAIL:-no-reply@openshock.local}
# SMTP (used when MAIL_TYPE=Smtp)
OPENSHOCK__MAIL__SMTP__HOST: ${SMTP_HOST:-}
OPENSHOCK__MAIL__SMTP__PORT: ${SMTP_PORT:-587}
OPENSHOCK__MAIL__SMTP__USERNAME: ${SMTP_USERNAME:-}
OPENSHOCK__MAIL__SMTP__PASSWORD: ${SMTP_PASSWORD:-}
OPENSHOCK__MAIL__SMTP__ENABLESSL: ${SMTP_ENABLESSL:-true}
OPENSHOCK__MAIL__SMTP__VERIFYCERTIFICATE: ${SMTP_VERIFYCERTIFICATE:-true}
# Mailjet (used when MAIL_TYPE=Mailjet)
OPENSHOCK__MAIL__MAILJET__KEY: ${MAILJET_KEY:-}
OPENSHOCK__MAIL__MAILJET__SECRET: ${MAILJET_SECRET:-}
# Common scaffolding shared by the OpenShock app services.
x-openshock-svc: &openshock-svc
restart: unless-stopped
networks:
- openshock
depends_on:
- db
- dragonfly
services:
db: # We need a postgres database, preferably version 18+
image: postgres:18
restart: unless-stopped
container_name: openshock-postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
start_period: 20s
interval: 30s
retries: 5
timeout: 5s
networks:
- openshock
environment:
POSTGRES_PASSWORD: ${PG_PASS:?database password required}
POSTGRES_USER: ${PG_USER:-openshock}
POSTGRES_DB: ${PG_DB:-openshock}
volumes:
# PG18+ mounts the parent dir (data lives in ./postgres-data/18/docker).
- ./postgres-data:/var/lib/postgresql
dragonfly: # Redis-compatible store. Ex = emit expired-key events (used by the app)
image: ghcr.io/dragonflydb/dragonfly:latest
command: "--notify_keyspace_events=Ex"
restart: unless-stopped
networks:
- openshock
volumes:
- ./dragonfly-data:/data
api:
<<: *openshock-svc
image: ghcr.io/openshock/api:${OPENSHOCK_TAG:-latest}
environment:
<<: *openshock-env
# Path prefix the API is served under. Must match the PathPrefix router below.
OPENSHOCK__API__PATHBASE: ${OPENSHOCK_API_PATH:-/api}
labels:
- "traefik.enable=true"
- "traefik.http.routers.openshock-api.rule=Host(`${OPENSHOCK_HOST:-openshock.local}`) && PathPrefix(`${OPENSHOCK_API_PATH:-/api}`)"
- "traefik.http.routers.openshock-api.entrypoints=https"
- "traefik.http.routers.openshock-api.tls=true"
- "traefik.http.routers.openshock-api.service=openshock-api"
- "traefik.http.services.openshock-api.loadbalancer.server.port=80"
frontend:
image: ghcr.io/openshock/frontend:${OPENSHOCK_FRONTEND_TAG:-latest}
restart: unless-stopped
networks:
- openshock
environment:
PUBLIC_SITE_NAME: OpenShock
PUBLIC_SITE_URL: https://${OPENSHOCK_HOST:-openshock.local}${OPENSHOCK_PORT:+:${OPENSHOCK_PORT}}${OPENSHOCK_FRONTEND_PATH:-}
PUBLIC_SITE_SHORT_URL: https://${OPENSHOCK_HOST:-openshock.local}${OPENSHOCK_PORT:+:${OPENSHOCK_PORT}}${OPENSHOCK_FRONTEND_PATH:-}
PUBLIC_BACKEND_API_URL: https://${OPENSHOCK_HOST:-openshock.local}${OPENSHOCK_PORT:+:${OPENSHOCK_PORT}}${OPENSHOCK_API_PATH:-/api}
# CSP connect-src allow-list for the gateway; the browser opens wss://host[:port].
PUBLIC_GATEWAY_CSP_WILDCARD: https://${OPENSHOCK_HOST:-openshock.local}${OPENSHOCK_PORT:+:${OPENSHOCK_PORT}}
PRIVATE_BACKEND_TLS_INSECURE: ${OPENSHOCK_FRONTEND_TLS_INSECURE:-false}
labels:
- "traefik.enable=true"
# Catch-all for the host; the api/gateway/cron PathPrefix routers are more specific and win.
- "traefik.http.routers.openshock-frontend.rule=Host(`${OPENSHOCK_HOST:-openshock.local}`)"
- "traefik.http.routers.openshock-frontend.entrypoints=https"
- "traefik.http.routers.openshock-frontend.tls=true"
- "traefik.http.routers.openshock-frontend.service=openshock-frontend"
- "traefik.http.services.openshock-frontend.loadbalancer.server.port=3000"
lcg:
<<: *openshock-svc
image: ghcr.io/openshock/live-control-gateway:${OPENSHOCK_TAG:-latest}
environment:
<<: *openshock-env
OPENSHOCK__LCG__COUNTRYCODE: ${OPENSHOCK_LCG_COUNTRYCODE:-DE}
# Public address the gateway advertises to firmware & browsers. PUBLICPATH must
# match the PathPrefix router below (the app serves under it via UsePathBase).
OPENSHOCK__LCG__FQDN: ${OPENSHOCK_HOST:-openshock.local}
OPENSHOCK__LCG__PUBLICPORT: ${OPENSHOCK_PORT:-443}
OPENSHOCK__LCG__PUBLICPATH: ${OPENSHOCK_GATEWAY_PATH:-/gateway}
labels:
- "traefik.enable=true"
- "traefik.http.routers.openshock-gateway.rule=Host(`${OPENSHOCK_HOST:-openshock.local}`) && PathPrefix(`${OPENSHOCK_GATEWAY_PATH:-/gateway}`)"
- "traefik.http.routers.openshock-gateway.entrypoints=https"
- "traefik.http.routers.openshock-gateway.tls=true"
- "traefik.http.routers.openshock-gateway.service=openshock-gateway"
- "traefik.http.services.openshock-gateway.loadbalancer.server.port=80"
cron:
<<: *openshock-svc
image: ghcr.io/openshock/cron:${OPENSHOCK_TAG:-latest}
environment:
<<: *openshock-env
labels:
- "traefik.enable=true"
- "traefik.http.routers.openshock-cron.rule=Host(`${OPENSHOCK_HOST:-openshock.local}`) && PathPrefix(`/hangfire`)"
- "traefik.http.routers.openshock-cron.entrypoints=https"
- "traefik.http.routers.openshock-cron.tls=true"
- "traefik.http.routers.openshock-cron.service=openshock-cron"
- "traefik.http.services.openshock-cron.loadbalancer.server.port=80"
traefik:
image: traefik:latest
container_name: traefik
command:
#- "--log.level=DEBUG"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entryPoints.https.address=:443"
#- "--api.insecure=true"
restart: unless-stopped
networks:
- openshock
ports:
- 80:80
# Publish the stack port (default 443) onto Traefik's https entrypoint.
- ${OPENSHOCK_PORT:-443}:443
#- 8080:8080 # Traefik Web UI (enabled by --api.insecure=true)
volumes:
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
openshock:
```
```yaml
# OpenShock configuration. These are simple knobs; docker-compose.yml maps them
# onto the OPENSHOCK__* variables the containers read and shares them across every
# service. Anything left unset falls back to the defaults defined in the compose file.
# --- Required ---
# Database password (no default, must be set).
PG_PASS=someSecurePassword
# --- Images ---
# Tag for the backend images (api, gateway, cron) β they share the backend repo's
# versioning. The frontend is a separate repo with its own versions, so it has its
# own tag. Pin to a release for reproducible deploys; both default to `latest`.
#OPENSHOCK_TAG=latest
#OPENSHOCK_FRONTEND_TAG=latest
# --- Host / port / paths ---
# The whole stack runs on one host and one port; services are told apart by path.
# The host clients use to reach the stack.
OPENSHOCK_HOST=openshock.local
# External port for the stack. Leave blank for 443 (standard https). Set e.g. 8080
# to serve on https://host:8080. Traefik publishes this onto its https entrypoint.
#OPENSHOCK_PORT=8080
# Path prefix per service. Frontend sits at the root; api and gateway on sub-paths.
# Leave OPENSHOCK_FRONTEND_PATH blank to keep the web UI at the root (recommended).
#OPENSHOCK_FRONTEND_PATH=
OPENSHOCK_API_PATH=/api
OPENSHOCK_GATEWAY_PATH=/gateway
# --- Database (optional, defaults shown) ---
#PG_USER=openshock
#PG_DB=openshock
# --- Feature flags (optional, defaults shown) ---
#OPENSHOCK_TURNSTILE_ENABLE=false
#OPENSHOCK_REGISTRATION_ENABLED=true
# --- TLS (optional, defaults shown) ---
# Set this to true to disable TLS certificate verification for the frontend. This is useful
# for testing with self-signed certs, but should not be used in production.
#OPENSHOCK_FRONTEND_TLS_INSECURE=false
# --- E-mail ---
# MAIL_TYPE is required by the app. Leave it as None to run without outbound mail,
# or set it to Smtp / Mailjet and fill in the matching block below.
MAIL_TYPE=None
MAIL_SENDER_NAME=OpenShock System
MAIL_SENDER_EMAIL=system@openshock.app
# SMTP (used when MAIL_TYPE=Smtp)
#SMTP_HOST=mail.domain.zap
#SMTP_PORT=587
#SMTP_USERNAME=open@shock.zap
#SMTP_PASSWORD=SMTPPASSWORD
#SMTP_ENABLESSL=true
#SMTP_VERIFYCERTIFICATE=true
# Mailjet (used when MAIL_TYPE=Mailjet)
#MAILJET_KEY=mailjetkey
#MAILJET_SECRET=mailjetsecret
```
These two can also be found in the [API repository](https://github.com/OpenShock/API)
### Reverse proxy [#reverse-proxy]
By default the reverse proxy that comes with this example is traefik. Everything should be setup and should be available under https on port 443 on your domain if done correctly.
## Done [#done]
Congratulations, the backend and website should be working now. π₯³
You can now set the backend domain for the firmware to your api url via the `domain` serial command.
## Migrating from the old docker compose setup [#migrating-from-the-old-docker-compose-setup]
If you are running the previous subdomain-based stack (`api.example.com` /
`gateway.example.com` plus the `webui` container), read this before you pull.
Back up your `postgres-data` folder before starting. The Postgres upgrade and the volume path
change below both touch persistent data.
### What changed [#what-changed]
| Old | New |
| ------------------------------------------------------ | ---------------------------------------------------------------------- |
| Subdomains: `api.`, `gateway.`, UI on the root | One host, one port, split by path: `/api`, `/gateway`, UI on `/` |
| `webui` container (`ghcr.io/openshock/webui`, port 80) | `frontend` container (`ghcr.io/openshock/frontend`, port 3000) |
| `redis/redis-stack-server`, keyspace events `KEA` | DragonflyDB, keyspace events `Ex` |
| `postgres:17`, volume at `/var/lib/postgresql/data` | `postgres:18`, volume at `/var/lib/postgresql` |
| `.env` holds raw `OPENSHOCK__*` variables | `.env` holds short knobs, the compose file maps them to `OPENSHOCK__*` |
| Images pinned to `latest` | `OPENSHOCK_TAG` / `OPENSHOCK_FRONTEND_TAG` |
| Traefik `redirectregex` rules for `/s/`, `/c/`, `/t/` | Handled by the frontend itself (`/c/` is now `/usc/`) |
### 1. Postgres 17 β 18 [#1-postgres-17--18]
Postgres 18 will not start on a 17 data directory, and the mount point moved (PG18 keeps
its data in `postgres-data/18/docker`). Dump on the **old** stack first:
```bash
docker compose exec db pg_dump -U openshock -d openshock -Fc > openshock.dump
docker compose down
mv postgres-data postgres-data-17-backup
```
Then start the new stack's database and restore into it:
```bash
docker compose up -d db
docker compose exec -T db pg_restore -U openshock -d openshock < openshock.dump
```
### 2. Redis β Dragonfly [#2-redis--dragonfly]
Nothing to migrate β only cache and ephemeral state lived there. Delete `./redis-data`
once the new stack is running. If you keep your own Redis instead of Dragonfly, set its
keyspace events to at least `Ex`.
### 3. Check your database name [#3-check-your-database-name]
The old compose file built the connection string with `Database=${PG_USER}` while it
created `POSTGRES_DB=${PG_DB}`, so the database in use was actually named after the
**user**. This is fixed now. If you had set `PG_USER` and `PG_DB` to different values,
your data lives in the database named after `PG_USER` β set `PG_DB` to that name, or
restore your dump into `PG_DB`.
### 4. Rewrite your `.env` [#4-rewrite-your-env]
Copy the new `.env` from above and port your values across:
| Old (`.env`) | New (`.env`) |
| --------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
| `OPENSHOCK_DOMAIN` | `OPENSHOCK_HOST` |
| `OPENSHOCK_API_SUBDOMAIN` | `OPENSHOCK_API_PATH` (default `/api`) |
| `OPENSHOCK_GATEWAY_SUBDOMAIN` | `OPENSHOCK_GATEWAY_PATH` (default `/gateway`) |
| `OPENSHOCK__MAIL__TYPE=SMTP` | `MAIL_TYPE=Smtp` β or `Mailjet`, or `None` for no outbound mail |
| `OPENSHOCK__MAIL__SENDER__NAME` / `__EMAIL` | `MAIL_SENDER_NAME` / `MAIL_SENDER_EMAIL` |
| `OPENSHOCK__MAIL__SMTP__*` | `SMTP_HOST`, `SMTP_PORT`, `SMTP_USERNAME`, `SMTP_PASSWORD`, `SMTP_ENABLESSL`, `SMTP_VERIFYCERTIFICATE` |
| `OPENSHOCK__MAIL__MAILJET__KEY` / `__SECRET` | `MAILJET_KEY` / `MAILJET_SECRET` |
| `OPENSHOCK__MAIL__MAILJET__TEMPLATE__PASSWORDRESET` | Gone β mail templates are generated now |
| `OPENSHOCK__TURNSTILE__ENABLE` | `OPENSHOCK_TURNSTILE_ENABLE` |
| `OPENSHOCK__ACCOUNT__REGISTRATIONENABLED` | `OPENSHOCK_REGISTRATION_ENABLED` |
| `OPENSHOCK__LCG__COUNTRYCODE` | `OPENSHOCK_LCG_COUNTRYCODE` |
`PG_PASS`, `PG_USER` and `PG_DB` keep their names.
The old `api` service had `env_file: .env`, so any extra `OPENSHOCK__*` variable you dropped into
`.env` reached the container automatically. It does not anymore. Anything not in the table above
has to be added explicitly to the `x-openshock-env` block (shared by api, cron and lcg) or to the
individual service.
New knobs worth knowing:
* `OPENSHOCK_PORT` β serve the stack on a non-443 port. Leave blank for 443.
* `OPENSHOCK_TAG` / `OPENSHOCK_FRONTEND_TAG` β pin images instead of tracking `latest`.
The frontend is a separate repository and versions independently of the backend.
* `OPENSHOCK_FRONTEND_TLS_INSECURE` β skip backend certificate verification from the
frontend. For testing with self-signed certs only, never in production.
### 5. DNS and certificates [#5-dns-and-certificates]
Only one hostname is needed now, so you can drop the `api.` and `gateway.` DNS records
and use a single-name certificate instead of a wildcard. Keep the old records pointed at
the server until every client has moved over.
### 6. Clients and firmware [#6-clients-and-firmware]
The gateway now advertises host, port and path prefix (`OPENSHOCK__LCG__PUBLICPORT`,
`OPENSHOCK__LCG__PUBLICPATH`) rather than a bare FQDN, and devices pick that up from the
API when they reconnect. Check that your firmware and client versions understand a
gateway path prefix before cutting over β in this single-host layout you cannot avoid it
by blanking `OPENSHOCK_GATEWAY_PATH`, because the frontend owns the root and the gateway
needs a prefix of its own to be routable.
### 7. Bring it up [#7-bring-it-up]
```bash
docker compose pull
docker compose up -d
```
The UI is on `https:///`, the API docs on `https:///api/scalar/viewer` and
Hangfire on `https:///hangfire`.
Using your own reverse proxy? Remove the `traefik` service and route by path: `/` β
`frontend:3000`, `OPENSHOCK_API_PATH` β `api:80`, `OPENSHOCK_GATEWAY_PATH` β `lcg:80`,
`/hangfire` β `cron:780`. Do **not** strip the prefixes β each app serves under its own
`UsePathBase`.
# ChilloutVR Avatar Setup (/guides/shockosc/avatar-setup-cvr)
## What you need [#what-you-need]
* [ShockOSC](basic)
* A ChilloutVR avatar
* Basic experience in working with ChilloutVR avatars is recommended
* A OSC mod for ChilloutVR
Please make sure you have "OSC Query" turned off in the **App Settings** tab.
## Touch Trigger [#touch-trigger]
1. Open your Project
2. Create an Advanced Avatar Trigger
1. Select the Bone of you avatar you want the trigger to be.
2. Create a new empty Game object and name it however you like.\
3. Add the "CVR Advanced Avatar Trigger" component to it.
4. Configure it like followed and replace `{GROUPNAME}` with the name of your ShockOsc group. `ShockOsc/Bzz` for example:\
5. Make sure the trigger area is appropriate for you.
3. Add the Parameter to your Animator as a bool.
4. Add the Parameter to your Menu as a bool.\
5. That's it. π
# VRChat Avatar Setup (/guides/shockosc/avatar-setup-vrc)
## What you need [#what-you-need]
* [ShockOSC](basic)
* A VRChat avatar
* Basic experience in working with VRChat avatars is recommended
## Touch trigger [#touch-trigger]
1. Open your avatars unity project.
2. Add the Touch Trigger
1. Create a new **Empty GameObject** on the bone you want your trigger to be at, your LeftLeg for example.
1. *Right-Click the bone.*
2. *Select "Create Empty".*
2. Select the new GameObject.
3. Rename it to whatever you want. *For example "ShockOSC"*
4. Add a new `VRC Contact Receiver` component to it.
5. Position the object on your avatar.
3. Configure the **VRC Contact Receiver** component:
* **Radius** : That's the range of the trigger, don't make it too big otherwise people will constantly trigger it by accident.
* **Filtering**: `Local Only` should definitely be used, but it's on you if you use `Allow Self`, `Allow Others` or both of these. This will decide if other people or you can trigger the shocker by touching it.
* **Collision Tags**: I recommend that you at least use the `Finger` Tag, otherwise people can't touch the trigger with their fingers, but is's up to you what kind of tags you use.
* **Receiver Type**: this needs to be set to `constant`.
* **Parameter**: `ShockOsc/{GroupName}`
Replace *{'{GroupName}'}* with the name you gave your shocker in the [ShockOSC config](basic#setup-shockosc).
Example: `ShockOsc/leftleg`.
4. Upload your Avatar and you are ready to go!
Make sure that you have [enabled OSC](https://docs.vrchat.com/docs/osc-overview#enabling-it)
inside VRChat.
If you update an existing avatar, make sure you delete the OSC config files in
`C:\Users\%USERPROFILE%\AppData\LocalLow\VRChat\VRChat\OSC`, they are not important for the game
since they only hold the avatar parameters for OSC to use, they get regenerated every time you
change your avatar, but VRChat fails to update them sometimes when a new parameter got added to an
Avatar. Reload your Avatar after that.
## Remote trigger [#remote-trigger]
This will utilize the Contact Sender and Receiver components of the VRChatSDK to make it possible to trigger a shock without touching your Avatar, like a remote.
### Create a Receiver [#create-a-receiver]
1. Open your Avatars Project
2. Create a Receiver
1. In the Hierarchy right click your Avatar
2. Click *Create Empty* to create a new GameObject
3. Rename it to something like "ShockOSC Receiver".
4. Select the newly created object and go into the inspector, click on *Add Component* and add a `VRC Contact Receiver` component to the object.
3. Setup the Receiver
1. Increase the Range of the component (max. 3m, that's a limit enforced by VRChat)
2. Check, Allow Others and Local Only
3. Uncheck Allow Self
4. Add a Collision Tag
5. Set the Collision Tag to *Custom*
6. Set a Custom Tag
1. I recommend generating a password with a password generator, **don't use a real password!** This password needs to be shared with the people that should be able to trigger your receiver.
7. Set the receiver type to constant
8. Set the Parameter: `ShockOsc/{GroupName}_IShock`(bool), alternatively you can use `ShockOsc/_All_IShock`(bool) to trigger all your shockers at the same time.
Replace *{'{GroupName}'}* with the name you gave your shocker in the [ShockOsc config](basic#setup-shockosc).
Example: `ShockOsc/leftleg_IShock`.
### Create a Sender [#create-a-sender]
1. Open your partners Avatar project.
2. Create a Sender
1. In the Hierarchy right click your Avatar
2. Click *Create Empty* to create a new GameObject
3. Rename it to something like "ShockOSC Sender".
4. Select the newly created object and go into the inspector, click on *Add Component* and add a `VRC Contact Sender` component to the object.
3. Setup the Sender
1. Increase the Range of the component (max. 3m, that's a limit enforced by VRChat)
2. Add a Collision Tag
3. Set the Collision Tag to *Custom*
4. Set a Custom Tag
1. this needs to be the same tag as the one in the Receiver!
5. Create a Toggle for it in the FXLayer.
1. Open your Avatar FX Layer Animator
2. Go to the Parameter Tab and create a new Bool parameter
3. Name the new Bool Parameter however you want, maybe something like "ShockerRemote"
4. Switch to the Layer tab of the Animator and Create a new Layer.
5. Name the layer something like "Shocker Remote"
6. Create 2 new states inside the layer and name them On and Off and set Off as the default layer state (Orange).
7. Create 2 new Animations, one that toggles the Sender object On an one that turns it Off, then assigns the animations to the right states you created earlier.
8. Create 2 Transitions one from On to Off and one from Off to On.
9. Both transitions should **not** have a transition time greater then 0 and they should have **no** Exit time.
10. In both transitions set your Bool Parameter created earlier as a condition, from On to Off should be `false` and Off to On should be `true`
6. Create the Toggle in the Action Menu.
1. Open your avatars Parameter list and add your earlier created bool parameter to it
2. uncheck the "Saved" option and also the "default" option
3. Open your Avatar Menu file and go to the place you want to add the Button for the Remote to.
4. Create a new entry, give it a name "Shocker Remote" for example. Make sure it's set to Button and then add your Parameter to it.
### Upload your Avatars [#upload-your-avatars]
Both avatars can now be uploaded, the Receiver Avatar should also delete their VRChat OSC config
(`C:\Users\%USERPROFILE%\AppData\LocalLow\VRChat\VRChat\OSC`) to make sure that the newly added
IShock parameter is used by OSC. Also make sure you have interactions enabled in-game otherwise
contacts won't work!
## Pull trigger [#pull-trigger]
You can use physbones to trigger shocks with intensity based on the distance the bone is stretched once it's released.
Add a new parameter to a physbone component on your avatar with the same name as your group, e.g. `ShockOsc/Leg` or `ShockOsc/_All`
# Basic Setup (/guides/shockosc/basic)
Please go and download [OpenShock Desktop](https://github.com/OpenShock/Desktop) to use ShockOSC.
ShockOSC is an [OpenShock Desktop Module](https://github.com/OpenShock/Desktop) made for OSC to
trigger your shockers from an in-game trigger. OSC is a protocol implemented in VRChat,
ChilloutVR, etc. that allows the communication between the game and 3rd party applications.
## What you need [#what-you-need]
* [Fully setup shocker](../openshock/first-setup)
* [Newest OpenShock Desktop with ShockOSC](https://github.com/OpenShock/Desktop/releases)
* [Shocklink Account](https://openshock.app/)
## Setup ShockOsc [#setup-shockosc]
1. [Download OpenShock Desktop](https://github.com/OpenShock/Desktop/releases/latest/download/OpenShock_Desktop_Setup.exe) and install it.
2. Login
1. Open OpenShock (Desktop)
2. Bottom left corner should say "Not Logged In", click it.
3. Click Login, this will open your browser
4. In the browser, log into your OpenShock account and accept the request shown.
5. OpenShock Desktop will now be logged in.
3. Create your Shock Group. *Everything is done in groups β it doesn't matter if it's only one shocker or multiple shockers.*
* Go to the **Group** tab.
* Create a new group.
* Give the group a name. *(This also defines the parameter name later used for your avatar.)*
* Select what shocker is to be used with the group.
* *Optionally you can override the default limits set in ShockOSC per group.*
4. Configure your Limits.
1. Go to the Config Tab
2. Configure Cooldown, Hold time, if Intensity is fixed or random and the limits for that same with duration.
3. Choose if ShockOSC pauses while being AFK and if it'll un-mute you when shocked.
4. Everything else can be left alone unless you know what you are doing.\
5. That's it, you are ready to go! π
Check out the [VRChat Avatar Setup](avatar-setup-vrc) or [ChilloutVR Avatar
Setup](avatar-setup-cvr) Guide!
# List of ShockOsc Parameters (/guides/shockosc/parameters)
The syntax of the parameters is important, if it's not correct, ShockOSC will NOT recognize the parameter.
Replace "Groupname" with the name of your group defined in ShockOsc WITHOUT the brackets (ex. `ShockOsc/{Groupname}` -> ShockOsc/LeftLeg)
You can check the recognized parameters in the Debug Tab
If you updated your avatar with a NEW parameter and it doesnt work / show up in the Debug Tab, delete the files in `C:\Users\%USERPROFILE%\AppData\LocalLow\VRChat\VRChat\OSC` to refresh the OSC index.
{/* markdownlint-disable MD046 */}
## Avatar Dynamic Parameters [#avatar-dynamic-parameters]
| Parameter | Type | Range Info | Description |
| ---------------------------------------- | ----- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`ShockOsc/{GroupName}`** | bool | | When set to `true` and held, will trigger a normal shock in ShockOSC |
| **`ShockOsc/{GroupName}_Stretch`** | float | 00 (0%) - 1 (100%) | Used by physbones, you usually dont want to set this manually |
| **`ShockOsc/{GroupName}_IsGrabbed`** | bool | | Mainly used to indicate that a Physbone is grabbed, Used by physbones, you usually dont want to set this manually |
| **`ShockOsc/{GroupName}_IShock`** | bool | | If set to `true` will shock immediately ignoring the configured `HoldTime` |
| **`ShockOsc/{Groupname}_ISound`** | bool | | If set to `true` will trigger a Sound ignoring the configurated `HoldTime` |
| **`ShockOsc/{Groupname}_IVibrate`** | bool | | If set to `true` will trigger the vibration of the shocker ignoring the configurated `HoldTime` |
| **`ShockOsc/{Groupname}_CShock`** | float | 0 (Stop) - 1 (100%) | When at 0 it wont do anything, anything above 0 up to 1 will shock for as long as this float is not 0. The value determines how strong but scaled with limit settings |
| **`ShockOsc/{Groupname}_CVibrate`** | float | 0 (Stop) - 1 (100%) | When at 0 it wont do anything, anything above 0 up to 1 will vibrate for as long as this float is not 0. The value determines how strong but scaled with limit settings |
| **`ShockOsc/{Groupname}_CSound`** | float | 0 (Stop) - 1 (100%) | When at 0 it wont do anything, anything above 0 up to 1 will beep / trigger a sound as long as this float is not 0. The value determines how strong but scaled with limit settings |
| **`ShockOsc/{Groupname}_NextIntensity`** | float | 0 (0%) - 1 (100%) | Overrides the intensity for triggered actions. At 0 the configured intensity is used; any value above 0 (scaled to your limit settings) overrides it. Stays in effect until you set it back to 0 or change avatar β it is not cleared after a shock. |
| **`ShockOsc/{Groupname}_NextDuration`** | float | 0 (0%) - 1 (100%) | Overrides the duration for triggered actions, scaled to your duration limit settings. Works like NextIntensity. |
## Visual Parameters [#visual-parameters]
| Parameter | Type | Range Info | Description |
| --------------------------------------------- | ----- | ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| **`ShockOsc/{GroupName}_Active`** | bool | | Is set to `true` if the defined group is active, otherwise it's `false` |
| **`ShockOsc/{GroupName}_Cooldown`** | bool | | If the defined group is on cooldown this will be `true` otherwise it is `false` |
| **`ShockOsc/{GroupName}_CooldownPercentage`** | float | 0 (0%) - 1 (100%) | Gives back the shocker cooldown percentage, 1 means cooldown and 0 means no cooldown. (can be used to make a cooldown timer for example) |
| **`ShockOsc/{GroupName}_Intensity`** | float | 0 (0%) - 1 (100%) | Represents how close the shock was to your configured max intensity |
## Dummy Shockers [#dummy-shockers]
| Name | Description |
| :-------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **\_All** | Can be used in place of a group name, **represents all** shockers on your account. (ex: if **ShockOsc/\_All** is set to `true` on you Avatar, all of your shockers will be triggered at the same time) |
| **\_Any** | Can be used in place of a group name, **represents any** shocker on your account. (ex: if at least one of your shockers are currently shocking **ShockOsc/\_Any\_Active** will be `true`) |
## Config Parameters [#config-parameters]
| Parameter | Type | Range Info | Description |
| ----------------------------------------- | ----- | ----------------- | ------------------------------------------------------------------------------------------ |
| **ShockOsc/\_Config/\_All/Paused** | bool | | It's a kill switch, if set to `true` it will pause ShockOSC. |
| **ShockOsc/\_Config/\_All/MinIntensity** | float | 0 (0%) - 1 (100%) | Defines minimum intensity for the random mode. |
| **ShockOsc/\_Config/\_All/MaxIntensity** | float | 0 (0%) - 1 (100%) | Defines maximum intensity for the random mode. |
| **ShockOsc/\_Config/\_All/MinDuration** | float | 0 (0s) - 1 (10s) | Defines minimum duration for the random mode. Note there is a minimum duration of 300ms |
| **ShockOsc/\_Config/\_All/MaxDuration** | float | 0 (0s) - 1 (10s) | Defines maximum duration for the random mode. |
| **ShockOsc/\_Config/\_All/Duration** | float | 0 (0s) - 1 (10s) | Defines duration time for the fixed mode (100% = 10 Sec.) |
| **ShockOsc/\_Config/\_All/Intensity** | float | 0 (0%) - 1 (100%) | Defines intensity for the fixed mode. |
| **ShockOsc/\_Config/\_All/ModeIntensity** | bool | | Toggles between fixed and random intensity mode (True = Random; False = Fixed) |
| **ShockOsc/\_Config/\_All/ModeDuration** | bool | | Toggles between fixed and random duration mode (True = Random; False = Fixed) |
| **ShockOsc/\_Config/\_All/CooldownTime** | float | 0 (0s) - 1 (100s) | Defines the desired cooldown time. |
| **ShockOsc/\_Config/\_All/HoldTime** | float | 0 (0s) - 1 (1s) | Defines the time needed to hold the trigger to activate ShockOSC's standard touch trigger. |
# Visual Status LED Patterns (/hardware/firmware/status-led)
The firmware uses prioritized repeating patterns to convey device state via:
* Builtβin singleβcolor GPIO LED
* RGB WS2812B LED
Time values are in milliseconds. Patterns loop continuously. Priority means only the first matching state (highest severity) shows.
## Priority Order (highest β lowest) [#priority-order-highest--lowest]
1. Critical Error
2. Emergency Stop Awaiting Release
3. Emergency Stopped
4. WebSocket Connected
5. Has IP (WiβFi connected, no WebSocket)
6. WiβFi Scanning
7. WiβFi Disconnected (fallback)
(An extra βWebSocket Canβt Connectβ pattern exists in code but is not selected anywhere.)
## Pattern Reference [#pattern-reference]
| State | Builtβin LED Pattern | RGB Pattern (Color) | Meaning |
| ------------------------------- | ----------------------------------------------- | ----------------------------------------- | ------------------------------------- |
| Critical Error | 100 on / 100 off | 100 on / 100 off (Red 255,0,0) | Fatal condition β requires attention |
| Emergency Stop Awaiting Release | 150 on / 150 off | 150 on / 150 off (Green 0,255,0) | EβStop clearing, waiting for release |
| Emergency Stopped | 500 on / 500 off | 500 on / 500 off (Red 255,0,0) | EβStop engaged |
| WebSocket Connected | 100 on / 10,000 off | 100 on / 10,000 off (Green 0,255,0) | Fully online (gateway session active) |
| Has IP (no WebSocket) | 100 on /100 off /100 on /700 off (double blink) | Same timing (Orange 255,165,0) | Network OK, backend not connected |
| WiβFi Scanning | 4Γ (100 on /100 off) then 700 off | Same timing (Light Blue 0,50,255) | Actively scanning for networks |
| WiβFi Disconnected | 3Γ (100 on /100 off) then 700 off | Same timing (Blue 0,0,255) | Not associated to WiβFi |
| Status OK (dual LED mode only) | Solid ON | (RGB still shows its prioritized pattern) | Exact healthy flag set |
| Not pure OK (dual LED mode) | Solid OFF | (RGB shows prioritized pattern) | Any deviation from healthy mask |
### Flag to Pattern Mapping [#flag-to-pattern-mapping]
* kCriticalErrorFlag β Critical Error
* kEmergencyStopAwaitingReleaseFlag β Emergency Stop Awaiting Release
* kEmergencyStoppedFlag β Emergency Stopped
* kWebSocketConnectedFlag β WebSocket Connected
* kHasIpAddressFlag β Has IP (no WS)
* kWiFiScanningFlag β WiβFi Scanning
* (Else) β WiβFi **Disconnected**
## DualβLED Mode (Both GPIO + RGB Present) [#dualled-mode-both-gpio--rgb-present]
* The builtβin LED becomes a binary health indicator, overriding the normal blink patterns. (Some basic ESP's only have a Power LED which cannot be controlled)
* It is Solid ON only if the state flag mask equals exactly:\
WebSocketConnected + HasIpAddress + WiFiConnected
* Any additional or missing flag β Solid OFF (RGB continues to show detailed status).
# Identifying (/hardware/remotes/identifying)
# Boards (/hardware/boards)
## Legend [#legend]
### Compatibility [#compatibility]
| Icon | Meaning |
| ---- | --------------------- |
| β
| Fully compatible |
| β οΈ | Partial compatibility |
| β | Not compatible |
| π οΈ | In progress |
| β | Unknown |
### Support [#support]
| Icon | Meaning |
| ---- | -------------------------------------------------------------------------------------------------- |
| π | Supported by [π OpenShock maintainers](https://github.com/orgs/OpenShock/teams/maintainer) |
| βοΈ | Supported by [βοΈ Community maintainers](https://github.com/OpenShock/Firmware/graphs/contributors) |
### Features [#features]
| Icon | Meaning |
| ---- | ------------------------------------------ |
| βοΈ | Supports over-the-air updating |
| π | Supports hardware accelerated cryptography |
## Fully maintained [#fully-maintained]
These boards are tested before every release by the [π OpenShock maintainers](https://github.com/orgs/OpenShock/teams/maintainer).
| Board | Variant | Labels |
| ------------------------------------------------------ | ------- | ------- |
| [PiShock (2023)](boards/pishock/2023-pishock) | All | β
|
| [PiShock Lite (2021 Q3)](boards/pishock/2021q3-lite) | All | β
|
| [Seeed Studio Xiao ESP32S3](boards/seeed/xiao-esp32s3) | All | β
βοΈ π |
| [Wemos D1 Mini ESP32](boards/wemos/d1-mini-esp32) | All | β
|
| [Wemos Lolin S3](boards/wemos/lolin-s3) | All | β
βοΈ π |
| [OpenShock Core V1](boards/openshock/core-v1) | All | β
βοΈ π |
| [OpenShock Core V2](boards/openshock/core-v2) | All | β
βοΈ π |
## Community maintained [#community-maintained]
These boards are supported by designated [βοΈ Community maintainers](https://github.com/OpenShock/Firmware/graphs/contributors).
We do our best to give these contributors sufficient time to test new firmware during the release candidate phase(s), but we cannot guarantee that they got around to a full test cycle prior to a new release.
| Board | Variant | Labels | Original Contributor |
| ------------------------------------------------------------------ | ------------- | ------ | ---------------------------------------------- |
| [DFRobot FireBeetle ESP32-E](boards/dfr-firebeetle/dfr-firebeetle) | ESP32-E (All) | β
βοΈ | [βοΈ LostQuasar](https://github.com/LostQuasar) |
## Avoid β [#avoid-x]
These boards have been reported to have issues with OpenShock or just do not work with any provided firmware
| Board | Variant | Reason | Date Added |
| ----------------------------------------------------- | ---------- | ------------------------------------- | ---------- |
| [Wemos Lolin S2 Mini](boards/wemos/lolin-s2-mini) | N4R2 (All) | WiFi & Internet instability | 17.11.2024 |
| [Knockoff ESP32-S3 "Dorx"](boards/china/esp32s3-dorx) | R8N2 | Reported flashing and stablity issues | 10.04.2025 |
## Incompatible β [#incompatible-x]
Any **ESP8266 will not work!** It **must be a ESP32**.\
additionally these boards are fundamentally incompatible with OpenShock.
| Board | Reason |
| ---------------------------------------------------- | --------------------- |
| [PiShock Plus (2021 Q1)](boards/pishock/2021q1-plus) | Uses incompatible SoC |
# CaiXianlin (/hardware/shockers/caixianlin)
This product is compatible with OpenShock.
Cheap and easily acquirable.
## Buying [#buying]
### Shockers [#shockers]
Best effort list of current AliExpress sellers. Feel free to add more sources to this list!
* π [AliExpress](https://www.aliexpress.com/item/1005005133046985.html)
* π [AliExpress](https://www.aliexpress.com/item/3256804946732233.html)
* π [AliExpress](https://www.aliexpress.com/item/3256805637384984.html)
* π [AliExpress](https://www.aliexpress.com/item/3256806810698119.html)
* π [AliExpress](https://www.aliexpress.com/item/1005005823699736.html)
* π [AliBaba](https://www.alibaba.com/product-detail/MZ-880-Waterproof-Rechargeable-Vibrating-Dog_1600152421803.html)
Amazon also caries this style of shocker under the brand "Heaflex" - if you're looking to buy in the US without dealing with tarrifs this is a good option
* πΊπΈ: [Amazon](https://www.amazon.com/Training-Waterproof-Rechargeable-Vibration-Electronic/dp/B0CJDJ6LHB)
* πΊπΈ: [Amazon](https://www.amazon.com/slopehill-Training-Electronic-Vibration-Waterproof/dp/B09DFRYNMD)
### Cables [#cables]
The charging port for this model is a standard **DC 3.5 x 1.35mm**. A USB to **DC 3.5 x 1.35mm** cable is used to charge the shocker. You might even have one laying around as they are common.
* π [AliExpress](https://aliexpress.com/item/1005005000038383.html)
* π [AliExpress](https://de.aliexpress.com/item/4001327413911.html)
## Media [#media]
Thank you `@dasbrin` on Discord for the images.
## Technical Specification [#technical-specification]
### Official documents [#official-documents]
[US Patent Document 1](https://uspto.report/patent/grant/D879,390)
[US Patent Document 2](https://image-ppubs.uspto.gov/dirsearch-public/print/downloadPdf/D879390)
### Community Reversed Engineered documents [#community-reversed-engineered-documents]
[Shocker & Remote Documents on GitHub](https://github.com/Nat-the-Kat/caixianlin_remote_shocker) by @Nat-the-Kat
### RF Specification [#rf-specification]
| Name | Value |
| ----------------- | ---------- |
| Carrier Frequency | 433.95 MHz |
| Modulation Type | ASK / OOK |
### Bit encoding [#bit-encoding]
| Type | High duration | Low duration |
| ---- | ------------- | ------------ |
| Sync | 1400Β΅s | 750Β΅s |
| 1 | 750Β΅s | 250Β΅s |
| 0 | 250Β΅s | 750Β΅s |
### Packet fields [#packet-fields]
| Name | Value | Length | Remarks |
| ----------------- | --------- | ------- | ---------------------------------------- |
| Transmitter ID | 0 - 65535 | 16 bits | The collar will be Paired to this |
| Channel Number | 0 - 2 | 4 bits | The collar will be Paired to this |
| Action Command | 1 - 3 | 4 bits | 1 = Shock, 2 = Vibrate, 3 = Beep |
| Command Intensity | 0 - 99 | 8 bits | Should always be 0 for beep |
| Message checksum | 0 - 255 | 8 bits | 8-bit sum of all other fields as a int32 |
### Layout [#layout]
```text
[PREFIX ] = SYNC
[TRANSMITTER ID] = XXXXXXXXXXXXXXXX
[CHANNEL ] = XXXX
[MODE ] = XXXX
[STRENGTH ] = XXXXXXXX
[CHECKSUM ] = XXXXXXXX
[END ] = 00
```
## Working C++ code [#working-c-code]
[Firmware CaiXianlin Encoder](https://github.com/OpenShock/Firmware/blob/develop/src/radio/rmt/CaiXianlinEncoder.cpp)
## Example untested RFCat code [#example-untested-rfcat-code]
```py
# Import the necessary libraries and functions
from rflib import *
import time
# Set up the RfCat device
d = RfCat()
d.setPktPQT(0)
d.setMdmNumPreamble(0)
d.setEnableMdmManchester(False)
d.setFreq(433950000)
d.setMdmModulation(MOD_ASK_OOK)
d.setMdmDRate(3950)
d.makePktFLEN(22)
d.setMdmSyncWord(0)
"""
Returns the string representation of the action (Shock, Vibrate, or Beep)
"""
def get_action_string(action):
if action == 1:
return 'Shock'
elif action == 2:
return 'Vibrate'
elif action == 3:
return 'Beep'
else:
return 'Unknown'
# Since the receivers only support 3 channels, we can change the transmitter ID to extend the number of channels
for transmitter_id in range(46231, 46233):
# Loop through the channels
for channel in range(3):
# Loop through the actions
for action in range(1, 4):
# Loop through the intensities, but not if the action is 3 (beep)
for intensity in range(0, 100, 10) if action != 3 else [0]:
# Intensity has max of 99
if intensity == 100:
intensity = 99
# Assemble the payload
payload = (transmitter_id << 24) | (channel << 20) | (action << 16) | (intensity << 8)
# Calculate the checksum (sum(bytes) % 256)
checksum = 0
for i in range(8):
checksum += (payload >> (i * 8)) & 0xFF
checksum %= 256
# Add the checksum to the payload
payload |= checksum
# Assemble the message
message = bytes.fromhex('fc{0:040b}88'.format(payload).replace('1', 'e').replace('0', '8'))
print('Sending {0} on channel {1} with intensity {2} and checksum {3}'.format(get_action_string(action), channel, intensity, checksum))
# Transmit the message 5 times
for i in range(5):
d.RFxmit(message)
```
# Shockers (/hardware/shockers)
**Do not wear the shocker near your neck or your heart.** Check out [Safety](/home/safety-rules)
for more information.
**Do not touch the pins of the shocker with both hands at the same time.** The electricity could
flow through your heart.
At OpenShock we support a couple of different Shocker Models. All of them are based on 433 MHz RF
for communication. They are controlled via a OpenShock Hub.
## Where to buy them [#where-to-buy-them]
We recommend the [CaiXianlin](/hardware/shockers/caixianlin) Shocker due to it being cheap and accessible to buy from AliExpress.\
We have a couple of offers from AliExpress linked on the [CaiXianlin Shocker Page](/hardware/shockers/caixianlin)
## Supported Shockers [#supported-shockers]
We currently support the following Shockers:
* [CaiXianlin](/hardware/shockers/caixianlin) (**β
recommended β**)
* [Wellturn T330](/hardware/shockers/wellturn-t330) (barely used)
* [Petrainer](/hardware/shockers/petrainer) (discontinued)
* Petrainer 998DR (unknown availability)
# Petrainer (/hardware/shockers/petrainer)
This product is compatible with OpenShock.
## Usage [#usage]
Select `Petrainer` when adding the shocker to your account.
## Buying [#buying]
This product has been discontinued.
## Media [#media]
Do you have media of this product you are willing to let us use? Contact us [on Discord](https://discord.gg/OpenShock).
# Wellturn T330 (/hardware/shockers/wellturn-t330)
This product is compatible with OpenShock.
Highly priced and barely available.
## Buying [#buying]
### Official Wellturn Stores [#official-wellturn-stores]
* π [Alibaba](https://www.alibaba.com/product-detail/Dog-Remotely-Collar-1000-Feet-2_1600772049827.html)
* π [Alibaba](https://www.alibaba.com/product-detail/300m-Professional-Remote-Dog-Training-Collar_1600693067072.html)
### 3rd Party Stores [#3rd-party-stores]
* π [Alibaba](https://www.alibaba.com/product-detail/Circular-Rechargeable-Waterproof-Shock-Collar-Powerful_1601679214819.html)
* π [Alibaba](https://www.alibaba.com/product-detail/2025-Automatic-Pet-Stop-Barking-Collar_1601596339209.html)
* π [Chewy](https://www.chewy.com/petdiary-t330-waterproof-dog-remote/dp/892782)
## Official documents [#official-documents]
* π [User Manual](https://device.report/m/8edab0c9b7b69de0a98ad223b5e832501970825440d8abbd58300d6feea59dd1_optim.pdf)
## Media [#media]
# Transmitter (/hardware/transmitter)
Any 433 MHz transmitter that is compatible with ASK / OOK should work with OpenShock.
Please note that all ESP32s operate at 3.3V logic levels. To avoid overvolting your ESP's IO pins,
it is recommended to either: connect your transmitter's power input to a 3V supply pin on the
ESP's board, or use a logic-level shifter if your transmitter ***really* requires** more than 3V
power to operate.
Below are transmitters that have been tested to work.
* [Open Smart](/hardware/transmitter/china/open-smart)
# Contributor Covenant Code of Conduct (/home/legal/code-of-conduct)
## Our Pledge [#our-pledge]
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards [#our-standards]
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities [#enforcement-responsibilities]
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope [#scope]
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement [#enforcement]
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
`admin@openshock.org`.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines [#enforcement-guidelines]
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction [#1-correction]
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning [#2-warning]
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban [#3-temporary-ban]
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban [#4-permanent-ban]
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution [#attribution]
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
[https://www.contributor-covenant.org/version/2/0/code\_of\_conduct.html](https://www.contributor-covenant.org/version/2/0/code_of_conduct.html).
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq). Translations are available at
[https://www.contributor-covenant.org/translations](https://www.contributor-covenant.org/translations).
# License (/home/legal/license)
OpenShock Software is available Open Source under the AGPL-3.0, GPL-3.0 or MIT.
Read the individual license files in the individual source code repositories for
the full license information for that part of the software.
```text
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. [https://fsf.org/](https://fsf.org/)
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Copyright (C)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see [https://www.gnu.org/licenses/](https://www.gnu.org/licenses/).
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
[https://www.gnu.org/licenses/](https://www.gnu.org/licenses/).
```
# Privacy Policy (/home/legal/privacy-policy)
**Effective Date**: January 31, 2026\
**Applies to**: [openshock.app](https://openshock.app) and the [OpenShock Discord Bot / Activity](https://discord.com/oauth2/authorize?client_id=1096380937496969326)\
**Last Updated**: January 31, 2026
## 1. Introduction [#1-introduction]
Welcome to OpenShock!
We value your privacy and are committed to protecting your personal data in accordance with the EU General Data Protection Regulation (GDPR).
This Privacy Policy explains what personal information we collect, how we use it, how long we retain it, and what rights you have under GDPR.
By using openshock.app or the OpenShock Discord Bot / Activity, you agree to this Privacy Policy.
## 2. Data Controller [#2-data-controller]
The controller responsible for your personal data is:
OpenShock\
π§ [admin@openshock.org](mailto:admin@openshock.org)
## 3. What Information We Collect [#3-what-information-we-collect]
When you use our website or Discord bot, we may collect and store the following information:
* Account Information
* Email address
* Username
* Technical Information
* IP address
* User agent (browser or app information)
* Webserver and system logs
We collect only the information necessary for the proper functioning of our services.
## 4. Legal Basis for Processing [#4-legal-basis-for-processing]
We process your data under the following lawful bases defined by GDPR:
* Article 6(1)(b) β Performance of a contract: to provide and maintain your account and access to our services.
* Article 6(1)(f) β Legitimate interest: to maintain system security, prevent abuse, and improve reliability.
We will only process your personal data for the purposes stated in this policy.
## 5. How We Use Your Information [#5-how-we-use-your-information]
We use your information to:
* Provide and maintain your account
* Deliver and improve our services
* Ensure system security and prevent abuse
* Diagnose and troubleshoot technical issues
We do not sell or share your personal information with third parties.
## 6. Data Retention [#6-data-retention]
* Account information (email, username, etc.) is kept as long as your account exists.
* Technical and server logs are retained for up to 90 days, after which they are automatically deleted.
If you delete your account, all personal information associated with it will be permanently removed from our systems within 30 days.
## 7. Data Security [#7-data-security]
We use appropriate technical and organizational measures to safeguard your personal data against unauthorized access, loss, or misuse.
While we do our best to protect your data, no online service can be completely secure.
## 8. Cookies and Tracking [#8-cookies-and-tracking]
We use only essential cookies or similar technologies necessary for authentication and service functionality.
We do not use analytics, advertising, or tracking cookies.
## 9. Third-Party Services [#9-third-party-services]
We use limited third-party services to help deliver, secure, and improve OpenShock.\
These providers may process certain technical data on our behalf in accordance with GDPR and applicable data protection laws.
### Discord [#discord]
If you use our Service, Discord Bot, or Activity, your interaction also falls under the Discord Privacy Policy. We do not control how Discord processes or stores your data.
See Discordβs policy here: [https://discord.com/privacy](https://discord.com/privacy)
In addition, our main Service integrates with Discordβs API. As part of normal operation, limited data (such as event or error information) may be sent to Discord and logged in a private Discord channel for monitoring and troubleshooting purposes. We do not use this data for marketing or profiling.
### Cloudflare [#cloudflare]
We use **Cloudflare** to provide network security, DDoS protection, and content delivery for openshock.app.\
When you access our website, your traffic is routed through Cloudflareβs global network, which helps prevent abuse and improves site performance.
Cloudflare may process limited technical data such as:
* IP addresses
* System and browser information
* URLs requested
* Security and performance logs
Cloudflare acts as a **data processor** on our behalf and processes this information only to provide its services.\
Their processing is covered under a GDPR-compliant Data Processing Agreement (DPA).\
You can review Cloudflareβs Privacy Policy here: [https://www.cloudflare.com/privacypolicy/](https://www.cloudflare.com/privacypolicy/)
## 10. International Data Transfers [#10-international-data-transfers]
We store and process data within the European Union (EU) whenever possible.
If any processing occurs outside the EU, it will be done using providers offering GDPR-compliant safeguards (such as Standard Contractual Clauses).
## 11. Data Storage and Hosting [#11-data-storage-and-hosting]
Our services and databases are hosted on servers located within the European Union.\
We may use reputable third-party hosting or infrastructure providers who are contractually bound to comply with GDPR and data protection standards.
## 12. Your GDPR Rights [#12-your-gdpr-rights]
Under the GDPR, you have the following rights:
* Right of access β Request a copy of your personal data.
* Right to rectification β Request correction of inaccurate data.
* Right to erasure ("right to be forgotten") β Request deletion of your data.
* Right to restriction β Request limited processing of your data.
* Right to data portability β Receive your data in a structured, machine-readable format.
* Right to object β Object to processing based on legitimate interests.
* Right to lodge a complaint β File a complaint with your local data protection authority.
* Right to withdraw consent β If we rely on consent for any processing, you can withdraw it at any time.
To exercise these rights, contact us at: [admin@openshock.org](mailto:admin@openshock.org)
## 13. Childrenβs Privacy [#13-childrens-privacy]
OpenShock is not intended for use by individuals under the age of 18.\
We do not knowingly collect personal data from individuals under the age of 18.\
If you believe a child has provided us with personal information, please contact us so we can delete it promptly.
## 14. Changes to This Privacy Policy [#14-changes-to-this-privacy-policy]
We may update this Privacy Policy from time to time. Any changes will be posted on this page with an updated βEffective Date.β
We encourage you to review this policy periodically.
## 15. Contact [#15-contact]
If you have any questions or concerns about this Privacy Policy, please contact:
**OpenShock**
π§ [admin@openshock.org](mailto:admin@openshock.org)
# Terms and conditions (/home/legal/terms-and-conditions)
This article heavily under development, expect very frequent changes
Terms and conditions for OpenShock Open Source Software.
OpenShock Contributors Team is committed to ensure maximum safety for users and make software elements as useful and efficient as possible.
For that reason, we reserve the right to make changes to the app or change any policies, terms and or conditions at any time and for any reason.
OpenShock Software is intended for use exclusively on consenting human individuals. Users are required to obtain explicit consent before utilizing the software in any capacity. It is imperative that users respect the boundaries and preferences of individuals at all times.
Furthermore, OpenShock assumes no liability for any harm or permanent damage resulting from the use of our software, either alone or in combination with any hardware or equipment. Users are responsible for adhering to our safety guidelines and are encouraged to prioritize the well-being of themselves and others. Our safety guide must be followed diligently to ensure the responsible and ethical use of OpenShock Software.
We are committed to the well-being and safety of all animals. As part of our core values, we firmly oppose any use of OpenShock Software or similar products on animals.
We believe in treating animals with care, respect, and compassion at all times. Therefore, we expressly prohibit the use of our software for any purpose related to animals.
We advocate for positive, humane training methods that promote trust and cooperation between humans and animals.
## Changes to these terms and conditions [#changes-to-these-terms-and-conditions]
We may update our terms and conditions from time to time. Thus, you are advised to review this page periodically for any changes. We will notify you of any changes by posting the new terms and conditions on this page.
These terms and conditions are effective as of 2024-04-14.
## Contact us [#contact-us]
If you have any questions or suggestions about our terms and conditions, please do not hesitate to contact us at `admin@openshock.org`.
# ArtisanForgeDesigns (/vendors/hardware/artisanforgedesigns)
The OpenShock team does not provide **any** guarantees about the quality of products or services
rendered.
Selling pre-built OpenShock hubs and spacers.
I also accept custom requests.
## Contact [#contact]
* π Website/Store [artisanforgedesigns.com](https://artisanforgedesigns.com)
* β E-Mail `artisanforgedesigns@gmail.com`
# BosjesMan (/vendors/hardware/bosjesman)
The OpenShock team does not provide **any** guarantees about the quality of products or services
rendered.
Started `2023-10-17`.
## Contact [#contact]
* π¬ Discord `bosjesman`
* βοΈ Email `shockers@bosjes.cc`
# Ebthing (/vendors/hardware/ebthing)
The OpenShock team does not provide **any** guarantees about the quality of products or services
rendered.
Started `2025-10-27`.
Selling Hubs and Flatshocker kits and Fully assembled units via Their Website [shop.neuroi.au](https://shop.neuroi.au) And via Discord
Ships primarily to Australia And other countrys within Oceania
Has permission to sell parts and assembled shockers of the [Official FlatShocker](https://github.com/tommaier123/FlatShocker).
## Contact [#contact]
* π¬ Discord `ebthing`
# Hardware vendors (/vendors/hardware)
This is a **non-curated list** of self-reported vendors from the OpenShock **community**.
The OpenShock team does not provide **any** guarantees about the quality of products or services
rendered.
## Explanation [#explanation]
| Term | Meaning |
| ------------ | ----------------------------------------------------------------------------------------------------------------------------- |
| π From | Where it's being sent from. |
| βοΈ Ships to | The region(s) that the vendor ships to. |
| π‘ Hubs | Whether the vendor sells pre-assembled Hubs ([ESP32 board](/hardware/boards) + [433 MHz transmitter](/hardware/transmitter)). |
| β‘οΈ Shockers | Whether the vendor sells [shockers](/hardware/shockers). |
| π¦ 3D Prints | Whether the vendor sells 3D-printed cases (for controllers) or spacers (for shockers). |
| π¨ Designs | Whether the vendor sells the Official (Nullstalgia) OpenShock PCBs or Custom designs. |
## Vendor Picker [#vendor-picker]
Use these filters to quickly find vendors that ship to you and offer the products you want.
*Want to be on this list? Hit up a maintainer on [Discord](https://discord.gg/OpenShock).*
# Luc (/vendors/hardware/luc)
The OpenShock team does not provide **any** guarantees about the quality of products or services
rendered.
Started `2023-02-23`.
Selling Hubs & 3D-Prints.
Hubs are custom PCB's, [OpenShock Core V2](../../hardware/boards/openshock/core-v2) are specifically designed and made for OpenShock and offer the best experience.
Hubs can be purchased via KoFi Shop at [shop.luc.cat](https://shop.luc.cat) or contact Luc via discord.\
Spacers are included with every purchase. Will print extra upon request.\
Shipping from Germany to EU + UK. Others upon inquiry beforehand.
## Contact [#contact]
* π KoFi Shop [shop.luc.cat](https://shop.luc.cat)
* π¬ Discord `lucheart`
* βοΈ [openshock@luc.cat](mailto:openshock@luc.cat)
# Luvini (/vendors/hardware/luvini)
The OpenShock team does not provide **any** guarantees about the quality of products or services
rendered.
Started `2026-04-21`.
Selling Hubs & Shockers. Hubs use a custom design based on the ESP32-WROOM32 with a 433 MHz transmitter.
Ships within π§π· Brazil only.
## Contact [#contact]
* π¬ Discord `luvini`
* π¬ Telegram `@luvinimeep`
# MarkDasWolf (/vendors/hardware/markdaswolf)
The OpenShock team does not provide **any** guarantees about the quality of products or services
rendered.
Started `2026-02-05`.
Shipping to Europe from Austria.
Selling Hubs, Shockers & 3D-Prints.
Hubs are custom made [Wemos Lolin S3](../../hardware/boards/wemos/lolin-s3) based. Shockers are [CaiXianlin](../../hardware/shockers/caixianlin).
## Contact [#contact]
* π Shop [https://ko-fi.com/markdaswolf](https://ko-fi.com/markdaswolf)
* β Telegram [https://t.me/markdaswolf](https://t.me/markdaswolf)
* β Email `mail@markdaswolf.com`
# MeguminVRC (/vendors/hardware/meguminvrc)
The OpenShock team does not provide **any** guarantees about the quality of products or services
rendered.
Started `2026-01-09`.
Hubs and Shockers can be purchased via the Website [shocker.club69.club](https://shocker.club69.club/). Will 3D-Print custom parts upon request. Has permission to sell parts for the Official FlatShocker.
## Contact [#contact]
* π¬ Discord `megumin_vrc`
* π Website [shocker.club69.club](https://shocker.club69.club/)
* βοΈ Email `megumin@keemail.me`
# Millkox (/vendors/hardware/millkox)
The OpenShock team does not provide **any** guarantees about the quality of products or services
rendered.
Started `2025-07-06`.
Hubs, Shockers and Offline Remotes can be purchased through my Shop.
Custom 3D prints can be ordered via discord.
*The HUBs are using the latest OpenShock V2.2 board, designed by Nullstalgia*
## Contact [#contact]
* π¬ Discord `millkox`
* π Shop: [milkieverse.cc](https://milkieverse.cc)
* π¬ Discord Server: [discord.milkieverse.cc](https://discord.milkieverse.cc) (via support system)
# NamelessNanashi (/vendors/hardware/namelessnanashi)
The OpenShock team does not provide **any** guarantees about the quality of products or services
rendered.
Started `2025-08-07`.
Selling Hubs and Spacers via Discord or E-Mail inquiries.
Current spacers sold are a custom modified design found at [NanashiTheNameless/OpenShock-Custom-Spacer](https://github.com/NanashiTheNameless/OpenShock-Custom-Spacer), licensed under GPL-3.0, the same as the official designs.
Will also 3D print custom parts upon request.
(Has permission to sell parts for the [Official FlatShocker](https://github.com/tommaier123/FlatShocker) and the [Minimal hardware FlatShocker version by Ebthing](https://www.printables.com/model/1455967-minimal-hardware-flatshocker).)
A list of reviews can be found in the [OpenShock Discord](https://discord.gg/OpenShock) under the [Vendor Reviews](https://discord.com/channels/1078124408775901204/1424434056652783616) section.
**Discord is significantly preferred to E-Mail. If you have both as an option use Discord.**
**Via Discord, please clarify that you are messaging about an OpenShock in your first message.**
**Via E-Mail, please include `OpenShock` in the subject somewhere. It will cause your email to be automatically sorted into the correct category, making it easier for me to prioritize responses.**
## Contact [#contact]
* π¬ Discord `NamelessNanashi`
* βοΈ E-Mail `Nanashi@NamelessNanashi.dev`
# Nerex (/vendors/hardware/nerex)
The OpenShock team does not provide **any** guarantees about the quality of products or services
rendered.
Started `2025-01-06`. On hold as of `2026-04-14` until further notice.
~~Hubs & Shockers can be purchased via KoFi Shop at [shop.nerexbcd.dev/openshock](https://shop.nerexbcd.dev/openshock).~~
## Contact [#contact]
* π¬ Discord `nerexbcd`
* π KoFi Shop [shop.nerexbcd.dev/openshock](https://shop.nerexbcd.dev/openshock)
* βοΈ Email `products@nerexbcd.dev`
# nullstalgia (/vendors/hardware/nullstalgia)
The OpenShock team does not provide **any** guarantees about the quality of products or services
rendered.
~~Started `2023-12-01`.~~ On hold as of `2025 12 16` until further notice.
~~Current controller on sale: [OpenShock Core V2](../../hardware/boards/openshock/core-v2).~~
[Github](https://github.com/nullstalgia)
# Silly pupkit (/vendors/hardware/sillypupkit)
The OpenShock team does not provide **any** guarantees about the quality of products or services
rendered.
Started `2024-09-07`.
Selling Hubs, spacers, and Shockers via discord.
## Contact [#contact]
* π¬ Discord `sillypupkit`
# ESP32-S3 "Dorx" (/hardware/boards/china/esp32s3-dorx)
Codenamed "Dorx", this is a brandless knockoff ESP32-S3 board with a fake "ESP32-S3-WROOM-1" module.
## Variants [#variants]
* `N8R2` -- 8MiB of flash, 2MiB of PSRAM
* `N16R8` -- 16MiB of flash, 8MiB of PSRAM
## Specifications [#specifications]
* ESP32-S3 (Knockoff)
* One WS2812B controllable LED
* One LED for each of R/G/B:
* Red when the board is powered
* Green for serial traffic
* Blue while flashing
## Buying [#buying]
* [https://aliexpress.com/item/1005005767192637.html](https://aliexpress.com/item/1005005767192637.html)
## Media [#media]
# DFRobot FireBeetle 2 ESP32-E (/hardware/boards/dfr-firebeetle/dfr-firebeetle)
This product is fully compatible with OpenShock.
* [Official webpage](https://wiki.dfrobot.com/FireBeetle_Board_ESP32_E_SKU_DFR0654)
## Specifications [#specifications]
* ESP32-E
* Li-Po Battery Support
* USB Type C
## Pinout [#pinout]
* Pin 2 / D9 is used for the status LED.
* Pin 5 / D8 is used to control the onboard RGB LED.
* Pin 13 / D7 is the default pin for transmitting.
## Buying [#buying]
* [www.dfrobot.com](https://www.dfrobot.com/product-2195.html)
## Media [#media]
# OpenShock Core V1 (/hardware/boards/openshock/core-v1)
Designed by [nullstalgia](../../../vendors/hardware/nullstalgia)
This product is fully compatible with OpenShock.
## Specifications [#specifications]
* Espressif ESP32-S3-WROOM-1-N8 (8MB Flash, no PSRAM)
* USB-C Connection to integrated ESP32-S3 USB (no UART adapter)
* On-board 433 MHz Transmitter
* RGB and Status LEDs
* On-board Emergency Stop Button, plus 3.5mm extension port (for foot pedals)
## Pinout [#pinout]
* GPIO 15 for RF Transmission
* GPIO 13 for Emergency Stop (Active Low, on board pull-up)
* GPIO 35 for Status LED (Active High)
* GPIO 48 for RGB (WS2812B) LED
## Flashing [#flashing]
If you are having difficulties flashing via the USB port, you can enter the USB Serial Download Mode.
You may require a pair of small pointy objects, such as toothpicks or paperclips, to reach the buttons mentioned below.
**With the USB-C port facing down, the top button is RST (EN) and the bottom button is BOOT (IO 0).**
1. Plug the board into your computer via USB, make sure the cable can support power and data.
2. Hold down BOOT (IO 0).
3. While holding boot, tap RST (EN).
4. Release BOOT and upload new firmware via the virtual COM port!
5. You may need to tap RST (without BOOT!) to start new firmware after flashing has completed.
## Schematics and PCB files [#schematics-and-pcb-files]
[Freely available under the CERN-OHL-S-2.0 license here.](https://github.com/nullstalgia/OpenShock-Hardware/tree/main/Core)
## Media [#media]
# OpenShock Core V2 (/hardware/boards/openshock/core-v2)
Designed by [nullstalgia](../../../vendors/hardware/nullstalgia)
This product is fully compatible with OpenShock.
## Specifications [#specifications]
* Espressif ESP32-S3-WROOM-1-N8 (8MB Flash, no PSRAM)
* USB-C Connection to integrated ESP32-S3 USB (no UART adapter)
* On-board 433 MHz Transmitter
* RGB (WS2812B) and Status LEDs
* On-board Emergency Stop Button, plus 3.5mm extension port (for foot pedals)
## Pinout [#pinout]
* GPIO 1 for RF Transmission
* GPIO 38 for Emergency Stop (Active Low, on board pull-up)
* GPIO 13 for Status LED (Active High)
* GPIO 14 for RGB (WS2812B) LED
## Flashing [#flashing]
If you are having difficulties flashing via the USB port, you can enter the USB Serial Download Mode.
You may require a pair of small pointy objects, such as toothpicks or paperclips, to reach the buttons mentioned below.
**With the USB-C port facing down, the top button is BOOT (IO 0) and the bottom button is RST (EN).**
1. Plug the board into your computer via USB, make sure the cable can support power and data.
2. Hold down BOOT (IO 0).
3. While holding boot, tap RST (EN).
4. Release BOOT and upload new firmware via the virtual COM port!
5. You may need to tap RST (without BOOT!) to start new firmware after flashing has completed.
## Schematics and PCB files [#schematics-and-pcb-files]
[Freely available under the CERN-OHL-S-2.0 license here.](https://github.com/OpenShock/Hardware/tree/main/Core%20v2)
## Media [#media]
# PiShock Plus (2021 Q1) (/hardware/boards/pishock/2021q1-plus)
We are not affiliated with PiShock in any way and do not endorse their products.
This product is not compatible with OpenShock.
## Specifications [#specifications]
This device is based on the [Raspberry Pi Zero W](https://www.raspberrypi.com/products/raspberry-pi-zero-w/), which is not compatible with OpenShock.
## Media [#media]
Thanks to `@nacho_` on Discord for the images.
# PiShock Lite (2021 Q3) (/hardware/boards/pishock/2021q3-lite)
We are not affiliated with PiShock in any way and do not endorse their products. However, we do
support flashing OpenShock on this board.
This product is fully compatible with OpenShock.
## Specifications [#specifications]
* Board is [Wemos D1 Mini ESP32](../wemos/d1-mini-esp32)
* Simple [433 MHz transmitter](../../transmitter/index)
## Pinout [#pinout]
* Pin 15 is used for transmitting.
## Media [#media]
### Clean variant [#clean-variant]
### Burnt solder joint variant [#burnt-solder-joint-variant]
Courtesy of `@ulthirm` on Discord.
### Cold solder joint variant [#cold-solder-joint-variant]
Courtesy of `@pixelcommander` on Discord.
# PiShock 2023 (Current) (/hardware/boards/pishock/2023-pishock)
We are not affiliated with PiShock in any way and do not endorse their products. However, we do
support flashing OpenShock on this board.
This product is fully compatible with OpenShock.
First seen in the wild on `2023-09-19`.
## Specifications [#specifications]
* Espressif ESP32-WROOM-32D
* On-board 433 MHz transmitter
## Pinout [#pinout]
* Pin 12 is used for transmitting.
## Flashing [#flashing]
This board is compatible with the flash tool.
## Media [#media]
# Seeed Xiao ESP32S3 (/hardware/boards/seeed/xiao-esp32s3)
This product is fully compatible with OpenShock.
See the [official webpage](https://www.seeedstudio.com/XIAO-ESP32S3-p-5627.html) for a more
exhaustive description.
## Specifications [#specifications]
* ESP32-S
* 8MiB Flash
* 8MiB PSRAM
* Detachable antenna
The pin labels printed on the board do *not* match the ESP32-S3's actual GPIO numbers. Please
refer to the [official Seeed
documentation](https://wiki.seeedstudio.com/xiao_esp32s3_getting_started/#hardware-overview) to
find the correlations between the printed labels and the actual GPIO numbers.
## Flashing [#flashing]
Please read this section carefully.
On the first picture in the [Media section](#media) below, aside the USB-C are two (extremely
small!) buttons.
* The "R" button is "Reset";
* The "B" button is "Bootloader".
To flash, **you need to enter bootloader mode**. Follow these steps:
* Unplug the board.
* Hold down the "B" button.
* Replug the board **while holding it down.**
If everything went correctly, you can now flash the board using a flashing tool like `esptool`. After flashing, press "R" to reset the board into normal boot mode.
## Media [#media]
The antenna is detachable. The back side of the antenna has adhesive tape.
# Wemos D1 Mini ESP32 (/hardware/boards/wemos/d1-mini-esp32)
This product is fully compatible with OpenShock.
## Specifications [#specifications]
Sorry, we haven't *quite* finished this article yet. **In the meantime, feel free to hit us up on
[Discord](https://discord.gg/OpenShock) if you have any trouble.**
## Buying [#buying]
| Availability | Variant | Links |
| ------------------ | ------- | ------------------------------------------------------------- |
| π International 1 | FeiYang | [AliExpress](https://de.aliexpress.com/item/32858054775.html) |
## Media [#media]
### FeiYang variant [#feiyang-variant]
Credit to `minty_kitsune` on Discord.
# Wemos Lolin S2 Mini (/hardware/boards/wemos/lolin-s2-mini)
This product is fully compatible with OpenShock.
* [Official webpage](https://www.wemos.cc/en/latest/s2/s2_mini.html)
## Specifications [#specifications]
* ESP32-S2FN4R2
* 4MB Flash
* 2MB PSRAM
## Media [#media]
# Wemos Lolin S3 (/hardware/boards/wemos/lolin-s3)
This product is fully compatible with OpenShock.
* [Official webpage](https://www.wemos.cc/en/latest/s3/s3.html) -
[AliExpress](https://www.aliexpress.com/item/1005004643475363.html?spm=a2g0o.store_pc_home.0.0.276d4ff12EF3UH)
## Specifications [#specifications]
* ESP32-S3-WROOM-1
* 16MB Flash (Quad SPI)
* 8MB PSRAM (Octal SPI)
## Media [#media]
# Open Smart 433MHz (/hardware/transmitter/china/open-smart)
### Transmitter Only [#transmitter-only]
* [AliExpress](https://www.aliexpress.com/item/3256807953643815.html)
### Transceiver Kit [#transceiver-kit]
* [AliExpress](https://www.aliexpress.com/item/32820610184.html)
### Specifications [#specifications]
* 433MHz
### Media [#media]