# External TCP/UDP Control Specifications

## UDP/TCP Default Port

Unless overridden, Photon’s and Xenon’s default TCP and UDP control port is: 55503

The TCP server will reply with the received commands to each connected client.

UDP commands will be replied to as broadcasts on the main network interface using the same UDP port as configured for the reception.

## UDP/TCP Network Syntax

```
<vyv> [OpCode] [parameters] </vyv>
```

### Network Control

| Command            | Opcode                                   | Parameters              | Types             | Ranges    |
| ------------------ | ---------------------------------------- | ----------------------- | ----------------- | --------- |
| TimeLine Speed     | SET\_TIME\_SPEED                         | Speed                   | \[float32]        | \[-5 ; 5] |
| TimeLine Seek      | SET\_TIME\_SEEK                          | Frame #                 | \[unsigned int32] | \[0 ; N]  |
| TimeLine FreeRun   | SET\_TIME\_FR                            | FreeRun on/off          | \[unsigned int32] | \[0 ; 1]  |
| TimeLine LTC       | SET\_TIME\_LTC                           | Time-Code on/off        | \[unsigned int32] | \[0 ; 1]  |
| Special Codes      | 90BC9E48\_6D84\_4F8C\_AA23\_72E3379AC71C | special\_code           | \[unsigned int]   | \[0 ; N]  |
| Execute Cue ID     | CUE\_EXEC\_ID                            | Cue # by ID             | \[unsigned int32] | \[0 ; N]  |
| Query system state | GET\_SYSTEM\_STATE                       | No parameters           |                   |           |
| Delete Media       | REMOVE\_MEDIA                            | "media\_name.extension" |                   |           |

### Special Codes

<table><thead><tr><th width="464">Code Control</th><th data-type="number">ID</th></tr></thead><tbody><tr><td>Normal Mode</td><td>0</td></tr><tr><td>Sleep Mode</td><td>1</td></tr><tr><td>Fire Alarm</td><td>2</td></tr><tr><td>Fire Alarm 2</td><td>3</td></tr><tr><td>Reboot Photon</td><td>4</td></tr><tr><td>Reboot Server</td><td>5</td></tr><tr><td>Quit Photon</td><td>6</td></tr><tr><td>Shutdown Server</td><td>7</td></tr><tr><td>Enable Offline Mode</td><td>8</td></tr><tr><td>Disable Offline Mode</td><td>9</td></tr><tr><td>Show/Hide UI</td><td>10</td></tr></tbody></table>

## Syntax Rules

* Capitalization must be respected.
* Spaces between Tag, Opcode and Parameters are mandatory.

## Examples

### Cue trigger via ID number

```
<vyv> CUE_EXEC_ID 0 </vyv>
```

### Set Photon in Sleep Mode

```
<vyv> 90BC9E48_6D84_4F8C_AA23_72E3379AC71C 1 </vyv>
```

### Get Server State

```
<vyv> GET_SYSTEM_STATE </vyv>
```

When querying the system state using the above command, Photon will reply using its internal XML-like syntax. Below is an example of the system-state reply syntax:

{% code overflow="wrap" %}

```
<computer_data> <host_name> Photon-01 </host_name> <cpu_usage> 9.30233 </cpu_usage> <memory_usage> 23 </memory_usage> <process_memory_usage> 900344 </process_memory_usage> <vram_usage> 19.7842 </vram_usage> <vrec_usage> 0.772476 </vrec_usage> <disk_usage> 0.950111 </disk_usage> <disk_bw> 0.08192 </disk_bw> <gpu_usage> 11 </gpu_usage> <gpu_temperature> 77 </gpu_temperature> <gsync> 0 0 </gsync> <net> 0 </net> <fps> 60.0375 </fps> <task> -1 </task> <status> 3 </status> <version> 11.1.10532 </version> </computer_data>
```

{% endcode %}

{% hint style="info" %}

* Hostname: name of the server
* CPU usage: total percentage of CPU being used
* Memory usage: total percentage of the system memory currently in use
* Process Memory Usage: Memory in use by active process
* VRAM usage: total percentage of GPU memory currently in use
* VRec Usage: Video recycler usage
* Disk usage: Total ratio of disk usage currently in use (1 means 100%)
* Disk Bw: Disk reading speed in megabytes per second
* GPU Usage: GPU usage in %
* GPU Temperature: The current temperature of the GPU is expressed in Celsius
* GSync: G Sync active/G Sync External refresh rate
* Net: Photon Network usage in %
* FPS: System’s Current frame rate
* Task: Current task progress in % (import and conversion)
  * -1: Inactive
* Status: User Interface and openGL context status (Status can be combined ex: 3 is UI(1) + NFS(2))
  * 0 - OK: Everything is fine and no UI is shown
  * 1- UI: The user interface is displayed
  * 2- NFS: Not full screen, Photon GL Context is not covering the entire span of the outputs
  * 4- NVS: Not Vertical Sync
  * 8- RAID: Raid Problem
  * 16- Triple Buffering: Restart Required due to Triple Buffering Off
* Version: Current running system version
  {% endhint %}

### Remove Media

#### Original File

```
<vyv> REMOVE_MEDIA "test_video.mp4" </vyv>
```

#### VCI

```
<vyv> REMOVE_MEDIA "test_video.vci" </vyv>
```

REMOVE\_MEDIA command allows to delete medias from the Media Library (including medias in playlist and actual files in content folder)

Please note the double-quotes (") in the command are required.

***NB: it implements explicit removal with a complete filename. For example if you remove "file.vci" it will remove all related vci/vcd/aci/acd files but not the original media, you will need to explicitly call the REMOVE\_MEDIA command with "file.mp4" to get rid of the original.***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.vyv.ca/step-by-step-tutorials/i-o/network-messages-and-external-control/external-tcp-udp-control-specifications.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
