# External TCP/UDP Control Specifications (legacy)

{% file src="/files/-Lpj1TbdC35FqYqNBquJ" %}
Download step-by-step
{% endfile %}

## **UDP/TCP Default Port**

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

Once commands are received, TCP servers will reply back to each connected client for acknowledgement. UDP commands will be replied to as a broadcast on the main network interface using the same UDP port as configured for reception.

## **UDP/TCP Network Syntax**

\[OpCode] \[parameters] \[layer\_id] \[OpCode] \[parameter]

**Spaces above are mandatory, each \<tag> must be followed by a space character and each \</tag> must be preceded by a space character.**

## **Network Control**

| **COMMAND**          | **OPCODE**                                          | **PARAMETERS**                     | **TYPES**             | **RANGES** |
| -------------------- | --------------------------------------------------- | ---------------------------------- | --------------------- | ---------- |
| Select layer         | SET\_LAYER                                          | layer\_id                          | \[unsigned int32]     | \[0 ; N]   |
| TimeLine Speed       | SET\_TIME\_SPEED                                    | Speed                              | \[float32]            | \[-5 ; 5]  |
| TimeLine Seek        | SET\_TIME\_SEEK                                     | Frame #                            | \[unsigned int32]     | \[0 ; N]   |
| Timeline FreeRun     | SET\_TIME\_FR                                       | <p>FreeRun </p><p>on/off</p>       | \[unsigned int32]     | \[0 ; 1]   |
| TimeLine LTC         | SET\_TIME\_LTC                                      | <p>Time-Code</p><p>on/off</p>      | \[unsigned int32]     | \[0 ; 1]   |
| Media Opacity        | MEDIA\_BLEND                                        | Opacity                            | \[float32]            | \[0 ; 1]   |
| Media Mix mode       | MEDIA\_MIX\_MODE                                    | Mix mode                           | \[unsigned int32]     | \[0 ; 6]   |
| Media Frame Blending | MEDIA\_FB                                           | <p>Frame Blending</p><p>on/off</p> | \[unsigned int32]     | \[0 ; 1]   |
| Media Position       | MEDIA\_POS                                          | Position X Y                       | \[float32] \[float32] | \[-2 ; 2]  |
| Media Size           | MEDIA\_SIZE                                         | Size X Y                           | \[float32] \[float32] | \[-1 ; 3]  |
| Media Audio Volume   | MEDIA\_VOL                                          | Volume                             | \[float32]            | \[-1 ; 3]  |
| Select Media Type    | SEL\_MEDIA\_TYPE                                    | Media type                         | \[unsigned int32]     | \[0 ; 10]  |
| Select Media ID      | SEL\_MEDIA\_ID                                      | Media #                            | \[unsigned int32]     | \[0 ; N]   |
| Video Speed          | VIDEO\_SPEED                                        | Speed                              | \[float32]            | \[-5 ; 5]  |
| Video FreeRun        | VIDEO\_FR                                           | <p>FreeRun</p><p>on/off</p>        | \[unsigned int32]     | \[0 ; 1]   |
| Video-in-time        | VIDEO\_IN\_TIME                                     | Frame #                            | \[unsigned int32]     | \[0 ; N]   |
| Video-out-time       | VIDEO\_OUT\_TIME                                    | Frame #                            | \[unsigned int32]     | \[0 ; N]   |
| Execute Cue          | CUE\_EXEC                                           | Cue # by Index                     | \[unsigned int32]     | \[0 ; N]   |
| Execute Cue ID       | CUE\_EXEC\_ID                                       | Cue # by ID                        | \[unsigned int32]     | \[0 ; N]   |
| Special Codes        | <p>90BC9E48\_6D84\_4F8C\_<br>AA23\_72E3379AC71C</p> | special\_code                      | \[unsigned int]       | \[0 ; N]   |
| Query sytem state    | GET\_SYSTEM\_STATE                                  | No parameters                      |                       |            |

## **Media Types**

| **MEDIA TYPE**     | **FUNCTION**                                     | **ID** |
| ------------------ | ------------------------------------------------ | ------ |
| No Media           | Nothing in the keyframe                          | 0      |
| Media File         | Video file or picture                            | 1      |
| Media Input        | DirectShow compatible media input device         | 2      |
| Light FX           | Photon FX.                                       | 3      |
| Graphic FX         | Unused                                           | 4      |
| Cue Control        | Predefined Macro in Cue List                     | 5      |
| VNC Input          | Remote VNC server screen.                        | 6      |
| PGR Flea           | PointGrey Research Flea camera device.           | 7      |
| Media Sequence     | Predefined sequence from Sequence list           | 8      |
| Media Input Manger | Input device configured in Media\_input\_manager | 9      |

## **Media Mix Modes**

| MIX MODES   | FUNCTION             | ID |
| ----------- | -------------------- | -- |
| Mix         | C1 x a + C2 (1 - a)  | 0  |
| Add         | C1 x a + C2          | 1  |
| Sub         | C1 x a - C2          | 2  |
| Sub Reverse | C2 - C1 x a          | 3  |
| Minimum     | Minimum (C1 x a, C2) | 4  |
| Maximum     | Maximum (c1 x a, C2) | 5  |

## **Special Codes**

| **CODE CONTROL**            | **ID** |
| --------------------------- | ------ |
| Normal Mode                 | 0      |
| Sleep Mode                  | 1      |
| Fire Alarm                  | 2      |
| Fire Alarm 2                | 3      |
| Restart PHOTON              | 4      |
| Reboot Server               | 5      |
| Quit PHOTON                 | 6      |
| Shutdown Server             | 7      |
| PHOTON Offline Mode ON      | 8      |
| PHOTON Offline Mode OFF     | 9      |
| PHOTON Toggle UI Visibility | 10     |

## Syntax Rules

* Capitalization must be respected.
* Spaces between each word are mandatory.

## Examples

### Set Media Layer 3 opacity to 50%

\<photon\_layer> 3 MEDIA\_BLEND 0.5 \</photon\_layer>

### Set Photon in Sleep Mode

\<photon> 90BC9E48\_6D84\_4F8C\_AA23\_72E3379AC71C 1 \</photon>

### Querying System State

\<vyv> GET\_SYSTEM\_STATE \</vyv>

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

\<computer\_data> \<host\_name> Photon-1 \</host\_name> \<cpu\_usage> 9.30233 \</\
cpu\_usage> \<memory\_usage> 23 \</memory\_usage> \<vram\_usage> 19.7842 \</\
vram\_usage> \<disk\_usage> 0.950111 \</disk\_usage> \<opengl\_transfer> 110.063 \</\
opengl\_transfer> \<gpu\_temperature> 77 \</gpu\_temperature> \<fps> 60.0375 \</fps>\
\<raid> N/A \</raid> \<version> 6.1.4798 \</version> \</computer\_data>

| **HOSTNAME**    | **NAME OF THE SERVER**                                                                                      |
| --------------- | ----------------------------------------------------------------------------------------------------------- |
| Cpu usage       | Total Percentage of CPU being used                                                                          |
| Memory usage    | Total percentage of the system memory currently in use                                                      |
| VRAM usage      | Total percentage of GPU memory currently in use                                                             |
| Disk usage      | Total ratio of HDD usage currently in use (1 means 100%)                                                    |
| OpenGL transfer | <p>Bandwidth of data transferred between System Memory (RAM) <br>& GPU Memory (VRAM) expressed in Mbps.</p> |
| GPU Temperature | Current temperature of the GPU expressed in Celcius                                                         |
| FPS             | System's Current frame-rate.                                                                                |
| RAID            | RAID system current state (only supported for ERECA controllers at the time of this writing.                |
| Version         | Current running system version.                                                                             |


---

# 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/legacy/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.
