Class representing a WoSmartLock device.
https://github.com/OpenWonderLabs/SwitchBotAPI-BLE/blob/latest/devicetypes/lock.md
Static
Sends a command to the device and awaits a response.
The command buffer.
A Promise that resolves with the response buffer.
Connects to the device.
A Promise that resolves when the connection is complete.
Decrypts a buffer using AES-128-CTR.
The data to decrypt.
Disconnects from the device.
A Promise that resolves when the disconnection is complete.
Discovers the device services.
A Promise that resolves with the list of services.
Encrypts a string using AES-128-CTR.
The string to encrypt.
Sends an encrypted command to the device.
The command key.
Retrieves the device characteristics.
A Promise that resolves with the device characteristics.
Retrieves the device name.
A Promise that resolves with the device name.
Retrieves the IV from the device.
Gets general state info from the Smart Lock.
Locks the Smart Lock.
Logs a message with the specified log level.
The severity level of the log (e.g., 'info', 'warn', 'error').
The log message to be emitted.
Operates the lock with the given command.
Optional
Whether to encrypt the command.
Sets the device name.
The new device name.
A Promise that resolves when the name is set.
Initializes the encryption key info for valid lock communication.
The key ID.
The encryption key.
Unlocks the Smart Lock.
Unlocks the Smart Lock without unlatching the door.
Unsubscribes from the notify characteristic.
A Promise that resolves when the unsubscription is complete.
Parses the service data from the SwitchBot Strip Light.
The service data buffer.
The manufacturer data buffer.
The function to emit log messages.
Class representing a WoSmartLock device.
See
https://github.com/OpenWonderLabs/SwitchBotAPI-BLE/blob/latest/devicetypes/lock.md