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.