Autopilot

AutoPilot

Outgoing channels : AUTOPILOT_BE, AUTOPILOT_FE

About

Allows the user to pair up triggers and actions in order to perform tasks in streamroller.

Simple example

Sending a bits donation message on twitter (image from setup dialogs): bits to twitter

Quizbot example handling all the quizbot functionality (image from existing trigger/action pairings) example quzbot triggers

Macro triggers

To setup a streamdeck style macro to trigger an action simply create a macro button and then use that as the trigger for an action

Advanced triggers

You can setup quite advanced triggers and actions by utilizing chaining and the timer extension. Most actions you call will cause a resulting trigger to fire. ie. action "change stream title" will cause a twitch extension 'stream title changed' trigger to happen when twitch calls back to tell us the title has changed.

Multiple actions

You can set as many actions to trigger from the same trigger if you need to. If you need them triggered in a certain order/delay then use the timers (see below)

Using trigger names

You can set an identification in the action that will be passed back by a trigger so you can filter that particular response out. (note some triggers/actions might still be missing the triggerID/actionID fields. please let me know if you find this field is missing so I can add them in)

Using timers

Timers provide a great way to give more control over the system. You can set a timer with a 1 second timeout and use that as a starting trigger for serveral pairings. You can also then trigger a timer from a macro button like any other trigger.

Triggers/Actions

Triggers and actions below are updated when the automatic document generation system is run and only contain triggers actions relating to this specific extension.

Table last updated: Wed, 12 Mar 2025 05:38:02 GMT

Triggers

name trigger description
Macro Triggered trigger_MacroTriggered A Macro was triggered
AllTriggers trigger_AllTriggers Catches all triggers (for debugging)

Actions

name trigger description
Activate Macro action_ActivateMacro Activate a macro function
Set Group Pause State action_SetGroupPauseState Pause/Unpause groups
LogToConsole action_LogToConsole Log triggers to console

"Autopilot" Extension Details...

Provides the Autopilot webpage. This page allows the user to pair up triggers and actions from extensions to perform tasks.
It also provides a macro button system (similar to streamdeck's)
Source:

Methods

CheckTriggers(data)

Handles received triggers checking if we have any matching trigger/action pairs
Parameters:
Name Type Description
data object
Source:

ConnectToDataCenter(host, port)

Connect to the StreamRoller websocket
Parameters:
Name Type Description
host string
port number
Source:

ProcessReceivedTrigger(pairing, receivedTrigger)

Processes a triger action pairing that has been triggered.
Parameters:
Name Type Description
pairing object
receivedTrigger object
Source:

ProcessUserPairings(userPairings)

Updates our userPairings array with the date received from the frontend webpage when a user changes/adds a new item
Parameters:
Name Type Description
userPairings object
Source:

RequestChList()

Requests a channel list from the server
Source:

RequestExtList()

Requests a list of extensions connected from the server
Source:

SaveConfigToServer()

Saves our config on the server
Source:

SaveDataToServer()

Save our data JSON to the server
Source:

SendMacroImages(to)

Sends out the current list of macro images the user can chose from
Parameters:
Name Type Description
to string
Source:

SendMacros()

Sends out the current list of marcos
Source:

SendSettingsWidgetSmall(tochannel)

Sends our small settins widget to the given channel
Parameters:
Name Type Description
tochannel string
Source:

SendUserPairings(to)

Sends our user pairing lists to the given extension or broadcasts if we have just made a change and want to let everyone know
Parameters:
Name Type Description
to string
Source:

TriggerAction(action, triggerParams)

Causes an action to be triggered.
Parameters:
Name Type Description
action object action to be triggered
triggerParams object received trigger parameters
Source:

actionAction_SetGroupPauseState(group, state)

Handles the paused state actions to pause/unpause a trigger action pair
Parameters:
Name Type Description
group string group to toggle
state string state to move to
Source:

addTriggerEntries()

starts the process to build the webpage from the triggers and actions we have
Source:

handleSettingsWidgetSmallData(modalcode)

Handles data sent when a user submits our small setting dialog box
Parameters:
Name Type Description
modalcode object
Source:

heartBeatCallback()

Sends out our heartbeat message so others can monitor the extensions status
Source:

initTriggersAndActions(extension_list)

Requests the triggers and actions 'SendTriggerAndActions' from each extension list in 'extension_list' and also the User triggers from the autopilot backend 'RequestUserTriggers'
Parameters:
Name Type Description
extension_list Array.<strings> extensions to query
Source:

initialise(app, host, port, heartbeat)

Starts the extension using the given data.
Parameters:
Name Type Description
app object:Express
host string
port number
heartbeat number
Source:

onDataCenterConnect(socket)

Called when the StreaRoller websocket connection starts
Parameters:
Name Type Description
socket object
Source:

onDataCenterDisconnect(reason)

Called when the StreamRoller websocket disconnects
Parameters:
Name Type Description
reason string
Source:

onDataCenterMessage(server_packet)

Handles all streamroller inbound messages
Parameters:
Name Type Description
server_packet object
Source:

parseUserRequestSaveDataFile(data)

Handles a 'userRequestSaveDataFile' message triggered when a user uploads a new JSON data file containing the trigger/action pairings
Parameters:
Name Type Description
data object
Source:

receivedTrigger(extensiontriggers)

Received trigger from an extension
Parameters:
Name Type Description
extensiontriggers Array.<Object> triggers received from extension
Source:

(async) startServer(host, port, heartbeat)

Starts the extension using the given data.
Parameters:
Name Type Description
host String
port Number
heartbeat Number
Source:

triggerMacroButton(name)

Triggers the given actions mapped to a macro button trigger
Parameters:
Name Type Description
name string
Source: