Skip to content

Integrations

Integrations is a feature that allows Ontime to share its data or control other software and hardware in your system.
The feature can be configured in the Editor -> Settings -> Integrations

The Ontime lifecycle

While running your event, Ontime will go through a few lifecycle events.
The integration 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 integrations

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
frozenBoolean indicating if the runtime is frozen

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*