Nuki BLE ESP32
Loading...
Searching...
No Matches
NukiOpener Namespace Reference

Classes

struct  Action
 
class  NukiOpener
 

Enumerations

enum class  ButtonPressAction : uint8_t {
  NoAction = 0x00 , ToggleRTO = 0x01 , ActivateRTO = 0x02 , DeactivateRTO = 0x03 ,
  ToggleCM = 0x04 , ActivateCM = 0x05 , DectivateCM = 0x06 , Open = 0x07
}
 
enum class  CompletionStatus : uint8_t {
  Success = 0x00 , Canceled = 0x02 , TooRecent = 0x03 , Busy = 0x04 ,
  Incomplete = 0x08 , OtherError = 0xFE , Unknown = 0xFF
}
 
enum class  ErrorCode : uint8_t {
  ERROR_BAD_CRC = 0xFD , ERROR_BAD_LENGTH = 0xFE , ERROR_UNKNOWN = 0xFF , P_ERROR_NOT_PAIRING = 0x10 ,
  P_ERROR_BAD_AUTHENTICATOR = 0x11 , P_ERROR_BAD_PARAMETER = 0x12 , P_ERROR_MAX_USER = 0x13 , K_ERROR_NOT_AUTHORIZED = 0x20 ,
  K_ERROR_BAD_PIN = 0x21 , K_ERROR_BAD_NONCE = 0x22 , K_ERROR_BAD_PARAMETER = 0x23 , K_ERROR_INVALID_AUTH_ID = 0x24 ,
  K_ERROR_DISABLED = 0x25 , K_ERROR_REMOTE_NOT_ALLOWED = 0x26 , K_ERROR_TIME_NOT_ALLOWED = 0x27 , K_ERROR_TOO_MANY_PIN_ATTEMPTS = 0x28 ,
  K_ERROR_TOO_MANY_ENTRIES = 0x29 , K_ERROR_CODE_ALREADY_EXISTS = 0x2A , K_ERROR_CODE_INVALID = 0x2B , K_ERROR_CODE_INVALID_TIMEOUT_1 = 0x2C ,
  K_ERROR_CODE_INVALID_TIMEOUT_2 = 0x2D , K_ERROR_CODE_INVALID_TIMEOUT_3 = 0x2E , K_ERROR_AUTO_UNLOCK_TOO_RECENT = 0x40 , K_ERROR_POSITION_UNKNOWN = 0x41 ,
  K_ERROR_MOTOR_BLOCKED = 0x42 , K_ERROR_CLUTCH_FAILURE = 0x43 , K_ERROR_MOTOR_TIMEOUT = 0x44 , K_ERROR_BUSY = 0x45 ,
  K_ERROR_CANCELED = 0x46 , K_ERROR_NOT_CALIBRATED = 0x47 , K_ERROR_MOTOR_POSITION_LIMIT = 0x48 , K_ERROR_MOTOR_LOW_VOLTAGE = 0x49 ,
  K_ERROR_MOTOR_POWER_FAILURE = 0x4A , K_ERROR_CLUTCH_POWER_FAILURE = 0x4B , K_ERROR_VOLTAGE_TOO_LOW = 0x4C , K_ERROR_FIRMWARE_UPDATE_NEEDED = 0x4D
}
 
enum class  LockAction : uint8_t {
  ActivateRTO = 0x01 , DeactivateRTO = 0x02 , ElectricStrikeActuation = 0x03 , ActivateCM = 0x04 ,
  DeactivateCM = 0x05 , FobAction1 = 0x81 , FobAction2 = 0x82 , FobAction3 = 0x83 ,
  Undefined = 0xFF
}
 
enum class  LockState : uint8_t {
  Uncalibrated = 0x00 , Locked = 0x01 , RTOactive = 0x03 , Open = 0x05 ,
  Opening = 0x07 , Undefined = 0xFF
}
 
enum class  LoggingType : uint8_t {
  LoggingEnabled = 0x01 , LockAction = 0x02 , Calibration = 0x03 , KeypadAction = 0x05 ,
  DoorbellRecognition = 0x06
}
 
enum class  State : uint8_t {
  Uninitialized = 0x00 , PairingMode = 0x01 , DoorMode = 0x02 , ContinuousMode = 0x03 ,
  MaintenanceMode = 0x04
}
 
enum class  Trigger : uint8_t {
  System = 0x00 , Manual = 0x01 , Button = 0x02 , Automatic = 0x03 ,
  Undefined = 0xFF
}
 

Functions

struct __attribute__ ((packed)) OpenerState
 
void cmdResultToString (const CmdResult state, char *str)
 
void completionStatusToString (const CompletionStatus status, char *str)
 
template<std::size_t N>
uint8_t getWeekdaysIntFromBitset (const std::bitset< N > bits)
 Translate a bitset<N> into Nuki weekdays int.
 
void lockactionToString (const LockAction action, char *str)
 
void lockstateToString (const LockState state, char *str)
 
void logAdvancedConfig (AdvancedConfig advancedConfig, bool debug, Print *Log)
 
void logAuthorizationEntry (AuthorizationEntry authorizationEntry, bool debug, Print *Log)
 
void logBatteryReport (BatteryReport batteryReport, bool debug, Print *Log)
 
void logCompletionStatus (CompletionStatus completionStatus, bool debug, Print *Log)
 
void logConfig (Config config, bool debug, Print *Log)
 
void loggingTypeToString (const LoggingType state, char *str)
 
void logKeypadEntry (KeypadEntry keypadEntry, bool debug, Print *Log)
 
void logKeyturnerState (OpenerState keyTurnerState, bool debug, Print *Log)
 
void logLockAction (LockAction lockAction, bool debug, Print *Log)
 
void logLogEntry (LogEntry logEntry, bool debug, Print *Log)
 
void logMessage (const char *message, Print *Log, int level)
 
void logMessageVar (const char *message, const char *var, Print *Log, int level)
 
void logMessageVar (const char *message, const float var, Print *Log, int level)
 
void logMessageVar (const char *message, unsigned int var, Print *Log, int level)
 
void logNewAdvancedConfig (NewAdvancedConfig newAdvancedConfig, bool debug, Print *Log)
 
void logNewAuthorizationEntry (NewAuthorizationEntry newAuthorizationEntry, bool debug, Print *Log)
 
void logNewConfig (NewConfig newConfig, bool debug, Print *Log)
 
void logNewKeypadEntry (NewKeypadEntry newKeypadEntry, bool debug, Print *Log)
 
void logNewTimeControlEntry (NewTimeControlEntry newTimeControlEntry, bool debug, Print *Log)
 
void logNukiTrigger (Trigger nukiTrigger, bool debug, Print *Log)
 
void logOpenerErrorCode (uint8_t errorCode, bool debug, Print *Log)
 
void logTimeControlEntry (TimeControlEntry timeControlEntry, bool debug, Print *Log)
 
void logUpdatedAuthorizationEntry (UpdatedAuthorizationEntry updatedAuthorizationEntry, bool debug, Print *Log)
 
void logUpdatedKeypadEntry (UpdatedKeypadEntry updatedKeypadEntry, bool debug, Print *Log)
 
void triggerToString (const Trigger trigger, char *str)
 

Variables

const NimBLEUUID openerGdioUUID = NimBLEUUID("a92ae101-5501-11e4-916c-0800200c9a66")
 
const NimBLEUUID openerPairingServiceUUID = NimBLEUUID("a92ae100-5501-11e4-916c-0800200c9a66")
 
const NimBLEUUID openerServiceUUID = NimBLEUUID("a92ae200-5501-11e4-916c-0800200c9a66")
 
const NimBLEUUID openerUserDataUUID = NimBLEUUID("a92ae202-5501-11e4-916c-0800200c9a66")
 

Enumeration Type Documentation

◆ ButtonPressAction

enum class NukiOpener::ButtonPressAction : uint8_t
strong
Enumerator
NoAction 
ToggleRTO 
ActivateRTO 
DeactivateRTO 
ToggleCM 
ActivateCM 
DectivateCM 
Open 

◆ CompletionStatus

enum class NukiOpener::CompletionStatus : uint8_t
strong
Enumerator
Success 
Canceled 
TooRecent 
Busy 
Incomplete 
OtherError 
Unknown 

◆ ErrorCode

enum class NukiOpener::ErrorCode : uint8_t
strong
Enumerator
ERROR_BAD_CRC 
ERROR_BAD_LENGTH 
ERROR_UNKNOWN 
P_ERROR_NOT_PAIRING 
P_ERROR_BAD_AUTHENTICATOR 
P_ERROR_BAD_PARAMETER 
P_ERROR_MAX_USER 
K_ERROR_NOT_AUTHORIZED 
K_ERROR_BAD_PIN 
K_ERROR_BAD_NONCE 
K_ERROR_BAD_PARAMETER 
K_ERROR_INVALID_AUTH_ID 
K_ERROR_DISABLED 
K_ERROR_REMOTE_NOT_ALLOWED 
K_ERROR_TIME_NOT_ALLOWED 
K_ERROR_TOO_MANY_PIN_ATTEMPTS 
K_ERROR_TOO_MANY_ENTRIES 
K_ERROR_CODE_ALREADY_EXISTS 
K_ERROR_CODE_INVALID 
K_ERROR_CODE_INVALID_TIMEOUT_1 
K_ERROR_CODE_INVALID_TIMEOUT_2 
K_ERROR_CODE_INVALID_TIMEOUT_3 
K_ERROR_AUTO_UNLOCK_TOO_RECENT 
K_ERROR_POSITION_UNKNOWN 
K_ERROR_MOTOR_BLOCKED 
K_ERROR_CLUTCH_FAILURE 
K_ERROR_MOTOR_TIMEOUT 
K_ERROR_BUSY 
K_ERROR_CANCELED 
K_ERROR_NOT_CALIBRATED 
K_ERROR_MOTOR_POSITION_LIMIT 
K_ERROR_MOTOR_LOW_VOLTAGE 
K_ERROR_MOTOR_POWER_FAILURE 
K_ERROR_CLUTCH_POWER_FAILURE 
K_ERROR_VOLTAGE_TOO_LOW 
K_ERROR_FIRMWARE_UPDATE_NEEDED 

◆ LockAction

enum class NukiOpener::LockAction : uint8_t
strong
Enumerator
ActivateRTO 
DeactivateRTO 
ElectricStrikeActuation 
ActivateCM 
DeactivateCM 
FobAction1 
FobAction2 
FobAction3 
Undefined 

◆ LockState

enum class NukiOpener::LockState : uint8_t
strong
Enumerator
Uncalibrated 
Locked 
RTOactive 
Open 
Opening 
Undefined 

◆ LoggingType

enum class NukiOpener::LoggingType : uint8_t
strong
Enumerator
LoggingEnabled 
LockAction 
Calibration 
KeypadAction 
DoorbellRecognition 

◆ State

enum class NukiOpener::State : uint8_t
strong
Enumerator
Uninitialized 
PairingMode 
DoorMode 
ContinuousMode 
MaintenanceMode 

◆ Trigger

enum class NukiOpener::Trigger : uint8_t
strong
Enumerator
System 
Manual 
Button 
Automatic 
Undefined 

Function Documentation

◆ __attribute__()

struct NukiOpener::__attribute__ ( (packed) )

◆ cmdResultToString()

void NukiOpener::cmdResultToString ( const CmdResult state,
char * str )

◆ completionStatusToString()

void NukiOpener::completionStatusToString ( const CompletionStatus status,
char * str )
inline

◆ getWeekdaysIntFromBitset()

template<std::size_t N>
uint8_t NukiOpener::getWeekdaysIntFromBitset ( const std::bitset< N > bits)

Translate a bitset<N> into Nuki weekdays int.

Template Parameters
N
Parameters
bitsetwith bitset[0] = Monday ... bitset[7] = Sunday
Returns
uint8_t with bit6 = Monday ... bit0 = Sunday

◆ lockactionToString()

void NukiOpener::lockactionToString ( const LockAction action,
char * str )
inline

◆ lockstateToString()

void NukiOpener::lockstateToString ( const LockState state,
char * str )
inline

◆ logAdvancedConfig()

void NukiOpener::logAdvancedConfig ( AdvancedConfig advancedConfig,
bool debug,
Print * Log )
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ logAuthorizationEntry()

void NukiOpener::logAuthorizationEntry ( AuthorizationEntry authorizationEntry,
bool debug,
Print * Log )
+ Here is the call graph for this function:

◆ logBatteryReport()

void NukiOpener::logBatteryReport ( BatteryReport batteryReport,
bool debug,
Print * Log )
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ logCompletionStatus()

void NukiOpener::logCompletionStatus ( CompletionStatus completionStatus,
bool debug,
Print * Log )
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ logConfig()

void NukiOpener::logConfig ( Config config,
bool debug,
Print * Log )
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ loggingTypeToString()

void NukiOpener::loggingTypeToString ( const LoggingType state,
char * str )
inline

◆ logKeypadEntry()

void NukiOpener::logKeypadEntry ( KeypadEntry keypadEntry,
bool debug,
Print * Log )
+ Here is the call graph for this function:

◆ logKeyturnerState()

void NukiOpener::logKeyturnerState ( OpenerState keyTurnerState,
bool debug,
Print * Log )
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ logLockAction()

void NukiOpener::logLockAction ( LockAction lockAction,
bool debug,
Print * Log )
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ logLogEntry()

void NukiOpener::logLogEntry ( LogEntry logEntry,
bool debug,
Print * Log )
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ logMessage()

void NukiOpener::logMessage ( const char * message,
Print * Log,
int level )
+ Here is the caller graph for this function:

◆ logMessageVar() [1/3]

void NukiOpener::logMessageVar ( const char * message,
const char * var,
Print * Log,
int level )

◆ logMessageVar() [2/3]

void NukiOpener::logMessageVar ( const char * message,
const float var,
Print * Log,
int level )

◆ logMessageVar() [3/3]

void NukiOpener::logMessageVar ( const char * message,
unsigned int var,
Print * Log,
int level )
+ Here is the caller graph for this function:

◆ logNewAdvancedConfig()

void NukiOpener::logNewAdvancedConfig ( NewAdvancedConfig newAdvancedConfig,
bool debug,
Print * Log )
+ Here is the call graph for this function:

◆ logNewAuthorizationEntry()

void NukiOpener::logNewAuthorizationEntry ( NewAuthorizationEntry newAuthorizationEntry,
bool debug,
Print * Log )
+ Here is the call graph for this function:

◆ logNewConfig()

void NukiOpener::logNewConfig ( NewConfig newConfig,
bool debug,
Print * Log )
+ Here is the call graph for this function:

◆ logNewKeypadEntry()

void NukiOpener::logNewKeypadEntry ( NewKeypadEntry newKeypadEntry,
bool debug,
Print * Log )
+ Here is the call graph for this function:

◆ logNewTimeControlEntry()

void NukiOpener::logNewTimeControlEntry ( NewTimeControlEntry newTimeControlEntry,
bool debug,
Print * Log )
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ logNukiTrigger()

void NukiOpener::logNukiTrigger ( Trigger nukiTrigger,
bool debug,
Print * Log )
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ logOpenerErrorCode()

void NukiOpener::logOpenerErrorCode ( uint8_t errorCode,
bool debug,
Print * Log )
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ logTimeControlEntry()

void NukiOpener::logTimeControlEntry ( TimeControlEntry timeControlEntry,
bool debug,
Print * Log )
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ logUpdatedAuthorizationEntry()

void NukiOpener::logUpdatedAuthorizationEntry ( UpdatedAuthorizationEntry updatedAuthorizationEntry,
bool debug,
Print * Log )
+ Here is the call graph for this function:

◆ logUpdatedKeypadEntry()

void NukiOpener::logUpdatedKeypadEntry ( UpdatedKeypadEntry updatedKeypadEntry,
bool debug,
Print * Log )
+ Here is the call graph for this function:

◆ triggerToString()

void NukiOpener::triggerToString ( const Trigger trigger,
char * str )
inline

Variable Documentation

◆ openerGdioUUID

const NimBLEUUID NukiOpener::openerGdioUUID = NimBLEUUID("a92ae101-5501-11e4-916c-0800200c9a66")

◆ openerPairingServiceUUID

const NimBLEUUID NukiOpener::openerPairingServiceUUID = NimBLEUUID("a92ae100-5501-11e4-916c-0800200c9a66")

◆ openerServiceUUID

const NimBLEUUID NukiOpener::openerServiceUUID = NimBLEUUID("a92ae200-5501-11e4-916c-0800200c9a66")

◆ openerUserDataUUID

const NimBLEUUID NukiOpener::openerUserDataUUID = NimBLEUUID("a92ae202-5501-11e4-916c-0800200c9a66")