Waste Trait
API Service: WasteApi
WasteApi exposes details about units of waste that have been produced by the building
| Method | Request Type | Response Type | Description |
|---|---|---|---|
| ListWasteRecords | ListWasteRecordsRequest | ListWasteRecordsResponse | |
| PullWasteRecords | PullWasteRecordsRequest | PullWasteRecordsResponse stream |
Info Service: WasteInfo
| Method | Request Type | Response Type | Description |
|---|---|---|---|
| DescribeWasteRecord | DescribeWasteRecordRequest | WasteRecordSupport |
WasteRecord
WasteRecord is a record of a unit of waste produced by the building
| Field Name | Type | Description |
|---|---|---|
| id | string | The id of the waste record assigned by the external waste management system |
| record_create_time | google.protobuf.Timestamp | The time the record was created, this is not the time the waste was created |
| weight | float | The weight of the waste. Use the InfoApi to find the actual unit the device uses. |
| system | string | The system the waste was collected from. Used for presentation not to identify the waste |
| disposal_method | WasteRecord.DisposalMethod | |
| area | string | Area the waste was collected from, e.g. tenant x, common area. Used for presentation not to identify the waste |
| waste_create_time | google.protobuf.Timestamp | The date/time the waste was created |
| stream | string | The stream the waste was collected from. For example, general waste, mixed recycling etc. Used for presentation not to identify the waste |
| co2_saved | float | The amount of co2 saved. |
| land_saved | float | The amount of land saved. |
| trees_saved | float | The amount of trees saved in number of trees. Can be a decimal number. |
WasteRecord.DisposalMethod
Describes the disposal method of the waste. Recycled, general
| Name | Number | Description |
|---|---|---|
| DISPOSAL_METHOD_UNSPECIFIED | 0 | |
| GENERAL_WASTE | 1 | |
| MIXED_RECYCLING | 2 |
ListWasteRecordsResponse
| Field Name | Type | Description |
|---|---|---|
| wasteRecords | repeated WasteRecord | |
| next_page_token | string | A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages. |
| total_size | int32 | If non-zero this is the total number of alerts after filtering is applied. This may be an estimate. |
ListWasteRecordsRequest
| Field Name | Type | Description |
|---|---|---|
| name | string | |
| read_mask | google.protobuf.FieldMask | |
| page_size | int32 | The maximum number of WasteRecords to return. The service may return fewer than this value. If unspecified, at most 50 items will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
| page_token | string | A page token, received from a previous ListWasteRecordsResponse call. Provide this to retrieve the subsequent page. |
PullWasteRecordsRequest
| Field Name | Type | Description |
|---|---|---|
| name | string | |
| read_mask | google.protobuf.FieldMask | |
| updates_only | bool |
PullWasteRecordsResponse
| Field Name | Type | Description |
|---|---|---|
| changes | repeated PullWasteRecordsResponse.Change |
PullWasteRecordsResponse.Change
| Field Name | Type | Description |
|---|---|---|
| name | string | |
| change_time | google.protobuf.Timestamp | |
| new_value | WasteRecord | |
| old_value | WasteRecord | |
| type | smartcore.types.ChangeType |
DescribeWasteRecordRequest
| Field Name | Type | Description |
|---|---|---|
| name | string |
WasteRecordSupport
WasteRecordSupport 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 weight value |
| co2_saved_unit | string | The unit associated with the co2_saved value |
| land_saved_unit | string | The unit associated with the land_saved value |