Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions device_services/generic/door_lock.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ Door lock service is used to control door locks. It is used to lock and unlock d

| Type | Interface | Value type | Properties | Description |
|------|-------------------------------|------------|---------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------|
| out | evt.open.report | bool | | Simple lock status - true if open, false if closed
| in | cmd.lock.get_report | null | | Requests the lock status. |
| in | cmd.lock.set | bool | `mode_op` | **Secures** the lock if the provided value is `true` and unlocks it if the value is `false`. |
| in | cmd.lock.set | bool | `mode_op` `firstname`, `uuid` | **Secures** the lock if the provided value is `true` and unlocks it if the value is `false`. |
| out | evt.lock.report | bool_map | `timeout_m`, `timeout_s`, `lock_type` | Returns the lock status as a boolean map of components defined in [`sup_components`](#service-properties) property. |
| - | | | | |
| in | cmd.auto_lock.set | bool | | Enables/disables the auto-lock feature. |
Expand All @@ -33,6 +34,8 @@ Door lock service is used to control door locks. It is used to lock and unlock d
| Name | Example | Required | Description |
|-------------|----------------------------|----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `mode_op` | `"unsecured_with_timeout"` | No | Optionally defines mode of an unlock operation. Possible values are an applicable sub-set of [`sup_modes`](#service-properties): `unsecured_with_timeout`, `unsecured_for_inside_door_handles`, `unsecured_for_inside_door_handles_with_timeout`, `unsecured_for_outside_door_handles`,`unsecured_for_outside_door_handles_with_timeout`. |
| `firstname` | `Bjarne` | No | Name of the user who issued the message |
| `uuid` | `"f3bb49a9-80de-4831-a45f-5af5143d0c53"` | No | A Universally Unique Identifier (UUID) - 128-bit label of a user |
| `lock_type` | `"key"` | No | How lock was activated, it can take values such as `key`, `pin`, `rfid`. |
| `timeout_s` | `"30"` | No | Remaining time in seconds before the lock will be automatically secured again. |
| `timeout_m` | `"2"` | No | Remaining time in minutes before the lock will be automatically secured again. |
Expand Down Expand Up @@ -177,4 +180,20 @@ Door lock service is used to control door locks. It is used to lock and unlock d
"uid": "49b60210-5374-11ed-b6d0-33d4305f427b",
"topic": "pt:j1/mt:cmd/rt:dev/rn:zw/ad:1/sv:door_lock/ad:59_0"
}
```
```

* Example of a command locking the lock with user's details:
```json
{
"serv": "door_lock",
"type": "cmd.lock.set",
"val_t": "bool",
"val": true,
"props": {
"firstname": "Bjarne",
"uuid": "f3bb49a9-80de-4831-a45f-5af5143d0c53"
},
"tags": null,
"ver": "1"
}
```
149 changes: 24 additions & 125 deletions device_services/specific/doorman.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,29 @@ Yale Doorman custom service definition.
Type | Interface | Value Type | Description | Example
-----|-------------------------------|------------|------------------------| --------
out | evt.doorman_session.report | null | Integration required |
in | cmd.doorman.integration | str_map | Start lock integration | {"slot_number":"0", "code_type":"pin", "code":"123456"}
in | cmd.doorman.integration | str_map | Start lock integration | {"name":"Jon", "slot_number":"0", "code_type":"pin", "code":"123456"}
in | cmd.doorman_param.set | str_map | | {"parameter_id":"5", "value":"5"}
in | cmd.doorman_param.get_report | null | |
out | evt.doorman_param.report | str_map | Response to get_report |
in | cmd.doorman_user.set | str_map | Set pin or tag | {"name":"Jon", slot_number”:”1”, ”code”:”123456}
in | cmd.doorman_param.get_report | null | |
out | evt.doorman_param.report | str_map | Response to get_report | List of all available [parameters](#configuration-parameters) in format {"ID":"_value_"}
in | cmd.doorman_user.set | str_map | Set pin or tag | {"name":"Jon", "slot_number":"1", "code_type":"pin", "code":"123456"}
in | cmd.doorman_user.get_all | null | Get all user slots |
out | evt.doorman_user.report | object | Response to get_all | See below
in | cmd.doorman_user.clear | str_map | | {“slot_number”:”1”}
out | evt.doorman_activity.report | str_map | Sent after an activity | {“event_type”:”id”, “status”:”0”, “error_code”:”0”, “user_status”:”added”, “slot_number”:”0”, “alarm_type”:”0”, “alarm_level”:”0”, “arming_parameter”:”0”, “sequence_number”:”0”, ”card_uid_data”:”12345678”}
in | cmd.doorman.arm_confirm | str_map | | {“sequence_number”:”0”, “operating_parameter”:”0”}
out | evt.op.ack | string | Command sent to lock. Applies to `cmd.doorman_param.set` | Value can be "ack" or "nack"

More details and examples can be found on [Notion](https://www.notion.so/Assa-Abloy-Yale-doorman-v2-Zigbee-c94f3164a74f4035bf2d47d29ec9c9c0).
in | cmd.doorman_user.clear | str_map | | {"slot_number":"1"}
out | evt.doorman_activity.report | str_map | Modes settings | {"secure_mode": "true", "auto_lock": "true", "three_min_lock": "false"}
in | cmd.doorman.arm_confirm | str_map | Sets arming setting | {"operating_parameter":"0"}
out | evt.doorman_tag.report | str_map | tag_id is 8-byte long | {"type":"unrecognized_tag", "tag_id": "12345678AABBCCDD"}

### Interface props

Name | Value | Description
------------------|----------------------------------------------------|-------------
`slot_number` | 0-19 | 0-9 (PIN codes), 10-19 (RFID tags), 20 (24h codes)
`code_type` | "pin", "tag", "tag+pin", "24h", "s4+pin", "s8+pin" | List of supported code types Valid length for specified slots
`pin_code_length` | 6 (For slot number 0-19), 4 - For slot number 20 | Valid length for specified slots
`card_uid_data` | | The Hex format of the TAG UID
`user_status` | “added”, “removed” | Determines whether a user was successfully added or removed from the system.
Name | Value | Description
--------------------|----------------------------------------------------------|-------------
`slot_number` | 0-9 for PIN codes, 10-19 for RFID tags, 20 for 24h code | ID assigned to each user.
`code_type` | "pin", "tag", "tag+pin", "24h", "s4+pin", "s8+pin" | List of supported code types Valid length for specified slots
`card_uid_data` | | The Hex format of the TAG UID used in evt.doorman_activity.report event_type=3
`arming_parameter` | 0 - disarming, 1 - arming | Determines disarming/arming setting on the device
`secure_mode` | "true", "false" | Determines whether the device is in the secure mode in evt.doorman_activity_report. Sent only when changed.
`auto_lock` | "true", "false" | Determines whether the device is in the auto mode in evt.doorman_activity_report. Sent only when changed.
`secure_mode` | "true", "false" | Determines whether the device is in the 3 min lock mode in evt.doorman_activity_report. Sent only when changed.

### Configuration parameters

Expand All @@ -55,8 +55,6 @@ Topic example:

`pt:j1/mt:cmd/rt:dev/rn:zigbee/ad:1/sv:doorman/ad:2_1`

*Note: number `2` at the end of the topic is the device address. Change it to the actual address when sending the commands.*

- cmd.doorman.integration

Sent automatically from the hub upon reception of `evt.doorman.session_report`
Expand All @@ -66,8 +64,7 @@ Topic example:
"serv": "doorman",
"type": "cmd.doorman.integration",
"val_t": "str_map",
"val": {"slot_number":"0", "code_type":"pin",
"code":"123456"},
"val": {"slot_number":"0", "code_type":"pin", "code":"123456", "name": "Jon"},
"props": null,
"tags": null,
"src": "thingsplex-ui",
Expand All @@ -77,7 +74,7 @@ Topic example:

- cmd.doorman_param.set

Sets Doorman's parameters. For the valid `parameter_id` values and what they mean, check the delivery PDF above.
Sets configuration parameter from the [list](#configuration-parameters). For the valid `parameter_id` values and what they mean, check with corresponding version of Doorman cluster implementation

```jsx
{
Expand All @@ -92,8 +89,6 @@ Topic example:
}
```

[Configuration parameters](https://www.notion.so/3de70e7b58d1489482f2115a2e486866)

- cmd.doorman_param.get_report

Returns the values of all the parameters in an `evt.doorman_param.report` message.
Expand Down Expand Up @@ -123,7 +118,8 @@ Topic example:
"val": {
"name": "Jon"
"slot_number": "1",
"code": "111111"
"code": "111111",
"code_type":"pin"
},
"props": null,
"tags": null,
Expand Down Expand Up @@ -179,7 +175,7 @@ Topic example:
"slots": [
{
"id": 3,
"name": "Jon",
"name": "Jon",
"created_at": "2020-04-22T16:05:03.48677828+02:00"
}
]
Expand All @@ -189,112 +185,15 @@ Topic example:
}
```

- evt.op.ack

Sent by the adapter as an Ack for some commands

```jsx
{
"type": "evt.op.ack",
"serv": "doorman",
"val_t": "string",
"val": "ack",
"ver": "1",
"corid": "08d2da8b-0d2c-4a2c-a0d7-8facc48b302",
"ctime": "2019-09-13T11:12:51.597+09:00",
"uid": "08d2da8b-0d2c-4a2c-a0d7-8facc48b3026"
}
```

- evt.open.report

Sent by the adapter when the door opens/closes.

```jsx
{
"type": "evt.open.report",
"serv": "doorlock",
"val_t": "bool",
"val": false,
"tags": null,
"props": null,
"ver": "1",
"corid": "",
"ctime": "2020-05-06T11:55:21.02+02:00",
"uid": "8ed699b1-86bc-47ae-9c88-03ecc4b5c132"
}
```

- evt.alarm.report

Sent by the adapter upon certain events

```jsx
{
"type": "evt.alarm.report",
"serv": "alarm_lock",
"val_t": "str_map",
"val": {
"event": "manual_lock",
"status": "active"
},
"tags": null,
"props": null,
"ver": "1",
"corid": "",
"ctime": "2020-04-24T17:12:50.686+02:00",
"uid": "aeae3ebd-9db9-4cad-a9db-23ee493f5f83"
}
```

Event types:

```jsx
serviceName: "alarm_lock"
eventTypes: {
"jammed",
"manual_unlock",
"manual_lock",
"rf_unlock",
"rf_lock",
"keypad_unlock",
"keypad_lock",
"tag_unlock",
"tag_lock",
"auto_locked",
"lock_failed",
"door_opened",
"door_closed"
}

serviceName: "alarm_burglar"
eventTypes: {
"tamper_invalid_code",
"tamper_removed_cover",
"tamper_force_open"
}

serviceName: "alarm_power"
eventTypes: {
"replace_soon"
}
```

- evt.doorman_activity.report

Sent by the lock when an event happens
- evt.doorman_activity.report sent by the device upon secure mode change

```jsx
{
"type": "evt.doorman_activity.report",
"serv": "doorman",
"val_t": "str_map",
"val": {
"alarm_level": "1",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thi sis not used by the mobile app, I checked the code. Would be perfect if we could remove it.

"alarm_type": "21",
"error_code": "0",
"event_type": "0",
"status": "53"
"secure_mode": "true",
},
"tags": null,
"props": null,
Expand Down