Last updated

Gather instrument information

When gathering information about an instrument, obtain the instrument's device ID during runtime. The device ID is used to retrieve information such as instrument configuration and deck layout.

To obtain information on an instrument's labware equipment, subscribe to one or all of the labware state change notifications provided by the SignalR Hub.

If authentication is not enabled in your VENUS environment, omit the authorization header.

Get Device ID during runtime

After loading a method that contains one or more devices, use a SignalR notification or the Web API to get the device ID for each device. Use the device ID to obtain the instrument configuration and the device's deck layout.

To obtain the device ID from the SignalR Hub, subscribe to the “OnDeviceCreated” notification and filter through the response to obtain the device ID.

To obtain the device ID through the Web API, execute the provided endpoint and filter through the response for the device ID.

get/api/vector/v3/devices/runtime
curl 'https://{{your_venus_webapi_ip_address}}/api/vector/v3/devices/runtime' \
  --header 'Authorization: Bearer <token>'
Response
Returns a set of runtime devices.

Get deck layout

After obtaining the device ID, use the device ID in the {deviceId} section of the provided endpoint to retrieve the device's deck layout. by using

get/api/vector/v3/devices/deck-layout/{deviceId}
curl 'https://{{your_venus_webapi_ip_address}}/api/vector/v3/devices/deck-layout/<deviceId>' \
  --header 'Authorization: Bearer <token>'
Response
Returns Hamilton.WebAPI.Common.DeckLayoutData.

Subscribe to labware events

When a method is running, subscribe to specific SignalR push notifications to receive labware information.

Use Typescript code snippets only as a reference on how to receive notifications.

For more information on creating SignalR subscriptions, go to Microsoft's ASP.NET Core SignalR JavaScript client page.

Subscribe to LabwareLoadedStateChanged

The LabwareLoadedStateChanged push notification provides a payload that contains the load state of the labware.

To subscribe, use the provided code snippet and the LabwareLoadedStateChanged schema.

Possible labware state values:

  • Unloaded

  • Loaded

  • Unloading

  • Loading

  • Requesting Unload

  • Requesting Load

typescript
this.hubConnection.on(
  'LabwareLoadedStateChanged',
  (labwareloadedStateChanged: LabwareLoadedStateChanged) => {
    // handle notification
  }
);

Subscribe to LabwarePositionStateChanged

The LabwarePositionStateChanged push notification provides a payload that contains the position change of specified wells or containers in a plate in the labware (e.g., carrier).

To subscribe, use the provided code snippet and the LabwarePositionStateChanged schema. The payload contains the position ID and the coordinate change of the labware.

typescript
this.hubConnection.on(
  'LabwarePositionStateChanged',
  (labwarePositionStateChanged: LabwarePositionStateChanged) => {
    // handle notification
  }
);

Subscribe to LabwareStateChanged

The LabwareStateChanged push notification provides a payload that contains the action state of the labware.

To subscribe, use the code snippet and the LabwareStateChanged schema.

Possible labware state values:

  • Selected

  • Processing

  • Error

  • Process

  • Reset

  • Requires Input

  • Miscellaneous State

typescript
this.hubConnection.on(
  'LabwareStateChanged',
  (labwareStateChanged: LabwareStateChanged) => {
    // handle notification
  }
);