Overview

OpenShock is an open-source alternative to PiShock for controlling wearable haptic devices. VMSC integrates with the OpenShock API as a full output provider, giving you vibrate, shock, beep, and stop actions that can be triggered from stream events through the Rules system.

OpenShock supports self-hosted servers, making it a flexible choice for users who want full control over their infrastructure. VMSC connects to the OpenShock REST API using a personal API token and supports multiple shockers simultaneously.

Safety Warning

Shock mode delivers electrical stimulation. Always test devices on yourself at low intensity before enabling shock actions on stream. Never use shock devices near your chest, head, or neck. If you feel any discomfort, stop immediately. You are solely responsible for your safety when using OpenShock hardware.

Setting Up OpenShock

To connect VMSC to your OpenShock account, you need an API token and your server URL.

  1. Get Your API Token

    Log in to your OpenShock dashboard (either the official instance at openshock.app or your self-hosted server). Navigate to API Tokens and generate a new token. Copy it immediately — it will not be shown again.

  2. Note Your Server URL

    If you use the official OpenShock instance, the server URL is https://api.openshock.app. For self-hosted installations, use your own server's URL.

  3. Configure VMSC

    In VMSC, navigate to Outputs > OpenShock. Enter your API Token and Server URL.

  4. Load Shockers

    Click Fetch Shockers. VMSC queries the OpenShock API and displays all shockers linked to your account, each with its friendly name.

  5. Test the Connection

    Click the Test button next to any shocker to send a short, low-intensity vibration and confirm connectivity.

Self-Hosted Servers

OpenShock supports self-hosted server deployments. If you run your own server, enter its full URL (including protocol and port if non-standard) in the Server URL field.

Action Modes

OpenShock devices support four operation modes, each available as an action type in your rules:

Vibrate

Sends a vibration pulse to the device. The safest and most commonly used mode, suitable for any stream event.

  • Intensity: 1–100%
  • Duration: 300ms – 30,000ms

Shock

Sends an electrical stimulation pulse. Use with extreme caution and always start at the lowest effective intensity.

  • Intensity: 1–100%
  • Duration: 300ms – 30,000ms

Beep

Plays an audible tone from the device without any physical sensation. Useful as an alert or notification.

  • Duration: 300ms – 30,000ms
  • No intensity setting

Stop

Immediately stops any active action on the targeted shocker. Can be used as an emergency cutoff in rules.

  • No parameters
  • Instant effect

Multiple Shocker Support

VMSC supports connecting to multiple OpenShock devices simultaneously. After fetching your shockers, each device appears in the settings panel with its friendly name as assigned in the OpenShock dashboard.

  • Name-based selection — When creating an OpenShock action in a rule, you select the target shocker by its friendly name from a dropdown.
  • All Shockers — Select "All Shockers" to trigger every connected device at once.
  • Per-shocker limits — Each shocker can have its own intensity cap configured in the OpenShock dashboard.

OpenShock vs. PiShock

VMSC supports both OpenShock and PiShock as output providers. Here is how they compare:

Feature OpenShock PiShock
Source Open-source Proprietary
Self-hosting Yes — run your own server No — cloud-only
API Authentication API token Username + API key + share code
Connection Protocol REST API (HTTPS) WebSocket
Action Types Vibrate, Shock, Beep, Stop Vibrate, Shock, Beep
Stop Command Yes — dedicated stop action Via E-STOP button only
Multiple Devices Name-based selection from API Share-code-based manual entry
Duration Range 300ms – 30,000ms 1s – 15s
VMSC Edition Premium Premium
Use Both

OpenShock and PiShock can be active at the same time. You can have some rules target OpenShock devices and others target PiShock devices in the same stream.

Creating OpenShock Rules

To wire a stream event to an OpenShock action:

  1. Create or Edit a Rule

    Go to Rules and create a new rule or edit an existing one.

  2. Set the Trigger

    Choose the event that should trigger the action (e.g., Gift Received, New Follower, Chat Command).

  3. Add an OpenShock Action

    In the actions list, click Add Action and select OpenShock. Choose the target shocker, mode (vibrate/shock/beep/stop), intensity, and duration.

  4. Add Conditions (Optional)

    Use conditions to filter when the action fires. For example, only trigger on gifts worth more than 100 diamonds.

  5. Save and Test

    Save the rule and use the Dev Test Panel to simulate the event and verify the correct device activates.

Rate Limiting and Safety

VMSC enforces the same safety mechanisms for OpenShock as for PiShock:

  • Cooldown period — Configurable per rule to prevent rapid-fire activations.
  • Global intensity cap — Set a maximum intensity in OpenShock settings that overrides any rule value.
  • Global duration cap — Prevent any single action from exceeding a maximum duration.
  • API rate limits — The OpenShock API may enforce its own rate limits. VMSC logs warnings when limits are hit.
Gift Storms

TikTok gift events can arrive in rapid bursts. Set your cooldown to at least 5–10 seconds for shock-mode rules to prevent overlapping activations.