KM macro to switch Stream Deck Profiles works but is slow

Hello @griffman @Nige_S @Airy

I can better describe the problem: when the computer display goes to sleep, so does the Stream Deck mobile app which is difficult to wake up.

I asked the question on the Reddit shortcuts site and got these answers

  • there is no provision to close apps with shortcuts. It's cagtegorically against apple rules
  • one member suggested this solution which works very well:
    go to Home Screen" action followed by an "open app" action

If it's true that doing a Home/Open "works very well" then I guess you have solved your problem. Or am I misunderstanding you?

I'm surprised that that works because earlier you said, "I have to quit and restart the iPad Stream Deck app" and that's not the same thing as doing a Home/Open.

You also said, "the Stream Deck mobile app is difficult to wake up." I have the Stream Deck app and it's not difficult to wake up. I'm not even sure how to interpret the word "difficult." If it's not working, then what exactly is the problem? I'm unable to guess.

1 Like

does not work = it freezes
yes, the shortcut works. recommended by reddit, even though it is not logical

I may be missing an important part of this discussion, but this is what KM Link solves.

1 Like

When he said "KM Link" I interpreted it to mean the "KM Automation" in the SD app, and he didn't disagree. Nowhere in the KM Automation is a reference to anything in a KM macro. All you can find in there is a button number which a KM macro must be edited to correspond to.

If these are not the same thing, please tell me what you mean by that term.

the question (for me) is how to batch copy multiple macros to multiple buttons instead of assigning them one by one, for example I have about 30 to do in the next day.

1 Like

very interesting. thank you

Long story short, you should use KM Link at all times unless you want to set the button icon programmatically from KM.

2 Likes

great. I won^t persue the native plugin. thank you

As I understand it (@noisneil?) you can use both plugins at the same time, setting some buttons in a profile to use the native plugin and others to use KM Link. So use the one you need to do what you want to do.

One day I'll have a better look at this -- TBH, most of my buttons are using URL triggers!

1 Like

Yes, exactly. I use both because I do like the icon to be dynamic for some stuff. ("Is my mix currently in mono?", for example.)

It used to be that KM Link was no good for double-presses but I found a way around that...

Honestly, do yourself a favour and start using KM Link. :+1:t3:

2 Likes

Well, thanks for educating me. I didn't know about that.

The problem is that I do set the button icon programatically from KM, and that's very important to me, but it's just to change the button's background colour, so the user knows if the button means "on" (green) or "off" (red.) I will look into the KM Link method to see if I can use it to get the same result.

Would you know if there is a way to copy only the formatting of a button (text font and size, color of text and background) from one button to the other, without copying the action. The equivalent of copy paste format only. It's a common issue with me. thank you

I see no feature in any Stream Deck plug-in that lets you choose the text font, size, colour or background colour for a specific button. Which plug-in are you talking about? Those attributes are global. It even says "Global" in the screen shot below. If you tell me which plug-in allows you to have different fonts for different buttons, I may be able to help you.

In theory, you could emulate text font, size, colour and background colour using a custom image file for each button. That's something I wouldn't mind doing at some point in the future, because I find the current font system too restricting.

1 Like

As far as icon setting, no. You'll need to use the native action.

Unfortunately no, but you can try the global settings, as @Airy pointed out.

There's a little formatting button next to the button settings.

Jumping back a bit...

In typical ChatGPT fashion, it makes sense but is nonsense :wink: It might work if Stream Deck allowed you to switch profiles this way -- but SD doesn't, so it won't.

From a quick scan of the SD SDK -- you can't change profiles programmatically. You can write yourself a plugin that has its own "pages" of buttons, similar to profiles, and switch between those -- but everything has to be coded in the plugin's payload.

There is a way of changing profiles programmatically, but it's probably even slower than what you are doing now and I've only done brief testing so there may be issues. But, basically:

  1. Quit the Stream Deck app
  2. Edit ~/Library/com.elgato.StreamDeck.plist -- you want to change that device's ESDProfilesPreferred entry to the UUID of the profile you want to use
  3. Re-launch the Stream Deck app

Example of the change on my machine:

	<key>Devices</key>
	<dict>
		<key>@(1)[4057/128/DL15L2A02442]</key>
		<dict>
			<key>DeviceName</key>
			<string>Stream Deck</string>
			<key>ESDProfilesInfo</key>
			<dict>
				<key>ESDProfilesPreferred</key>
				<string>d44d93fb-73dd-4709-93ec-f1bbd9fa7eb2</string>
			</dict>
		</dict>
		<key>LastUsedNameIndex</key>
		<integer>47</integer>
		<key>PreferredDevice</key>
		<string>@@(1)[4057/128/DL15L2A02442]</string>
	</dict>

to...

	<key>Devices</key>
	<dict>
		<key>@(1)[4057/128/DL15L2A02442]</key>
		<dict>
			<key>DeviceName</key>
			<string>Stream Deck</string>
			<key>ESDProfilesInfo</key>
			<dict>
				<key>ESDProfilesPreferred</key>
				<string>b07e9d2c-1041-4bc2-91fe-91ba09131595</string>
			</dict>
		</dict>
		<key>LastUsedNameIndex</key>
		<integer>47</integer>
		<key>PreferredDevice</key>
		<string>@@(1)[4057/128/DL15L2A02442]</string>
	</dict>

That edit could be programmed if you collected all your profile UUIDs and presented them, with their "friendly names", in a KM "Prompt with List" action. With multiple devices you'd probably have to track the device ID as well (I'm guessing each device will have its own dictionary entry). But don't even think about automating this until you've tried it manually and checked that a) it works, and b) is less annoying than your current method of switching!

1 Like

thanks very much. This approach would be a bit much and if I bungle, as disaster.

I was wrong about the fact that there were individual font settings. I've been using the app for about 6 months and never spotted that.

Nevertheless, it would be possible to use Findimage and OCR inside KM to read the settings from an individual entry! Then it could also use the mouse to copy the settings to another entry.

I'm not sure I can see the benefit to doing this, so I'm not really inclined to code it.

1 Like

I think it might be easier to copy the button and then change the icon text and select a new macro (in the case of KM Link). The text formatting will be retained, and this seems simpler than messing around with that little fiddly format window.

1 Like