WebSocket Server for Carl Davis's Stream Deck Applications

NOTE: I have built a few executables that may work for you. If they do, then you will not need to follow the instructions below. Simply unzip the file enter the folder "streamdeckserver" and run the "streamdeckserver" application in the folder.

You may get a warning from your anti-virus software warning you about running it. Simply set this as an exception or indicate to run anyway (depending on your software).

You will see the two messages that the server is running on ports. If you get an error, you will need to follow the instructions below to install and configure the Python server.

The precompiled executables are found HERE

To install the server for Python:

First step is to install Python from python.org There are versions for most systems--incuding Windows, Mac.

If Python is already install, ensure it is at least version 3.8 or later using the following command:

python --version

Note: tye python command might be different for some system. For example, it might be "python3" instead. Be sure to consult the Python documentation on installation and use for your Operating System (OS) to learn the appropriate command.

Next step is to install a module that allows for network communication. This uses a command

pip install websockets

Note: this might be a different command depending on how Python is installed. For example, on my Mac I need to use "pip3".

Next, create a new folder. Then, download the file HERE to the new folder created. Unzip the file and you will find a file calle "streamdeckserver.py". This is the server application.

Now we start the server using the following command:

python streamdeckserver.py

As before, you may need to use a different Python command depending on the installation.

I also provide an example web page that uses the same server to retrieve the value of the latest roll from the General Dice Roller (not macro runner) and display it (this happens every second). This is very useful for displaying it on your computer screen or within an application that supports embedding web pages (such as OBS stream software).

The example web page is Here.

About This Page

The Python server on this page is meant to support Stream Deck applications by Carl Davis. This allows the commands and dice rolls (depending on application) to be used externally. At the start of Stream Deck software, they connect via a web socket to 127.0.0.1:25555 (port is arbitrarily selected and, yes, should be configurable but isn't at this time) and begin sending the roll values when the buttons are pressed.

This page shows a simple Python based Web Socket server which receives this data and places it on the clipboard (thus can then be pasted in other applications) and also provides a server that allows another application to request the latest value though a websocket. It provides a server that the stream deck application sends the value to and a server that can handle requests for the current value (on port 127.0.0.1:25556). Excellent for applications that can access a web socted to retrieve information. I include a sample web page that retrieves vallue and displays it. Great example that can be used as is in OBS (using the web page display).