Lock Unlock Trait
API Service: LockUnlockApi
LockUnlockApi describes devices that can be locked and unlocked, and/or report a locked state. The concept is encoded in the LockUnlock.position, a device may be locked, unlocked, or transitioning into one of these positions.
| Method | Request Type | Response Type | Description |
|---|---|---|---|
| GetLockUnlock | GetLockUnlockRequest | LockUnlock | Get the current lock position for the device. |
| UpdateLockUnlock | UpdateLockUnlockRequest | LockUnlock | Update the lock position of the device. |
| PullLockUnlock | PullLockUnlockRequest | PullLockUnlockResponse stream | Subscribe to changes in the lock position for the device. |
Info Service: LockUnlockInfo
todo: define LockUnlockInfo
No methods defined for this service.
LockUnlock
LockUnlock models the possible states of a lockable device.
| Field Name | Type | Description |
|---|---|---|
| position | LockUnlock.Position | Position reports whether the device is locked or unlocked, or transitioning. |
| jammed | bool | Jammed reports whether the lock has jammed and is unable to reach it's position. Output only. |
LockUnlock.Position
Position defines the possible lock positions. Note that only LOCKED and UNLOCKED can be used during a write.
| Name | Number | Description |
|---|---|---|
| POSITION_UNSPECIFIED | 0 | The lock position is unspecified. |
| LOCKED | 1 | The device is locked. |
| UNLOCKED | 2 | The device is unlocked. |
| LOCKING | 3 | The device is in the process of locking. Optional. Output only. |
| UNLOCKING | 4 | The device is in the process of unlocking. Optional. Output only. |
GetLockUnlockRequest
| Field Name | Type | Description |
|---|---|---|
| name | string | Name of the device to fetch the state for |
| read_mask | google.protobuf.FieldMask | Fields to fetch relative to the LockUnlock type |
UpdateLockUnlockRequest
| Field Name | Type | Description |
|---|---|---|
| name | string | Name of the device to fetch the state for |
| lock_unlock | LockUnlock | The new value |
| update_mask | google.protobuf.FieldMask | Fields to fetch relative to the LockUnlock type |
PullLockUnlockRequest
| Field Name | Type | Description |
|---|---|---|
| name | string | Name of the device to fetch the state for |
| read_mask | google.protobuf.FieldMask | Fields to fetch relative to the LockUnlock type |
| updates_only | bool | When true the device will only send changes to the resource value. The default behaviour is to send the current value immediately followed by any updates as they happen. |
PullLockUnlockResponse
| Field Name | Type | Description |
|---|---|---|
| changes | repeated PullLockUnlockResponse.Change | Changes since the last message. |
PullLockUnlockResponse.Change
| Field Name | Type | Description |
|---|---|---|
| name | string | Name of the device that issued the change. |
| change_time | google.protobuf.Timestamp | When the change occurred |
| lock_unlock | LockUnlock | The new value for the lock. |