Skip to content

Lock Mechanism

David Dix edited this page May 4, 2020 · 43 revisions

A HomeKit Lock Mechanism.

Type Device Type
4 Lock Mechanism

The following configuration is available for lock mechanisms:

Section Key Description
Actions "a" The actions performed by the accessory
State Inputs "f[n]" Inputs that trigger a fixed event
Ping State Inputs "q[n]" Ping input to set a state
Accessory Notifications "m" Notifications to send to another accessory
Initial State "s" State a lock accessory enters on boot

Example

{
  "c": {
    "b": [{ "g": 0, "t": 5 }]
  },
  "a": [{
    "t": 4,
    "f0": [{ "g": 0, "t": 1 }],
    "f1": [{ "g": 0, "t": 2 }],
  }]
}

This is an example of a lock mechanism... ???

Actions

A lock mechanism has two actions.

Action Press Description
"0" UNLOCK (default)
"1" LOCK

The Digital Outputs "r": [{}] for each should be configured to attain the desired state.

Accessory Notifications

The list of notifications "m" supported by a lock mechanism are as follows:

Value Notification
0 Lock UNLOCK (default)
1 Lock LOCK

Accessory notifications can be included as part of an action definition. When an action occurs any one of the above notifications can be sent to another accessory using the "m" option within the action object.

See the general Accessory Notifications section for details of how to configure these notifications.

State & Status Inputs

State inputs "f[n]" & Status Inputs "g[n]" are supported by this accessory. The supported list is:

Key Required State
"f0" Perform action "0" (Unlock)
"f1" Perform action "1" (Lock)

Refer to State Inputs for more detail and examples.

ICMP Ping Inputs

ICMP Ping inputs "p[n]" and "q[n]" are supported by this accessory. Refer to ICMP Ping Inputs for more detail.

Initial State

Initial state is defined by the "s" key contained within the accessory object.

Key State Description
"s" 0 UNLOCKED
1 LOCKED (default)
4 Defined by fixed state inputs
5 Last state before restart
6 Opposite to last state before restart

The initial state that a lock mechanism enters on boot can be set using the "s" option.

Clone this wiki locally