Education

Control Protocols for AV — OSC, MQTT, REST, WebSocket

AV control systems need to send and receive commands: change sources, adjust volumes, trigger presets, query device status. Several networking protocols handle this, each with different trade-offs for real-time responsiveness, complexity, and compatibility. Understanding which protocol a device uses determines how you integrate it into a control system.

OSC — Open Sound Control

OSC (Open Sound Control) is a message-based protocol originally developed for real-time music performance and sound synthesis. It has since become a standard for AV show control, theatrical lighting, and live event systems.

OSC fundamentals:

  • Messages are organized as address patterns that look like file paths: /fader/1/volume, /scene/recall, /matrix/crosspoint/1/2
  • Each message carries typed arguments: integers, floats, strings, booleans, blobs
  • OSC typically runs over UDP for low-latency control, or TCP for guaranteed delivery
  • No built-in acknowledgment — if a UDP message is lost, the command is silently dropped

AV uses for OSC:

  • Mixing console control (Yamaha CL/QL series, Allen & Heath, Midas)
  • Media server control (QLab, Disguise, Resolume)
  • Show control and theatrical automation
  • QSC Q-SYS external control (Q-SYS uses OSC for third-party integration)
  • Custom control surface software (TouchOSC, Lemur)
  • Integration between control systems and show systems

OSC's flexible address pattern system makes it well-suited for deep parameter control. A Yamaha CL5 console exposes hundreds of OSC addresses for every fader, send, EQ band, and compressor parameter. TouchOSC or a custom web UI can control the console from any networked device.

OSC over UDP vs. TCP: For show-critical cues (scene recalls, sound playback triggers), use TCP to ensure delivery. For continuous parameter control like fader automation, UDP is acceptable — a missed update is immediately overwritten by the next position message.

MQTT — Message Queuing Telemetry Transport

MQTT (Message Queuing Telemetry Transport) is a lightweight publish/subscribe protocol designed for IoT and connected devices. It's increasingly used in AV systems for room automation, building integration, and cloud-connected control.

MQTT fundamentals:

  • Broker-based — all messages pass through a central MQTT broker (server). Devices publish to topics and subscribe to topics; the broker routes messages between publishers and subscribers.
  • Topics are hierarchical strings: building/floor2/room201/lights/state, av/room3/display/power
  • Publish/Subscribe decouples senders from receivers — a control processor publishes a command; all subscribed devices receive it
  • QoS levels: 0 (fire and forget), 1 (at least once), 2 (exactly once)
  • Retained messages — the broker stores the last message on a topic, so new subscribers immediately receive the current state
  • Will messages — devices can pre-register a "last will" message that the broker sends if the device disconnects unexpectedly

AV uses for MQTT:

  • Room booking and occupancy systems (sensor data → room scheduling displays)
  • Building management system (BMS) integration — HVAC, lighting, blinds responding to AV events
  • IoT sensor integration (occupancy sensors triggering AV system state changes)
  • Cloud-connected AV monitoring and remote management
  • Crestron, AMX, and QSC Q-SYS all support MQTT for external integration
  • Digital signage content triggering from business systems

MQTT is particularly well-suited for AV systems that need to integrate with building automation or enterprise software, because most BMS and IoT platforms speak MQTT natively.

Popular MQTT brokers: Mosquitto (open source), HiveMQ, AWS IoT Core, Azure IoT Hub.

REST / HTTP APIs

REST (Representational State Transfer) over HTTP/HTTPS is the dominant API pattern for modern networked AV devices. It uses standard HTTP methods (GET, POST, PUT, DELETE, PATCH) against resource URLs, with JSON or XML payloads.

REST fundamentals:

  • Stateless — each request carries all necessary information; the server doesn't maintain session state between requests
  • Resource-based — devices expose their parameters as URLs: GET /api/v1/volume returns current volume; PUT /api/v1/volume with {"level": -10} sets it
  • Runs over TCP (HTTP) or TLS-encrypted TCP (HTTPS)
  • Human-readable JSON payloads are easy to inspect and debug
  • Request/response model — control processor sends a command, waits for acknowledgment

AV uses for REST:

  • QSC Q-SYS External Control API (REST/JSON)
  • Crestron NVX AV-over-IP REST API
  • PTZ camera control and configuration
  • Video conferencing unit APIs (Cisco Webex Codec, Poly Studio REST APIs)
  • Digital signage server APIs
  • Dante Domain Manager REST API
  • Virtually all modern AV devices include a REST API for programmatic control

REST APIs are easy to integrate and well-documented. The request/response model provides built-in acknowledgment of every command. The primary limitation is latency — TCP connection overhead and HTTP headers add overhead compared to UDP-based protocols. For high-frequency control (real-time fader automation), REST is too slow; for discrete commands (power on, select input, recall preset), it's ideal.

API authentication: Most AV REST APIs support API key authentication, Basic Auth, or OAuth tokens. Always use HTTPS (TLS) when sending credentials, even on local networks.

WebSocket

WebSocket (RFC 6455) is a protocol that upgrades an HTTP connection to a persistent, bidirectional TCP channel. Unlike REST, which is request/response only, WebSocket allows the server to push messages to the client without being asked.

WebSocket fundamentals:

  • Starts as an HTTP request, upgrades to WebSocket with a handshake
  • Full-duplex — server and client can send messages simultaneously without request/response overhead
  • Low overhead after initial handshake — no HTTP headers on each message
  • Persistent connection — no connection setup on every command
  • Commonly used with JSON message payloads

AV uses for WebSocket:

  • Real-time device status feedback (current volume, active input, mute state)
  • Live monitoring dashboards for AV systems
  • Control interfaces that need server push (a fader moved on hardware reflects immediately in a UI)
  • QSC Q-SYS WebSocket API for real-time control and feedback
  • Crestron WebSocket control interface
  • Biamp Tesira API uses WebSocket for real-time event notifications
  • Custom AV control UIs (React or Vue.js dashboards communicating with AV systems)

WebSocket is particularly valuable when the AV system needs to push status updates to control interfaces — for example, when a physical button press on a wall panel should update the state shown on a touchscreen across the room. REST polling (asking for status repeatedly) is inefficient; WebSocket delivers the update instantly when it occurs.

Protocol Comparison

ProtocolTransportPatternLatencyBest For
OSCUDP/TCPPoint-to-pointVery lowShow control, real-time mix control
MQTTTCPPub/SubLowIoT integration, building automation
REST/HTTPTCPRequest/ResponseMediumDevice configuration, discrete cmds
WebSocketTCPBidirectionalLowReal-time status, push notifications

Choosing the Right Control Protocol

  • Real-time continuous control (fader automation, show cue firing): OSC over UDP
  • IoT/BMS integration (occupancy sensors, room booking): MQTT
  • Device configuration and discrete commands (power on, input select, preset recall): REST
  • Live status monitoring and feedback (current levels, active inputs, error states): WebSocket
  • Legacy devices (older control systems): RS-232 over IP (Telnet/TCP) or proprietary protocols — consult device documentation

Most modern control systems (Crestron, AMX, QSC Q-SYS) support all of these protocols either natively or through modules, allowing integration with virtually any networked AV or building system.

Common Pitfalls

  • Using REST polling for real-time status — Polling a REST API every 100 ms to get updated fader levels generates unnecessary network traffic and adds latency. Use WebSocket for real-time status. REST is for commands; WebSocket is for live data.
  • OSC over UDP without loss handling — A dropped OSC UDP packet means a missed command. For show-critical operations, use OSC over TCP or implement application-layer acknowledgment. For non-critical continuous control, UDP is fine.
  • MQTT broker as a single point of failure — All MQTT messages route through the broker. If the broker goes down, MQTT-controlled devices lose communication. Run the MQTT broker on reliable infrastructure (a dedicated server or cluster), not on a user workstation.
  • Unencrypted control API traffic — Default configurations on many AV REST APIs use plain HTTP. On shared networks, credentials and commands are visible in packet captures. Always enable HTTPS/WSS (WebSocket Secure) for AV APIs, especially on enterprise networks.
  • Port conflicts between AV control protocols — OSC, MQTT, and REST all use configurable ports, and defaults sometimes conflict with other services. Document the port assignments for every control protocol in the system, and verify firewall rules allow traffic on those ports between control systems and devices.

Related

Continue reading in the knowledge base.

We use optional analytics cookies to understand site usage and improve the experience. You can accept or reject.