Skip to content

Automation

Automation rules let br\u016bhi take actions without operator intervention. Both platforms support automation, but the trigger and action types differ.

TriggerDescription
Clock timeFires at a specific wall-clock time (HH:MM:SS)
Before track endFires N seconds before the current track finishes
Playlist positionFires when a specific track index is reached in the playlist
Queue emptyFires when the broadcast queue becomes empty
RecurringFires on a repeating schedule (daily / weekly / monthly / custom interval)
ActionDescription
Load playlist to deckLoads a regular or smart playlist to Deck A or B
Load track to deckLoads a single track to a deck
Trigger soundboard padPlays a cart wall pad
Set master gainChanges the master output level
Start recordingStarts a file recording session
Stop recordingStops the current recording
Run scriptExecutes a br\u016bhi Script program

To prevent accidental double-fires:

  • A 150 ms debounce window blocks duplicate fires for the same rule.
  • A 1-second re-fire guard prevents the same rule firing again within 1 second.

Recurring triggers can be set to repeat on:

  • Daily — same time every day
  • Weekly — same time on selected days of the week
  • Monthly — same time on a specific date each month
  • Custom interval — every N minutes/hours

Combine a trigger with a condition to create conditional automation. For example:

Trigger: Clock time 23:00 Condition: Queue is empty Action: Load playlist “Overnight” to Deck A

This loads the overnight playlist only if the queue is empty at 23:00. If a live show is still running with content in the queue, the action is skipped.

TimeAction
05:50Load playlist “Morning Music” to Deck A
05:55Trigger soundboard pad “Station ID”
06:00Set master gain to 100%
06:01Start recording (morning show archive)
09:00Stop recording

Automation rules are stored in the SQLite database with their full configuration, last-fired timestamp, and fire count.


TriggerDescription
ManualTriggered explicitly via API call
ScheduleTime-based (cron-style, HH:MM)
Source changeFires when the active audio source changes
Stream startFires when a DJ connects and goes live
Stream stopFires when a DJ disconnects
ActionDescription
Telnet commandSends a raw command to the station’s Liquidsoap telnet port
Set variableSets a Liquidsoap variable
Switch sourceSwitches the active audio source
LogWrites a message to the station log

The most powerful action type. Anything Liquidsoap supports can be triggered via telnet:

# Switch to the scheduled playlist source
station.select("scheduled")
# Set the output metadata
request.push("/path/to/file.mp3")
# Check the current source
source.status

Rules are managed via the dashboard’s Automation panel or the API:

GET /api/stations/{id}/automation/rules # List all rules
POST /api/stations/{id}/automation/rules # Create a rule
PUT /api/stations/{id}/automation/rules/{rid} # Update a rule
DELETE /api/stations/{id}/automation/rules/{rid} # Delete a rule

Each rule records:

  • Last fired — timestamp of the most recent execution
  • Fire count — total number of times the rule has executed
  • Enabled — toggle to disable a rule without deleting it
{
"name": "Overnight playlist at midnight",
"trigger": { "type": "schedule", "time": "00:00" },
"action": {
"type": "telnet_command",
"command": "station.select(\"scheduled\")"
},
"enabled": true
}