Connect OBS Studio Websocket to Home Assistant
Yes, you can connect OBS Studio to your Home Assistant setup using the built-in OBS WebSocket server. This integration allows your smart home to communicate directly with your broadcasting software, enabling you to automate lights, switches, and other smart devices based on your streaming activity. This guide covers how the connection works, how to set it up, and the automation possibilities it creates.
How the Connection Works
Since version 28, OBS Studio includes a native WebSocket server (v5) pre-installed. Home Assistant features an official OBS Studio integration that acts as a WebSocket client. Once connected over your local network, Home Assistant can monitor OBS states (such as whether you are streaming, recording, or virtual camera status) and send commands back to OBS to control scenes, sources, and audio levels.
Setup Instructions
To establish the connection, follow these steps:
- Configure OBS Studio:
- Open OBS Studio on your computer.
- Go to Tools in the top menu and select WebSocket Server Settings.
- Check the box to Enable WebSocket Server.
- Note the Server Port (the default is usually
4455). - Click Show Connect Info to view or generate a Server Password, then click Apply.
- Configure Home Assistant:
- Open your Home Assistant dashboard and navigate to Settings > Devices & Services.
- Click Add Integration in the bottom right corner.
- Search for OBS Studio and select it.
- Enter the Host IP address of the computer running
OBS. If Home Assistant and OBS are on the same machine, use
localhostor127.0.0.1. Otherwise, use the computer’s local IP address (e.g.,192.168.1.50). - Enter the Port (default
4455) and the Password you configured in OBS. - Click Submit to finish the integration.
Practical Use Cases for Automation
Once integrated, OBS Studio entities will appear in Home Assistant, allowing you to create powerful automations:
- Studio Lighting: Automatically turn on a red “On Air” smart light outside your room or change your desk’s RGB strip lights when you start streaming or recording.
- Noise Reduction: Automatically mute your smart speakers, turn off smart plugs connected to noisy fans, or pause a robotic vacuum when OBS detects that your microphone is active or streaming has started.
- Physical Controls: Use smart buttons, Zigbee switches, or a custom Home Assistant dashboard on a tablet to switch OBS scenes, mute audio sources, or trigger stream transitions.