Static class accessing the configuration.
More...
#include <Configuration.h>
|
| Configuration () |
|
const String & | getSsid () const |
| get the SSID(name) of your wifi More...
|
|
const String & | getPwd () const |
| get the password of your wifi. More...
|
|
const String & | getUserId () const |
| get the User ID extracted from the webpage settings > API More...
|
|
const String & | getApiKey () const |
| get the API Key extracted from the webpage settings > API More...
|
|
const String & | getEmergencyKey () const |
| get the emergency key of the safe More...
|
|
const bool & | getDisableFailedSession () const |
| get disable support of failed session. Note: If selected, the safe will be locked until the last known end date before a session was ended and marked as failed. Hygiene openings can no longer be triggered since the session is no longer valid! More...
|
|
const String & | getTimezone () const |
| get the timezone-string (e.g. "CET-1CEST,M3.5.0,M10.5.0/3") see also https://github.com/nayarsystems/posix_tz_db/blob/master/zones.csv More...
|
|
const String & | getTimezoneName () const |
| get the name to the timezone-string (e.g. "Europe/Berlin") More...
|
|
const unsigned long & | getBacklightTimeOut () const |
| get the timeout of display backlight in seconds More...
|
|
const bool & | getAutoLockHygieneOpeningTimeout () const |
| return if the safe should automatically lock after the time for hygiene opening is over. If not set, the safe stays unlocked until the hygiene opening is ended on the website. More...
|
|
const TimeRestrictions & | getTimeRestrictions () const |
| get the timeout of display backlight in seconds More...
|
|
void | setWifiSettings (const String &ssid, const String &pwd) |
| Set the Wifi Settings. More...
|
|
void | setConfigurationSettings (const String &userId, const String &apiKey, const bool &disableFailedSession, const String &timezoneName, const String &timezone, const long &backlightTimeOut, const bool &autoLockHygieneOpeningTimeout, const TimeRestrictions &timeRestrictions) |
| Set the Configuration Settings. More...
|
|
const String & | generateNewEmergencyKey () |
| Generates a new key and stores it to the file system. More...
|
|
void | restoreFactoryDefaults () |
| Reset all values to the default values and write configuration. More...
|
|
Static class accessing the configuration.
◆ Configuration()
configuration::Configuration::Configuration |
( |
| ) |
|
|
inline |
◆ begin()
initialize the configuration object and load the configuration file
◆ generateNewEmergencyKey()
const String & configuration::Configuration::generateNewEmergencyKey |
( |
| ) |
|
|
inline |
Generates a new key and stores it to the file system.
◆ getApiKey()
const String & configuration::Configuration::getApiKey |
( |
| ) |
const |
|
inline |
get the API Key extracted from the webpage settings > API
◆ getAutoLockHygieneOpeningTimeout()
const bool & configuration::Configuration::getAutoLockHygieneOpeningTimeout |
( |
| ) |
const |
|
inline |
return if the safe should automatically lock after the time for hygiene opening is over. If not set, the safe stays unlocked until the hygiene opening is ended on the website.
◆ getBacklightTimeOut()
const unsigned long & configuration::Configuration::getBacklightTimeOut |
( |
| ) |
const |
|
inline |
get the timeout of display backlight in seconds
◆ getDisableFailedSession()
const bool & configuration::Configuration::getDisableFailedSession |
( |
| ) |
const |
|
inline |
get disable support of failed session. Note: If selected, the safe will be locked until the last known end date before a session was ended and marked as failed. Hygiene openings can no longer be triggered since the session is no longer valid!
◆ getEmergencyKey()
const String & configuration::Configuration::getEmergencyKey |
( |
| ) |
const |
|
inline |
get the emergency key of the safe
◆ getInstance()
static Configuration ** configuration::Configuration::getInstance |
( |
| ) |
|
|
inlinestaticprotected |
Function providing the instance for the singleton.
◆ getPwd()
const String & configuration::Configuration::getPwd |
( |
| ) |
const |
|
inline |
get the password of your wifi.
◆ getRandomChar()
static char configuration::Configuration::getRandomChar |
( |
| ) |
|
|
inlinestaticprotected |
Get a random character (A-Z, 0-9)
◆ getSingleton()
static Configuration & configuration::Configuration::getSingleton |
( |
| ) |
|
|
inlinestatic |
Get the Singleton object.
◆ getSsid()
const String & configuration::Configuration::getSsid |
( |
| ) |
const |
|
inline |
get the SSID(name) of your wifi
◆ getTimeRestrictions()
const TimeRestrictions & configuration::Configuration::getTimeRestrictions |
( |
| ) |
const |
|
inline |
get the timeout of display backlight in seconds
◆ getTimezone()
const String & configuration::Configuration::getTimezone |
( |
| ) |
const |
|
inline |
◆ getTimezoneName()
const String & configuration::Configuration::getTimezoneName |
( |
| ) |
const |
|
inline |
get the name to the timezone-string (e.g. "Europe/Berlin")
◆ getUserId()
const String & configuration::Configuration::getUserId |
( |
| ) |
const |
|
inline |
get the User ID extracted from the webpage settings > API
◆ readConfiguration()
void configuration::Configuration::readConfiguration |
( |
| ) |
|
|
inlineprotected |
Read all configuration data from file.
◆ restoreFactoryDefaults()
void configuration::Configuration::restoreFactoryDefaults |
( |
| ) |
|
|
inline |
Reset all values to the default values and write configuration.
◆ setConfigurationSettings()
void configuration::Configuration::setConfigurationSettings |
( |
const String & |
userId, |
|
|
const String & |
apiKey, |
|
|
const bool & |
disableFailedSession, |
|
|
const String & |
timezoneName, |
|
|
const String & |
timezone, |
|
|
const long & |
backlightTimeOut, |
|
|
const bool & |
autoLockHygieneOpeningTimeout, |
|
|
const TimeRestrictions & |
timeRestrictions |
|
) |
| |
|
inline |
Set the Configuration Settings.
- Parameters
-
userId | new Emlalock API user id |
apiKey | new Emlalock API key |
disableFailedSession | disable support of failed session. Note: If selected, the safe will be locked until the last known end date before a session was ended and marked as failed. Hygiene openings can no longer be triggered since the session is no longer valid! |
timezoneName | new name of timezone |
timezone | new timezone string |
backlightTimeOut | new timeout of display backlight in seconds |
autoLockHygieneOpeningTimeout | Automatically lock after the time for hygiene opening is over. If not set, the safe stays unlocked until the hygiene opening is ended on the website. |
timeRestrictions | the new time restrictions |
◆ setWifiSettings()
void configuration::Configuration::setWifiSettings |
( |
const String & |
ssid, |
|
|
const String & |
pwd |
|
) |
| |
|
inline |
Set the Wifi Settings.
- Parameters
-
ssid | new ssid |
pwd | new password |
◆ writeConfiguration()
void configuration::Configuration::writeConfiguration |
( |
| ) |
|
|
inlineprotected |
writes all configuration values to the SPIFFS
◆ apiKey
String configuration::Configuration::apiKey |
|
protected |
The API Key extracted from the webpage settings > API.
◆ autoLockHygieneOpeningTimeout
bool configuration::Configuration::autoLockHygieneOpeningTimeout |
|
protected |
Automatically lock after the time for hygiene opening is over. If not set, the safe stays unlocked until the hygiene opening is ended on the website.
◆ backlightTimeOut
unsigned long configuration::Configuration::backlightTimeOut |
|
protected |
Timeout of display backlight in seconds.
◆ disableFailedSession
bool configuration::Configuration::disableFailedSession |
|
protected |
Disable support of failed session. Note: If selected, the safe will be locked until the last known end date before a session was ended and marked as failed. Hygiene openings can no longer be triggered since the session is no longer valid!
◆ emergencyKey
String configuration::Configuration::emergencyKey |
|
protected |
◆ pwd
String configuration::Configuration::pwd |
|
protected |
The password of your wifi.
◆ ssid
String configuration::Configuration::ssid |
|
protected |
The SSID(name) of your wifi.
◆ timeRestrictions
Container to restrict the time when the safe can be opened.
◆ timezone
String configuration::Configuration::timezone |
|
protected |
◆ timezoneName
String configuration::Configuration::timezoneName |
|
protected |
The name to the timezone-string (e.g. "Europe/Berlin")
◆ userId
String configuration::Configuration::userId |
|
protected |
The User ID extracted from the webpage settings > API.
The documentation for this class was generated from the following file: