-
Notifications
You must be signed in to change notification settings - Fork 14
/
config.h
81 lines (67 loc) · 3.64 KB
/
config.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
//Configuration Settings for the ESP32 iGrill BLE Client
// Set Wifi Manager Logging Level
//Use from 0 to 4. Higher number, more debugging messages and memory usage.
#define _WIFIMGR_LOGLEVEL_ 1
// Enable iGrill BLE Client Debugging which will print detailed information to Serial Port
// Level 0: Print only Basic Info (Default)
// Level 1: Level 0 + Print BLE Connection Info
// Level 2: Level 1 + Print everything including temp/batt/propane callbacks (Only Recommended for troubleshooting BLE issues)
#define IGRILL_DEBUG_LVL 0
// Setup File System Information (Needed to Read and Store the JSON )
#define FileFS LITTLEFS
#define FS_Name "LittleFS"
// You only need to format the filesystem once
//#define FORMAT_FILESYSTEM true
#define FORMAT_FILESYSTEM false
#define MIN_AP_PASSWORD_SIZE 8
#define SSID_MAX_LEN 32
#define PASS_MAX_LEN 64
#define ESP_getChipId() ((uint32_t)ESP.getEfuseMac())
#define LED_BUILTIN 2
#define LED_ON HIGH
#define LED_OFF LOW
// Configuration Settings for ESP Double Reset Detector (DRD)
#define ESP_DRD_USE_LITTLEFS true
#define ESP_DRD_USE_SPIFFS false
#define ESP_DRD_USE_EEPROM false
#define DOUBLERESETDETECTOR_DEBUG false //Enable or Disable DRD Debugging
#define DRD_TIMEOUT 5 // Number of seconds after reset during which a subseqent reset will be considered a double reset.
#define DRD_ADDRESS 0 // RTC Memory Address for the DoubleResetDetector to use
// Default configuration values for MQTT
#define MQTT_SERVER "127.0.0.1"
#define MQTT_SERVERPORT "1883"
#define MQTT_USERNAME "mqtt"
#define MQTT_PASSWORD "password"
#define MQTT_BASETOPIC "homeassistant" //If you are using Home Assistant you should set this to your discovery_prefix (default: homeassistant)
#define MQTT_RETAIN_TEMP false //Set to true if you want the temperature sensor value to be retained in MQTT. (default: false)
// Labels and max field lengths MQTT Custom parameters used in the JSON File Created From The Configuration Portal Data
#define MQTT_SERVER_Label "MQTT_SERVER"
#define MQTT_SERVERPORT_Label "MQTT_SERVERPORT"
#define MQTT_USERNAME_Label "MQTT_USERNAME"
#define MQTT_PASSWORD_Label "MQTT_PASSWORD"
#define MQTT_BASETOPIC_Label "MQTT_BASETOPIC"
#define USE_METRIC_DEGREES_Label "METRIC_DEGREES"
#define NO_MULTI_WIFI_Label "NO_MULTI_WIFI"
// MQTT Field Lengths (Change the Lengths here if the field isnt large enough)
#define custom_MQTT_SERVER_LEN 20
#define custom_MQTT_PORT_LEN 5
#define custom_MQTT_USERNAME_LEN 20
#define custom_MQTT_PASSWORD_LEN 40
#define custom_MQTT_BASETOPIC_LEN 40
// Number of Wifi Credentials to Store
#define NUM_WIFI_CREDENTIALS 2
#define CONFIG_FILENAME F("/wifi_cred.dat")
// Use false if you don't like to display Available Pages in Information Page of Config Portal
#define USE_AVAILABLE_PAGES true
// Use false to disable NTP config. Advisable when using Cellphone, Tablet to access Config Portal.
#define USE_ESP_WIFIMANAGER_NTP false
// Use true to enable CloudFlare NTP service. System can hang if you don't have Internet access while accessing CloudFlare
#define USE_CLOUDFLARE_NTP false
#define USING_CORS_FEATURE true
#define USE_CONFIGURABLE_DNS false
#define WIFI_MULTI_1ST_CONNECT_WAITING_MS 0
#define WIFI_MULTI_CONNECT_WAITING_MS 100L
#define WIFICHECK_INTERVAL 1000L
#define LED_INTERVAL 2000L
#define HEARTBEAT_INTERVAL 10000L
#define IGRILL_HEARTBEAT_INTERVAL 60000L