Appearance
traits/meter.proto
Table of Contents
traits/meter.proto
DescribeMeterReadingRequest
Field | Type | Label | Description |
---|---|---|---|
name | string |
GetMeterReadingRequest
Field | Type | Label | Description |
---|---|---|---|
name | string | ||
read_mask | google.protobuf.FieldMask |
MeterReading
Field | Type | Label | Description |
---|---|---|---|
usage | float | Usage records the current value of the meter. The unit is unspecified, use device documentation or MeterInfo to discover it. This value is a total recorded between the start and end times. | |
start_time | google.protobuf.Timestamp | Optional. The start period usage is recorded relative to. Typically the installation date, but not required to be. The start time can be reset and updated by the device if it is serviced or updated. | |
end_time | google.protobuf.Timestamp | Optional. The end of the period usage is recorded relative to, i.e. the time the reading was taken. This time might not be now if the device has a low resolution for taking readings. |
MeterReadingSupport
MeterReadingSupport describes the capabilities of devices implementing this trait
Field | Type | Label | Description |
---|---|---|---|
resource_support | smartcore.types.ResourceSupport | How a named device supports read/write/pull apis | |
unit | string | The unit associated with the usage value |
PullMeterReadingsRequest
Field | Type | Label | Description |
---|---|---|---|
name | string | ||
read_mask | google.protobuf.FieldMask | ||
updates_only | bool |
PullMeterReadingsResponse
Field | Type | Label | Description |
---|---|---|---|
changes | PullMeterReadingsResponse.Change | repeated |
PullMeterReadingsResponse.Change
Field | Type | Label | Description |
---|---|---|---|
name | string | ||
change_time | google.protobuf.Timestamp | ||
meter_reading | MeterReading |
MeterApi
MeterApi represents a metering device, like an electric meter. The device records total usage since some fixed point in time, this trait provides access to that usage value. For example an electric meter records total energy usage since it was installed/reset in kWh as an ever increasing number.
Method Name | Request Type | Response Type | Description |
---|---|---|---|
GetMeterReading | GetMeterReadingRequest | MeterReading | |
PullMeterReadings | PullMeterReadingsRequest | PullMeterReadingsResponse stream |
MeterInfo
Method Name | Request Type | Response Type | Description |
---|---|---|---|
DescribeMeterReading | DescribeMeterReadingRequest | MeterReadingSupport |