IAddLockInteractor

Interface defining operations for adding lock to account. This includes unsecure connecting to the lock, getting all needed data from the lock (like firmware version, device settings, and signature), and registering the device.

Inheritors

Functions

Link copied to clipboard
abstract fun clear()

Clear all resources and close active connection

Link copied to clipboard
abstract fun connectForAdding(serialNumber: String, keepConnection: Boolean = true, addLockConnectionListener: IAddLockConnectionListener)

Initiates an add lock connection to the lock.

Link copied to clipboard
abstract fun disconnect()

Disconnect from the lock and notify the listener

Link copied to clipboard
abstract suspend fun getAddLockData(activationCode: String, serialNumber: String): CreateDoorLockData?

Retrieves all necessary data from the lock required to add it to your account.

Link copied to clipboard
abstract suspend fun getSignature(): String?

Retrieves the signature from the lock.

Link copied to clipboard
abstract suspend fun getUnsecureDeviceSettings(isLockAdded: Boolean): DeviceSettings?

Retrieves the device settings from the lock (without secure session).

Link copied to clipboard
abstract suspend fun getUnsecureFirmwareVersion(isLockAdded: Boolean): FirmwareVersion?

Retrieves the firmware version from the lock (without secure session).

Link copied to clipboard
abstract suspend fun registerDevice(registerDeviceData: RegisterDeviceData)

Registers the device with the given registration data.

Link copied to clipboard
abstract suspend fun setSignedTime(signedTime: SignedTime): ByteArray?

Sends the SET_SIGNED_TIME (0x71) command to the lock with the provided signed time. This command is crucial for ensuring that the lock's operations are synchronized with a trusted time source, enhancing the security and reliability of its operations.