Camera

API for communication with ZBOS by Zora Robotics.

Channels

zbos/camera/picture/get

PUB Get picture

Channel tags
  • Camera

KeyResult

Random key

Payload

Name

Type

Description

Accepted values

key

string

Required random key

Any

Examples of payload
{
  "key": "ABCxyz"
}

zbos/camera/picture/event

SUB event: Get picture

Channel tags
  • Camera

String
Payload

Name

Type

Description

Accepted values

Message Payload

string

Any

Example of payload (generated)
"string"

zbos/camera/picture/save

PUB Take a picture and save it to storage

Channel tags
  • Camera

EmptyMessage

Empty message

zbos/camera/picture/save/response/\{key}

SUB response: Take a picture and save it to storage

Channel tags
  • Camera

PictureSaveResponse
Payload

Name

Type

Description

Accepted values

storage_path

string

The path where the image was stored

Any

Examples of payload
{
  "storage_path": "/sdcard/zbos_media_library/image1.png"
}

zbos/camera/stream/start

PUB Start the camera stream of the selected camera.

Channel tags
  • Camera

StreamStartRequest
Payload

Name

Type

Description

Accepted values

cameraId

string

Camera id

Any

extras

object

Any

Examples of payload
{
  "cameraId": "string",
  "extras": {}
}

zbos/camera/stream/stop

PUB Stop camera stream

Channel tags
  • Camera

VideoOptions
Payload

Name

Type

Description

Accepted values

requestId

string

Any

cameraId

string

camera id

Any

Examples of payload
{
  "requestId": "string",
  "cameraId": "string"
}

zbos/camera/stream/stop/event

SUB Camera stream has stopped

Channel tags
  • Camera

EmptyMessage

Empty message

zbos/camera/stream/init

PUB Initialize camera stream

Send by the robot to start the webrtc handshake

Channel tags
  • Camera

EmptyMessage

Empty message

zbos/camera/stream/offer

WebRTC Session Description

PUB Handshake offer for camera stream

Channel tags
  • Camera

StreamMessage
Payload

Name

Type

Description

Accepted values

cameraId

string

Any

type

string

* offer * pranswer * answer

sdp

string

Any

Example of payload (generated)
{
  "cameraId": "string",
  "type": "offer",
  "sdp": "string"
}

zbos/camera/stream/answer

WebRTC Session Description

SUB Handshake answer for camera stream

Channel tags
  • Camera

StreamMessage
Payload

Name

Type

Description

Accepted values

cameraId

string

Any

type

string

* offer * pranswer * answer

sdp

string

Any

Examples of payload
{
  "type": "answer",
  "sdp": "string"
}

zbos/camera/stream/candidate/core

WebRTC Session Description

SUB RTC ICE Candidate Core

Channel tags
  • Camera

Candidate
Payload

Name

Type

Description

Accepted values

cameraId

string

camera id

Any

type

string

Always returns "candidate"

Any

label

integer

sdpMLineIndex

Any

id

string

sdpMid

Any

candidate

string

Any

Examples of payload
{
  "cameraId": "string",
  "type": "string",
  "label": 5,
  "id": "string",
  "candidate": "string"
}

zbos/camera/stream/candidate/control

SUB RTC ICE Candidate Control

Channel tags
  • Camera

Candidate
Payload

Name

Type

Description

Accepted values

cameraId

string

camera id

Any

type

string

Always returns "candidate"

Any

label

integer

sdpMLineIndex

Any

id

string

sdpMid

Any

candidate

string

Any

Examples of payload
{
  "cameraId": "string",
  "type": "string",
  "label": 5,
  "id": "string",
  "candidate": "string"
}

zbos/camera/stream/status/event

SUB Event: Camera stream status changed

Channel tags
  • Camera

StreamStatus
Payload

Name

Type

Description

Accepted values

cameraId

string

Any

status

string

* NEW * CHECKING * CONNECTED * COMPLETED * FAILED * DISCONNECTED * CLOSED * REFUSED

Examples of payload
{
  "cameraId": "main_camera",
  "status": "CONNECTED"
}
{
  "cameraId": "main_camera",
  "status": "CLOSED"
}

zbos/camera/stream/twoway/request

PUB Request two way camera stream

Channel tags
  • Camera

TwoWayRequest
Payload

Name

Type

Description

Accepted values

audioEnabled

boolean

Optional. Whether or not the stream should start with audio enabled, false by default

Any

target

string

Optional. The component to start the stream in, will start in 'STEERING' by default

* DASHBOARD * DASHBOARD_FLOATING * STEERING

cameraId

string

Optional. The camera to use for the stream, will use the main camera by default

Any

userId

string

Optional. A connected user to send this request to, will be sent to all connected users by default

Any

Examples of payload
{
  "audioEnabled": true,
  "target": "DASHBOARD",
  "cameraId": "screenshare",
  "userId": "a123bc"
}

zbos/camera/preview/resume

PUB Resume camera preview

Channel tags
  • Camera

EmptyMessage

Empty message

zbos/camera/preview/pause

PUB Pause camera preview

Channel tags
  • Camera

EmptyMessage

Empty message

zbos/camera/error

PUB Camera error

Channel tags
  • Camera

EmptyMessage

Empty message

zbos/camera/qr/scan/start

PUB Start QR Scanning

Start a QR code scan using the camera.

Channel tags
  • Camera

QrScanOptions
Payload

Name

Type

Description

Accepted values

id

string

Unique ID that will be used in related topics.

Any

scan_timeout_in_seconds

integer

Optional. Timeout in seconds after which the scan should automatically be stopped. Pass 0 to not have a timeout. 0 is also the default when no value was passed.

Any

stop_on_detection

boolean

Optional. Stop scanning once a QR code has been detected, default false

Any

tell_user

boolean

Optional. Use text to speech to announce the current status of the QR scan, default true

Any

play_scan_sound

boolean

Optional. Play a barcode scan sound when detecting a QR code, default true

Any

show_camera

boolean

Optional. Show an overlay for the QR scan, default false

Any

show_icon

boolean

Optional. Show a checkmark icon when a QR code has been detected, default true

Any

show_close_button

boolean

Optional. Allows stopping the QR scan with a close button, default false

Any

publish_to_listeners

boolean

Optional. Allow internal listeners (such as wifi connection via QR) to receive scanned QR codes, default true

Any

Examples of payload
{
  "id": "abc",
  "scan_timeout_in_seconds": 60
}
{
  "id": "xyz",
  "scan_timeout_in_seconds": 0,
  "show_camera": true
}

zbos/camera/qr/scan/stop

PUB Stop QR Scanning

Stop a QR code scan using the camera.

Channel tags
  • Camera

QrScanStopRequest
Payload

Name

Type

Description

Accepted values

id

string

Unique ID that should be the same as the one used in the start request.

Any

Examples of payload
{
  "id": "abc"
}

zbos/camera/qr/scan/stopped/event

SUB Event: Stopped QR scanning

This event is published when a QR scan has stopped, either manually or due to a timeout.

Channel tags
  • Camera

QrScanStoppedEvent
Payload

Name

Type

Description

Accepted values

scan_id

string

Unique ID that will be the same as the one used in the start request.

Any

Examples of payload
{
  "scan_id": "abc"
}

zbos/camera/qr/result/event

SUB QR Result Event

This event is published every time a QR code is decoded while a scan is active.

Channel tags
  • Camera

QrResultEvent
Payload

Name

Type

Description

Accepted values

content

string

Any

Examples of payload
{
  "content": "QR Code Content"
}