SinusBot
Included with Macro DeckControl the music of your SinusBot instances and show what they play on your deck.
Two Music Player widgets playing a track, one in the Full cover style and one in the Small cover style, both with the SinusBot name and logo in the header
- Play, pause, skip and seek on any SinusBot instance
- Set the volume, shuffle and repeat
- Play a track from the bot's library
- Shows the playing track in the Music Player widget
- Add as many bot instances as you like
SinusBot is a music bot for TeamSpeak and Discord that you run on your own server. The SinusBot integration connects Macro Deck to the SinusBot web interface, so you can control what a bot instance plays and see the current track on your deck. It works with any SinusBot that Macro Deck can reach over the network, on the same computer, in your local network or on a server.
What you can do
- Play, pause, toggle, skip to the next or previous track and jump to a position in the current track.
- Set the volume, raise or lower it, turn shuffle on or off and turn repeat on or off.
- Play a specific track from the bot's library with Play Track. Leave the track empty to choose one when you press the button.
- Show the playing track, artist and cover in Macro Deck's Music Player widget, and use the bot's track, position and volume in labels through variables.
Some example setups:
- A row of buttons with Previous Track, Toggle Play/Pause and Next Track for the bot in your TeamSpeak channel. The play button shows whether the bot is playing.
- A slider bound to the bot's volume variable,
sinusbot_<instance>_volume, so you can turn the music down while you talk. - A Music Player widget for each bot, next to buttons whose color follows the cover through the
music_player_<player>_album_colorvariable.
Multiple bots and how it behaves
Each SinusBot instance you want to control is one configuration. You can add as many as you like, also instances on different servers, and pick the instance in the Player field of each action. When you leave Player empty, the action controls the first one. Each configuration gets its own set of variables, named after the configuration name, such as sinusbot_<instance>_volume.
Macro Deck checks the connection when you set up a configuration and loads the instances the bot has. While it runs, it reads the playback state regularly. When the bot cannot be reached for a short moment, the deck keeps showing the last track; when it stays unreachable, the sinusbot_<instance>_is_connected variable reads false and actions do nothing until the bot answers again.
What you need
- A running SinusBot whose web interface Macro Deck can reach, for example
http://your-bot:8087. - A SinusBot user name and password.
- At least one instance created in the SinusBot web interface.
Set it up
Step 1: Check the SinusBot web interface
Open the SinusBot web interface in a browser and sign in. Note the address including the port, for example
http://192.168.1.20:8087, and make sure there is at least one instance.Step 2: Open the SinusBot integration
In Macro Deck, click Integrations in the sidebar and click SinusBot. On the Overview tab, click Add configuration in the Configuration section. Turning on the switch at the top right opens the same dialog, and the integration is turned on once the setup is done.
Step 3: Enter the server and sign-in
In the Connect SinusBot dialog, enter:
- Server URL: the address of the SinusBot web interface, including the port.
- Username and Password: the account you sign in to SinusBot with.
When you click Continue, Macro Deck tests the connection and loads the instances.
Step 4: Select the instance
On Select Instance, choose the bot instance under Instance and click Continue. The configuration is saved as SinusBot with the instance name in parentheses. Repeat these steps for every other instance you want to control.
Step 5: Add an action to a button
On the Deck page, click a button. The deck must be unlocked: when the Lock button shows at the top right, it is. The editor opens with Short Press selected. Click + Add action, select SinusBot on the left of the Add action dialog, pick Toggle Play/Pause and choose the instance under Player.
Step 6: Press the button
Press the button on your deck. The bot starts or pauses playback, and the button shows the current state. A Music Player widget set to the instance shows the playing track.
Actions13
Put these on a button or run them from a flow.
- Play
- Resumes playback.
- Pause
- Pauses playback.
- Toggle Play/Pause
- Switches between play and pause, and shows the current state on the button.
- Next Track
- Skips to the next track.
- Previous Track
- Skips to the previous track.
- Refresh State
- Reads the now-playing state again right away.
- Set Volume
- Sets the playback volume (0 to 100%).
- Volume Up
- Raises the playback volume by 10%.
- Volume Down
- Lowers the playback volume by 10%.
- Seek
- Jumps to a position in the current track, in seconds.
- Toggle Shuffle
- Toggles shuffle, or turns it on or off.
- Set Repeat Mode
- Turns repeat on or off. SinusBot has one repeat mode, so both repeat options turn it on.
- Play Track
- Plays a track from the bot's library. Leave it empty to pick a track when you press the button.
Triggers7
A button or flow can react to these events.
- Track Changed
- A different track started playing (under Music Player).
- Playback Started
- Playback started or resumed (under Music Player).
- Playback Paused
- Playback was paused (under Music Player).
- Playback Stopped
- Playback stopped (under Music Player).
- Volume Changed
- The bot's volume changed, with the new and the previous value (under Music Player).
- Player Connected
- The bot instance became reachable (under Music Player).
- Player Disconnected
- The bot instance is no longer reachable (under Music Player).
Variables8
Show these values on buttons and widgets, or use them in conditions.
sinusbot_<instance>_current_track_name,sinusbot_<instance>_current_artist,sinusbot_<instance>_current_album- The current track and its artist. SinusBot does not report an album, so
sinusbot_<instance>_current_albumstays empty. sinusbot_<instance>_playback_state,sinusbot_<instance>_is_playing- Whether the bot is playing, paused or stopped.
sinusbot_<instance>_volume- The playback volume in percent. You can also set it, for example with a slider.
sinusbot_<instance>_track_duration,sinusbot_<instance>_current_position,sinusbot_<instance>_progress_percentage- The length of the track and the position in seconds, and the progress in percent. You can set the position to seek.
sinusbot_<instance>_album_art_url- The address of the current cover.
sinusbot_<instance>_device_name- The name of the bot instance.
sinusbot_<instance>_shuffle_enabled,sinusbot_<instance>_repeat_mode- Whether shuffle and repeat are on.
sinusbot_<instance>_is_connected- Whether Macro Deck can reach the bot instance.
Frequently asked questions
Can I control more than one bot?
Yes. Add one configuration per SinusBot instance, also on different servers. Each action has a Player field for the instance it controls, and each configuration has its own variables.
Does SinusBot have to run on the same computer?
No. Macro Deck talks to the SinusBot web interface over the network, so the bot can run on a server or another computer, as long as Macro Deck can reach its address.
Setup says no instances were found. What can I do?
The account has no instance it can use. Create an instance in the SinusBot web interface first, then set up the configuration again.
What happens when the bot goes offline?
A short interruption does not clear the deck: it keeps the last track for a moment. When the bot stays unreachable, the sinusbot_<instance>_is_connected variable reads false, and Macro Deck keeps trying to reach it.
Where is my password stored?
The password is stored encrypted on your computer and only used to sign in to your SinusBot.
More in Chat and voice
Discord
Included with Macro DeckMute, deafen, join voice channels, change voice settings and post webhook messages in Discord from your deck.
Discord Webhooks
Included with Macro DeckPost rich messages with embeds and mentions to Discord channels through webhooks, with a live preview.