Skip to content

cloud.smarthq.service.meter

  • 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 that represents the state of a meter within an appliance.

Example Device Response (Digital Twin API)

Service for Meter Device

{
  "adapterId": "0000000000000000000000000000000000000000",
  "alertTypes": [],
  "createdDateTime": "2022-03-04T12:12:12.123Z",
  "deviceId": "0000000000000000000000000000000000000000000000000000000000000000",
  "deviceType": "cloud.smarthq.device.meter",
  "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.meter",
      "lastSyncTime": "2022-03-04T12:12:12.123Z",
      "domainType": "cloud.smarthq.domain.voltage",
      "supportedCommands": [],
      "state": {
        "meterValue": 223.3
      },
      "serviceId": "0000000000000000000000000000000000000000000000000000000000000000",
      "serviceDeviceType": "cloud.smarthq.device.meter",
      "config": {
        "sources": "[{\"circuitId\": \"B038CA87-AD2E-46DC-9C5F-E88978B76CC2\"}, {\"circuitId\": \"B038CA87-AD2E-46DC-9C5F-E88978B76CC3\"}",
        "reading": "cloud.smarthq.type.reading.measured",
        "meterUnits": "cloud.smarthq.type.meterunits.volts",
        "supportResourceManagement": true,
        "measurement": "cloud.smarthq.type.measurement.instantaneous"
      },
      "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
circuitId STRING No
measurement MEASUREMENT Yes
meterUnits METER_UNITS Yes
reading READING Yes
sources STRING No
supportResourceManagement BOOLEAN 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
meterValue DOUBLE Yes
meterValueDelta DOUBLE No
updateFrequencySeconds INTEGER No

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.

MEASUREMENT

MEASUREMENT Documentation
cloud.smarthq.type.measurement.cumulative Cumulative
cloud.smarthq.type.measurement.instantaneous Instantaneous

METER_UNITS

METER_UNITS Documentation
cloud.smarthq.type.meterunits.amps Amps
cloud.smarthq.type.meterunits.cubicfeet Cubic Feet
cloud.smarthq.type.meterunits.kw Kw
cloud.smarthq.type.meterunits.kwh Kwh
cloud.smarthq.type.meterunits.liters Liters
cloud.smarthq.type.meterunits.milileters Milileters
cloud.smarthq.type.meterunits.volts Volts

READING

READING Documentation
cloud.smarthq.type.reading.estimated Estimated
cloud.smarthq.type.reading.measured Measured