Appearance
traits/enter_leave_sensor.proto
Table of Contents
traits/enter_leave_sensor.proto
EnterLeaveEvent
EnterLeaveEvent describes an enter or leave event, and optionally the entity that entered or left.
Field | Type | Label | Description |
---|---|---|---|
direction | EnterLeaveEvent.Direction | Direction describes in which direction movement was detected. | |
occupant | EnterLeaveEvent.Occupant | Occupant describes the entity either entering or leaving. Optional. | |
enter_total | int32 | optional | Enter total, if present, indicates how many ENTER events have been recognised by the device. |
leave_total | int32 | optional | Leave total, if present, indicates how many LEAVE events have been recognised by the device. |
EnterLeaveEvent.Occupant
An Occupant is some entity that triggers the enter or leave event. It could be an object, like a car, or a person or animal.
Field | Type | Label | Description |
---|---|---|---|
name | string | A unique name for this occupant as measured by the device. Name allows correlation between enter and leave events. | |
title | string | An official title for this occupant. | |
display_name | string | A recognisable display name for this occupant. | |
picture | smartcore.types.Image | A picture of the occupant. | |
url | string | A url that resolves to more information on this occupant. | |
string | An email address for the occupant. | ||
ids | EnterLeaveEvent.Occupant.IdsEntry | repeated | IDs holds external occupant ids. For example this might hold an id representing a person in an access control system. The map key should uniquely represent the domain for the id, for example "my-access-system/user-id", the use of uris is not required, values should be the id of this consumable in that domain, for example "sma81r6t1c5o3r58e1-3r8u16l1es". |
more | EnterLeaveEvent.Occupant.MoreEntry | repeated | Additional properties associated with the occupant. Typically displayed to a user to help them to distinguish between similar occupants. |
EnterLeaveEvent.Occupant.IdsEntry
Field | Type | Label | Description |
---|---|---|---|
key | string | ||
value | string |
EnterLeaveEvent.Occupant.MoreEntry
Field | Type | Label | Description |
---|---|---|---|
key | string | ||
value | string |
GetEnterLeaveEventRequest
Field | Type | Label | Description |
---|---|---|---|
name | string | Name of the device to fetch the state for | |
read_mask | google.protobuf.FieldMask | Fields to fetch relative to the EnterLeaveEvent type |
PullEnterLeaveEventsRequest
Field | Type | Label | Description |
---|---|---|---|
name | string | Name of the device to fetch the state for | |
read_mask | google.protobuf.FieldMask | Fields to fetch relative to the EnterLeaveEvent type | |
updates_only | bool | If true, only updates to the state will be returned. The first event sent when false will be equivalent to GetEnterLeaveEvent, direction will be unspecified. |
PullEnterLeaveEventsResponse
Field | Type | Label | Description |
---|---|---|---|
changes | PullEnterLeaveEventsResponse.Change | repeated | The list of changes |
PullEnterLeaveEventsResponse.Change
A change, i.e. a new event, has been recorded.
Field | Type | Label | Description |
---|---|---|---|
name | string | name for the device that issued the change | |
change_time | google.protobuf.Timestamp | when the change occurred | |
enter_leave_event | EnterLeaveEvent | The new value for the state |
ResetEnterLeaveTotalsRequest
Field | Type | Label | Description |
---|---|---|---|
name | string | Name of the device to fetch the state for |
ResetEnterLeaveTotalsResponse
EnterLeaveEvent.Direction
Possible directions.
Name | Number | Description |
---|---|---|
DIRECTION_UNSPECIFIED | 0 | |
ENTER | 1 | Something entered. |
LEAVE | 2 | Something left. |
EnterLeaveSensorApi
EnterLeaveSensor applies to devices that can track objects entering or leaving. It could apply to footfall counters, turn styles, or car park entry barriers.
Method Name | Request Type | Response Type | Description |
---|---|---|---|
PullEnterLeaveEvents | PullEnterLeaveEventsRequest | PullEnterLeaveEventsResponse stream | Subscribe to new enter or leave events. |
GetEnterLeaveEvent | GetEnterLeaveEventRequest | EnterLeaveEvent | Get information about the enter leave state. The response will not contain a direction or occupant, but may include totals. |
ResetEnterLeaveTotals | ResetEnterLeaveTotalsRequest | ResetEnterLeaveTotalsResponse | Reset the enter and leave totals. |
EnterLeaveSensorInfo
todo: define EnterLeaveSensorInfo
Method Name | Request Type | Response Type | Description |
---|