Motion detection

API for communication with ZBOS by Zora Robotics.

Channels

zbos/security/motiondetect/start

publish

Start motion detection

Channel tags
  • Motion detection

Message MotionDetectionOptions
Payload

Name

Type

Description

Accepted values

key

string

Required key

Any

unit

string

Can be "s", "h" or "m" (seconds, hours, minutes), used for duration. Defaults to seconds

Any

initialDelay

number

How long to wait until starting motion detection, in milliseconds. Defaults to 2000, lower values may cause false positives

Any

interval

number

How often the camera should check for motion, in milliseconds. Defaults to 200

Any

duration

number

The maximum time the motion detection will be active, after the time is elapsed, the motion detection will stop. Defaults to 10

Any

stopOnDetection

boolean

If true the motion detection will stop after the first detection. Defaults to true

Any

upload

boolean

If true, the picture with motion detected will be uploaded to the cloud. A notification is sent to zbos-control (if enabled). Defaults to false

Any

stopAfterDuration

boolean

If true the motion detection will stop at the end of the duration. Defaults to true

Any

Examples of payload
{
  "key": "test",
  "unit": "h",
  "initialDelay": 2500,
  "interval": 250,
  "duration": 7,
  "stopOnDetection": true,
  "upload": true,
  "stopAfterDuration": true
}

zbos/security/motiondetect/stop

publish

Stop motion detection

Channel tags
  • Motion detection

Message KeyResult

Random key

Payload

Name

Type

Description

Accepted values

key

string

Required random key

Any

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

zbos/security/motiondetect/event/{key}

subscribe

event: Motion detected

Channel tags
  • Motion detection

Message MotionDetectionEvent
Payload

Name

Type

Description

Accepted values

image

string

Image of the detected motion, only given if upload is enabled in motion detection options.

Any

Examples of payload
{
  "image": "SomeBase64Image"
}

zbos/security/motiondetect/started/{key}

subscribe

Motion detection started

Channel tags
  • Motion detection

Message EmptyMessage

Empty message

Payload

Name

Type

Description

Accepted values

Message Payload

object

Any

Example of payload (generated)
{}

zbos/security/motiondetect/stopped/{key}

subscribe

Motion detection stopped

Channel tags
  • Motion detection

Message EmptyMessage

Empty message

Payload

Name

Type

Description

Accepted values

Message Payload

object

Any

Example of payload (generated)
{}

zbos/security/motiondetect/timeout/event/{key}

subscribe

event: Motion detection timeout

Channel tags
  • Motion detection

Message EmptyMessage

Empty message

Payload

Name

Type

Description

Accepted values

Message Payload

object

Any

Example of payload (generated)
{}