Active Timers and Schedule

Control Active Timers and Schedule from other systems

Start the next speaker from a button on your Stream Deck, show the countdown in your video mix, or load the day's agenda from your own system. The API is free, like the rest of Active Timers and Schedule.

What you can do

What you need

  1. An account. It is free: sign in with your email. Rooms made without an account cannot be controlled from outside.
  2. A key. In the technician's window, under Control from other systems, create a key for that room. A key for all your rooms is made on My rooms; it also works in rooms that others let you edit, for everything but deleting them. A key is shown once – if you lose it, delete it and make a new one.
  3. The room id. Twelve characters, shown beside the key. It is also the last part of the address of the technician's window.

Your first call

Ask what is on stage, then start the next speaker:

curl -H "Authorization: Bearer YOUR_KEY" https://timer.activeled.se/api/v1/rooms/ROOM_ID/status

curl -X POST -H "Authorization: Bearer YOUR_KEY" https://timer.activeled.se/api/v1/rooms/ROOM_ID/next

A program that can only open an address may carry the key in it, and the commands also answer to GET:

https://timer.activeled.se/api/v1/rooms/ROOM_ID/next?key=YOUR_KEY

Such an address works like a password: anyone who has it can control the room. Use the header when you can.

Every answer is {"ok": true, "data": …} or {"ok": false, "error": {"code": "…", "message": "…"}}; the message says what was wrong. A command with nothing to act on – pause when nothing is running, next at the end of the list – changes nothing and answers with the status as it is.

The status

Every command answers with the status, and /status returns it on its own:

Following live

/events is a stream (Server-Sent Events). It sends the status at once, after every change, and when the colour changes – so a button can turn red the moment the time is up. It does not send every second: count down from endsAt, or ask for the status once a second.

const stream = new EventSource('https://timer.activeled.se/api/v1/rooms/ROOM_ID/events?key=YOUR_KEY');
stream.addEventListener('status', (e) => {
  const { status } = JSON.parse(e.data);
  console.log(status.state, status.phase, status.clock);
});

Recipes

Stream Deck with Bitfocus Companion

  1. In Companion, add the connection Generic: HTTP Requests and set its Base URL to https://timer.activeled.se/api/v1/rooms/ROOM_ID/
  2. On a button, add the action GET with the URI next and the header {"Authorization": "Bearer YOUR_KEY"}
  3. Make more buttons the same way: toggle (start and pause on one button), start?position=1, adjust?seconds=60, reset, message/show?text=Please%20wrap%20up, message/hide.
  4. For the stream's name plates: plates/show?number=1 puts the first name of the row on stage on air (2, 3, 4 for the others in a panel), plates/show?name=Dan%20Ek&line=Moderator any name, plates/hide takes it off.

Our own Companion module (Active LED: Active Timers and Schedule) has all of this as actions, variables and ready-made buttons – one button per name of the row on stage, red while that plate is on air.

vMix: the countdown and name plates from your run list

vMix can read a table from a web address and put its columns into any title, including the ones you already use. The room gives such a table, with the clock, what is on stage and who holds it. Nothing to draw: your own titles, filled in from the run list.

  1. In the room, open Settings and other systems and make a key under Control from other systems. Copy the room's id from the address bar too.
  2. In vMix, open Data Sources Manager (the cog beside the title list), press Add, choose JSON, and give it the web address
    https://timer.activeled.se/api/v1/rooms/ROOM_ID/table.json?key=YOUR_KEY
  3. Set the update interval to a second or two.
  4. Open a title's Title Editor, select a text field, press Data Source and pick the column. The table has one row, so no row selection is needed.

The columns:

No titles of your own? The room also has a ready-made overlay for the names: under Share in the room, press Open the name plates, and add its link as a browser source. The plates are put on air from that page. The guide has the steps.

vMix fetches the table at its own pace, so the clock in the picture can be about a second behind the stage screen. Press Next in the room and the plates follow within the same interval. The same table works in any program that reads JSON by rows and columns.

Your own program

With an account key, create a room and fill its run list:

curl -X POST -H "Authorization: Bearer YOUR_ACCOUNT_KEY" -H "Content-Type: application/json" \
  -d '{"name": "Sales kick-off"}' https://timer.activeled.se/api/v1/rooms

curl -X PUT -H "Authorization: Bearer YOUR_ACCOUNT_KEY" -H "Content-Type: application/json" \
  -d '{"timers": [{"title": "Welcome", "durationSec": 300}, {"title": "Keynote", "durationSec": 1800, "note": "Own laptop"}]}' \
  https://timer.activeled.se/api/v1/rooms/ROOM_ID/timers

Good to know

All calls

Every address begins with https://timer.activeled.se/api/v1. {room} is the room id and {timer} a timer id from the run list.

Loading the list…