Page cover image

Connect to Vanilla Websocket

Connect to Vanilla Websocket

Event dump can be caught by a client that is using WebSocket client. Depends on your programming language, for Node.js you can follow the instructions below:

  • install nodejs

  • install wsc

npm install -g wsc
  • listen to the result

wsc ws://[VANILLA_DASHBOARD_HOST]/api/event_channel?stream_id=[CAMERA_STREAM_ID]

The result you got, example one of JSON event dump below (Face Recognition event):

{
  "analytic_id": "NFV4-FR",
  "stream_id": "asda123da",
  "label": "unrecognized",
  "location": "test1",
  "primary_image": "base64 / empty string ",
  "secondary_image": "base64 / empty string ",
  "result": "string",
  "timestamp": "2021-03-30T03:15:38Z"
}

All analytics has same response template.

Face Recognition

{
  "analytic_id": "NFV4-FR",
  "stream_id": "asda123da",
  "label": "unrecognized",
  "location": "test1",
  "primary_image": "base64 / empty string ",
  "secondary_image": "base64 / empty string ",
  "result": "string",
  "timestamp": "2021-03-30T03:15:38Z"
}

Vehicle Counting

{
  "analytic_id": "NFV4-VC",
  "stream_id": "asda123da",
  "label": "Car",
  "location": "test1",
  "primary_image": "base64 / empty string ",
  "secondary_image": "base64 / empty string ",
  "result": "IN",
  "timestamp": "2021-03-30T03:15:38Z"
}

Last updated

Was this helpful?