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 (for example Behringer X32 and Midas M32)
- Media server control (QLab, Disguise, Resolume)
- Show control and theatrical automation
- QSC Q-SYS, through a Lua script or plugin (Q-SYS has no built-in OSC; its own external control protocols include QRC and ECP)
- 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 Behringer X32 or Midas M32 console exposes OSC addresses for faders, sends, EQ bands, and compressor parameters. 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 where the device supports it 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). These are message delivery guarantees, separate from network QoS
- Retained messages — the broker can store 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
- MQTT can be added to Crestron and QSC Q-SYS systems with modules, scripts or plugins
- 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 many IoT platforms and some building management systems support MQTT.
Popular MQTT brokers: Mosquitto (open source), HiveMQ, AWS IoT Core.
REST / HTTP APIs
REST (Representational State Transfer) over HTTP/HTTPS is a common 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/volumereturns current volume;PUT /api/v1/volumewith{"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:
- 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
REST APIs are usually easy to integrate. 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: Many 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
- 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
| Protocol | Transport | Pattern | Latency | Best For |
|---|---|---|---|---|
| OSC | UDP/TCP | Point-to-point | Very low | Show control, real-time mix control |
| MQTT | TCP | Pub/Sub | Low | IoT integration, building automation |
| REST/HTTP | TCP | Request/Response | Medium | Device configuration, discrete cmds |
| WebSocket | TCP | Bidirectional | Low | Real-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
Modern control systems such as Crestron and QSC Q-SYS can work with these protocols, some natively and some through modules, scripts or plugins.
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.