DoorLock

interface DoorLock : DoorLockTrait.Attributes, MatterTrait, Updatable, DoorLockCommands


API for the DoorLock trait. This trait provides an interface to a generic way to secure a door.

Summary

Nested types

Descriptor enum for this trait's attributes.

Descriptor enum for this trait's commands.

Public functions

Boolean
Boolean

Public properties

open TraitFactory<DoorLock>

Inherited functions

From com.google.home.matter.standard.DoorLockCommands
suspend Unit
suspend Unit

Clear a single credential, one type of credential, or all credentials except ProgrammingPIN credentials.

suspend Unit
clearHolidaySchedule(holidayIndex: UByte)

Clear the specified holiday schedule, or all holiday schedules.

suspend Unit
clearUser(userIndex: UShort)

Clear the specified user.

suspend Unit
clearWeekDaySchedule(weekDayIndex: UByte, userIndex: UShort)

Clear the specified week day schedule or all week day schedules for the specific user.

suspend Unit
clearYearDaySchedule(yearDayIndex: UByte, userIndex: UShort)

Clear the specified year day schedule, or all year day schedules for the specific user.

suspend DoorLockTrait.GetCredentialStatusCommand.Response

Retrieve the status of the specified credential.

suspend DoorLockTrait.GetHolidayScheduleCommand.Response
getHolidaySchedule(holidayIndex: UByte)

Get the holiday schedule for the specified holiday index.

suspend DoorLockTrait.GetUserCommand.Response
getUser(userIndex: UShort)

Retrieve the user type for a specific user.

suspend DoorLockTrait.GetWeekDayScheduleCommand.Response
getWeekDaySchedule(weekDayIndex: UByte, userIndex: UShort)

Retrieve the weekly schedule for the specified user.

suspend DoorLockTrait.GetYearDayScheduleCommand.Response
getYearDaySchedule(yearDayIndex: UByte, userIndex: UShort)

Retrieve the specified year day schedule for the specified user.

suspend Unit

Lock the door.

suspend Unit
setAliroReaderConfig(
    signingKey: ByteArray,
    verificationKey: ByteArray,
    groupIdentifier: ByteArray,
    optionalArgs: DoorLockTrait.SetAliroReaderConfigCommand.OptionalArgs.() -> Unit
)
suspend DoorLockTrait.SetCredentialCommand.Response
setCredential(
    operationType: DoorLockTrait.DataOperationTypeEnum,
    credential: DoorLockTrait.CredentialStruct,
    credentialData: ByteArray,
    userIndex: UShort?,
    userStatus: DoorLockTrait.UserStatusEnum?,
    userType: DoorLockTrait.UserTypeEnum?
)

Set a credential into the lock for a new or existing user, or for a programming user.

suspend Unit
setHolidaySchedule(
    holidayIndex: UByte,
    localStartTime: UInt,
    localEndTime: UInt,
    operatingMode: DoorLockTrait.OperatingModeEnum
)

Set the holiday schedule by specifying the local start and end time with respect to a specific lock operating mode.

suspend Unit
setUser(
    operationType: DoorLockTrait.DataOperationTypeEnum,
    userIndex: UShort,
    userName: String?,
    userUniqueId: UInt?,
    userStatus: DoorLockTrait.UserStatusEnum?,
    userType: DoorLockTrait.UserTypeEnum?,
    credentialRule: DoorLockTrait.CredentialRuleEnum?
)

Set the user on the lock.

suspend Unit
setWeekDaySchedule(
    weekDayIndex: UByte,
    userIndex: UShort,
    daysMask: DoorLockTrait.DaysMaskMap,
    startHour: UByte,
    startMinute: UByte,
    endHour: UByte,
    endMinute: UByte
)

Set a weekly repeating schedule for the specified user.

suspend Unit
setYearDaySchedule(
    yearDayIndex: UByte,
    userIndex: UShort,
    localStartTime: UInt,
    localEndTime: UInt
)

Set a time-specific schedule ID for a specified user.

suspend Unit

Disengage the deadbolt.

suspend Unit

Unlock the door.

suspend Unit

Unlock the door with a timeout parameter.

From com.google.home.TraitStateInvalidation
suspend Unit
From com.google.home.Updatable
suspend DoorLock
update(optimisticReturn: (DoorLock) -> Unit, init: DoorLockTrait.MutableAttributes.() -> Unit)

Creates a mutable copy of an object and calls the given function to mutate it, then saves it and returns a new immutable copy with the updated state.

Inherited properties

From com.google.home.matter.standard.DoorLockTrait.Attributes
List<UInt>

A list of client-generated commands which are supported by this cluster server instance.

Boolean?

Indicates whether the lock is able to process remote Lock, Unlock, or Unlock with Timeout commands.

UByte?
List<ByteArray>?
ByteArray?
ByteArray?
ByteArray?
ByteArray?
List<ByteArray>?
List<UInt>

A list of the attribute IDs of the attributes supported by the cluster instance.

UInt?

The number of seconds to wait after unlocking a lock before it automatically locks again.

UShort

The revision of the server cluster specification supported by the cluster instance.

DoorLockTrait.DlCredentialRuleMask?

Bitmap which indicates which credential rules are supported by the door lock.

DoorLockTrait.DlDefaultConfigurationRegister?

The default settings for the door lock device.

UInt?

The number of door closed events that have occurred since it was last zeroed.

UInt?

The number of door opened events that have occurred since it was last zeroed.

DoorLockTrait.DoorStateEnum?

The current door state as defined in DoorStateEnum.

Boolean?

Enables or disables an inside LED that allows the user to see at a glance if the door is locked.

Boolean?

Enable or disable local programming of certain features, as enumerated in the localProgrammingFeatures attribute.

Boolean?

Enables or disables the ability to lock the door lock with a single touch on the door lock.

Boolean?

Enable or disable a button inside the door that is used to put the lock into privacy mode.

UShort?

The number of minutes a PIN, RFID, fingerprint, or other credential associated with a user of type ExpiringUser remains valid after its first use before expiring.

DoorLockTrait.Feature

Whether the server supports zero or more optional cluster features.

List<UInt>

A list of server-generated commands (server to client) which are supported by this cluster server instance.

String?

The language used for the user interface.

UByte?

The settings for the LED support three different modes.

DoorLockTrait.DlLocalProgrammingFeatures?

The local programming features that are disabled when the enableLocalProgramming attribute is set to false.

DoorLockTrait.DlLockState?

Indicates the current state of the lock.

DoorLockTrait.DlLockType?

The type of lock.

UByte?

The maximum length in bytes of a PIN Code on this device.

UByte?

The maximum length in bytes of a RFID Code on this device.

UByte?

The minimum length in bytes of a PIN Code on this device.

UByte?

The minimum length in bytes of a RFID Code on this device.

UShort?
UShort?
UByte?

The number of credentials that could be assigned for each user.

UByte?

The number of holiday schedules supported for the door lock device.

UShort?

The number of PIN users supported.

UShort?

The number of RFID users supported.

UShort?

Number of total users supported by the lock.

UByte?

The number of configurable week day schedules supported per user.

UByte?

The number of configurable year day schedules supported per user.

UShort?

This attribute holds the number of minutes the door has been open since the last time it transitioned from closed to open.

DoorLockTrait.OperatingModeEnum?

The current operating mode of the lock.

Boolean?

true if the door lock server requires that an optional PINs be included in the payload of remote lock operation events like Lock, Unlock, Unlock with Timeout and Toggle in order to function.

Boolean?

true if it is ok for the door lock to send PINs over the air.

UByte?

Has one of four possible settings:

  • 0 - Silent Mode
  • 1 - Low Volume
  • 2 - High Volume
  • 3 - Medium Volume

DoorLockTrait.DlSupportedOperatingModes?

Indicates which operating modes are supported by the lock.

UByte?

The number of seconds that the lock shuts down following wrong code entry.

UByte?

The number of incorrect credential attempts allowed before the lock enters the lockout state.

From com.google.home.Trait

Public functions

supports

fun supports(attribute: DoorLock.Attribute): Boolean

supports

fun supports(command: DoorLock.Command): Boolean

Public properties

factory

open val factoryTraitFactory<DoorLock>