xObsSimpleHttpControl

D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
This tool acts as a simple HTTP gateway to the obs-websocket interface. The idea is that more tools can trigger simple HTTP interfaces instead of opening a websocket connection and sending JSON. Also from user perspective it's easier to use, because formatting URL query parameters is a bit easier to do than formatting JSON.
In theory every request that is listed here can be sent: https://github.com/Palakis/obs-websocket/blob/4.x-current/docs/generated/protocol.md#requests
A few examples that have already been tested: Change current scene, show/hide sources, set audio volumes or mute/unmute, rename sources, enable/disable filters...

Another feature it has is that it can call a web hook configured by you for each event it receives from obs-websocket, see: https://github.com/Palakis/obs-websocket/blob/4.x-current/docs/generated/protocol.md#events
However, with this webhook it will send the original JSON and not query parameters, so your receiving tool must be able to parse JSON.

You only need to run one instance of this tool to manage multiple instances of OBS, each instance is addressed as part of the URL.

I've written this for myself but thought I'd share it here, because I am sure others will find it useful too. Therefore if you have feature requests your best chance is that it's something I also want for myself, otherwise I might not be willing to invest the time.

L̲i̲m̲i̲t̲a̲t̲i̲o̲n̲s̲
- all requests with only simple data types (int, double, string, bool) should work fine, as soon as you have some kind of nesting (indicated by "object" data type) it either doesn't work or needs ugly hacks, like cramping URL-encoded JSON into a query parameter value
- currently all requests for the tool are "fire and forget", this means the tool
  - does not wait for a response (the HTTP request returns immediately, even if the obs-websocket request in the background hasn't finished yet)
  - cannot be used to get data from "Get" requests, e.g. "GetVersion"
- the tool doesn't indicate the connection status to each OBS instance, in OBS activate "Tools -> WebSockets Server Settings -> [X] Enable System Tray Alerts" to see if the tool is connecting to a particular OBS instance.
- the webhook sends the original JSON, the data is NOT formatted as query parameters
- this will always depend on obs-websocket, it just wouldn't make sense to do all the work that is going into obs-websocket again only with HTTP queries instead of JSON
  - this has the advantage that the tool doesn't have to be modified when new versions of obs-websocket introduce new methods/events or change the fields/names used in existing ones
- each webhook call for each event is happening on its own thread, but request handling is currently not multi-threaded
  - since all requests are handled very quickly this should still scale up even for high numbers of requests, but let me know if the tool has become a bottleneck for you, I am still thinking about making request-handling multi-threaded too

O̲p̲e̲r̲a̲t̲i̲n̲g̲ ̲S̲y̲s̲t̲e̲m̲
This software has only been tested on Windows 10 Pro (64 bit). In theory it could also work on other Windows versions and using the Mono Framework even on MacOS or Linux, but this hasn't been tested and no guarantees whatsoever can be given.
Feel free to let me know what worked for you and what didn't.

P̲r̲e̲r̲e̲q̲u̲i̲s̲i̲t̲e̲s̲
- .NET Framework 4.5.2 (Windows)
- OBS 27.0.1 or higher
- obs-websocket 4.9.1 installed and enabled in OBS, get it from: https://github.com/Palakis/obs-websocket/releases/tag/4.9.1
- tools that can trigger HTTP requests, some examples it has been tested with: Node-RED, Chataigne, Stream Deck, various Browsers...

I̲n̲s̲t̲a̲l̲l̲a̲t̲i̲o̲n̲
- make sure the obs-websocket plug-in is enabled in OBS (Main menu -> Tools -> WebSockets Server Settings -> Enable WebSockets Server)
- extract all files from the ZIP to an empty folder
- make a copy of xObsSimpleHttpControl.conf.example and rename it to xObsSimpleHttpControl.conf
- open xObsSimpleHttpControl.conf with a text editor and configure everything to your needs
  - if you want to configure more than one OBS instance make a copy of the lines from <Instance> to </Instance> (including these lines)
- create a shortcut to xObsSimpleHttpControl.exe if you wish, e.g. on your desktop

U̲p̲d̲a̲t̲e̲
- overwrite all files in the existing folder with the files from the ZIP file
- open xObsSimpleHttpControl.conf.example with a text editor and check for potential new configuration settings, copy them over to xObsSimpleHttpControl.conf as needed

U̲s̲a̲g̲e̲
- run the OBS instance(s) xObsSimpleHttpControl is configured to connect to
- run xObsSimpleHttpControl.exe directly or the shortcut you have created during installation
  - a new tray icon will appear in the start menu tray area, this tool doesn't have a window
- xObsSimpleHttpControl will automatically try to connect to the configured OBS WebSocket address(es)
- in cases it loses connection to OBS it will automatically try to reconnect every few seconds
- to exit the program right click the tray icon and select "Exit" from the menu

In the file Examples.txt included in the download package you will find several examples that have already been successfully tested with the tool.


C̲h̲a̲n̲g̲e̲l̲o̲g̲

v0.1 Beta (2021-07-23):
- initial release as beta software only given to a select few testers

v1.0 (2021-07-26):
- initial public release
- added a feature to have webhook calls filtered for only specified events specified in a text file
- some code clean-up
