Ports must be between 1024 and 65535. The TCP port cannot be the HTTP API port.
TCP line protocol
The protocol is UTF-8 text, one request per line. A line ends with\n or \r\n and is at most 4096 bytes. Requests on one connection are answered in order, one reply line each.
A request is a Core API v2 route as in the HTTP API, without /api/v2:
/, api/v2/, plain/ and a GET or POST verb are accepted and ignored. Path segments and query values may be percent-encoded.
Replies
The reply is the plain-text presentation of the route:
The codes are the same as over HTTP:
invalid_args, unauthorized, forbidden, feature_disabled, read_only, not_found, not_active, station_mismatch, station_changing, signal_disabled, not_ready, timeout and error. See Errors and status codes.
Prefix a route with JSON to get the JSON body on one line instead:
Commands
AUTH authenticates the connection with a device token. Without it, the caller’s IP address is judged by the LAN access setting (Off, Listed devices or Whole LAN), exactly as for HTTP. See Authentication and LAN access. Legacy (EXTERNAL_APP) authorization is not accepted: only v2.
Example
OSC
The Core listens for OSC 1.0 messages on the UDP portosc_port. Bundles are unpacked and their messages handled in order.
Address
The address is/vra/ plus the route:
/vra prefix is optional. OSC wildcards (*, ?, [ and {) are not supported and answer ERR invalid_args.
Arguments
- A string
vra_<token>is the device token. - A string
name=valuesets that query parameter, likewait=0orstation=Radio 1. - A string
name=valueis the only way to setscene,station,timeoutandwait. - Every other argument (int, float, string, true or false) fills the route’s other query parameters in declared order. For
/vra/signals/count/set ,i 5that isvalue. For/vra/outputs/main/rundown/take ,s "2.3"that isitem. - Numbers without a fraction are sent as integers, so
1.0becomes1. True and false become1and0.
Buttons
Many OSC controllers, like TouchOSC, send1 when a button is pressed and 0 when it is released. On a route that takes no value, a message whose only argument is 0 or false is treated as a release and ignored. A toggle button therefore fires once per press, and gets no reply for the release.
Reply
The Core answers with one UDP datagram to the sender’s IP. It goes toosc_reply_port, or to the sender’s source port when that is empty.
- Address:
/vra/replyplus the route, like/vra/reply/studio/status. - Arguments:
ithe HTTP status, andsthe plain reply.
200 "onair" or 409 "ERR not_active".