Skip to content

cloud.smarthq.service.coffeebrewer.v1

  • 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 a coffee brewer. This service represents the current state of a coffee brewer device.

Example Device Response (Digital Twin API)

Service for controlling coffee brewer.

{
  "adapterId": "0000000000000000000000000000000000000000",
  "alertTypes": [],
  "createdDateTime": "2022-03-04T12:12:12.123Z",
  "deviceId": "0000000000000000000000000000000000000000000000000000000000000000",
  "deviceType": "cloud.smarthq.device.coffeebrewer",
  "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.coffeebrewer.v1",
      "lastSyncTime": "2022-03-04T12:12:12.123Z",
      "domainType": "cloud.smarthq.domain.coffeebrewer",
      "supportedCommands": [
        "cloud.smarthq.command.coffeebrewer.v1.start",
        "cloud.smarthq.command.coffeebrewer.v1.stop"
      ],
      "state": {
        "runStatus": "cloud.smarthq.type.runstatus.off"
      },
      "serviceId": "0000000000000000000000000000000000000000000000000000000000000000",
      "serviceDeviceType": "cloud.smarthq.device.coffeebrewer",
      "config": {},
      "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
bloomDwellTimeSecondsMaximum INTEGER No
bloomDwellTimeSecondsMinimum INTEGER No
bloomDwellTimeSupported SUPPORTED_PARAMETER No
bloomPumpRunTimeSecondsMaximum INTEGER No
bloomPumpRunTimeSecondsMinimum INTEGER No
bloomPumpRunTimeSupported SUPPORTED_PARAMETER No
coffeePresetsAvailable STRING_ARRAY No
durationSecondsMaximum INTEGER No
durationSecondsMinimum INTEGER No
durationSupported SUPPORTED_PARAMETER No
strengthMaximum INTEGER No
strengthMinimum INTEGER No
strengthSupported SUPPORTED_PARAMETER No
temperatureCelsiusMaximum DOUBLE No
temperatureCelsiusMinimum DOUBLE No
temperatureFahrenheitMaximum DOUBLE No
temperatureFahrenheitMinimum DOUBLE No
temperatureSupported SUPPORTED_PARAMETER No
volumeCarafeMaximum DOUBLE No
volumeCarafeMinimum DOUBLE No
volumeCarafeSupported SUPPORTED_PARAMETER No
volumeCarafeUnits VOLUME_UNITS No
volumeSingleMaximum DOUBLE No
volumeSingleMinimum DOUBLE No
volumeSingleSupported SUPPORTED_PARAMETER No
volumeSingleUnits VOLUME_UNITS No

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 Calculated
bloomDwellTimeSeconds INTEGER No
bloomPumpRunTimeSeconds INTEGER No
coffeePreset STRING No
durationSeconds INTEGER No
outOfWater BOOLEAN No
potPresent BOOLEAN No
runStatus RUN_STATUS Yes
strength INTEGER No
temperatureCelsius DOUBLE No
temperatureCelsiusConverted DOUBLE No Yes
temperatureFahrenheit DOUBLE No
temperatureFahrenheitConverted DOUBLE No Yes
volumeCarafe DOUBLE No
volumeSingle DOUBLE No

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.coffeebrewer.v1.start

Command used to start a coffee brewer.

Field Name Property Type Required Calculated
bloomDwellTimeSeconds INTEGER No
bloomPumpRunTimeSeconds INTEGER No
coffeePreset STRING No
durationSeconds INTEGER No
strength INTEGER No
temperatureCelsius DOUBLE No
temperatureCelsiusConverted DOUBLE No Yes
temperatureFahrenheit DOUBLE No
temperatureFahrenheitConverted DOUBLE No Yes
volumeCarafe DOUBLE No
volumeSingle DOUBLE No
volumeUnits VOLUME_UNITS No

Example Commands

Command to start a coffee brewer.

{
  "command": {
    "commandType": "cloud.smarthq.command.coffeebrewer.v1.start"
  },
  "deviceId": "00000000000000000000000000000000000000000000000000000000000000",
  "domainType": "cloud.smarthq.domain.coffeebrewer",
  "kind": "service#command",
  "serviceDeviceType": "cloud.smarthq.device.coffeebrewer",
  "serviceType": "cloud.smarthq.service.coffeebrewer.v1"
}

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.outofbounds General out of bounds error
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.command.coffeebrewer.v1.stop

Command used to stop a coffee brewer v1 units.

Example Commands

Command to stop a coffee brewer.

{
  "command": {
    "commandType": "cloud.smarthq.command.coffeebrewer.v1.stop"
  },
  "deviceId": "00000000000000000000000000000000000000000000000000000000000000",
  "domainType": "cloud.smarthq.domain.coffeebrewer",
  "kind": "service#command",
  "serviceDeviceType": "cloud.smarthq.device.coffeebrewer",
  "serviceType": "cloud.smarthq.service.coffeebrewer.v1"
}

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

Data Types

BOOLEAN

Value must be either true or false.

DOUBLE

Value must be an double. Field specific restrictions such as a minimum and maximum may apply depending on the field.

INTEGER

Value must be an integer. Field specific restrictions such as a minimum and maximum may apply depending on the field.

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.

STRING_ARRAY

Value must be an array of strings.

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

SUPPORTED_PARAMETER

SUPPORTED_PARAMETER Documentation
cloud.smarthq.type.parameter.defaulted Associated parameter may be provided, the value defaults if not provided
cloud.smarthq.type.parameter.optional Associated parameter may be provided
cloud.smarthq.type.parameter.prohibited Associated parameter cannot be used, this is the implied behavior when not provided.
cloud.smarthq.type.parameter.required Associated parameter must be provided

VOLUME_UNITS

VOLUME_UNITS Documentation
cloud.smarthq.type.volumeunits.cups Cups
cloud.smarthq.type.volumeunits.fluidounces Fluid Ounces
cloud.smarthq.type.volumeunits.unknown Unknown