Status Message Customization
Blueprints can customize the status messages displayed to users in the Sofie UI. This allows you to replace technical status messages with human-friendly ones that are relevant to your broadcast environment.
Overview
Sofie displays error notifications from several sources:
- Device statuses - from TSR devices (ATEM, CasparCG, vMix, etc.) - customized via Studio Blueprint
- Package errors - from the Package Manager (media files, thumbnails) - customized via ShowStyle Blueprint
- System errors - from Sofie Core itself - customized via System Blueprint
Each error type is customized in a different blueprint type, matching where the errors originate.
Device Status Messages (Studio Blueprint)
Device status messages come from TSR (Timeline State Resolver) integrations. Customize them in your Studio Blueprint:
import { StudioBlueprintManifest } from '@sofie-automation/blueprints-integration'
import { AtemStatusCode, CasparCGStatusCode } from 'timeline-state-resolver-types'
export const manifest: StudioBlueprintManifest = {
// ... other manifest properties ...
deviceStatusMessages: {
// Simple string template with placeholders
[AtemStatusCode.DISCONNECTED]: 'Vision mixer offline - check network to {{host}}',
// Use {{deviceName}} for the configured device name
[CasparCGStatusCode.DISCONNECTED]: '{{deviceName}}: Graphics server offline ({{host}}:{{port}})',
// Empty string suppresses the error entirely
[AtemStatusCode.SOME_NOISY_WARNING]: '',
},
}
Using Placeholders
Error messages support {{placeholder}} syntax for dynamic values. Common placeholders include:
{{deviceName}}- The configured name of the device in Sofie{{deviceId}}- The internal device ID- Additional context from the specific error (e.g.,
{{host}},{{port}},{{channel}})
Function-Based Messages
For complex logic, use a function instead of a string. Functions can return:
- A string - Use this as the custom message
undefined- Fall back to the default TSR message''(empty string) - Suppress the message entirely
import { DeviceStatusContext } from '@sofie-automation/blueprints-integration'
deviceStatusMessages: {
[CasparCGStatusCode.CHANNEL_ERROR]: (context: DeviceStatusContext) => {
const channel = context.channel as number
if (channel === 1) return 'Primary graphics output failed!'
if (channel === 2) return 'Secondary graphics output failed!'
return `Graphics channel ${channel} error on ${context.deviceName}`
},
// Return undefined to use the default TSR message
[SomeErrorCode.COMPLEX_ERROR]: (context) => {
if (context.isExpected) return undefined // Fall back to default
return `Unexpected error on ${context.deviceName}`
},
// Return empty string to suppress
[SomeErrorCode.NOISY_WARNING]: (context) => {
if (context.severity === 'low') return '' // Suppress low severity
return `Warning on ${context.deviceName}`
},
}
Available Status Codes
Import error codes from timeline-state-resolver-types for type safety:
import {
AtemStatusCode,
CasparCGStatusCode,
VmixStatusCode,
OBSStatusCode,
// ... other device status codes
} from 'timeline-state-resolver-types'
Each device type exports its own error codes. Check the TSR documentation or source code for the complete list.