Last updated

SignalR

This section describes how the VENUS Web API handles real-time events through a SignalR hub and how to set up a SignalR client. The URL for the SignalR hub is http://{{your_venus_webapi_ip_address}}/signalr.

About SignalR

SignalR provides real-time functionality to applications by providing bidirectional communication between clients and a hub. The VENUS Web API utilizes SignalR to provide real-time updates on instruments, traces, errors, and more.

For more information about SignalR, go to Microsoft's Introduction to SignalR page.

Subscribe to SignalR push notifications

Refer to Microsoft's ASP.NET Core SignalR clients page for guidance on subscribing to SignalR push notifications using official client libraries.

Microsoft offers official SignalR client libraries for select platforms. If your application's technology stack is not supported, consider exploring community libraries or alternative solutions.

SignalR push notifications

This section provides schemas for the different push notifications provided by the SignalR hub.

Device notifications

On Control Panel Complete

Payload: Object

Message Name: OnControlPanelComplete

Schema: ControlPanelArgs

Key

Type

Value

Description

DeviceId

Int

Int

ID for the associated device.

On Device Created

Payload: Object

Message Name: OnControlPanelComplete

Schema: ControlPanelArgs

Key

Type

Value

Description

DeviceId

Int

Int

ID for the associated device.

deviceName

String

String

Shortened name of the device, no spaces.

deviceDisplayName

String

String

Full display name of the device.

hasDeckLayout

Boolean

True or False

Flag for if the device has a deck layout.

Simulation

Boolean

True or False

Flag for if the device is in a simulation.

Model

String

String or Empty

Contains the file path for the device model found in the \Vector\RunMaster\Graphic folder.

Labware notifications

The following schemas are used in each of the labware state change notifications.

Schema: DeckLayoutArgs

Key

Type

Value

Description

DeviceId

Int

Int

ID for the associated device.

LabwareId

String

String

Shortened name of the device, no spaces.

PositionId

String

String | empty

Full display name of the device.

PositionCoordinates

Coordinate

Coordinate

Flag for a device with a deck layout (if applicable).

State

Int

ActionType: {

lwcatSelected=0,

lwcatProcessing=1,

lwcatMisc=2,

lwcatError=3,

lwcatProcessed=4,

lwcatReset=5,

lwcatInputRequired=6

}

or

LoadState: {

lwclsUnloaded=0,

lwclsLoaded=1,

lwclsUnloading=2,

lwclsLoading=3,

lwclsRequestUnload=4,

lwclsRequestLoad=5 }

Labware state.

Note: The DeckLayoutArgs can only be ActionType or LoadState, but not both. See the labware state change notifications listed below and their associated state type.

Labware State Enums

ActionType

Key

Value

lwcatSelected

0

lwcatProcessing

1

lwcatMisc

2

lwcatError

3

lwcatProcessed

4

lwcatReset

5

lwcatInputRequired

6

LoadState

Key

Value

lwclsUnloaded

0

lwclsLoaded

1

lwclsUnloading

2

lwclsLoading

3

lwclsRequestUnload

4

lwclsRequestLoad

5

The DeckLayoutArgs type can only be ActionType or LoadState, but not both.

Schema: Coordinate

Key

Type

Value

Description

X

Double

mm

X coordinate.

Y

Double

mm

Y coordinate.

Z

Double

mm

Z coordinate.

Labware Loaded State Changed

Payload: Object

Name: LabwareLoadedStateChanged

Schema: Deck Layout Args

  • Status type: ActionType

Labware Position State Changed

Payload: Object

Name: LabwarePositionStateChanged

Schema: Deck Layout Args

  • Status type: ActionType

Labware State Changed

Payload: Object

Name: LabwareStateChanged

Schema: Deck Layout Args

  • Status type: ActionType

Runtime notifications

During method loading and execution, VENUS provides realtime notifications to indicate instrument state, traces, errors, and more.

New Runtime Error

Payload: String

Message Name: NewRuntimeError

Key

Type

Value

Description

runtimeError

String

String

Message containing the runtime error.

New Runtime Status

Payload: Object

Message Name: NewRuntimeStatus

Schema: RuntimeStatusArgs

Key

Type

Value

Description

ExecutorEvent

ExecutorEvent

Undefined: 0,

Initialized: 1,

InitializedFailed: 2,

Terminated: 3,

Aborted: 4,

Paused: 5,

Running: 6,

Unloaded: 7

Executor Event type.

Message

ExecutorEvent String

String | null | empty

Status message to display.

New Runtime Trace

Payload: String

Message Name: NewRuntimeTrace

Key

Type

Value

Description

runtimeTrace

String

String

Message containing the runtime trace to display.

On Progress Changed

Payload: Object

Message Name: OnProgressChanged

Schema: ProgressChangedArgs

Key

Type

Value

Description

methodName

String

String

Name of the method associated with the progress change.

message

String

String

Message to display.

progressPercentage

Int

Int

Percentage of progress with the running method.

elapsedSeconds

Int

Int

Elapsed run time in seconds.

remainingSeconds

Int

Int

Total remaining seconds left of the method.

schedMode

SchedulingMode

None: 0,

ActivityScheduling: 1,

ActionScheduling: 2

Type of scheduling.

On Load Method

Payload: String

Message Name: OnLoadMethod

Key

Type

Value

Description

loadedMethod

String

String

Message to notify that a method has been loaded.

On DeckWatch Recording Export

Payload: Object

Message Name: OnDeckWatchRecordingExportStarted

Key

Type

Value

Description

FileName

String

String

Filename of the recording.

StartTime

DateTime

DateTime

Start timestamp of the recording.

EndTime

DateTime

DateTime

End timestamp of the recording.

CameraIds

List<String>

List<String>

Collection of camera IDs.

On Instrument Error

Payload: Object

Message Name: InstrumentErrorEvent

Schema: ErrorData

Key

Type

Value

Description

Actions

List<Actions>

List<Actions>

Collection of instrument error actions.

Code

string

string

Specific internal software instrument error code.

Date

DateTime

DateTime

Date and time of the instrument error (in ISO 8601 format).

DetailedErrors

List<DetailedErrors>

List<DetailedErrors>

Collection of detailed errors.

Help

Help

Help

Help related to the instrument error.

uuid

guid

guid

Identifier representing the unique instance of the instrument error.

DeviceId

int

int

Integer representing the unique device for this error.

Message

string

string

Error text

NotificationSound

string

string

Path to sound asset.

RecoveryActions

List<RecoveryActions>

List<RecoveryActions>

Collection of recovery actions for the instrument error.

Timeout

int

int

Time in seconds, as an integer, to wait for the user selection before automated selection of recovery action(s).

Title

string

string

Title of the instrument-error

On Instrument Error Handled

Payload: Object

Message Name: DeviceErrorHandledResponse

Schema: InstrumentErrorHandled

Key

Type

Value

Description

Uuid

Guid

Guid

GUID representing the unique instance of the instrument error that was handled.

RecoveryAction

string

string

Recovery action used to handle the instrument error.