Skip to content

cloud.smarthq.service.leaksensor.pairing

  • 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 leak sensor pairing

Example Device Response (Digital Twin API)

Pairing Service for Leak Sensor.

{
  "adapterId": "0000000000000000000000000000000000000000",
  "alertTypes": [],
  "createdDateTime": "2022-03-04T12:12:12.123Z",
  "deviceId": "0000000000000000000000000000000000000000000000000000000000000000",
  "deviceType": "cloud.smarthq.device.leaksensor",
  "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.leaksensor.pairing",
      "lastSyncTime": "2022-03-04T12:12:12.123Z",
      "domainType": "cloud.smarthq.domain.pair",
      "supportedCommands": [],
      "state": {
        "sensorIndex": 333.0,
        "sensorRequestId": 3.0,
        "sensorResult": "cloud.smarthq.type.pair.result.idle"
      },
      "serviceId": "0000000000000000000000000000000000000000000000000000000000000000",
      "serviceDeviceType": "cloud.smarthq.device.leaksensor",
      "config": {},
      "lastStateTime": "2022-03-04T12:12:12.123Z"
    }
  ],
  "userId": "000000000000000"
}

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 Minimum Maximum
sensorIndex INTEGER Yes 0 2147483647
sensorMacAddress STRING No
sensorRequestId INTEGER Yes 0 255
sensorResult PAIR_RESULT 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.leaksensor.pairing.pair

Command used to pair the Leak Sensor

Field Name Property Type Required
requestAction MODE Yes
requestType REQUEST_SENSOR_TYPE Yes

Example Commands

Command to pair the leak sensor.

{
  "command": {
    "commandType": "cloud.smarthq.command.leaksensor.pairing.pair",
    "requestType": "cloud.smarthq.type.pair.ble.advertisemode.waterleaksensor.gea",
    "requestAction": "cloud.smarthq.type.mode.start"
  },
  "deviceId": "00000000000000000000000000000000000000000000000000000000000000",
  "domainType": "cloud.smarthq.domain.pair",
  "kind": "service#command",
  "serviceDeviceType": "cloud.smarthq.device.leaksensor",
  "serviceType": "cloud.smarthq.service.leaksensor.pairing"
}

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.command.leaksensor.pairing.unpair

Command used to unpair the Leak Spairing.ensor

Field Name Property Type Required
requestMacAddress STRING Yes

Example Commands

Command to unpair the leak sensor.

{
  "command": {
    "commandType": "cloud.smarthq.command.leaksensor.pairing.unpair",
    "requestMacAddress": "408D5C654321"
  },
  "deviceId": "00000000000000000000000000000000000000000000000000000000000000",
  "domainType": "cloud.smarthq.domain.unpair",
  "kind": "service#command",
  "serviceDeviceType": "cloud.smarthq.device.leaksensor",
  "serviceType": "cloud.smarthq.service.leaksensor.pairing"
}

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

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.

MODE

MODE Documentation
cloud.smarthq.type.mode.cancel Cancel
cloud.smarthq.type.mode.start Start

PAIR_RESULT

PAIR_RESULT Documentation
cloud.smarthq.type.pair.result.busy Busy
cloud.smarthq.type.pair.result.failure Failure
cloud.smarthq.type.pair.result.idle Idle
cloud.smarthq.type.pair.result.success Success
cloud.smarthq.type.pair.result.timeout Timeout

REQUEST_SENSOR_TYPE

REQUEST_SENSOR_TYPE Documentation
cloud.smarthq.type.pair.ble.advertisemode.waterleaksensor.gea BLE Advertise Mode Water Leak Sensor - GEA
cloud.smarthq.type.pair.ble.mesh.waterleaksensor.gea BLE Mesh Water Leak Sensor - GEA