Meter Trait
API Service: 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 | Request Type | Response Type | Description |
---|---|---|---|
GetMeterReading | GetMeterReadingRequest | MeterReading | |
PullMeterReadings | PullMeterReadingsRequest | PullMeterReadingsResponse stream |
Info Service: MeterInfo
Method | Request Type | Response Type | Description |
---|---|---|---|
DescribeMeterReading | DescribeMeterReadingRequest | MeterReadingSupport |
MeterReading
Field Name | Type | 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 Name | Type | Description |
---|---|---|
resource_support | smartcore.types.ResourceSupport | How a named device supports read/write/pull apis |
unit | string | The unit associated with the usage value |
GetMeterReadingRequest
Field Name | Type | Description |
---|---|---|
name | string | |
read_mask | google.protobuf.FieldMask |
PullMeterReadingsRequest
Field Name | Type | Description |
---|---|---|
name | string | |
read_mask | google.protobuf.FieldMask | |
updates_only | bool |
PullMeterReadingsResponse
Field Name | Type | Description |
---|---|---|
changes | repeated PullMeterReadingsResponse.Change |
PullMeterReadingsResponse.Change
Field Name | Type | Description |
---|---|---|
name | string | |
change_time | google.protobuf.Timestamp | |
meter_reading | MeterReading |
DescribeMeterReadingRequest
Field Name | Type | Description |
---|---|---|
name | string |