Nuki BLE ESP32
|
#include <NukiOpener.h>
Public Member Functions | |
NukiOpener (const std::string &deviceName, const uint32_t deviceId) | |
Nuki::CmdResult | addTimeControlEntry (NewTimeControlEntry newTimecontrolEntry) |
Sends a new time(d) control entry via BLE to the lock. This entry is independant of keypad or authorization entries, it will execute the defined action at the defined time in the newTimeControlEntry. | |
Nuki::CmdResult | disableRtoAfterRing (const bool disable) |
Gets the current config from the lock, updates the disable rto after ring parameter and sends the new config to the lock via BLE. | |
Nuki::CmdResult | enableAutoBatteryTypeDetection (const bool enable) |
Gets the current advanced config from the lock, updates the enable battery type detection parameter and sends the new advanced config to the lock via BLE. | |
Nuki::CmdResult | enableButton (const bool enable) |
Gets the current config from the lock, updates the enable button parameter and sends the new config to the lock via BLE. | |
Nuki::CmdResult | enableDst (const bool enable) |
Gets the current config from the lock, updates the dst parameter and sends the new config to the lock via BLE. | |
CmdResult | enableLedFlash (const bool enable) |
Gets the current config from the lock, updates the whether or not the flashing LED should be enabled to signal an unlocked door. And sends the new config to the lock via BLE. | |
Nuki::CmdResult | enablePairing (const bool enable) |
Sets the lock ability to pair with other devices (can be used to prevent unauthorized pairing) Gets the current config from the lock, updates the pairing parameter and sends the new config to the lock via BLE (CAUTION: if pairing is set to false and credentials are deleted a factory reset of the lock needs to be performed before pairing is possible again) | |
Nuki::CmdResult | enableRandomElectricStrikeDelay (const bool enable) |
Gets the current config from the lock, updates the random electric strike delay parameter and sends the new config to the lock via BLE. | |
Nuki::CmdResult | enableSoundConfirmation (const bool enable) |
Gets the current config from the lock, updates the enable sound confirmation parameter and sends the new config to the lock via BLE. | |
const ErrorCode | getLastError () const |
Get the Last Error code received from the lock. | |
void | getLogEntries (std::list< LogEntry > *requestedLogEntries) |
Get the Log Entries stored on the esp. Only available after executing retreiveLogEntries. | |
void | getTimeControlEntries (std::list< TimeControlEntry > *timeControlEntries) |
Get the time control entries stored on the esp (after executing retrieveTimeControlEntries()) | |
bool | isBatteryCritical () |
Returns battery critical state parsed from the battery state byte (battery critical byte) | |
Nuki::CmdResult | lockAction (const LockAction lockAction, const uint32_t nukiAppId=1, const uint8_t flags=0, const char *nameSuffix=nullptr, const uint8_t nameSuffixLen=0) |
Sends lock action cmd via BLE to the lock. | |
virtual void | logErrorCode (uint8_t errorCode) override |
Nuki::CmdResult | removeTimeControlEntry (uint8_t entryId) |
Deletes a time(d) control entry via BLE to the lock. (see addTimeControlEntry()) | |
Nuki::CmdResult | requestAdvancedConfig (AdvancedConfig *retrievedAdvancedConfig) |
Requests advanced config from Lock via BLE. | |
Nuki::CmdResult | requestBatteryReport (BatteryReport *retrievedBatteryReport) |
Requests battery status from Lock via BLE. | |
Nuki::CmdResult | requestConfig (Config *retrievedConfig) |
Requests config from Lock via BLE. | |
Nuki::CmdResult | requestOpenerState (OpenerState *state) |
Requests keyturner state from Lock via BLE. | |
Nuki::CmdResult | retrieveLogEntries (const uint32_t startIndex, const uint16_t count, const uint8_t sortOrder, const bool totalCount) |
Request the lock via BLE to send the log entries. | |
void | retrieveOpenerState (OpenerState *openerState) |
Gets the last keyturner state stored on the esp. | |
Nuki::CmdResult | retrieveTimeControlEntries () |
Request the lock via BLE to send the existing time control entries. | |
Nuki::CmdResult | setAdvertisingMode (const AdvertisingMode mode) |
Gets the current config from the lock, updates the advertising frequency parameter and sends the new config to the lock via BLE. | |
Nuki::CmdResult | setBatteryType (const BatteryType type) |
Gets the current advanced config from the lock, updates the battery type parameter and sends the new advanced config to the lock via BLE. | |
Nuki::CmdResult | setBusModeSwitch (const bool busModeSwitch) |
Gets the current config from the lock, updates the bus mode switch parameter and sends the new config to the lock via BLE. | |
Nuki::CmdResult | setDoorbellSuppression (const uint8_t suppression) |
Gets the current config from the lock, updates the doorbell suppression parameter and sends the new config to the lock via BLE. | |
Nuki::CmdResult | setDoorbellSuppressionDuration (const uint16_t duration) |
Gets the current config from the lock, updates the doorbell suppression duration parameter and sends the new config to the lock via BLE. | |
Nuki::CmdResult | setDoubleButtonPressAction (const ButtonPressAction action) |
Gets the current advanced config from the lock, updates the double button press action parameter and sends the new advanced config to the lock via BLE. | |
Nuki::CmdResult | setElectricStrikeDelay (const uint16_t delay) |
Gets the current config from the lock, updates the electric strike delay parameter and sends the new config to the lock via BLE. | |
Nuki::CmdResult | setElectricStrikeDuration (const uint16_t duration) |
Gets the current config from the lock, updates the electric strike duration parameter and sends the new config to the lock via BLE. | |
Nuki::CmdResult | setFobAction (const uint8_t fobActionNr, const uint8_t fobAction) |
Gets the current config from the lock, updates the given fob action parameter and sends the new config to the lock via BLE. | |
Nuki::CmdResult | setIntercomID (const uint16_t intercomID) |
Gets the current config from the lock, updates the intercom id parameter and sends the new config to the lock via BLE. | |
Nuki::CmdResult | setLatitude (const float degrees) |
Gets the current config from the lock, updates the latitude parameter and sends the new config to the lock via BLE. | |
Nuki::CmdResult | setLongitude (const float degrees) |
Gets the current config from the lock, updates the longitude parameter and sends the new config to the lock via BLE. | |
Nuki::CmdResult | setName (const std::string &name) |
Gets the current config from the lock, updates the name parameter and sends the new config to the lock via BLE. | |
Nuki::CmdResult | setOperatingMode (const uint8_t opmode) |
Gets the current config from the lock, updates the operating mode parameter and sends the new config to the lock via BLE. | |
Nuki::CmdResult | setRtoTimeout (const uint8_t timeout) |
Gets the current config from the lock, updates the rto timeout parameter and sends the new config to the lock via BLE. | |
Nuki::CmdResult | setShortCircuitDuration (const uint16_t duration) |
Gets the current config from the lock, updates the short circuit duration parameter and sends the new config to the lock via BLE. | |
Nuki::CmdResult | setSingleButtonPressAction (const ButtonPressAction action) |
Gets the current advanced config from the lock, updates the single button press action parameter and sends the new advanced config to the lock via BLE. | |
Nuki::CmdResult | setSoundCm (const uint8_t sound) |
Gets the current config from the lock, updates the sound continuous mode parameter and sends the new config to the lock via BLE. | |
CmdResult | setSoundLevel (const uint8_t value) |
Gets the current config from the lock, and updates the sound level. | |
Nuki::CmdResult | setSoundOpen (const uint8_t sound) |
Gets the current config from the lock, updates the sound open parameter and sends the new config to the lock via BLE. | |
Nuki::CmdResult | setSoundRing (const uint8_t sound) |
Gets the current config from the lock, updates the sound ring parameter and sends the new config to the lock via BLE. | |
Nuki::CmdResult | setSoundRto (const uint8_t sound) |
Gets the current config from the lock, updates the sound RTO parameter and sends the new config to the lock via BLE. | |
Nuki::CmdResult | setTimeZoneId (const TimeZoneId timeZoneId) |
Gets the current config from the lock, updates the timezone id parameter and sends the new config to the lock via BLE. | |
Nuki::CmdResult | setTimeZoneOffset (const int16_t minutes) |
Gets the current config from the lock, updates the timezone offset parameter and sends the new config to the lock via BLE. | |
Nuki::CmdResult | updateTimeControlEntry (TimeControlEntry TimeControlEntry) |
Sends an updated time(d) control entry via BLE to the lock. (see addTimeControlEntry()) | |
Public Member Functions inherited from Nuki::NukiBle | |
NukiBle (const std::string &deviceName, const uint32_t deviceId, const NimBLEUUID pairingServiceUUID, const NimBLEUUID deviceServiceUUID, const NimBLEUUID gdioUUID, const NimBLEUUID userDataUUID, const std::string preferencedId) | |
virtual | ~NukiBle () |
Nuki::CmdResult | addAuthorizationEntry (NewAuthorizationEntry newAuthorizationEntry) |
Sends a new authorization entry to the lock via BLE. | |
Nuki::CmdResult | addKeypadEntry (NewKeypadEntry newKeypadEntry) |
Send a new keypad entry to the lock via BLE. | |
Nuki::CmdResult | deleteAuthorizationEntry (const uint32_t id) |
Deletes the authorization entry from the lock. | |
CmdResult | deleteKeypadEntry (uint16_t id) |
Delete a Keypad Entry. | |
void | getAuthorizationEntries (std::list< AuthorizationEntry > *requestedAuthorizationEntries) |
Get the Authorization Entries stored on the esp (after executing retreiveAuthorizationEntries) | |
const BLEAddress | getBleAddress () const |
Returns the BLE address of the device if paired. | |
void | getKeypadEntries (std::list< KeypadEntry > *requestedKeyPadEntries) |
Get the Keypad Entries stored on the esp (after executing retreieveLogKeypadEntries) | |
uint16_t | getKeypadEntryCount () |
Returns the keypad entry count. Only available after executing retreiveKeypadEntries. | |
unsigned long | getLastHeartbeat () |
Returns the timestamp (millis) of the last received BLE beacon from the lock. | |
unsigned long | getLastReceivedBeaconTs () const |
Returns the timestamp in milliseconds when the last ble beacon has been received from the device. | |
uint16_t | getLogEntryCount () |
Returns the log entry count. Only available after executing retreiveLogEntries. | |
void | getMacAddress (char *macAddress) |
Gets the ble mac address of the paired lock stored on the esp. | |
int | getRssi () const |
Returns the RSSI of the last received ble beacon broadcast. | |
uint16_t | getSecurityPincode () |
Gets the pincode stored on the esp. This pincode is used for sending/setting config via BLE to the lock by other methods and needs to be the same pincode as stored in the lock. | |
void | initialize () |
Initializes stored preferences based on the devicename passed in the constructor, creates the BLE client, sets the BLE callback and checks if the lock is paired (if credentials are stored in preferences) | |
const bool | isPairedWithLock () const |
Returns pairing state (if credentials are stored or not) | |
Nuki::PairingResult | pairNuki (AuthorizationIdType idType=AuthorizationIdType::Bridge) |
Checks if credentials are stored in preferences, if not initiate pairing. | |
void | registerBleScanner (BleScanner::Publisher *bleScanner) |
Registers the BLE scanner to be used for scanning for advertisements from the lock. BleScanner::Publisher is defined in dependent library https://github.com/I-Connect/BleScanner.git. | |
Nuki::CmdResult | requestCalibration () |
Sends an calibration (mechanical) request to the lock via BLE. | |
Nuki::CmdResult | requestReboot () |
Sends an reboot request to the lock via BLE. | |
Nuki::CmdResult | retrieveAuthorizationEntries (const uint16_t offset, const uint16_t count) |
Request the lock via BLE to send the existing authorizationentries. | |
Nuki::CmdResult | retrieveKeypadEntries (const uint16_t offset, const uint16_t count) |
Request the lock via BLE to send the existing keypad entries. | |
bool | saveSecurityPincode (const uint16_t pinCode) |
Saves the pincode on the esp. This pincode is used for sending/setting config via BLE to the lock by other methods and needs to be the same pincode as stored in the lock. | |
void | setConnectRetries (uint8_t retries) |
Set the BLE Connect number of retries. | |
void | setConnectTimeout (uint8_t timeout) |
Set the BLE Connect Timeout in seconds. | |
void | setDisconnectTimeout (uint32_t timeoutMs) |
Set the BLE Disconnect Timeout, if longer than ~20 sec the lock will disconnect by itself if there is no BLE communication. | |
void | setEventHandler (Nuki::SmartlockEventHandler *handler) |
Set the Event Handler object. | |
void | setPower (esp_power_level_t powerLevel) |
the transmission power. | |
Nuki::CmdResult | setSecurityPin (const uint16_t newSecurityPin) |
Send the new pincode command to the lock via BLE (this command uses the earlier by saveSecurityPincode() stored pincode which needs to be the same as the pincode stored in the lock) | |
void | unPairNuki () |
Delete stored credentials. | |
Nuki::CmdResult | updateAuthorizationEntry (UpdatedAuthorizationEntry updatedAuthorizationEntry) |
Sends an updated authorization entry to the lock via BLE. | |
void | updateConnectionState () |
checks the time past after last connect/communication sent, if the time past > timeout it will disconnect the BLE connection with the lock so that lock will start sending advertisements. | |
Nuki::CmdResult | updateKeypadEntry (UpdatedKeypadEntry updatedKeyPadEntry) |
Send an updated keypad entry to the lock via BLE. | |
Nuki::CmdResult | updateTime (TimeValue time) |
Sends the time to be set to the lock via BLE. | |
Nuki::CmdResult | verifySecurityPin () |
Send the verify pincode command via BLE to the lock. This command uses the earlier by saveSecurityPincode() stored pincode. | |
Protected Member Functions | |
void | handleReturnMessage (Command returnCode, unsigned char *data, uint16_t dataLen) override |
Protected Member Functions inherited from Nuki::NukiBle | |
template<typename TDeviceAction > | |
Nuki::CmdResult | cmdChallAccStateMachine (const TDeviceAction action) |
template<typename TDeviceAction > | |
Nuki::CmdResult | cmdChallStateMachine (const TDeviceAction action, const bool sendPinCode=false) |
template<typename TDeviceAction > | |
Nuki::CmdResult | cmdStateMachine (const TDeviceAction action) |
bool | connectBle (const BLEAddress bleAddress, bool pairing) |
template<typename TDeviceAction > | |
Nuki::CmdResult | executeAction (const TDeviceAction action) |
void | extendDisconnectTimeout () |
Additional Inherited Members | |
Protected Attributes inherited from Nuki::NukiBle | |
uint8_t | errorCode = 0 |
Command | lastMsgCodeReceived = Command::Empty |
NukiOpener::NukiOpener::NukiOpener | ( | const std::string & | deviceName, |
const uint32_t | deviceId ) |
Nuki::CmdResult NukiOpener::NukiOpener::addTimeControlEntry | ( | NewTimeControlEntry | newTimecontrolEntry | ) |
Sends a new time(d) control entry via BLE to the lock. This entry is independant of keypad or authorization entries, it will execute the defined action at the defined time in the newTimeControlEntry.
newTimecontrolEntry | Nuki api based datatype to send |
Nuki::CmdResult NukiOpener::NukiOpener::disableRtoAfterRing | ( | const bool | disable | ) |
Gets the current config from the lock, updates the disable rto after ring parameter and sends the new config to the lock via BLE.
disable | true if RTO should be disabled after ring |
Nuki::CmdResult NukiOpener::NukiOpener::enableAutoBatteryTypeDetection | ( | const bool | enable | ) |
Gets the current advanced config from the lock, updates the enable battery type detection parameter and sends the new advanced config to the lock via BLE.
enable | true if the automatic detection of the battery type is enabled |
Nuki::CmdResult NukiOpener::NukiOpener::enableButton | ( | const bool | enable | ) |
Gets the current config from the lock, updates the enable button parameter and sends the new config to the lock via BLE.
enable | true if button enabled |
Nuki::CmdResult NukiOpener::NukiOpener::enableDst | ( | const bool | enable | ) |
Gets the current config from the lock, updates the dst parameter and sends the new config to the lock via BLE.
enable | The desired daylight saving time mode. false disabled, true european |
CmdResult NukiOpener::NukiOpener::enableLedFlash | ( | const bool | enable | ) |
Gets the current config from the lock, updates the whether or not the flashing LED should be enabled to signal an unlocked door. And sends the new config to the lock via BLE.
enable | true if led enabled |
Nuki::CmdResult NukiOpener::NukiOpener::enablePairing | ( | const bool | enable | ) |
Sets the lock ability to pair with other devices (can be used to prevent unauthorized pairing) Gets the current config from the lock, updates the pairing parameter and sends the new config to the lock via BLE (CAUTION: if pairing is set to false and credentials are deleted a factory reset of the lock needs to be performed before pairing is possible again)
enable | true if allowed to pair with other devices |
Nuki::CmdResult NukiOpener::NukiOpener::enableRandomElectricStrikeDelay | ( | const bool | enable | ) |
Gets the current config from the lock, updates the random electric strike delay parameter and sends the new config to the lock via BLE.
enable | true if random electric strike delay enabled |
Nuki::CmdResult NukiOpener::NukiOpener::enableSoundConfirmation | ( | const bool | enable | ) |
Gets the current config from the lock, updates the enable sound confirmation parameter and sends the new config to the lock via BLE.
enable | true if sound confirmation enabled |
const ErrorCode NukiOpener::NukiOpener::getLastError | ( | ) | const |
Get the Last Error code received from the lock.
void NukiOpener::NukiOpener::getLogEntries | ( | std::list< LogEntry > * | requestedLogEntries | ) |
Get the Log Entries stored on the esp. Only available after executing retreiveLogEntries.
requestedLogEntries | list to store the returned log entries |
void NukiOpener::NukiOpener::getTimeControlEntries | ( | std::list< TimeControlEntry > * | timeControlEntries | ) |
Get the time control entries stored on the esp (after executing retrieveTimeControlEntries())
timeControlEntries | list to store the returned time control entries |
|
overrideprotectedvirtual |
bool NukiOpener::NukiOpener::isBatteryCritical | ( | ) |
Returns battery critical state parsed from the battery state byte (battery critical byte)
Note that retrieveOpenerState()
needs to be called first to retrieve the needed data
Nuki::CmdResult NukiOpener::NukiOpener::lockAction | ( | const LockAction | lockAction, |
const uint32_t | nukiAppId = 1, | ||
const uint8_t | flags = 0, | ||
const char * | nameSuffix = nullptr, | ||
const uint8_t | nameSuffixLen = 0 ) |
Sends lock action cmd via BLE to the lock.
lockAction | |
nukiAppId | 0 = App, 1 = Bridge, 2 = Fob, 3 = Keypad |
flags | optional |
nameSuffix | optional |
nameSuffixLen | len of nameSuffix if used |
|
overridevirtual |
Nuki::CmdResult NukiOpener::NukiOpener::removeTimeControlEntry | ( | uint8_t | entryId | ) |
Deletes a time(d) control entry via BLE to the lock. (see addTimeControlEntry())
entryId | The ID to be deleted, can be retrieved via retrieveTimeControlEntries() |
Nuki::CmdResult NukiOpener::NukiOpener::requestAdvancedConfig | ( | AdvancedConfig * | retrievedAdvancedConfig | ) |
Requests advanced config from Lock via BLE.
retrievedAdvancedConfig | Nuki api based datatype to store the retrieved advanced config |
Nuki::CmdResult NukiOpener::NukiOpener::requestBatteryReport | ( | BatteryReport * | retrievedBatteryReport | ) |
Requests battery status from Lock via BLE.
retrievedBatteryReport | Nuki api based datatype to store the retrieved battery status |
Nuki::CmdResult NukiOpener::NukiOpener::requestConfig | ( | Config * | retrievedConfig | ) |
Requests config from Lock via BLE.
retrievedConfig | Nuki api based datatype to store the retrieved config |
Nuki::CmdResult NukiOpener::NukiOpener::requestOpenerState | ( | OpenerState * | state | ) |
Requests keyturner state from Lock via BLE.
state | Nuki api based datatype to store the retrieved keyturnerstate |
Nuki::CmdResult NukiOpener::NukiOpener::retrieveLogEntries | ( | const uint32_t | startIndex, |
const uint16_t | count, | ||
const uint8_t | sortOrder, | ||
const bool | totalCount ) |
Request the lock via BLE to send the log entries.
startIndex | Startindex of first log msg to be send |
count | The number of log entries to be read, starting at the specified start index. |
sortOrder | The desired sort order |
totalCount | true if a Log Entry Count is requested from the lock |
void NukiOpener::NukiOpener::retrieveOpenerState | ( | OpenerState * | openerState | ) |
Gets the last keyturner state stored on the esp.
openerState | Nuki api based datatype to store the retrieved keyturnerstate |
Nuki::CmdResult NukiOpener::NukiOpener::retrieveTimeControlEntries | ( | ) |
Request the lock via BLE to send the existing time control entries.
Nuki::CmdResult NukiOpener::NukiOpener::setAdvertisingMode | ( | const AdvertisingMode | mode | ) |
Gets the current config from the lock, updates the advertising frequency parameter and sends the new config to the lock via BLE.
mode | 0x00 Automatic, 0x01 Normal, 0x02 Slow, 0x03 Slowest (~400ms till ~1s) |
Nuki::CmdResult NukiOpener::NukiOpener::setBatteryType | ( | const BatteryType | type | ) |
Gets the current advanced config from the lock, updates the battery type parameter and sends the new advanced config to the lock via BLE.
type | The type of the batteries present in the smart lock. |
Nuki::CmdResult NukiOpener::NukiOpener::setBusModeSwitch | ( | const bool | busModeSwitch | ) |
Gets the current config from the lock, updates the bus mode switch parameter and sends the new config to the lock via BLE.
busModeSwitch | true for analogue mode, false for data mode |
Nuki::CmdResult NukiOpener::NukiOpener::setDoorbellSuppression | ( | const uint8_t | suppression | ) |
Gets the current config from the lock, updates the doorbell suppression parameter and sends the new config to the lock via BLE.
suppression | the desired setting for doorbell suppression (0 = Off, 1 = CM, 2 = RTO, 3 = CM & RTO, 4 = Ring, 5 = CM & Ring, 6 = RTO & Ring, 7 = CM & RTO & Ring) |
Nuki::CmdResult NukiOpener::NukiOpener::setDoorbellSuppressionDuration | ( | const uint16_t | duration | ) |
Gets the current config from the lock, updates the doorbell suppression duration parameter and sends the new config to the lock via BLE.
duration | the duration in ms of doorbell suppression (only in Operating mode 0x02,0x03,0x04,0x05,0x07,0x08 digital Intercom) |
Nuki::CmdResult NukiOpener::NukiOpener::setDoubleButtonPressAction | ( | const ButtonPressAction | action | ) |
Gets the current advanced config from the lock, updates the double button press action parameter and sends the new advanced config to the lock via BLE.
action | the desired action for a double button press |
Nuki::CmdResult NukiOpener::NukiOpener::setElectricStrikeDelay | ( | const uint16_t | delay | ) |
Gets the current config from the lock, updates the electric strike delay parameter and sends the new config to the lock via BLE.
delay | the desired electric strike delay in ms in case of an electric strike actuation by RTO |
Nuki::CmdResult NukiOpener::NukiOpener::setElectricStrikeDuration | ( | const uint16_t | duration | ) |
Gets the current config from the lock, updates the electric strike duration parameter and sends the new config to the lock via BLE.
duration | the desired duration in ms of electric strike actuation. |
Nuki::CmdResult NukiOpener::NukiOpener::setFobAction | ( | const uint8_t | fobActionNr, |
const uint8_t | fobAction ) |
Gets the current config from the lock, updates the given fob action parameter and sends the new config to the lock via BLE.
fobActionNr | the fob action to change (1 = single press, 2 = double press, 3 = triple press) |
fobAction | the desired fob action setting |
Nuki::CmdResult NukiOpener::NukiOpener::setIntercomID | ( | const uint16_t | intercomID | ) |
Gets the current config from the lock, updates the intercom id parameter and sends the new config to the lock via BLE.
intercomID | the desired database ID of the connected intercom |
Nuki::CmdResult NukiOpener::NukiOpener::setLatitude | ( | const float | degrees | ) |
Gets the current config from the lock, updates the latitude parameter and sends the new config to the lock via BLE.
degrees | the desired latitude |
Nuki::CmdResult NukiOpener::NukiOpener::setLongitude | ( | const float | degrees | ) |
Gets the current config from the lock, updates the longitude parameter and sends the new config to the lock via BLE.
degrees | the desired longitude |
Nuki::CmdResult NukiOpener::NukiOpener::setName | ( | const std::string & | name | ) |
Gets the current config from the lock, updates the name parameter and sends the new config to the lock via BLE.
name | max 32 character name |
Nuki::CmdResult NukiOpener::NukiOpener::setOperatingMode | ( | const uint8_t | opmode | ) |
Gets the current config from the lock, updates the operating mode parameter and sends the new config to the lock via BLE.
opmode | the desired operating mode |
Nuki::CmdResult NukiOpener::NukiOpener::setRtoTimeout | ( | const uint8_t | timeout | ) |
Gets the current config from the lock, updates the rto timeout parameter and sends the new config to the lock via BLE.
timeout | the desired timeout for RTO in minutes |
Nuki::CmdResult NukiOpener::NukiOpener::setShortCircuitDuration | ( | const uint16_t | duration | ) |
Gets the current config from the lock, updates the short circuit duration parameter and sends the new config to the lock via BLE.
duration | the desired duration of the short circuit for BUS mode switching in ms |
Nuki::CmdResult NukiOpener::NukiOpener::setSingleButtonPressAction | ( | const ButtonPressAction | action | ) |
Gets the current advanced config from the lock, updates the single button press action parameter and sends the new advanced config to the lock via BLE.
action | the desired action for a single button press |
Nuki::CmdResult NukiOpener::NukiOpener::setSoundCm | ( | const uint8_t | sound | ) |
Gets the current config from the lock, updates the sound continuous mode parameter and sends the new config to the lock via BLE.
sound | the desired sound setting for continuous mode (0 = No Sound, 1 = Sound1, 2 = Sound2, 3 = Sound3) |
CmdResult NukiOpener::NukiOpener::setSoundLevel | ( | const uint8_t | value | ) |
Gets the current config from the lock, and updates the sound level.
enable | true if led enabled |
Nuki::CmdResult NukiOpener::NukiOpener::setSoundOpen | ( | const uint8_t | sound | ) |
Gets the current config from the lock, updates the sound open parameter and sends the new config to the lock via BLE.
sound | the desired sound setting for open (0 = No Sound, 1 = Sound1, 2 = Sound2, 3 = Sound3) |
Nuki::CmdResult NukiOpener::NukiOpener::setSoundRing | ( | const uint8_t | sound | ) |
Gets the current config from the lock, updates the sound ring parameter and sends the new config to the lock via BLE.
sound | the desired sound setting for ring (0 = No Sound, 1 = Sound1, 2 = Sound2, 3 = Sound3) |
Nuki::CmdResult NukiOpener::NukiOpener::setSoundRto | ( | const uint8_t | sound | ) |
Gets the current config from the lock, updates the sound RTO parameter and sends the new config to the lock via BLE.
sound | the desired sound setting for RTO (0 = No Sound, 1 = Sound1, 2 = Sound2, 3 = Sound3) |
Nuki::CmdResult NukiOpener::NukiOpener::setTimeZoneId | ( | const TimeZoneId | timeZoneId | ) |
Gets the current config from the lock, updates the timezone id parameter and sends the new config to the lock via BLE.
timeZoneId | The id of the current timezone or 0xFFFF if timezones are not supported |
Nuki::CmdResult NukiOpener::NukiOpener::setTimeZoneOffset | ( | const int16_t | minutes | ) |
Gets the current config from the lock, updates the timezone offset parameter and sends the new config to the lock via BLE.
minutes | The timezone offset (UTC) in minutes |
Nuki::CmdResult NukiOpener::NukiOpener::updateTimeControlEntry | ( | TimeControlEntry | TimeControlEntry | ) |
Sends an updated time(d) control entry via BLE to the lock. (see addTimeControlEntry())
TimeControlEntry | Nuki api based datatype to send. The ID can be retrieved via retrieveTimeControlEntries() |