Skip to content

Automation

The Automation feature aims to integrate Ontime into users’ workflows.
Ontime has a large amount of production information, which users need considerable effort to maintain. We want to allow tools so that:

  • allow distribution of Ontime’s and other production data
  • allow surfacing Ontime events
  • allow synchronizing with other tools

The feature can be configured in the Editor -> Settings -> Automation

Setting up automations in Ontime

The automations feature is split in two parts: automation and trigger.

Manage automations

An automation entry contains filter logic and outputs. Ie: if these conditions are true, send these messages.

Network settings In the image example, we check if a custom field contains data (ie: is not empty), and if so, send an OSC message with its value.

Manage triggers

Triggers associate the automation with the Ontime event lifecycle.
We can describe, what action in Ontime should trigger which automation.

Network settings In the image example, we build on the previous automation to say: “when Ontime starts an event, trigger the automation that starts the sound”.

The Ontime lifecycle

While running your event, Ontime will go through a few lifecycle events.
The automation feature allows you to request a message once that happens.

EventDescription
On LoadTriggered when an event is loaded
On StartTriggered when an event starts
On PauseTriggered when an event is paused
On StopTriggered when playback is stopped
On Every SecondTriggered once a second
On UpdateTriggered once a second, as long as a timer is running
On FinishTriggered when a timer passes the 0 mark

Using variables in automation

You can embed data from the application runtime in the message using templates /your-message/{{ontime-data}} {{ontime-more-data}}

This means that any of the data described in the Runtime Data can be sent as part of the message payload.

When the lifecycle event is triggered, Ontime places the updated piece of data in place of the template.

Finding variables

The entire Runtime Data object is available in integrations using the above templates.
However, it can be challenging to find the correct structure of the key.

You can see below a table with all the current keys available, this is likely to change as we develop Ontime and could get out-of-date.
Continue reading here for how to find the variables yourself.

Keep in mind that your custom fields will be added to the list. 
You can find the appropriate key in the Custom Fields panel.

Runtime data

Note that this is just an example and it might run out of sync Follow the steps above to find this for yourself

VariableDescription
clockCurrent clock value in milliseconds
timer.addedTimeAdditional time added to the timer in milliseconds
timer.currentCurrent timer value in milliseconds
timer.durationTotal duration of the timer in milliseconds
timer.elapsedElapsed time in milliseconds
timer.expectedFinishExpected finish time in milliseconds
timer.finishedAtTime when the timer finished (null if not finished)
timer.phaseCurrent phase of the timer
timer.playbackPlayback state of the timer
timer.secondaryTimerSecondary timer value (null if not used)
timer.startedAtTime when the timer started in milliseconds
onAirBoolean indicating whether the playback is active
runtime.selectedEventIndexIndex of the selected event
runtime.numEventsNumber of events
runtime.offsetOffset time in milliseconds
runtime.plannedStartPlanned start time in milliseconds
runtime.plannedEndPlanned end time in milliseconds
runtime.actualStartActual start time in milliseconds
runtime.expectedEndExpected end time in milliseconds
eventNow.idID of the current event
eventNow.typeType of the current event
eventNow.titleTitle of the current event
eventNow.timeStartStart time of the current event in milliseconds
eventNow.timeEndEnd time of the current event in milliseconds
eventNow.durationDuration of the current event in milliseconds
eventNow.timeStrategyTime strategy of the current event
eventNow.linkStartLink start time of the current event (null if not used)
eventNow.endActionEnd action of the current event
eventNow.timerTypeTimer type of the current event
eventNow.isPublicBoolean indicating if the current event is public
eventNow.skipBoolean indicating if the current event is skipped
eventNow.noteNote for the current event
eventNow.colourColour code for the current event
eventNow.cueCue for the current event
eventNow.revisionRevision number of the current event
eventNow.timeWarningWarning time for the current event in milliseconds
eventNow.timeDangerDanger time for the current event in milliseconds
eventNow.custom.songCustom field: song for the current event
eventNow.custom.artistCustom field: artist for the current event
currentBlock.blockCurrent block (null if not used)
currentBlock.startedAtStart time of the current block (null if not used)
eventNext.idID of the next event
eventNext.typeType of the next event
eventNext.titleTitle of the next event
eventNext.timeStartStart time of the next event in milliseconds
eventNext.timeEndEnd time of the next event in milliseconds
eventNext.durationDuration of the next event in milliseconds
eventNext.timeStrategyTime strategy of the next event
eventNext.linkStartLink start time of the next event (null if not used)
eventNext.endActionEnd action of the next event
eventNext.timerTypeTimer type of the next event
eventNext.isPublicBoolean indicating if the next event is public
eventNext.skipBoolean indicating if the next event is skipped
eventNext.noteNote for the next event
eventNext.colourColour code for the next event
eventNext.cueCue for the next event
eventNext.revisionRevision number of the next event
eventNext.timeWarningWarning time for the next event in milliseconds
eventNext.timeDangerDanger time for the next event in milliseconds
eventNext.custom.songCustom field: song for the next event
eventNext.custom.artistCustom field: artist for the next event
eventNext.delayDelay for the next event in milliseconds
auxtimer1.durationDuration of the auxiliary timer in milliseconds
auxtimer1.currentCurrent value of the auxiliary timer in milliseconds
auxtimer1.playbackPlayback state of the auxiliary timer
auxtimer1.directionDirection of the auxiliary timer

Human readable data

The above data defined in runtime data will give you the data from Ontime as consumed in-app.
For example, all times are in milliseconds.

This is great for software-to-software communications, but it might not be ideal if you want to consume the data yourself.

For these use cases, we have defined a small list of human-readable timer values you can use in your integration messages.
The usage would look like

VariableUsageResult
human.clock{{human.clock}}Current clock in hh:mm:ss
human.duration{{human.duration}}Duration of current timer in hh:mm:ss*
human.expectedEnd{{human.expectedEnd}}Time at which the current event is expected to finish in hh:mm:ss*
human.runningTimer{{human.runningTimer}}Current running timer in hh:mm:ss*
human.elapsedTime{{human.elapsedTime}}Elapsed time of current timer in hh:mm:ss*
human.startedAt{{human.startedAt}}Time when the current time started hh:mm:ss*