> For the complete documentation index, see [llms.txt](https://ontime.gitbook.io/v2/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ontime.gitbook.io/v2/control-and-feedback/integrations.md).

# Integrations

**Integrations** is a feature to allow Ontime to share its data with other parts of your workflow. Meant for generic software and hardware integrations. This can be set up in the [Integration Settings modal](/v2/main-concepts/interface-1/integration-settings.md)

<div data-full-width="false"><figure><img src="/files/lxHSbDXv3VtInQoCwzaZ" alt=""><figcaption><p>OSC Settings</p></figcaption></figure> <figure><img src="/files/bS1zzlDl2vxiPCfZNNsF" alt=""><figcaption><p>OSC Integration Settings</p></figcaption></figure></div>

### The ontime lifecycle

During the running of your event, Ontime server will go through a few lifecycle events.&#x20;

The integration feature allows you to leverage these events to send data&#x20;

* On Load - Triggered when an event is loaded
* On Start - Triggered when an event starts
* On Pause - Triggered when an event is paused
* On Stop - Triggered when playback is stopped
* On Every Second - Triggered once a second (great for sending your timer data out)
* On Finish - Triggered when a timer passes the 0 mark and becomes in overtime

{% hint style="info" %}
Example:

If you add a message to the On Load lifecycle: eg: `/ontime/loaded-event` , you would see this message in the OSC Port you have configured in OSC Settings every time an event is loaded
{% endhint %}

### 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 ](/v2/control-and-feedback/runtime-data.md)is available to be sent as part of the message payload

When the lifecycle event is triggered, your message is parsed, and Ontime places the updated piece of data in place of the template

Extending the example above, you could compose a message that sends the id of the loaded event with

```
/send-this/load-{{loaded.selectedEventIndex}}
```

Inside the template (double brackets), you can add any of the keys described in [runtime data](/v2/control-and-feedback/runtime-data.md). Use the  `.` when referencing a subkey

`{{titlesPublic.noteNext}}`

`{{playback}}`

`{{timer.current}}`

### Human readable data

The above data defined in runtime data will give you the data from Ontime as it is 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 this use cases, we have defined a small list of human-readable timer values that you can use in your integration messages. The usage would look like

{% hint style="info" %}
\*Timer values will return "null" if no event is loaded
{% endhint %}

| Variable           | Usage                  | Result                                                                |
| ------------------ | ---------------------- | --------------------------------------------------------------------- |
| 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)\*                       |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ontime.gitbook.io/v2/control-and-feedback/integrations.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
