Timeline scripts and Event scripts

Scripts

Build Timeline scripts for ordered camera, light, and GPIO actions, or Event scripts that respond to Camera Server events.

Build your first timeline script

Create a small timeline script, validate it, and run it before adapting it to all cameras.

Create and run a timeline script

  1. Open Scripts and create a new timeline script (Timeline script).
  2. Choose New timeline script, enter a name, and select Create timeline script.
  3. Open Code view and replace the starter document with the example below.
  4. Replace the camera serials with serials from your cameras.
  5. Wait for Timeline script is valid and Saved. Validation and saving are automatic.
  6. Choose Run and watch the run log.
  7. Confirm the expected files before binding the timeline script to the main trigger.
{
  "id": "first-timeline",
  "name": "Warmup then two cameras",
  "description": "A small test timeline script.",
  "schemaVersion": 1,
  "groups": [
    {
      "id": "test-cameras",
      "serials": ["CAM_001", "CAM_002"]
    }
  ],
  "steps": [
    {
      "type": "trigger",
      "params": {
        "target": { "groupId": "test-cameras" },
        "phase": "warmup"
      },
      "duration": 1000
    },
    {
      "type": "trigger",
      "params": { "target": { "groupId": "test-cameras" } },
      "duration": 0
    }
  ]
}

The warmup step runs first and pauses for one second. The capture step then fires both cameras. duration: 0 prevents an extra pause after the capture.

Open History to return to an earlier saved edit. The undo and redo controls move between history entries. Each timeline script has its own history and Assistant conversation.

Bind the main trigger

Under Trigger binding, select the radio button beside the timeline script. The normal trigger button will then run this timeline script. Select None (normal capture) to restore the regular capture behavior.

Binding is optional. A timeline script can always be run directly, and a rule can start it after a matching Camera Server event.

Stop safely

Choose Abort while a timeline script is running. Abort stops future steps and waits; it does not undo a command that has already reached a camera, light, GPIO node, or transfer service.

JSONC editing

Timeline script source is JSONC. // comments and trailing commas are allowed. The document still needs valid JSON structure and must pass server validation before it can run.

Updated

Page links