Skip to content

cloud.smarthq.service.laundry.mode.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 to model the laundry mode is used in conjunction with the laundry state service. This service represents an available laundry mode providing the configuration for what parameters are required to start it, a command for actually starting the laundry mode, as well as the state of the laundry mode if it is running.

Example Device Response (Digital Twin API)

Service representing jeans stain mode for washer.

{
  "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.laundry.mode.v1",
      "lastSyncTime": "2022-03-04T12:12:12.123Z",
      "domainType": "cloud.smarthq.domain.laundry.jeans",
      "supportedCommands": [
        "cloud.smarthq.command.laundry.mode.v1.set"
      ],
      "state": {
        "disabled": false
      },
      "serviceId": "0000000000000000000000000000000000000000000000000000000000000000",
      "serviceDeviceType": "cloud.smarthq.device.washer",
      "config": {
        "supportedStains": [
          "cloud.smarthq.type.laundry.stain.off",
          "cloud.smarthq.type.laundry.stain.blood",
          "cloud.smarthq.type.laundry.stain.grass",
          "cloud.smarthq.type.laundry.stain.dirt",
          "cloud.smarthq.type.laundry.stain.tomato",
          "cloud.smarthq.type.laundry.stain.beverages",
          "cloud.smarthq.type.laundry.stain.oily"
        ]
      },
      "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
supportedLaundryDrynessLevel SET<LAUNDRY_DRYNESS_LEVEL> No
supportedLaundryTemperatures SET<LAUNDRY_TEMPERATURE> No
supportedStains SET<LAUNDRY_STAIN_REMOVAL_GUIDE> 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
disabled BOOLEAN 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.laundry.mode.v1.set

Command used to set options on a laundry device.

Field Name Property Type Required
laundryDrynessLevel LAUNDRY_DRYNESS_LEVEL No
laundryTemperature LAUNDRY_TEMPERATURE No
stain LAUNDRY_STAIN_REMOVAL_GUIDE No

Example Commands

Command to set the stain mode in washer.

{
  "command": {
    "commandType": "cloud.smarthq.command.laundry.mode.v1.set",
    "stain": "cloud.smarthq.type.laundry.stain.off"
  },
  "deviceId": "00000000000000000000000000000000000000000000000000000000000000",
  "domainType": "cloud.smarthq.domain.laundry.jeans",
  "kind": "service#command",
  "serviceDeviceType": "cloud.smarthq.device.washer",
  "serviceType": "cloud.smarthq.service.laundry.mode.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

Data Types

BOOLEAN

Value must be either true or false.

LAUNDRY_DRYNESS_LEVEL

LAUNDRY_DRYNESS_LEVEL Documentation
cloud.smarthq.type.laundry.dryness.level.damp Damp
cloud.smarthq.type.laundry.dryness.level.disabled Disabled
cloud.smarthq.type.laundry.dryness.level.dry Dry
cloud.smarthq.type.laundry.dryness.level.extradry Extra Dry
cloud.smarthq.type.laundry.dryness.level.invalid Invalid
cloud.smarthq.type.laundry.dryness.level.lessdry Less Dry
cloud.smarthq.type.laundry.dryness.level.moredry More Dry
cloud.smarthq.type.laundry.dryness.level.unknown Unknown

LAUNDRY_STAIN_REMOVAL_GUIDE

LAUNDRY_STAIN_REMOVAL_GUIDE Documentation
cloud.smarthq.type.laundry.stain.beverages Beverages
cloud.smarthq.type.laundry.stain.blood Blood
cloud.smarthq.type.laundry.stain.dirt Dirt
cloud.smarthq.type.laundry.stain.grass Grass
cloud.smarthq.type.laundry.stain.off Off
cloud.smarthq.type.laundry.stain.oily Oily
cloud.smarthq.type.laundry.stain.tomato Tomato
cloud.smarthq.type.laundry.stain.unknown Unknown

LAUNDRY_TEMPERATURE

LAUNDRY_TEMPERATURE Documentation
cloud.smarthq.type.laundry.temperature.cold Cold
cloud.smarthq.type.laundry.temperature.colors Colors
cloud.smarthq.type.laundry.temperature.cool Cool
cloud.smarthq.type.laundry.temperature.disabled Disabled
cloud.smarthq.type.laundry.temperature.extrahot Extra Hot
cloud.smarthq.type.laundry.temperature.extralow Extra Low
cloud.smarthq.type.laundry.temperature.high High
cloud.smarthq.type.laundry.temperature.hot Hot
cloud.smarthq.type.laundry.temperature.low Low
cloud.smarthq.type.laundry.temperature.medium Medium
cloud.smarthq.type.laundry.temperature.noheat No Heat
cloud.smarthq.type.laundry.temperature.tapcold Tap Cold
cloud.smarthq.type.laundry.temperature.unknown Unknown
cloud.smarthq.type.laundry.temperature.warm Warm

SET<LAUNDRY_DRYNESS_LEVEL>

SET<LAUNDRY_DRYNESS_LEVEL> Documentation
cloud.smarthq.type.laundry.dryness.level.damp Damp
cloud.smarthq.type.laundry.dryness.level.disabled Disabled
cloud.smarthq.type.laundry.dryness.level.dry Dry
cloud.smarthq.type.laundry.dryness.level.extradry Extra Dry
cloud.smarthq.type.laundry.dryness.level.invalid Invalid
cloud.smarthq.type.laundry.dryness.level.lessdry Less Dry
cloud.smarthq.type.laundry.dryness.level.moredry More Dry
cloud.smarthq.type.laundry.dryness.level.unknown Unknown

SET<LAUNDRY_STAIN_REMOVAL_GUIDE>

SET<LAUNDRY_STAIN_REMOVAL_GUIDE> Documentation
cloud.smarthq.type.laundry.stain.beverages Beverages
cloud.smarthq.type.laundry.stain.blood Blood
cloud.smarthq.type.laundry.stain.dirt Dirt
cloud.smarthq.type.laundry.stain.grass Grass
cloud.smarthq.type.laundry.stain.off Off
cloud.smarthq.type.laundry.stain.oily Oily
cloud.smarthq.type.laundry.stain.tomato Tomato
cloud.smarthq.type.laundry.stain.unknown Unknown

SET<LAUNDRY_TEMPERATURE>

SET<LAUNDRY_TEMPERATURE> Documentation
cloud.smarthq.type.laundry.temperature.cold Cold
cloud.smarthq.type.laundry.temperature.colors Colors
cloud.smarthq.type.laundry.temperature.cool Cool
cloud.smarthq.type.laundry.temperature.disabled Disabled
cloud.smarthq.type.laundry.temperature.extrahot Extra Hot
cloud.smarthq.type.laundry.temperature.extralow Extra Low
cloud.smarthq.type.laundry.temperature.high High
cloud.smarthq.type.laundry.temperature.hot Hot
cloud.smarthq.type.laundry.temperature.low Low
cloud.smarthq.type.laundry.temperature.medium Medium
cloud.smarthq.type.laundry.temperature.noheat No Heat
cloud.smarthq.type.laundry.temperature.tapcold Tap Cold
cloud.smarthq.type.laundry.temperature.unknown Unknown
cloud.smarthq.type.laundry.temperature.warm Warm