Skip to main content

OBS Studio websocket backend for El Decko. Allow your Elgato Stream Deck to control OBS Studio using it's webscoket server

Project description

El Decko Backend OBS Studio Websocket

OBS Studio websocket based backend for El Decko.

First run

Upon running El Decko the first time with this backend installed it will create an empty default config to connect to your local OBS Studio instance at: $XDG_CONFIG/eldecko/backend/obsws.json.
Please update the generated default credentials with the actual port and password of what is shown inside your OBS Studio Websocket Settings.

Use this backend

In order to use this backend you need to supply the streamdeck.json generated by El Decko Core with the following key_config:

{
    "STREAM_DECK_SERIAL_NUMBER": {
        "brightness": 30,
        "key_config": {
            "0": {
            "backend": "edb_obs_ws",
            "event": "SET_CURRENT_PROGRAM_SCENE",
            "event_parameters": {"name":"S: Desktop"},
            "image_idle": null,
            "image_pressed": null
            }
        }
    }
}

This will configure the very first key (0) to use this plugin (edb_obs_ws) and bind the event SwitchScene to it.
The event will receive the parameter map defined by event_parameters, name defines the name of you scene within OBS Studio.
More supported websocket events will follow.

Implemented websocket protocols

SetCurrentProgramScene

Tells OBS Studio to change the currently visible Scene to any other available scene.

Event name: SET_CURRENT_PROGRAM_SCENE
Parameters: name -> Name of your local OBS Studio Scene

GetSceneList

Returns a list with all available Scenes within OBS Studio.

Event name: GET_SCENE_LIST
Parameters: None

SetSceneItemEnabled

Set the enabled state of an item inside a given scene

Event name: SET_SCENE_ITEM_ENABLED Parameters:
scene_name -> The name of the scene
item_id -> The internal ID of the required item.
You can find this inside your OBS Scene Settings JSON.
enabled -> True or False to show/hide the item.

Example JSON:
"key_config": {
    "<key_number>": {
        "backend": "edb_obs_ws",
        "event": "SET_SCENE_ITEM_ENABLED",
        "event_parameters": {"scene_name":"S: Confeti", "item_id": 42, "enabled": false},
        "image_idle": "<some_image_path>",
        "image_pressed": null,
        "label": "Hide Video"
      },
}

ToggleSceneItemEnabled

Similar to SetSceneItemEnabled does this event show/hide an item in a given scene.
But additionally it queries the current item state and sets it to the opposite state.

Event name: ToggleSceneItemEnabled Parameters:
scene_name -> The name of the scene
item_id -> The internal ID of the required item.
You can find this inside your OBS Scene Settings JSON.

Example JSON:
"key_config": {
    "<key_number>": {
        "backend": "edb_obs_ws",
        "event": "TOGGLE_SCENE_ITEM_ENABLED",
        "event_parameters": {"scene_name":"S: Confeti", "item_id": 2},
        "image_idle": "<some_image_path>",
        "image_pressed": null,
        "label": "Confetti!"
      },
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

el_decko_backend_obs_ws-2023.5.3.tar.gz (17.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

el_decko_backend_obs_ws-2023.5.3-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

Details for the file el_decko_backend_obs_ws-2023.5.3.tar.gz.

File metadata

  • Download URL: el_decko_backend_obs_ws-2023.5.3.tar.gz
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/6.3.0 pkginfo/1.9.6 requests/2.28.2 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.10.10

File hashes

Hashes for el_decko_backend_obs_ws-2023.5.3.tar.gz
Algorithm Hash digest
SHA256 a675d7753ab1faec176fe1def2992d2cb58c0d323e44f6c0fc40e4e09d3970d1
MD5 3980921a440a93718cbc4ee28011b969
BLAKE2b-256 3649e64d0b493ed4e84a7a1f859e96db8969428a4c515b2cfa0bf6bd06f17795

See more details on using hashes here.

File details

Details for the file el_decko_backend_obs_ws-2023.5.3-py3-none-any.whl.

File metadata

  • Download URL: el_decko_backend_obs_ws-2023.5.3-py3-none-any.whl
  • Upload date:
  • Size: 18.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/6.3.0 pkginfo/1.9.6 requests/2.28.2 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.10.10

File hashes

Hashes for el_decko_backend_obs_ws-2023.5.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9a5313a2f3f53c2fb5f074c8e4052f13d72fa616299dc73a608b929a711cb14b
MD5 80f61c86bc64eb61afcf2203947d2315
BLAKE2b-256 0fc28d6c6658d07a0c5772534ef139c23776c24effb7f2fb67b10f0274524c04

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page