Skip to main content

Generic TCP Command and the Automator

Learn how to send TCP commands to any device or system from the Cuez Automator

What is Generic TCP Command?

The Generic TCP Command integration allows you to send an arbitrary line-based command to any device or system that accepts TCP connections — without needing a dedicated Automator integration for that device. It is designed for situations where you need to control legacy broadcast hardware, trigger a Viz Trio or Viz Director macro, or communicate with any other system that accepts plain text commands over a TCP connection.

When to use it: use Generic TCP Command when the device or system you want to control does not have a dedicated Automator integration, but does accept commands as plain text over a TCP socket — for example, Viz Trio macro calls, Viz Director commands, or custom TCP-capable hardware.

Adding a TCP Command 'device' to the Automator

In the top right corner of the Automator, we see 'Devices' - this can be either in red or green depending on the status of the configured devices. Click it and select 'Add device'.

Next, select 'TCP Command' from the 'Device type' dropdown list, then give it a name.

Once the device is selected and given a name, we will see all fields needed to configure it so it can be used with the Automator.

Basic device configuration

You can enter the following settings to configure your TCP Command device:

  • 'Host' - the IP address or hostname of the device or system you want to send commands to.

  • 'Port' - the port number the device is listening on. The default is 6200, the port used by Viz Trio. Viz Director uses 6484. For other devices, use the port from the device's documentation.

  • 'Command prefix' - an optional piece of text put in front of every command, separated from it by a space. Leave blank to send the command exactly as you type it.

  • 'Line terminator' - see below.

  • 'Timeout (ms)' - see below.

  • 'Wait for response' - see below.

Line terminator

Controls how each command is terminated when sent over the TCP connection. This must match what the receiving device expects. Options are: CRLF (\r\n), LF (\n), CR (\r), or None. The default is CRLF (\r\n).

Timeout (ms)

How long, in milliseconds, the Automator waits to connect to the device and, when 'Wait for response' is on, for its reply. The default is 5000 ms. If the time runs out, the function fails and the device shows as offline until the next check. Adjust this if the device responds slowly or if you want to fail faster on unresponsive devices.

Wait for response

Enabled by default. When enabled, the Automator sends the command and then waits for the device's reply, until the device closes the connection or stays silent for a short moment. If nothing arrives within the timeout, the function fails. Use this when the device acknowledges each command and you want to see that reply.

Turn this off for devices that do not send a reply, or that keep the connection open without answering. The Automator then sends the command and carries on immediately, without waiting.

How the connection works

The Automator opens a new connection for every command and closes it afterwards. The device shows as 'online' (green) in the top right corner when it accepts a connection on the configured host and port. The Automator checks this every 15 seconds. If a command fails, the device shows as offline until the next successful check.

Configuring actions

The next step is then to configure each Item and Block configuration with the (set of) functions you want to perform on the TCP Command device when triggering the Item or Block - more general information on that in this article.

Available functions

Send Command

The 'Send Command' function sends a plain text command to the configured host and port. Enter the command text in the 'Command' field. The command prefix (if configured) is put in front of it and the configured line terminator is added at the end automatically, so do not type the terminator yourself.

Use case examples

Viz Trio macro call

To trigger a Viz Trio macro from the Automator, add a TCP Command device pointing to the Viz Trio host and port 6200. For example, set the 'Command prefix' to main:call_macro and enter ULTRA_take_page_100 in the 'Command' field of the 'Send Command' function. The Automator then sends main:call_macro ULTRA_take_page_100 followed by the line terminator. Set the line terminator to match what Viz Trio expects, usually CRLF.

Viz Director command

To send a command to Viz Director, configure the device with the Viz Director host and port 6484 and enter the command string in the 'Send Command' function.

Legacy broadcast hardware

For any legacy device that accepts plain text TCP commands, configure the host, port, and line terminator to match the device's specification, then enter the command string in the 'Send Command' function. Refer to the device's documentation for the expected command format and line terminator.

Troubleshooting

Device shows as offline

Check that the host and port are correct and that the device is reachable from the machine running the Automator. Confirm there are no firewall rules blocking the connection on your network. The device only shows as online when it accepts a connection, and the Automator re-checks every 15 seconds.

Device not responding to commands

Check that the line terminator matches what the device expects — an incorrect line terminator is the most common reason a device receives the command but does not act on it. Also verify the command string is correct by referring to the device's documentation.

Function fails with a timeout

If the device does not answer within the configured timeout, the function fails with a "Timed out" error, and the device shows as offline until the next successful check. If the device is slow to respond, increase the 'Timeout (ms)' value. If the device never replies to commands, or keeps the connection open without answering, turn 'Wait for response' off so the Automator does not wait for a reply that never comes.

Did this answer your question?