bitfocus / companion

Bitfocus Companion enables the reasonably priced Elgato Streamdeck and other controllers to be a professional shotbox surface for an increasing amount of different presentation switchers, video playback software and broadcast equipment.
http://bitfocus.io/companion
Other
1.46k stars 489 forks source link

API Create/Delete Button and Set Button Actions #2928

Closed DhSufi closed 6 days ago

DhSufi commented 6 days ago

Is this a feature relevant to companion itself, and not a module?

Is there an existing issue for this?

Describe the feature

API request to create or remove a button and API request to set Buttons Actions

For example: cerate a button in page 1, column 1, row 1, Set to that button Action -> Internal: System: Run shell path (local) Inside Action -> set Path, Delay, timeout, etc.

Usecases

In unpredictable enviroments, like videogames production, usually there are some elements on screen that must be controlled, but those elements could be obtained or lost during gameplay. It would be nice to be able to create or delete a button that corresponds to that element and set actions to that button.

For example there is three elements available for player1 and seven elements avilable for player2 in turn one. So through videogame API those elements are created in OBS Studio as sources (using OBS Studio websocket) Each one of those OBS sources are assigned to 3 buttons in Companion. One button that performs intro and outro animations other button that make it blink or shine, and other button that make it change source image. Each Companion button runs a script that triggers those actions in OBS Studio. (Companion Buttons performs the action Internal: System: Run shell path) As long as gameplay advances the number of avilable items for each players changes.

Currently, in Companion I am creating manually pages for each player with buttons and setting them to run a script. This can lead to undesired errors if pressing a button for an element that does not exist anymore or run out of buttons if elements exceed the number of manually pre-configured buttons in Companion.

It would be very helpful if buttons in Companion could be created or removed through API requests and also if each button could be configured throud API requests.

thedist commented 6 days ago

Have you considered making a custom module for your game, as from what you've described it sounds like all of this is entirely possible if you made a module for your specific use case.

dnmeid commented 6 days ago

This is kinda duplicate of #2233 with the only difference that you are asking for an API access, where #2233 wants to expose this functionality with actions (which can be put on butttons and they can be triggered with the API). Generally there are strong reservations against this idea.