Nuki BLE ESP32
Loading...
Searching...
No Matches
NukiOpener::NukiOpener Class Reference

#include <NukiOpener.h>

+ Inheritance diagram for NukiOpener::NukiOpener:
+ Collaboration diagram for NukiOpener::NukiOpener:

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
 

Constructor & Destructor Documentation

◆ NukiOpener()

NukiOpener::NukiOpener::NukiOpener ( const std::string & deviceName,
const uint32_t deviceId )

Member Function Documentation

◆ addTimeControlEntry()

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.

Parameters
newTimecontrolEntryNuki api based datatype to send
+ Here is the call graph for this function:

◆ disableRtoAfterRing()

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.

Parameters
disabletrue if RTO should be disabled after ring

◆ enableAutoBatteryTypeDetection()

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.

Parameters
enabletrue if the automatic detection of the battery type is enabled

◆ enableButton()

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.

Parameters
enabletrue if button enabled

◆ enableDst()

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.

Parameters
enableThe desired daylight saving time mode. false disabled, true european

◆ enableLedFlash()

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.

Parameters
enabletrue if led enabled

◆ enablePairing()

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)

Parameters
enabletrue if allowed to pair with other devices

◆ enableRandomElectricStrikeDelay()

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.

Parameters
enabletrue if random electric strike delay enabled

◆ enableSoundConfirmation()

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.

Parameters
enabletrue if sound confirmation enabled

◆ getLastError()

const ErrorCode NukiOpener::NukiOpener::getLastError ( ) const

Get the Last Error code received from the lock.

◆ getLogEntries()

void NukiOpener::NukiOpener::getLogEntries ( std::list< LogEntry > * requestedLogEntries)

Get the Log Entries stored on the esp. Only available after executing retreiveLogEntries.

Parameters
requestedLogEntrieslist to store the returned log entries

◆ getTimeControlEntries()

void NukiOpener::NukiOpener::getTimeControlEntries ( std::list< TimeControlEntry > * timeControlEntries)

Get the time control entries stored on the esp (after executing retrieveTimeControlEntries())

Parameters
timeControlEntrieslist to store the returned time control entries

◆ handleReturnMessage()

void NukiOpener::NukiOpener::handleReturnMessage ( Command returnCode,
unsigned char * data,
uint16_t dataLen )
overrideprotectedvirtual

Reimplemented from Nuki::NukiBle.

+ Here is the call graph for this function:

◆ isBatteryCritical()

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

Returns
true if critical

◆ lockAction()

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.

Parameters
lockAction
nukiAppId0 = App, 1 = Bridge, 2 = Fob, 3 = Keypad
flagsoptional
nameSuffixoptional
nameSuffixLenlen of nameSuffix if used
Returns
Nuki::CmdResult

◆ logErrorCode()

void NukiOpener::NukiOpener::logErrorCode ( uint8_t errorCode)
overridevirtual

Implements Nuki::NukiBle.

+ Here is the call graph for this function:

◆ removeTimeControlEntry()

Nuki::CmdResult NukiOpener::NukiOpener::removeTimeControlEntry ( uint8_t entryId)

Deletes a time(d) control entry via BLE to the lock. (see addTimeControlEntry())

Parameters
entryIdThe ID to be deleted, can be retrieved via retrieveTimeControlEntries()

◆ requestAdvancedConfig()

Nuki::CmdResult NukiOpener::NukiOpener::requestAdvancedConfig ( AdvancedConfig * retrievedAdvancedConfig)

Requests advanced config from Lock via BLE.

Parameters
retrievedAdvancedConfigNuki api based datatype to store the retrieved advanced config

◆ requestBatteryReport()

Nuki::CmdResult NukiOpener::NukiOpener::requestBatteryReport ( BatteryReport * retrievedBatteryReport)

Requests battery status from Lock via BLE.

Parameters
retrievedBatteryReportNuki api based datatype to store the retrieved battery status

◆ requestConfig()

Nuki::CmdResult NukiOpener::NukiOpener::requestConfig ( Config * retrievedConfig)

Requests config from Lock via BLE.

Parameters
retrievedConfigNuki api based datatype to store the retrieved config

◆ requestOpenerState()

Nuki::CmdResult NukiOpener::NukiOpener::requestOpenerState ( OpenerState * state)

Requests keyturner state from Lock via BLE.

Parameters
stateNuki api based datatype to store the retrieved keyturnerstate

◆ retrieveLogEntries()

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.

Parameters
startIndexStartindex of first log msg to be send
countThe number of log entries to be read, starting at the specified start index.
sortOrderThe desired sort order
totalCounttrue if a Log Entry Count is requested from the lock

◆ retrieveOpenerState()

void NukiOpener::NukiOpener::retrieveOpenerState ( OpenerState * openerState)

Gets the last keyturner state stored on the esp.

Parameters
openerStateNuki api based datatype to store the retrieved keyturnerstate

◆ retrieveTimeControlEntries()

Nuki::CmdResult NukiOpener::NukiOpener::retrieveTimeControlEntries ( )

Request the lock via BLE to send the existing time control entries.

◆ setAdvertisingMode()

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.

Parameters
mode0x00 Automatic, 0x01 Normal, 0x02 Slow, 0x03 Slowest (~400ms till ~1s)

◆ setBatteryType()

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.

Parameters
typeThe type of the batteries present in the smart lock.

◆ setBusModeSwitch()

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.

Parameters
busModeSwitchtrue for analogue mode, false for data mode

◆ setDoorbellSuppression()

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.

Parameters
suppressionthe 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)

◆ setDoorbellSuppressionDuration()

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.

Parameters
durationthe duration in ms of doorbell suppression (only in Operating mode 0x02,0x03,0x04,0x05,0x07,0x08 digital Intercom)

◆ setDoubleButtonPressAction()

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.

Parameters
actionthe desired action for a double button press

◆ setElectricStrikeDelay()

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.

Parameters
delaythe desired electric strike delay in ms in case of an electric strike actuation by RTO

◆ setElectricStrikeDuration()

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.

Parameters
durationthe desired duration in ms of electric strike actuation.

◆ setFobAction()

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.

Parameters
fobActionNrthe fob action to change (1 = single press, 2 = double press, 3 = triple press)
fobActionthe desired fob action setting

◆ setIntercomID()

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.

Parameters
intercomIDthe desired database ID of the connected intercom

◆ setLatitude()

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.

Parameters
degreesthe desired latitude

◆ setLongitude()

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.

Parameters
degreesthe desired longitude

◆ setName()

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.

Parameters
namemax 32 character name

◆ setOperatingMode()

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.

Parameters
opmodethe desired operating mode

◆ setRtoTimeout()

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.

Parameters
timeoutthe desired timeout for RTO in minutes

◆ setShortCircuitDuration()

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.

Parameters
durationthe desired duration of the short circuit for BUS mode switching in ms

◆ setSingleButtonPressAction()

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.

Parameters
actionthe desired action for a single button press

◆ setSoundCm()

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.

Parameters
soundthe desired sound setting for continuous mode (0 = No Sound, 1 = Sound1, 2 = Sound2, 3 = Sound3)

◆ setSoundLevel()

CmdResult NukiOpener::NukiOpener::setSoundLevel ( const uint8_t value)

Gets the current config from the lock, and updates the sound level.

Parameters
enabletrue if led enabled

◆ setSoundOpen()

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.

Parameters
soundthe desired sound setting for open (0 = No Sound, 1 = Sound1, 2 = Sound2, 3 = Sound3)

◆ setSoundRing()

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.

Parameters
soundthe desired sound setting for ring (0 = No Sound, 1 = Sound1, 2 = Sound2, 3 = Sound3)

◆ setSoundRto()

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.

Parameters
soundthe desired sound setting for RTO (0 = No Sound, 1 = Sound1, 2 = Sound2, 3 = Sound3)

◆ setTimeZoneId()

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.

Parameters
timeZoneIdThe id of the current timezone or 0xFFFF if timezones are not supported

◆ setTimeZoneOffset()

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.

Parameters
minutesThe timezone offset (UTC) in minutes

◆ updateTimeControlEntry()

Nuki::CmdResult NukiOpener::NukiOpener::updateTimeControlEntry ( TimeControlEntry TimeControlEntry)

Sends an updated time(d) control entry via BLE to the lock. (see addTimeControlEntry())

Parameters
TimeControlEntryNuki api based datatype to send. The ID can be retrieved via retrieveTimeControlEntries()
+ Here is the call graph for this function:

The documentation for this class was generated from the following files: