SAMMI interacts with OBS Studio through OBS Websocket (OBSWS), enabling remote control and event monitoring in OBS Studio.
Install OBS Websocket #
SAMMI is compatible with OBS Websocket versions 5.0 and 4.9. However, we highly recommend using OBS Websocket 5.0 with OBS Studio versions 28 and 29, as it is the latest version.
OBS Studio 28 and higher come with OBS Websocket 5.0 pre-installed, so there is no need to install it separately.
While OBS Websocket 5.0 is preferred, there may be specific cases where OBS Websocket 4.9 is still needed, such as when using certain outdated plugins that have not yet been updated for compatibility with OBS Websocket 5.0. For users who need to maintain compatibility with OBS Websocket 4.9, OBS Studio 28 supports the installation of the OBS Websocket 4.9.1-compat plugin, which can be downloaded from the link below.
Connect SAMMI to OBS Websocket #
If you are using OBS Studio version 28 or higher, you do not need to install OBS Websocket 5.0 separately, as it is included with OBS. However, you may need to install the OBS Websocket 4.9.1-compat plugin if you want to use OBS Websocket 4.9, which may be required by some extensions.
To connect SAMMI to OBS Websocket, follow these steps in SAMMI:
- Click on OBS Connections in the bottom menu.
- Enter the following information:
Name: The name of your OBS instance. The first OBS instance will always be named “Main” and cannot be changed.
Protocol: Select the protocol used by your OBS Websocket (OBSws4 or OBSws5).
IP: The IP address of the OBS Websocket. Use
127.0.0.1unless connecting to OBS on a different computer.
Port: The port used by the OBS Websocket. It must match the port in OBS > Tools > Websocket Server Settings. Default ports are
4455for OBSws5 and
4444for OBSws4. We recommend keeping the default port.
Password: The password for OBS Websocket authorization. Leave empty unless “Enable Authorization” is checked in OBS > Tools > OBS Websocket Settings. Passwords must match.
Auto Connect: Check this option if you want SAMMI to automatically connect to OBS Websocket on launch.
Non-Blocking: Keep this option checked unless you have trouble connecting to OBS Websocket.
- Click Connect. The
OBS Mainindicator should turn from red to green in SAMMI.
Connect SAMMI to Multiple OBS Websockets #
SAMMI can connect to multiple OBS Websockets. To add another connection, go to OBS Connections settings and add a new entry.
For OBS commands, you must manually select the OBS Name (unless using the “Main” OBS connection) to specify which OBS instance to send commands to. OBS Name also accepts variable inserts.
Control OBS from SAMMI #
You can remotely control OBS Studio using SAMMI OBS commands. To do so:
- Go to an existing deck in SAMMI or click on
Add a new deck.
- Right-click on an empty grid and select
- Click on the icon and add your desired OBS command(s). Examples include:
- Switch to previous scene
- Change text in your Text (GDI+) source in OBS
- Change position of a source
- Click “Save” in the edit button screen and then click “Save” again in your deck. This step is crucial to save your button.
- Press the button in your SAMMI Deck while connected to OBS to execute the command(s).
Permanent Variables #
Once connected to OBS Websocket, SAMMI provides useful permanent variables that you can use in your commands. All OBS variables are stored in the
global.[obsName] object. If you’re using only one OBS connection, your variables will always be stored in
global.Main, for example
||Whether you’re connected to your selected OBS Name, 1 = connected, 0 = not connected|
||Your selected OBS current scene|
||Your selected OBS previous scene|
||OBSws selected type in OBS Connections, either
||The IP address of the OBS connection|
||The port of the OBS connection|
||Current OBS studio version the OBSws is connected to|
||Current OBS Websocket version the OBSws is connected to|
Listen to OBS Events in SAMMI #
You can trigger buttons in SAMMI by listening to events in OBS Studio, such as switching to a new scene or enabling studio mode. A detailed guide for setting up OBS triggers can be found in the Triggers-OBS section.