AmpliGame D6 and Streamlabs

I recently stumbled across a number of Reddit posts/Youtube comments asking how to switch scenes on Streamlabs using the Fifine AmpliGame D6 controller, so I decided to investigate...

Ampligame D6

Background

It turns out the AmpliGame D6 does include a Streamlabs plugin:

D6StreamlabsPlugin

But you have to jump through hoops to get it to connect and even if you get it working (I had problems authorizing), it's not obvious how to switch scenes with it, if it's even possible.


Solution

So how else can we control Streamlabs from the AmpliGame D6? One option is via a CLI but we need a way to run it. The D6 does include a feature Toolbox > Open which allows a user to load an application with arguments. This sounds great but in my testing, it opens a CMD window which threw me out of game, so no good.

So how else can we run a CLI?


ScriptDeck

Enter ScriptDeck, a wonderful plugin written by the StartAutomating guys. It was written for the Elgato StreamDeck but can be installed on the AmpliGame D6 by following these instructions by TheBeardOfKnowledge.

To summarise:

Note, at the time of writing this still works for the ScriptDeck plugin although it no longer works for many other plugins.

When downloading the ScriptDeck plugin you'll notice there are two versions, one named WindowsScriptDeck and the other ScriptDeck. The former works with Powershell 5 and the latter with Powershell 7, so make sure you install the correct one. Windows by default has Powershell 5 installed but Powershell 7 is easy enough to install.

Now that we have a way to run our CLI, we need a way to install the CLI and make it discoverable.


SLOBS-CLI

slobs-cli is a python CLI, so you'll need python 3.11 or greater at the very least. Thankfully the guys at Astral have created uv a python package manager which makes installing python CLIs a cinch. There are several ways to install uv on Windows so select any one of them from their installation instructions.

Once that's done, installing the slobs-cli is a one-liner:

uv tool install slobs-cli

In order to communicate with Streamlabs the slobs-cli expects to know the websocket connection information. In recent versions of Streamlabs you'll find the information in Settings > Mobile > Third Party Connections:

Streamlabs Remote Conn

Once you have the ip, port and websocket token it's time to test. First open a Powershell session in Windows and run:

slobs-cli --domain localhost --port 59650 --token <API token> scene list

You should be met with a response like:

slobs-cli scene list

This is great, it's working! However, passing the connection info on every invocation is cumbersome. A better way is to use environment variables. The way to manage this in Powershell is to store them in a Powershell profile, so in your Powershell session enter $profile and open the file (or create if it doesn't exist). Then in your Microsoft.PowerShell_profile.ps1 file enter the following:

# slobs-cli
$Env:SLOBS_DOMAIN = "localhost"
$Env:SLOBS_PORT = "59650"
$Env:SLOBS_TOKEN = <API Token>

To be sure this works, restart your Powershell session then retry the command above but without passing the connection flags:

slobs-cli scene list


Running slobs-cli on the D6

Now we have a way to run our CLI and we have the CLI installed, we just need to run it from the D6 controller!

Expand the ScriptDeck plugin in the Fifine Control Deck software and drag-n-drop Powershell Script onto a button. Then in When Presssed just enter your slobs-cli command like so:

D6Software-Slobs-CLI

Fingers crossed, press the button on your D6 and watch the scene switch. Voilà!

You can do a lot more than just scene switching with slobs-cli so check the README for a full list of available commands.


Conclusion

If you're unfamiliar with using python or CLIs in general then this process might seem daunting but if you follow the steps carefully it shouldn't take long to set up.

Furthermore, you can now control other software using CLIs, for example, OBS, Voicemeeter, Meld Studio etc.

Subscribe to this blog's RSS feed