Motion detection

API for communication with ZBOS by Zora Robotics.

Channels

zbos/security/motiondetect/start

PUB Start motion detection

Channel tags
  • Motion detection

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

cooldown

number

How long to wait after motion is detected before a detection can be triggered again, in milliseconds. Defaults to 0

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

generateMonitoringEvent

boolean

If true, a monitoring event will be created, even if the service is disabled.

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,
  "cooldown": 5000,
  "duration": 7,
  "stopOnDetection": true,
  "stopAfterDuration": true
}

zbos/security/motiondetect/stop

PUB Stop motion detection

Channel tags
  • Motion detection

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}

SUB event: Motion detected

Channel tags
  • Motion detection

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

options

object

Options that were used to start the motion detection.

Any

options. key

string

Required key

Any

options. unit

string

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

Any

options. initialDelay

number

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

Any

options. interval

number

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

Any

options. cooldown

number

How long to wait after motion is detected before a detection can be triggered again, in milliseconds. Defaults to 0

Any

options. 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

options. stopOnDetection

boolean

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

Any

options. generateMonitoringEvent

boolean

If true, a monitoring event will be created, even if the service is disabled.

Any

options. stopAfterDuration

boolean

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

Any

Examples of payload
{
  "image": "SomeBase64Image",
  "options": {
    "key": "test",
    "unit": "h",
    "initialDelay": 2500,
    "interval": 250,
    "cooldown": 5000,
    "duration": 7,
    "stopOnDetection": true,
    "stopAfterDuration": true
  }
}

zbos/security/motiondetect/started/\{key}

SUB Motion detection started

Channel tags
  • Motion detection

EmptyMessage

Empty message

zbos/security/motiondetect/stopped/\{key}

SUB Motion detection stopped

Channel tags
  • Motion detection

EmptyMessage

Empty message

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

SUB event: Motion detection timeout

Channel tags
  • Motion detection

EmptyMessage

Empty message

zbos/security/motiondetect/ready/get

PUB Get motion detection ready

Channel tags
  • Motion detection

KeyResult

Random key

Payload

Name

Type

Description

Accepted values

key

string

Required random key

Any

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

zbos/security/motiondetect/ready/get/response/\{key}

SUB response: Motion detection ready

Channel tags
  • Motion detection

EmptyMessage

Empty message

zbos/security/motiondetect/ready/event

SUB event: Ready to start motion detection

Channel tags
  • Motion detection

EmptyMessage

Empty message