Change Stream Deck Profile From Macro

I'm very interested in this. It sounds as though it's quite different to the method I was already aware of. Please do elaborate if you don't mind. It goes without saying that I'd love to try your method if you would care to share it. :pray:t3:

Not to throw water on the proposal, as a matter of fact, I would love to be wrong, but from what I remember, the ability to bundle profiles with your app has always been there. I don't think you can manage those profiles from the StreamDeck UI.

I think this 'node' SDK is just a wrapper on their existing SDK.

That was my presumption too, and I'm hoping it was premature.

It's far from perfect but it works once you've set everything.

Here's how it works. Let's say you want to switch between three profiles that you've already created. You export each one inside the directory of the plugin "com.example.pluginame.sdPlugin"

then you add them at the root level of your plugin's manifest.json:

  "Profiles": [
    {
      "Name": "Profile1",
      "DeviceType": 7
    },
    {
      "Name": "Profile2",
      "DeviceType": 7
    },
    {
      "Name": "Profile3",
      "DeviceType": 7
    }
  ]

You build the plugin and then load it from the Stream Deck app.

In my case the Websocket server starts and is ready to receive messages from my CLI app when the plugin is loaded.

Once the WS server receives any message that triggers the profile switching Stream Deck will prompt you to install the bundled profiles.

Issue 1: You need to delete/remove the original profiles that have the same names otherwise the plugin will create duplicates. e.g. Profile 1 will become Profile 1 copy once it's installed.

Issue 2: If there's any mismatch between the profile names or any of the profiles doesn't exist it gets very buggy and you need to delete the profiles that cause the issues and restart the Stream Deck app and then add again the plugin.

Once the bundled profiles have been installed they act like regular profiles and you can edit them normally as long as you aren't rebuilding the plugin or you remove the plugin both of which will trigger issue 1 again. In that case you need to export the edited profiles and repeat the process once again.

Annoying for sure but workable as a compromise. The next SDK version will add the ability to switch to a specific page of a profile so we won't need as many profiles.

I'll try to share the code in a few days.

1 Like

Here's the code.

Let me know if something doesn't work or if the instructions aren't clear enough. Suggestions for improvements are welcome.

Bumping this old thread, I was looking for a way to do this and came across a pretty simple solution using the idea here: How to Select an Item in an App Menu Bar?

Just change the app in the script to "stream deck" and the typed text to the profile you want to select - you can now trigger profile changes via the stream deck menu dropdown.

All elgato really needs to do is make these profiles assignable to a hotkey via the menubar app, would solve a lot of problems!

1 Like

Thanks so much @method1 for your hint.
I was also looking for a solution to change profiles depending on a focused window of an application.
I tried it today with two windows and it worked surprisingly reliably. Here is the image of my macro (the application is internal so I had to blur some names):