Skip to content
Tero Marttila edited this page Oct 18, 2016 · 1 revision

Server (Web UI)

Web interface for displaying E2 state and controlling presets.

Follow E2 status, providing a HTTP REST + WebSocket JSON API, and an AngularJS web UI:

server --discovery-interface=eth0 --http-listen=:8284 --http-static=./static

The server will connect to the first discovered E2 system.

The REST API will be available at the given --http-listen address. The Web UI requires the static assets at the given --http-static filesystem path. The static web assets are included in the release builds, or they can be built from the sources (see README).

The Web UI will be accessible at the port configured using --http-listen. Using --http-listen=:8284 will listen on all interfaces at TCP port 8282. Use an URL such as http://localhost:8284 or http://yourhostname:8284/. Using --http-listen=192.0.2.1:8284 will listen on the specific interface given.

Usage

  server [OPTIONS]

Web:
	  --http-listen=[HOST]:PORT
	  --http-static=PATH

E2 Discovery:
	  --discovery-address=
	  --discovery-interface=
	  --discovery-interval=

E2 Client:
	  --e2-address=HOST
	  --e2-jsonrpc-port=PORT
	  --e2-xml-port=PORT
	  --e2-telnet-port=PORT
	  --e2-timeout=
	  --e2-safe                    Safe mode, only modify preview
	  --e2-readonly                Read state, do not modify anything
	  --e2-debug                   Dump commands

Help Options:
  -h, --help                       Show this help message

The server can be run in LIVE, SAFE or READ mode. Use --e2-readonly for READ mode to limit the client to only commands that read the system state, and do not perform any modifications to preview or program state. Use --e2-safe for SAFE mode to limit the client to commands that modify the preview state only, and do not perform any Recall, Cut or AutoTrans commands to program. The default LIVE mode is to allow use of all commands, including those that modify Program state.

The status bar at the top of the UI indicates the current mode, showing green for LIVE mode, yellow for SAFE mode and grey for READ mode. The status bar will change to read to indicate ERROR mode if the WebSocket connection or any REST API request fails. If the WebSocket connection is lost, the status bar will turn dark grey and the view will fade:

Web UI Disconnected

Main view

Shows an overview of Sources and their active Preview/Program destinations.

Web UI Main view

Presets

Shows grouped Presets.

Web UI Presets view

Clicking a Preset recalls it to Preview.

There are three different grouping options available. All will show all presets in ID order. X.Y groups presets by their sequence number. PG groups presets by the console layout's preset pages.

The display size buttons change the size of the preset buttons, between Small, Normal and Large.

Clicking Take transitions the last selected Preset directly to Program. Enabling Auto Take will recall each selected Preset directly to Program. The colors of the Preset buttons change to red to indicate this state.

Clicking Cut or Auto Trans transitions the current System Preview state to Program. WARNING: This may not necessarily be the same as the last recalled preset, in case other concurrent users are also modifying preview or the set of active destinations!

The last recalled preset is shown with a border. Externally recalled presets are colored in white. Recalling a preset will color the border green. The border is initially dashed until the E2 updates the result of the recall command. Take will change the selected Preset's border to red. XXX: Cut and Auto Trans do not change the selected Preset's display state.

System

Raw System state, represented as a collapsible JSON object, live-updated from the /events WebSocket:

Web UI System view

API

HTTP REST JSON.

GET /api/

Returns server state:

{
    "System": { ... }
}

This uses the same JSON format as the WebSocket API.

See the server.json example file.

GET /api/presets

List of presets.

POST /api/presets { ID: 0, Live: false, Cut: false, AutoTrans: -1 }

Activate presets on preview/program, and optionally cut/autotrans from preview to program.

Parameter Type Default Meaning
ID int -1 Recall preset
Live bool false Recall preset directly to program
Cut bool false Cut preview to program (on active destinations)
AutoTrans int -1 Auto transition preview to program, using given number of frames, or 0 for default

GET /api/presets/

List of presets with detailed information about preset destinations.

This is O(N) JSON-RPC calls on the number of presets.

GET /api/presets/:id

Detailed information about given preset.

This is a single JSON-RPC call.

WebSocket /events

Live streaming of updated E2 system state on events. Sends the current system state on initial connect.

Uses the same JSON format as /api/.

{
    "System": { ... }
}

See the server.json example file.