getAddLockData

open suspend override fun getAddLockData(activationCode: String, serialNumber: String): CreateDoorLockData

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

This function retrieves device settings, firmware version, and the signature from the lock, then combines them to create a CreateDoorLockData object.

The steps involved are:

  1. Get the device settings and revision using getUnsecureDeviceSettings.

  2. Get the firmware version using getUnsecureFirmwareVersion.

  3. Get the signature using getSignature().

  4. Combine the retrieved data into a CreateDoorLockData object.

Return

A CreateDoorLockData object containing all the necessary data to add the lock to your account.

Parameters

activationCode

The activation code for the lock.

serialNumber

The serial number of the lock.

Throws

if an error occurs during the process.