Viz Plug-ins User Guide

Version 5.0 | Published December 20, 2022 ©

viz_tally_tsl

The viz_tally_tsl plug-in allows Viz Engine to control tallies via message passing from plug-ins and scripts using the TSL UMD Protocol Specification.

The extension acts as client and connects to an TSL server. Currently only V3.1 of TSL UMD Protocol is implemented for both TCP and UDP. The communication for TSL UMD Protocol is unidirectional. So its not possible to get the current status from the Server. Therefore, the extensions keeps record of the current state. On startup, the extensions assumes that all tallies are off. From this point on, the extensions stores which tallies were enabled. If the server connection is lost, then the extension attempts to reconnect. As soon as it is reconnected, it resends all tally states to the server.

Message Interface

The Viz Engine Plug-in API now supports communication via message passing which is similar to a REST API. Messages can be sent via Request(location, message) in the Viz Script.

List Servers

Location: /Extensions/Tsl_Tally/servers
Response:

[
{
"host": "120.120.120.120",
"id": 0,
"links": [
"self",
{
"href": "/Extensions/Tsl_Tally/servers/0"
},
"tally",
{
"href": "/Extensions/Tsl_Tally/servers/0/tally"
}
],
"name": "tsm_test_server",
"port": 6112,
"status": "disconnected"
},
{
"host": "localhost",
"id": 1,
"links": [
"self",
{
"href": "/Extensions/Tsl_Tally/servers/1"
},
"tally",
{
"href": "/Extensions/Tsl_Tally/servers/1/tally"
}
],
"name": "local",
"port": 34567,
"status": "connected"
}
]

Get Tally Status for a Given Server and Address

Location: /Extensions/Tsl_Tally/servers/:server-id/tally/:address
Response:

[
{
"active": false,
"brightness": 1.0
},
{
"active": false,
"brightness": 1.0
},
{
"active": false,
"brightness": 1.0
},
{
"active": false,
"brightness": 1.0
}
]

Get Tally Status for a Given Server and Address

Location: /Extensions/Tsl_Tally/servers/:server-id/tally/:address
Message:

[
{
"active": true,
"brightness": 1.0
},
{
"active": true,
"brightness": 1.0
},
{
"active": false,
"brightness": 1.0
},
{
"active": false,
"brightness": 1.0
}
]

Response:

[
{
"active": true,
"brightness": 1.0
},
{
"active": true,
"brightness": 1.0
},
{
"active": false,
"brightness": 1.0
},
{
"active": false,
"brightness": 1.0
}
]

Get Tally Status for a Given Server, Address and Tally

Location: /Extensions/Tsl_Tally/servers/:server-id/tally/:address/:tally-index
Response:

{
"active": false,
"brightness": 1.0
}

Set Tally Status for a Given Server, Address and Tally

Location: /Extensions/Tsl_Tally/servers/:server-id/tally/:address/:tally-index
Message:

{
"active": true,
"brightness": 1.0
}

Response:

{
"active": true,
"brightness": 1.0
}

Configuration

To Configure this plugin create a file called {VizEngine-Config-dir}/extensions/Tsl_Tally.json. This file is used for every running instance of Viz Engine. To have a specific configuration for a running instance you can create configuration files like {VizEngine-Config-dir}/extensions/Tsl_Tally-{Instance-Number}.json.

Supported config parameters:

  • reconnect-interval-seconds: Interval in seconds to reconnect to a disconnected server.

  • servers: Array of TSM servers.

    • host: Hostname of the TSM server.

    • port: Port of the TSM server.

    • name: Assocciated name for this server.

The Tsl_Tally.json file could then look like this:

{
"reconnect-interval-seconds": 60,
"servers": [
{
"host": "10.211.1.153",
"name": "tsm_adrian",
"port": 6112
},
{
"host": "localhost",
"name": "local",
"port": 34567
}
]
}

Sample Scripts

Switch Tally on

sub turnOnTally(serverId as Integer, address as Integer, tally as Integer)
Request("/Extensions/Tsl_Tally/servers/"&serverId&"/tally/"&address&"/"&tally&"", "{\"active\": true}")
end sub
 
sub turnOffTally(serverId as Integer, address as Integer, tally as Integer)
Request("/Extensions/Tsl_Tally/servers/"&serverId&"/tally/"&address&"/"&tally&"", "{\"active\": true}")
end sub
 
turnOnTally(0, 0, 0)
turnOffTally(0, 0, 0)

Switch Tally on with Brightness to 0.4

sub setTally(serverId as Integer, address as Integer, tally as Integer)
Request("/Extensions/Tsl_Tally/servers/"&serverId&"/tally/"&address&"/"&tally&"", "{\"active\": true, \"brightness\": 0.4}")
end sub
 
setTally(0, 0, 0)