Skip to content

cloud.smarthq.service.smartdispense

  • 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 Smart Dispense.

Example Device Response (Digital Twin API)

Service for smart dispense for laundry.

{
  "adapterId": "0000000000000000000000000000000000000000",
  "alertTypes": [],
  "createdDateTime": "2022-03-04T12:12:12.123Z",
  "deviceId": "0000000000000000000000000000000000000000000000000000000000000000",
  "deviceType": "cloud.smarthq.device.washer",
  "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.smartdispense",
      "lastSyncTime": "2022-03-04T12:12:12.123Z",
      "domainType": "cloud.smarthq.domain.laundry.smartdispense",
      "supportedCommands": [
        "cloud.smarthq.command.smartdispense.mode.set"
      ],
      "state": {
        "level": "cloud.smarthq.type.tanklevel.full",
        "substance": "cloud.smarthq.type.substance.detergent",
        "cyclesRemaining": 25.0,
        "type": "cloud.smarthq.type.featuretype.detergentandsoftener",
        "dosing": "cloud.smarthq.type.dosing.more",
        "featureVersion": 1.0
      },
      "serviceId": "0000000000000000000000000000000000000000000000000000000000000000",
      "serviceDeviceType": "cloud.smarthq.device.washer",
      "config": {
        "supportedModes": [
          "cloud.smarthq.type.substance.detergent",
          "cloud.smarthq.type.substance.softener"
        ]
      },
      "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
supportedModes SET<SUBSTANCE> 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
cyclesRemaining INTEGER No
disabled BOOLEAN No
dosing DOSING Yes
featureVersion INTEGER Yes
level TANK_LEVEL Yes
substance SUBSTANCE Yes
type FEATURE_TYPE 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.smartdispense.mode.set

Command to set the new mode for the Smart Dispense Service.

Rules Engine Allowed Domains:

  • cloud.smarthq.domain.laundry.smartdispense
Field Name Property Type Required
bucket INTEGER Yes
dosage DOSING Yes
substance SUBSTANCE Yes

Example Commands

Command to set the Smart Dispense Type.

{
  "command": {
    "bucket": 2.0,
    "dosage": "cloud.smarthq.type.dosing.auto",
    "commandType": "cloud.smarthq.command.smartdispense.mode.set",
    "substance": "cloud.smarthq.type.substance.detergent"
  },
  "deviceId": "00000000000000000000000000000000000000000000000000000000000000",
  "domainType": "cloud.smarthq.domain.laundry.smartdispense",
  "kind": "service#command",
  "serviceDeviceType": "cloud.smarthq.device.washer",
  "serviceType": "cloud.smarthq.service.smartdispense"
}

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.

INTEGER

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

DOSING

DOSING Documentation
cloud.smarthq.type.dosing.auto auto
cloud.smarthq.type.dosing.less less
cloud.smarthq.type.dosing.lessminus lessminus
cloud.smarthq.type.dosing.more more
cloud.smarthq.type.dosing.moreplus moreplus
cloud.smarthq.type.dosing.off off
cloud.smarthq.type.dosing.regular regular

FEATURE_TYPE

FEATURE_TYPE Documentation
cloud.smarthq.type.featuretype.detergent detergent
cloud.smarthq.type.featuretype.detergentandsoftener detergent and softener
cloud.smarthq.type.featuretype.softener softener

SET<SUBSTANCE>

SET<SUBSTANCE> Documentation
cloud.smarthq.type.substance.detergent detergent
cloud.smarthq.type.substance.softener softener

SUBSTANCE

SUBSTANCE Documentation
cloud.smarthq.type.substance.detergent detergent
cloud.smarthq.type.substance.softener softener

TANK_LEVEL

TANK_LEVEL Documentation
cloud.smarthq.type.tanklevel.empty empty
cloud.smarthq.type.tanklevel.full full
cloud.smarthq.type.tanklevel.low low
cloud.smarthq.type.tanklevel.sensordisconnected sensordisconnected
cloud.smarthq.type.tanklevel.sensorerror sensorerror
cloud.smarthq.type.tanklevel.unknown unknown