mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-01-26 08:39:09 +03:00
set default values, just to be sure
This commit is contained in:
@@ -59,11 +59,11 @@ enum APNetworkStatus { ACTIVE = 0, INACTIVE, LINGERING };
|
|||||||
class APSettings {
|
class APSettings {
|
||||||
public:
|
public:
|
||||||
uint8_t provisionMode = FACTORY_AP_PROVISION_MODE; // 0 = on, 2 = off
|
uint8_t provisionMode = FACTORY_AP_PROVISION_MODE; // 0 = on, 2 = off
|
||||||
String ssid;
|
String ssid = FACTORY_AP_SSID;
|
||||||
String password;
|
String password = FACTORY_AP_PASSWORD;
|
||||||
uint8_t channel = FACTORY_AP_CHANNEL;
|
uint8_t channel = FACTORY_AP_CHANNEL;
|
||||||
bool ssidHidden = FACTORY_AP_SSID_HIDDEN;
|
bool ssidHidden = FACTORY_AP_SSID_HIDDEN;
|
||||||
uint8_t maxClients = FACTORY_AP_MAX_CLIENTS;
|
uint8_t maxClients = FACTORY_AP_MAX_CLIENTS;
|
||||||
|
|
||||||
IPAddress localIP;
|
IPAddress localIP;
|
||||||
IPAddress gatewayIP;
|
IPAddress gatewayIP;
|
||||||
|
|||||||
@@ -66,19 +66,19 @@
|
|||||||
|
|
||||||
class MqttSettings {
|
class MqttSettings {
|
||||||
public:
|
public:
|
||||||
bool enabled = FACTORY_MQTT_ENABLED;
|
bool enabled = FACTORY_MQTT_ENABLED;
|
||||||
String host;
|
String host = FACTORY_MQTT_HOST;
|
||||||
uint16_t port = FACTORY_MQTT_PORT;
|
uint16_t port = FACTORY_MQTT_PORT;
|
||||||
String rootCA;
|
String rootCA = "";
|
||||||
bool enableTLS = false;
|
bool enableTLS = false;
|
||||||
String username;
|
String username = FACTORY_MQTT_USERNAME;
|
||||||
String password;
|
String password = FACTORY_MQTT_PASSWORD;
|
||||||
String clientId;
|
String clientId;
|
||||||
uint16_t keepAlive = FACTORY_MQTT_KEEP_ALIVE;
|
uint16_t keepAlive = FACTORY_MQTT_KEEP_ALIVE;
|
||||||
bool cleanSession = FACTORY_MQTT_CLEAN_SESSION;
|
bool cleanSession = FACTORY_MQTT_CLEAN_SESSION;
|
||||||
|
|
||||||
// EMS-ESP specific
|
// EMS-ESP specific
|
||||||
String base;
|
String base = FACTORY_MQTT_BASE;
|
||||||
uint16_t publish_time_boiler = EMSESP_DEFAULT_PUBLISH_TIME;
|
uint16_t publish_time_boiler = EMSESP_DEFAULT_PUBLISH_TIME;
|
||||||
uint16_t publish_time_thermostat = EMSESP_DEFAULT_PUBLISH_TIME;
|
uint16_t publish_time_thermostat = EMSESP_DEFAULT_PUBLISH_TIME;
|
||||||
uint16_t publish_time_solar = EMSESP_DEFAULT_PUBLISH_TIME;
|
uint16_t publish_time_solar = EMSESP_DEFAULT_PUBLISH_TIME;
|
||||||
@@ -91,12 +91,12 @@ class MqttSettings {
|
|||||||
bool mqtt_retain = EMSESP_DEFAULT_MQTT_RETAIN;
|
bool mqtt_retain = EMSESP_DEFAULT_MQTT_RETAIN;
|
||||||
bool ha_enabled = EMSESP_DEFAULT_HA_ENABLED;
|
bool ha_enabled = EMSESP_DEFAULT_HA_ENABLED;
|
||||||
uint8_t nested_format = EMSESP_DEFAULT_NESTED_FORMAT;
|
uint8_t nested_format = EMSESP_DEFAULT_NESTED_FORMAT;
|
||||||
String discovery_prefix;
|
String discovery_prefix = EMSESP_DEFAULT_DISCOVERY_PREFIX;
|
||||||
uint8_t discovery_type = EMSESP_DEFAULT_DISCOVERY_TYPE;
|
uint8_t discovery_type = EMSESP_DEFAULT_DISCOVERY_TYPE;
|
||||||
bool publish_single = EMSESP_DEFAULT_PUBLISH_SINGLE;
|
bool publish_single = EMSESP_DEFAULT_PUBLISH_SINGLE;
|
||||||
bool publish_single2cmd = EMSESP_DEFAULT_PUBLISH_SINGLE2CMD;
|
bool publish_single2cmd = EMSESP_DEFAULT_PUBLISH_SINGLE2CMD;
|
||||||
bool send_response = EMSESP_DEFAULT_SEND_RESPONSE;
|
bool send_response = EMSESP_DEFAULT_SEND_RESPONSE;
|
||||||
uint8_t entity_format = EMSESP_DEFAULT_ENTITY_FORMAT;
|
uint8_t entity_format = EMSESP_DEFAULT_ENTITY_FORMAT;
|
||||||
|
|
||||||
static void read(MqttSettings & settings, JsonObject root);
|
static void read(MqttSettings & settings, JsonObject root);
|
||||||
static StateUpdateResult update(JsonObject root, MqttSettings & settings);
|
static StateUpdateResult update(JsonObject root, MqttSettings & settings);
|
||||||
|
|||||||
@@ -30,10 +30,10 @@
|
|||||||
|
|
||||||
class NTPSettings {
|
class NTPSettings {
|
||||||
public:
|
public:
|
||||||
bool enabled = FACTORY_NTP_ENABLED;
|
bool enabled = FACTORY_NTP_ENABLED;
|
||||||
String tzLabel;
|
String tzLabel = FACTORY_NTP_TIME_ZONE_LABEL;
|
||||||
String tzFormat;
|
String tzFormat = FACTORY_NTP_TIME_ZONE_FORMAT;
|
||||||
String server;
|
String server = FACTORY_NTP_SERVER;
|
||||||
|
|
||||||
static void read(NTPSettings & settings, JsonObject root);
|
static void read(NTPSettings & settings, JsonObject root);
|
||||||
static StateUpdateResult update(JsonObject root, NTPSettings & settings);
|
static StateUpdateResult update(JsonObject root, NTPSettings & settings);
|
||||||
|
|||||||
@@ -64,10 +64,10 @@
|
|||||||
class NetworkSettings {
|
class NetworkSettings {
|
||||||
public:
|
public:
|
||||||
// core wifi configuration
|
// core wifi configuration
|
||||||
String ssid;
|
String ssid = FACTORY_WIFI_SSID;
|
||||||
String bssid;
|
String bssid = "";
|
||||||
String password;
|
String password = FACTORY_WIFI_PASSWORD;
|
||||||
String hostname;
|
String hostname = FACTORY_WIFI_HOSTNAME;
|
||||||
bool staticIPConfig = false;
|
bool staticIPConfig = false;
|
||||||
bool bandwidth20 = false;
|
bool bandwidth20 = false;
|
||||||
uint8_t tx_power = 0;
|
uint8_t tx_power = 0;
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
#define ACCESS_TOKEN_PARAMATER "access_token"
|
#define ACCESS_TOKEN_PARAMATER "access_token"
|
||||||
|
|
||||||
#define AUTHORIZATION_HEADER "Authorization"
|
#define AUTHORIZATION_HEADER "Authorization"
|
||||||
#define AUTHORIZATION_HEADER_PREFIX "Bearer "
|
#define AUTHORIZATION_HEADER_PREFIX "Bearer "
|
||||||
#define AUTHORIZATION_HEADER_PREFIX_LEN 7
|
#define AUTHORIZATION_HEADER_PREFIX_LEN 7
|
||||||
|
|||||||
Reference in New Issue
Block a user