SAMMI Stream Deck Buttons and Automation

A collection of buttons for the SAMMI Stream Deck open-source software (GitHub / itch.io). Click on any button below to be taken to a text file with JSON that can be imported into SAMMI. The “More Info” link beneath each button will take you to a section that provides additional info about how the button works as well as screenshots and video.

Before you begin, I strongly recommend that if you use a bot or secondary account that functions as a bot on Twitch, you consider linking it as a streamer account and not a bot account. SAMMI seems to have removed the ability to set custom scopes, and this limits what a bot account can do (unless you know how to set scopes manually).

Twitch Buttons

Buttons that specifically interact with Twitch in some way. Due to a change to how Twitch will handle slash commands via IRC starting in February 2023, commands that previously used a slash (like /emoteonly) will now use Twitch's API to ensure they continue to work past that date.

OBS Buttons

Buttons that work directly between SAMMI and OBS and aren't tied to any specific streaming service.

Follower / Subscriber / Member Alerts

While these examples were built with Twitch in mind and in turn use Twitch commands and triggers, they can be converted to YouTube alerts by changing the trigger type in SAMMI. You can also use them as inspiration for other types of alerts – just because they're described as follower alerts doesn't mean you have to use them that way! Alerts and other notifications are fun ways to kit out your stream regardless of what platform you stream to.

The Laboratory

Weird and goofy ideas that don't quite fit anywhere else, or that might be useful for you to build off of to make your own stuff.

More Info About Each Button

Emergency Chat Lockdown

What Does It Do?
Immediately clears the chat, sets the chat to Emote Only Mode, and puts chat into Followers Only Mode with a 7-day minimum follow time. Clicking the button again while it’s on will turn off Emote Only Mode and Followers Only Mode.

There’s various ways of handling this that have been shared over the past couple years, so you may have a button for this already. However, since Twitch is removing chat commands via IRC in February 2023 (as of this writing), this button uses HTTP requests to make an API call, which will be the method supported by Twitch moving forward.

Things to Know
Additional instructions are included in the button itself, but you mostly just need to replace a few lines with your channel name.

This button uses an initial variable (accessible by right clicking the button and clicking “Edit Init Variables”) set within the button to ensure it works properly. If you change the “chatlockdown” value, it will affect the button’s ability to work correctly, so if you change the “chatlockdown” value, make sure you change the initial variable to match!

Chat Announcement

Update [Nov 5, 2022]: The announcement text can now be handled by Twitch: Send Announcement in SAMMI versions 2022.5.0 and above. If you want more customization options, you can still use the HTTP request method to set the color and further tweak message details.

What Does It Do?
The button will bring up two input boxes in SAMMI: One for a custom message, then a second one for the color. Once both the message and color have been set, it'll send an announcement to chat. This is effectively the same thing as using /announcement via the website version of Twitch, but can also be programmed with pre-written messages.

Things to Know
If you know you're always going to use a set color, you can replace the variable for it in the HTTP request command with the color you're going to use. You can also use variables to customize parts of the message with Wait for User Input. For example, you can create an announcement for going on break. Set a Wait for User Input command for the number of minutes you'll be away, save the variable as time, and add /$time$/ to the HTTP request. Now all you have to do is type in how many minutes you'll be gone!

Examples:
{“message”:”Snack time! Be back in /$time$/ minutes!”,”color”:”default”}
{“message”:”Stream's starting soon!”,”color”:”purple”}
{“message”:”Question of the day: /$message$/”,”color”:”blue”}

Commercial Break

What Does It Do?
Just what it says on the tin. Runs a commercial via the Twitch API.

Things to Know
Valid lengths for commercials are in 30-second increments – 30, 60, 90, 120, 150, and 180. Any other length will result in an error. You can get creative with this and combine this with other commands, too. For example, you can include an announcement to let viewers (and yourself) know a commercial break will be starting soon, and add a Wait Until Timeout command to have the commercial run after a set amount of time.

Sound Effects – Channel Points

What Does It Do?
Runs a sound locally via SAMMI based on a point redeem on Twitch.

Things to Know
SAMMI must have ownership of Twitch rewards, otherwise they will not trigger correctly.
You'll need to set up Channel Points redeems via SAMMI for redemption triggers to work properly. This isn't (currently) covered well in the online documentation, but it isn't too difficult to set up. From the main SAMMI window, go to Twitch Connections, then click Edit Scopes at the bottom. Make sure Manage Channel Point Rewards and View Channel Points Rewards are both checked. (It's generally accepted that you can turn on all scopes to make sure SAMMI does everything you want it to, but use your own discretion.)

From there, click the Edit button to the right of your account, then click Create Reward. If you want to carry over old rewards, click Dupe to create a version that SAMMI owns. This will carry over any title, description, color, cost, limits per user, limits per stream, and cooldown.

Create Clip

Update [Nov 5, 2022]: This is mostly covered by Twitch: Create Clip in SAMMI versions 2022.5.0 and above. If you want more customization options, you can still use the HTTP request method to account for stream delay.

What Does It Do?
Automatically creates a 30-second clip on Twitch via an HTTP request.

Things to Know
This will create a clip based on the last 30 seconds of real time – i.e., what you see, not what the viewers see with stream delay. You can add a has_delay Boolean of false if you know how to do so, but generally this shouldn't be necessary since the clip will be based off of what you're seeing in real time, not the delayed stream that viewers will see.

Basic Follow Alerts

Things to Know
This assumes you've already connected OBS to SAMMI via websocket. If you haven't done so yet, you can learn how via SAMMI's online documents. There are two options below as examples; one has the image and text fade in and out, while the other has the image and text slide in and out.

These are purely examples, so adjust these to your needs! Fading in and out is a bit easier to work with since you can move and resize the image and text anywhere you want without much fuss. A sliding image is a bit more dynamic, and requires that you know where it's going to be on screen to set the correct values. Mix it up however you want, and let you creativity flow.

Alerts are universal in terms of streaming platforms, since you're just using a trigger in SAMMI to make things happen. If you want to use these for YouTube (or any other supported sites in the future), all you need to do is change the Trigger type in SAMMI.

Advanced Follow Alert

What Does It Do?
This alert is extremely similar to one of the alerts I use on my own streams (as of this writing) with the serial numbers filed off. To really explain all the details I'd have to give you all the files and my OBS layouts and, well, that's not happening, so hopefully between the video and the comments included in the button it makes sense. I also included a little bit about pulling the most recent follower name from Twitch. It's off by default.

Things to Know
Similar to the basic follow alerts, this is meant to be an example. I use it on my stream, but don't let that limit you to copying what I do. The only significant difference between this and the basic follow alerts is that there are more parts to it.

Random Follow Alerts

What Does It Do?
Triggers a follow alert based on your preferred method – either via selecting and pressing and triggering a button from an array (Random Follow Alert – Array) or by changing a piece of media in SAMMI before displaying it (Random Follow Alert – Command).


Things to Know
Depending on your preferred method, you can use Create Array, Array Insert, and Array Random to tell SAMMI to pull from a set of values that can then be assigned to press a related button or run a set of commands, or you can use the Random command in SAMMI to roll a random number and assign that to something like a variable, a set of images, a video, etc. I strongly recommend the array option if you're creating custom alerts. You can assign each one to a different button in SAMMI and, once it's set up, all you need to do to add on to it in the future is add another Array Insert for any additional buttons you add.

If you ONLY want the image, video, etc. to change and nothing else, you can use the Random command – but keep in mind that all files will need to be the exact same file type and have to be sequentially numbered (i.e. 1, 2, 3, 4…).

Dynamic Subscriber Alert

What Does It Do?
Uses a set of two buttons to pull subscriber info from Twitch when there's a new subscription, then display that information as part of a notification on-stream.


Things to Know
This builds on how to make follow alerts and alerts in general, so if you're not familiar with commands in SAMMI, I recommend taking a look at the buttons for follow alerts first! Be sure to grab and import both buttons, as they work together as a set.

The first button includes a trigger when there's a new subscriber, which has SAMMI fetch data from Twitch on that subscriber's username. This first “trigger” button then presses a second button that plays out whatever commands you want to happen on stream. In the example, it changes a text source to that username and also sends a message in chat that includes the username. Just like with Random Follow Alert (Array), you can have the trigger button press another button at random. You can ALSO adjust the trigger in SAMMI so that it only happens in certain situations, or you can have specific alerts for subscribers based on if it was a normal sub, a gift, an anonymous gift, based on tier, Prime, community gifts, and even month range. Special thanks to a_bat on YouTube, whose videos I stumbled across and were super helpful in explaining how triggers, arrays, and pulling info from other buttons works.

Sound Boards and Sound Effects

What Does It Do?
Plays sound effects. I think this was a gimme.


Things to Know
Setting up a sound board just for you is pretty simple – all you really need is a Play Sound Effect command in a button, and you're done. Each time you press the button, that sound will play.

If you want to set one up with chat commands, you can use a chat trigger in SAMMI to look for specific words, such as !failhorn or !waow, and play a sound based on that.

It's worth keeping in mind that, if you expect a LOT of sounds to play, you may want to group them via Save Sound ID or include a Stop Sound Effect command with Sound ID as “all” to stop any currently playing sounds before a new one starts.

Pop-up Image in Random Location

What Does It Do?
Causes an image to fade in at a random location while moving upwards slightly, then fade out. Also, optionally, plays a sound effect.


Things to Know
If your canvas size in OBS is different than 1920 x 1080 – i.e. 1280 x 720 – you'll need to adjust the settings of this button.

This will likely need a bit of experimentation on your part depending on the size of the image you're using. The button uses two variables – xpos and ypos – to determine a random value for where the image will show up based on the X (horizontal) and Y (vertical) position in OBS.

The Endless Twitch Sub Goal

What Does It Do?
Uses a trigger to pull your current number of subscribers on Twitch when SAMMI starts up as well as when you get a new subscriber and saves it as a variable (substatus), then creates a second variable that is (Your Current Number of Subscribers + 1) and saves that as a variable (subgoal). A text source is then updated to show your Sub Goal as substatus / subgoal.


Things to Know
You either die a hero or live long enough to become a villain.

FAQ

How to Add a Button to SAMMI

SAMMI has the ability to import / export any button as JSON (JavaScript Object Notation). For our purposes, that means it converts all the different commands, settings, and even the button appearance that you see in SAMMI into a text string, and that text string can easily be copied and pasted somewhere else. When you click on one of the buttons above, all you'll need to do is copy the plain text that pops up. After that, in SAMMI, right click on any open space in any deck in SAMMI and select “Import from JSON”. That’s it!

General Things to Know

Please test these buttons off-stream to make sure they work! I’ve put in every effort to explain the different steps and options within each one, but I’m only human. Different streaming setups call for different settings, and there’s rarely a one-size-fits-all solution. SAMMI is endlessly customizable, so think of these as templates to use, adapt, and learn from, and don’t be afraid to experiment a bit.

If you’re totally, completely new to SAMMI, I recommend reading over the documentation, particularly the Commands, Triggers, and Variables sections to understand how those work. Understanding how commands work in particular is incredibly important, as those are the backbone of how SAMMI makes things happen.

Okay but why go through all the trouble to do this?
I want other people to be able to let their creativity flow and not be restrained by the limited resources that online sites that handle alerts and sound effects offer.
When I first started using SAMMI, I really wanted to create unique animations and other stream alerts that weren't possible with web-based solutions like StreamLabs and StreamElements. After a lot of searches that resulted in how to make a random image display on stream – but not make it go away – and, for some reason, too many tutorials about twerking Thanos, I realized that no resource out there could really teach me this and that I'd have to learn a lot of it myself. And… so I did.
I used a variety of different sources, including information provided by the SAMMI devs and a_bat on YouTube, whose tutorials I stumbled across at random and were incredibly helpful in teaching me how arrays work. I hope you find the information here useful to really make your own streams shine, too.