Skip to content

cloud.smarthq.service.video.stream

  • Configuration


    Describes boundaries and fixed properties for the service.

    Go There

  • State


    A list of the states this service can be in.

    Go There

  • Commands


    How to change the state of the service.

    Go There

  • Data Types


    All the data types used for this service.

    Go There

Description

Service for video stream.

Example Device Response (Digital Twin API)

Service representing the functionality of the video stream

{
  "adapterId": "0000000000000000000000000000000000000000",
  "alertTypes": [],
  "createdDateTime": "2022-03-04T12:12:12.123Z",
  "deviceId": "0000000000000000000000000000000000000000000000000000000000000000",
  "deviceType": "cloud.smarthq.device.appliance",
  "gatewayId": "0000000000000000000000000000000000000000000000000000000000000000",
  "kind": "device#item",
  "lastPresenceTime": "2022-03-04T12:12:12.123Z",
  "lastSyncTime": "2022-03-04T12:12:12.123Z",
  "presence": "OFFLINE",
  "removable": true,
  "services": [
    {
      "serviceType": "cloud.smarthq.service.video.stream",
      "lastSyncTime": "2022-03-04T12:12:12.123Z",
      "domainType": "cloud.smarthq.domain.videostream",
      "supportedCommands": [
        "cloud.smarthq.command.video.stream.set.action"
      ],
      "state": {
        "currentStatus": "cloud.smarthq.type.runstatus.stopped",
        "cameraFirmwareVersion": "0.0.0.0",
        "imageCaptureAvailable": "cloud.smarthq.type.imagecapture.availability.available",
        "autheticationStatus": "cloud.smarthq.type.videostream.authenticationstatus.none",
        "terminationReason": "cloud.smarthq.type.videostream.terminationreason.timeout"
      },
      "serviceId": "0000000000000000000000000000000000000000000000000000000000000000",
      "serviceDeviceType": "cloud.smarthq.device.appliance",
      "config": {
        "supportedRunStatus": [
          "cloud.smarthq.type.runstatus.stopped",
          "cloud.smarthq.type.runstatus.running.720p",
          "cloud.smarthq.type.runstatus.running.480p"
        ]
      },
      "lastStateTime": "2022-03-04T12:12:12.123Z"
    }
  ],
  "userId": "000000000000000"
}

Configuration

The following are properties for the gateway/device sync as part of the "config" object for each individual service.

Field Name Property Type Required
supportedRunStatus SET<RUN_STATUS> Yes

State

The following are properties for the device state report as part of the "state" object for each individual service.

Field Name Property Type Required
autheticationStatus VIDEOSTREAM_AUTHENTICATION_STATUS No
cameraFirmwareVersion STRING No
currentStatus RUN_STATUS Yes
disabled BOOLEAN No
imageCaptureAvailable IMAGE_CAPTURE_AVAILABILITY Yes
terminationReason VIDEOSTREAM_TERMINATION_REASON Yes

Commands

The following are properties for both the Digital Twin API to send a command to the device as well as the properties passed as part of a command to the gateway to be processed by the device itself.

cloud.smarthq.command.video.stream.set.action

Command used to set the action for the video stream

Field Name Property Type Required
action RUN_STATUS Yes

Example Commands

Command to set the action for video stream.

{
  "command": {
    "commandType": "cloud.smarthq.command.video.stream.set.action",
    "action": "cloud.smarthq.type.runstatus.stopped"
  },
  "deviceId": "00000000000000000000000000000000000000000000000000000000000000",
  "domainType": "cloud.smarthq.domain.videostream",
  "kind": "service#command",
  "serviceDeviceType": "cloud.smarthq.device.appliance",
  "serviceType": "cloud.smarthq.service.video.stream"
}

Supported Outcomes

Each service has an allow listed set of outcomes that the device may return when asked to execute a command.

Outcome Documentation
cloud.smarthq.outcome.badrequest The request was invalid.
cloud.smarthq.outcome.developererror Only used when there is a server side bug
cloud.smarthq.outcome.deviceoffline The device is offline.
cloud.smarthq.outcome.forbidden The request is forbidden due to permissions.
cloud.smarthq.outcome.internalerror The server had an issue processing the request
cloud.smarthq.outcome.missingconfig The service config is missing
cloud.smarthq.outcome.missingstate The service state is missing
cloud.smarthq.outcome.notallowed The command is not allowed.
cloud.smarthq.outcome.notfound The request is forbidden due to permissions.
cloud.smarthq.outcome.notsupported The command is not supported.
cloud.smarthq.outcome.servicedisabled Feature is currently disabled
cloud.smarthq.outcome.success Successful request
cloud.smarthq.outcome.timeout The server experienced timeout waiting for a response from the gateway
cloud.smarthq.outcome.unavailablerunstatus The run status is unavailable.

Data Types

BOOLEAN

Value must be either true or false.

STRING

Value must be a sequence of characters, inserted between " and " (double quotes). Field specific restrictions such as a regular expression may apply depending on the field.

IMAGE_CAPTURE_AVAILABILITY

IMAGE_CAPTURE_AVAILABILITY Documentation
cloud.smarthq.type.imagecapture.availability.available Available
cloud.smarthq.type.imagecapture.availability.available.with.privacy.filter Available with privacy filter
cloud.smarthq.type.imagecapture.availability.unavailable Unavailable

RUN_STATUS

RUN_STATUS Documentation
cloud.smarthq.type.runstatus.active Active
cloud.smarthq.type.runstatus.delayed Delayed
cloud.smarthq.type.runstatus.endofcycle End of Cycle
cloud.smarthq.type.runstatus.idle Idle
cloud.smarthq.type.runstatus.off Off
cloud.smarthq.type.runstatus.paused Paused
cloud.smarthq.type.runstatus.running.480p Running 480p
cloud.smarthq.type.runstatus.running.720p Running 720p
cloud.smarthq.type.runstatus.standby Standby
cloud.smarthq.type.runstatus.stopped Stopped
cloud.smarthq.type.runstatus.unknown Unknown

SET<RUN_STATUS>

SET<RUN_STATUS> Documentation
cloud.smarthq.type.runstatus.active Active
cloud.smarthq.type.runstatus.delayed Delayed
cloud.smarthq.type.runstatus.endofcycle End of Cycle
cloud.smarthq.type.runstatus.idle Idle
cloud.smarthq.type.runstatus.off Off
cloud.smarthq.type.runstatus.paused Paused
cloud.smarthq.type.runstatus.running.480p Running 480p
cloud.smarthq.type.runstatus.running.720p Running 720p
cloud.smarthq.type.runstatus.standby Standby
cloud.smarthq.type.runstatus.stopped Stopped
cloud.smarthq.type.runstatus.unknown Unknown

VIDEOSTREAM_AUTHENTICATION_STATUS

VIDEOSTREAM_AUTHENTICATION_STATUS Documentation
cloud.smarthq.type.videostream.authenticationstatus.failure Failure
cloud.smarthq.type.videostream.authenticationstatus.none None
cloud.smarthq.type.videostream.authenticationstatus.pending Pending
cloud.smarthq.type.videostream.authenticationstatus.success Success

VIDEOSTREAM_TERMINATION_REASON

VIDEOSTREAM_TERMINATION_REASON Documentation
cloud.smarthq.type.videostream.terminationreason.authenticationfailed Authentication failed
cloud.smarthq.type.videostream.terminationreason.cameramissing Camera missing
cloud.smarthq.type.videostream.terminationreason.cookmodeinvalid Cook mode invalid
cloud.smarthq.type.videostream.terminationreason.notterminated Not terminated
cloud.smarthq.type.videostream.terminationreason.processcheckfailed Process check failed
cloud.smarthq.type.videostream.terminationreason.sabbathmodeon Sabbath mode on
cloud.smarthq.type.videostream.terminationreason.timeout Timeout
cloud.smarthq.type.videostream.terminationreason.userstopped User stopped
cloud.smarthq.type.videostream.terminationreason.wifidisconnected Wifi disconnected