Elixir client for the OBS WebSocket v5 API.
Implements all 137 request types: General, Config, Sources, Scenes, Inputs, Transitions, Filters, Scene Items, Outputs, Stream, Record, Media Inputs, UI.
def deps do
[{:obs_ex, "~> 0.1.0"}]
endEnable the WebSocket server in OBS: Tools → WebSocket Server Settings → Enable.
{:ok, pid} = ObsEx.WebSocket.start_link(host: "localhost", port: 4455, password: "secret")
{:ok, %{"currentProgramSceneName" => scene}} = ObsEx.WebSocket.get_current_program_scene(pid)
:ok = ObsEx.WebSocket.set_current_program_scene(pid, %{"sceneName" => "Main"})
ObsEx.WebSocket.subscribe(pid, fn event -> IO.inspect(event["eventType"]) end)mix test # unit + mock tests, no OBS required
mix test.integration # all tests, requires OBS running locallySee CLAUDE.md for full test options, mock patterns, and integration setup.
obs-websocket protocol spec
— default port 4455, JSON over WebSocket text frames.