Overview

The Setup Wizard is a build-in feature that guides the user through the initial setup process. This page documents the protocol that underlies the setup wizard functionality.

When a WebSocket connection is first established to the TVH server, an array of unsolicited messages is received.

A message with a notificationClass property of type accessUpdate should be present in that array. If there is a wizard property present in that message, it will contain the name of the current wizard step.

This information can also be obtained from comet/poll/. Note: No /api/ prefix.

Wizard Steps

Step Name
Wizard Operation

"hello"

Language selection.

"login"

Computer Network, Admin and User details.

"network"

TVH Network Type to Adaptor mapping.

"muxes"

Pre-defined mux selection, per TVH Network type.

"status"

Service scanning. (See below)

"mapping"

Service Mapping and Tag creation.

"channels"

This is the 'Finished' screen.

At each step, there is a corresponding 'load' and 'save' operation.

For example:

/api/wizard/login/load /api/wizard/login/save

Each 'load' operation retrieves the fields that are required for that step and the 'save' operation returns the values of those fields.

Sample response for '/api/wizard/login/save':

{ "network":"0.0.0.0/0", "admin_username":"admin_user", "admin_password":"admin_password", "username":"normal_user", "password":"normal_password", "uuid":"00000000000000000000000000000000" }

Manual Operations

The wizard can be manually started with a /api/wizard/start operation. This operation resets the 'wizard' property to "hello".

The wizard can be manually stopped with a /api/wizard/cancel operation. This operation removes the 'wizard' property.

Service Scan Progress Tracking

After the muxes are saved, TVH will commence scanning for services. In order to obtain progress of this scan, TVH should be periodically polled using /api/wizard/status/progress?_dc=[Unix time stamp]. TVH will respond with a status message containing the current progress, mux count and discovered service count. For example:

{"progress":0,"muxes":6,"services":0}{"progress":0.6666666666666667,"muxes":6,"services":41}{"progress":1,"muxes":6,"services":58}

Once progress reaches 1, the service scan is complete and the wizard can progress to the next step.

Outstanding Topics

  • Error messages

  • Data validation

Last updated

Was this helpful?