14 #ifndef OPENDEVICE_CONFIG_H_ 15 #define OPENDEVICE_CONFIG_H_ 25 #error A C++ compiler is required! 36 #define DEBUG_SETUP 1 // set 1 to enable (receiving debug) 37 #define DEBUG_CON 0 // set 1 to enable (receiving debug) 38 #define ENABLE_SERIAL 1 40 #define API_VERSION 050 // software version of this library 41 #define CONFIG_VERSION "cv1" // version of config layout 42 #define CONFIG_START 0 // start address in EEPROM 44 #define DEFAULT_BAUD 115200 45 #define DEFAULT_SERVER_PORT 8182 // Used only in server mode to receive socket connections 46 #define DISCOVERY_PORT 6142 // UDP port to enable discovery services. 47 #define KEEP_ALIVE_INTERVAL 30000 48 #define KEEP_ALIVE_MAX_MISSING 3 49 #define ENABLE_DEVICE_INTERRUPTION 0 50 #define ENABLE_SYNC_DEVICEID 1 // Sync DeviceID from server and save on EEPROM. 51 #define ENABLE_PREFIX_NAME 1 // Add Module name to Devices 52 #define LOAD_DEVICE_STORAGE 0 // Load deviceID from EEPROM ? (enable in production) 54 #define RECONNECT_TIMEOUT 30000 57 #define ENABLE_SSL 0 // disable to reduce flash/memory usage (tested only for MQTT/ESP8266) 58 #define ENABLE_ALEXA_PROTOCOL 0 // Enable Alexa/AmazonEcho direct integration (ESP8266 Only) 59 #define ALEXA_MAX_DEVICES 10 // MAX 14 66 #define MAX_DEVICE_ID 255 69 #if defined(__AVR_ATtinyX313__) || defined(__AVR_ATtinyX4__) || defined(__AVR_ATtinyX5__) 70 #define DATA_BUFFER 16 71 #define MAX_DEVICE_NAME 10 72 #define MAX_LISTENERS 2 75 #define MAX_COMMAND 5 // this is used for user command callbacks 76 #define MAX_COMMAND_STRLEN 5 77 #define READING_INTERVAL 100 // sensor reading interval (ms) 80 #elif defined(ESP8266) 81 #define DATA_BUFFER 256 82 #define MAX_LISTENERS 5 84 #define MAX_DEVICE_NAME 25 85 #define MAX_COMMAND 5 // this is used for user command callbacks 86 #define MAX_COMMAND_STRLEN 14 87 #define READING_INTERVAL 100 // sensor reading interval (ms) 91 #define DATA_BUFFER 128 92 #define MAX_LISTENERS 5 94 #define MAX_DEVICE_NAME 25 95 #define MAX_COMMAND 3 // this is used for user command callbacks 96 #define MAX_COMMAND_STRLEN 14 97 #define READING_INTERVAL 100 // sensor reading interval (ms) 109 CONNECTION_MODE_CLIENT,
110 CONNECTION_MODE_SERVER
135 uint8_t connectionMode;
136 int8_t devicesLength;
137 uint16_t devices[MAX_DEVICE];
void clear()
Definition: config.cpp:56
void load()
Definition: config.cpp:26
void save()
Definition: config.cpp:46
bool check()
Definition: config.cpp:39