Skip to content

cloud.smarthq.service.cycletimer

  • Configuration


    Describes boundaries and fixed properties for the service.

    Go There

  • State


    A list of the states this service can be in.

    Go There

  • Data Types


    All the data types used for this service.

    Go There

Description

Service to model a cycle timer that indicate the amount of time remaining.

Example Device Response (Digital Twin API)

Cycletimer Service to know the amount of time left on a delay cycle before the dishwasher starts.

{
  "adapterId": "0000000000000000000000000000000000000000",
  "alertTypes": [],
  "createdDateTime": "2022-03-04T12:12:12.123Z",
  "deviceId": "0000000000000000000000000000000000000000000000000000000000000000",
  "deviceType": "cloud.smarthq.device.dishwasher",
  "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.cycletimer",
      "lastSyncTime": "2022-03-04T12:12:12.123Z",
      "domainType": "cloud.smarthq.domain.state",
      "supportedCommands": [],
      "state": {
        "secondsRemaining": 11400.0
      },
      "serviceId": "0000000000000000000000000000000000000000000000000000000000000000",
      "serviceDeviceType": "cloud.smarthq.device.dishwasher",
      "config": {
        "granularity": "cloud.smarthq.type.timergranularity.minutes"
      },
      "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
granularity TIME_GRANULARITY 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
paused BOOLEAN No
secondsInitial INTEGER No
secondsRemaining INTEGER Yes

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.

TIME_GRANULARITY

TIME_GRANULARITY Documentation
cloud.smarthq.type.timergranularity.days Granularity of days
cloud.smarthq.type.timergranularity.hours Granularity of hours
cloud.smarthq.type.timergranularity.minutes Granularity of minutes
cloud.smarthq.type.timergranularity.seconds Granularity of seconds