Controlling Stagetimer via Companion for Stream Deck - Complete Guide

Module Version v2.8.0 GitHub Repository Bitfocus Companion
Companion controlling Stagetimer
Companion controlling Stagetimer

Companion drives a Stream Deck and controls Stagetimer through the Stagetimer module. The API needs a Pro or Premium plan.

Prefer a video?

Matthew Hand describes how to use Stagetimer with Bitfocus Companion (26 min)

Using Bitfocus Companion with Stagetimer.io

Getting Started

  1. Get an Elgato Stream Deck, a keypad with programmable LCD buttons.

    Stream Deck
    Elgato Stream Deck
  2. Download and launch the Companion app.

  3. In the GUI, add the “stagetimer.io: Stagetimer API” connection.

    Add Connection
    Adding the Stagetimer API connection in the Companion app
  4. The Companion module can control one Stagetimer room. Open the desired room to get its Room ID and API key.

    Room ID and API Key
    Retrieving the Room ID and API key
    API Key
    API key location
  5. Enter the Room ID and API key into the Stagetimer connection in Companion. Click Save. The status turns into a green checkmark.

    Status Check
    Stagetimer connection status check

    Note: The Companion module can also be used with the Stagetimer desktop app. In this scenario, you need to adjust the API URL to connect with your desktop app (explained later).

  6. Switch to the “Buttons” tab in Companion, open “Presets” → “Stagetimer API” → “Transport”, and drag the “Start/Stop” button onto a Stream Deck field.

    Button Addition
    Adding the “Start/Stop” button
    Stream Deck
    The “Start/Stop” button visible on the Stream Deck

Download Page Template

Download the Stagetimer page template and import it into Companion. You get a full page of buttons, ready to use. The page has the countdown, a clock, the current timer with its speaker and group, the next timer with its speaker, transport controls, time adjustments, flash, blackout, message toggles and the connection status. It needs Companion 5.0 or newer.

Stagetimer button page template
The Stagetimer page template in Companion

Set up the Stagetimer connection first, as described in Getting Started.

Stagetimer page template
stagetimer-companion-page.companionconfig
Download

Step 1: In Companion, open the Import / Export tab and click Import configuration. Select the downloaded file.

Import configuration
The Import / Export tab in the Companion app

Step 2: Select the destination page and your Stagetimer connection. Then click Import.

Using the Companion Module with the Desktop App

The module also works with the desktop app. The API needs a paid plan; every paid plan includes an offline license key.

Stagetimer desktop app
Stagetimer desktop app interface
  1. Run the desktop app on an IP address Companion can reach: 127.0.0.1 on the same computer, your network IP on another.

  2. Open the room and click Menu → API to get the room ID, API key and API URL.

    API details
    API details found under “Menu” -> “API” in the desktop app
  3. Paste them into the Stagetimer connection in Companion and click Save. The status turns green.

    Companion module configuration
    Update Companion module configuration

Control Multiple Rooms in Companion

Switching rooms dynamically

The Utility: Switch room action changes the active room of a connection, so one button layout serves every room.

Requirements:

  • A team API key, which has access to all rooms in your team.

Add the Utility: Switch room action to a button and enter the Room ID of the target room. The Room ID field takes variables. The module reconnects to the new room and every variable and feedback updates.

You can check which room is currently active using the $(stagetimer:roomId) variable.

Using multiple connections

To control several rooms at once, set up one connection per room:

  1. In the Connections tab, locate your existing Stagetimer connection.

  2. Change the label of your first Stagetimer connection to something distinctive (e.g., stagetimer-1). This helps differentiate between multiple rooms.

    Connection Label
    Change the label of your first Stagetimer connection
  3. Click the “Add connection” button and search for “stagetimer” to add another Stagetimer API module.

  4. Configure the second connection with:

    • A unique label (e.g., stagetimer-2)
    • The Room ID for your second room
    • The corresponding API key
    Multiple Connections
    Setting up multiple Stagetimer connections
  5. Once both connections are set up, you can add buttons for either room to your Stream Deck. The presets section will now show options for both connections.

    Multi Connection Presets
    Presets for multiple rooms
  6. When setting up button text, you can use variables specific to each connection by referencing the connection label:

    • For room 1: $(stagetimer-1:currentTimerName)
    • For room 2: $(stagetimer-2:currentTimerName)
    Button Configuration
    Configuring buttons for multiple rooms

Reference

The Stagetimer module provides presets, actions, variables and feedbacks. The preset buttons show how to combine them in your own buttons.

Presets

Transport presets

ButtonNameDescription
Start/StopToggle the timer between start and stop, the button turns red when the timer is started.
StartStart the timer, the button turns red when the timer is started.
StopStop or pause the timer, the button turns red when the timer is paused.
ResetReset the selected timer to its original duration.
PreviousResets the timer or selects the previous timer if it already is reset. Has an option to autostart the previous timer.
NextSelects the next timer. Has an option to autostart the next timer.
Jump back 10sJump the playhead of the current timer 10 seconds back. The duration does not change. It cannot jump back past the start of the timer. If it would, the timer does not move.
Jump forward 10sJump the playhead of the current timer 10 seconds forward. The duration does not change.
+5minAdd 5 minutes to the current timer.
+1minAdd 1 minute to the current timer.
+30sAdd 30 seconds to the current timer.
-5minSubtract 5 minutes from the current timer.
-1minSubtract 1 minute from the current timer.
-30sSubtract 30 seconds from the current timer.

Viewer presets

ButtonNameDescription
Time remainingShows a live countdown of the full current timer including wrap-up colors.
Time remaining (hours)Shows only the hours of the current timer including wrap-up colors.
Time remaining (minutes)Shows only the minutes of the current timer including wrap-up colors.
Time remaining (seconds)Shows only the seconds of the current timer including wrap-up colors.
Wrap-up indicatorIndicates the current wrap-up state: “On time”, “Wrap up..”, “Wrap up!”, or “Over time!”
Timer appearanceDefines how the timer is displayed. Read more: Timer Appearances
Current timerShows the title of the current timer.
Current speakerShows the speaker of the current timer.
Current timer labelsShows the labels of the current timer.
Next timer labelsShows the labels of the next timer.
Current groupShows the group of the current timer, in the group color. Shows “No group” outside a group.
Next groupShows the group of the next timer, in the group color. Shows “No next group” outside a group.
TimezoneShows the timezone setting of the room.
Time of dayShows the time of day in the room timezone and time of day format.
Flash 3 timesTriggers the timer to flash 3 times. Option to flash between 1 and 99 times.
Stop flashingStops the timer from flashing.
Toggle blackout modeToggles blackout mode on or off, hiding the timer.
Toggle ON AIRToggles ON AIR mode on or off.

Timer presets

ButtonNameDescription
ResetReset to the first timer.
Option to target any timer by its number in the controller or its timer ID.
Start timerStart the second timer.
Option to target any timer by its number in the controller or its timer ID.
Stop timerStop the second timer.
Option to target any timer by its number in the controller or its timer ID.
Create timerCreate a new timer.
Options to configure the timer before it is created.

Message presets

ButtonNameDescription
Toggle messageToggle a message.
Option to target any message indicated by index (starting from 1) or message ID.
Toggle message fullscreenToggle a message in fullscreen. The message covers all other output elements.
Show messageShow a message.
Option to target any message indicated by index (starting from 1) or message ID.
Hide messageHide a message.
Option to target any message indicated by index (starting from 1) or message ID. Otherwise hides the active message.
Create messageCreate a new message.
Options to configure the message before it is created.

Actions

ActionDescription
Message: ShowShow a message in the room. Enable “Fullscreen” to cover all other output elements.
Message: HideHide a message in the room
Message: Toggle visibilityShow/hide a message in the room. When showing, enable “Fullscreen” to cover all other output elements.
Message: Create new messageCreate a new message in the room
Timer: StartStart or resume a specific timer in the room
Timer: StopStop a specific timer in the room
Timer: Toggle playbackToggle (start/stop) a specific timer in the room
Timer: ResetReset a specific timer to the original duration
Timer: Create new timerCreate a new timer in the room
Timer: Update timerUpdate an existing timer in the room
Transport: StartStart or resume the selected timer in the room
Transport: StopStop the selected timer in the room
Transport: Start/stopStart/stop the selected timer in the room
Transport: ResetReset or restart the currently selected timer
Transport: NextSelect the next timer in the list
Transport: PreviousReset the selected timer if running, otherwise select the previous timer. Optionally auto-start.
Transport: Add timeAdd an amount of time to the selected timer in the room
Transport: Subtract timeSubtract an amount of time from the selected timer in the room
Transport: Jump playheadJump the playhead of the selected timer forward or back. The duration does not change. A positive number of milliseconds jumps forward, a negative number jumps back. It cannot jump back past the start of the timer. If it would, the timer does not move.
Viewer: Enable blackout modeEnable blackout mode in the room
Viewer: Disable blackout modeDisable blackout mode in the room
Viewer: Toggle blackout modeToggle (enable/disable) blackout mode in the room
Viewer: Enable focus mode (legacy)Legacy: prefer “Message: Show” with the “Fullscreen” option.
Viewer: Disable focus mode (legacy)Legacy: prefer “Message: Hide”.
Viewer: Toggle focus mode (legacy)Legacy: prefer “Message: Show” with the “Fullscreen” option.
Viewer: Enable ON AIREnable ON AIR mode in the room
Viewer: Disable ON AIRDisable ON AIR mode in the room
Viewer: Toggle ON AIRToggle (enable/disable) ON AIR mode in the room
Viewer: Flash the screenFlashes the screen in the room. Can be used to grab the attention of speakers.
Viewer: Stop flashingStops any flashing timers and messages on the screen.
Utility: Switch roomChange the active room. Requires a team API key. The module will reconnect to the new room. Supports variables.
Utility: Get roomGet the status of the room
Utility: Get statusGet the playback status of the room
Utility: Test authTest connection and authentication

Targeting a specific timer or message

The Timer: * and Message: * actions target either an index or an ID. A timer index is the number the controller shows. In a group, the API takes the number with a dot, like 2.1. A message index is the position in the list, starting at 1. Use one or the other, not both — if both fields are filled, the ID wins. Leave the index blank when targeting by ID.

Both fields accept variables, so you can act on whatever is currently on screen. For example, set Timer ID to $(stagetimer:currentTimerId) and clear the Timer index to reset the currently selected timer. To do the same without any variables, use Transport: Reset, which always applies to the selected timer.

Variables

Room

VariableDescription
$(stagetimer:roomId)Room ID
$(stagetimer:roomName)Room name
$(stagetimer:roomTimezone)Room timezone (Docs)
$(stagetimer:timeOfDay)Time of day in the room timezone and time of day format
$(stagetimer:connected)true while the module is connected to Stagetimer, else false. The module tries again until the connection is back

Playback Snapshot

The time display matches the Stagetimer output, taking timer appearance into account. It also uses the room’s overtime prefix and overtime behavior: with “stop” it stays at zero, with “hide” it is empty. The hours, minutes and seconds variables always have two digits. In overtime, the hours variable has the sign. The remaining time variables are always strictly a countdown and run into overtime. They use the overtime prefix too.

VariableDescription
$(stagetimer:timeDisplay)Time display
$(stagetimer:timeDisplayHours)Time display (hours)
$(stagetimer:timeDisplayMinutes)Time display (minutes)
$(stagetimer:timeDisplaySeconds)Time display (seconds)
$(stagetimer:currentTimerRemaining)Timer remaining time
$(stagetimer:currentTimerRemainingAsMs)Timer remaining time (ms)
$(stagetimer:currentTimerRemainingHours)Timer remaining time (hours)
$(stagetimer:currentTimerRemainingMinutes)Timer remaining time (minutes)
$(stagetimer:currentTimerRemainingSeconds)Timer remaining time (seconds)
$(stagetimer:running)true while the timer runs, else false
$(stagetimer:lastStartedAt)Time of the last fresh timer start (Unix time in ms)

A fresh start changes lastStartedAt. A resume after a pause does not change it. To run a button action at the moment a timer starts, make a Companion trigger with the event “On variable change” for $(stagetimer:lastStartedAt). When the trigger runs, the current timer variables already show the timer that started, for example $(stagetimer:currentTimerField.vt). The module ignores a start that is older than 2 seconds when it gets it, for example after a reconnect. This prevents a late cue.

Current Timer

The timer currently selected in the room. These variables are empty while no timer is selected.

VariableDescription
$(stagetimer:currentTimerId)Timer ID
$(stagetimer:currentTimerName)Timer name
$(stagetimer:currentTimerIndex)Timer number as the controller shows it, for example 2.1 in a group
$(stagetimer:currentTimerGroup)Title of the group that holds the timer. Empty outside a group
$(stagetimer:currentTimerGroupId)ID of that group. A trigger on this variable runs when the show enters another group
$(stagetimer:currentTimerGroupColor)Color of that group as hex, for example #7c3aed
$(stagetimer:currentTimerSpeaker)Timer speaker
$(stagetimer:currentTimerNotes)Timer notes
$(stagetimer:currentTimerAppearance)Timer appearance (Docs)
$(stagetimer:currentTimerStartTime)Hard start time (room time of day format, Docs)
$(stagetimer:currentTimerStartTime12h)Hard start time (12h format, Docs)
$(stagetimer:currentTimerStartTime24h)Hard start time (24h format, Docs)
$(stagetimer:currentTimerDuration)Timer duration
$(stagetimer:currentTimerDurationAsMs)Timer duration (ms)
$(stagetimer:currentTimerLabels)Timer labels (comma-separated)
$(stagetimer:currentTimerLabel1)Timer label 1
$(stagetimer:currentTimerLabel2)Timer label 2
$(stagetimer:currentTimerLabel3)Timer label 3

Next Timer

The timer that follows the current one. These variables are empty when the last timer is selected, so $(stagetimer:nextTimerId) can be used to detect the end of the rundown.

VariableDescription
$(stagetimer:nextTimerId)Timer ID
$(stagetimer:nextTimerName)Timer name
$(stagetimer:nextTimerIndex)Timer number as the controller shows it, for example 2.1 in a group
$(stagetimer:nextTimerGroup)Title of the group that holds the timer. Empty outside a group
$(stagetimer:nextTimerGroupId)ID of that group. A trigger on this variable runs when the show enters another group
$(stagetimer:nextTimerGroupColor)Color of that group as hex, for example #7c3aed
$(stagetimer:nextTimerSpeaker)Timer speaker
$(stagetimer:nextTimerNotes)Timer notes
$(stagetimer:nextTimerAppearance)Timer appearance (Docs)
$(stagetimer:nextTimerStartTime)Hard start time (room time of day format, Docs)
$(stagetimer:nextTimerStartTime12h)Hard start time (12h format, Docs)
$(stagetimer:nextTimerStartTime24h)Hard start time (24h format, Docs)
$(stagetimer:nextTimerDuration)Timer duration
$(stagetimer:nextTimerDurationAsMs)Timer duration (ms)
$(stagetimer:nextTimerLabels)Timer labels (comma-separated)
$(stagetimer:nextTimerLabel1)Timer label 1
$(stagetimer:nextTimerLabel2)Timer label 2
$(stagetimer:nextTimerLabel3)Timer label 3

Timer Fields

Each key in a timer’s fields gets one variable for the current timer and one for the next timer. The key is written in lowercase, and each run of other characters becomes _, so VT image becomes vt_image. Two keys with the same result share one variable.

VariableDescription
$(stagetimer:currentTimerField.vt_image)Field VT image of the current timer
$(stagetimer:nextTimerField.vt_image)Field VT image of the next timer
$(stagetimer:currentTimerFields)All fields of the current timer as a JSON string
$(stagetimer:nextTimerFields)All fields of the next timer as a JSON string

A variable appears when the module first sees the key, and it stays until the module restarts. It is empty when a timer does not have that key. A nested value is a JSON string. To read one part of it, use the jsonpath function (Companion 3.3 or later), for example jsonpath($(stagetimer:currentTimerField.slides), '$[0].name'). For a key that does not give a usable variable name, use the JSON of all fields, for example jsonpath($(stagetimer:currentTimerFields), '$["Größe"]').

Current Message

These variables describe the message currently showing on the viewer. They are empty while no message is showing.

VariableDescription
$(stagetimer:currentMessageId)Message ID
$(stagetimer:currentMessageText)Message text
$(stagetimer:currentMessageColor)Message color

Feedbacks

  • Blackout mode
  • Connected
  • Flashing
  • Message is fullscreen
  • Group color: the background takes the color of the current or next timer’s group
  • ON AIR mode
  • Message showing
  • Playback running
  • Playback stopped
  • Timer is over time
  • Timer is running and on time
  • Timer is showing red wrap-up warning
  • Timer is showing yellow wrap-up warning

Use the Stagetimer API directly

The Stagetimer API documentation lists all accessible commands. Many are readily available as actions or presets in the Stagetimer module. However, a few might be missing, like the “Delete message” function.

Here’s a step-by-step guide to use such functions:

  1. Create a Generic Button in Companion

    Add a regular button in Companion and attach the “Run shell path” action to it.

    Screenshot showing how to add a regular button in Companion
    Adding a regular button in Companion
  2. Copy-Paste the curl Command from the Stagetimer API Documentation

    Copy the curl command from the API documentation into the “Path” field and replace the placeholders with your Room ID and API key. The API Documentation button in the room’s API popup prefills every command with your room ID, API key and API URL.

    Screenshot showing how to paste the curl command into the "Path" field
    Pasting the curl command into the “Path” field in Companion
  3. Customize the Command As Per Your Need

    Example: this command deletes the top message in the room on every press.

    curl "https://api.stagetimer.io/v1/delete_message?room_id=YOUR_ROOM_ID&api_key=YOUR_API_KEY&index=1"

Install the Latest Module Version

New module versions take some time to arrive in the Companion module store. You can install the latest version yourself. It needs Companion 4.2 or newer.

Stagetimer Companion module v2.8.0
stagetimerio-api-2.8.0.tgz · 84 KB
Download

Step 1: In Companion, open the Modules tab and click Import module package. Select the downloaded file.

Step 2: Open the Connections tab and click your Stagetimer connection. Click the pencil icon next to the module version, select the new version and click Save. The connection restarts with the new version.