123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191 |
- // PRE-COMPILE CONFIGURATION
- //#define FORCE_SPIFFS_FORMAT
- //#define DEBUG_VERBOSE
- //#define DEBUGMODE // WARNING - DEBUGMODE reveals saved passwords on serial connection and shows note in web interface
- //#define DEBUG_SERIAL true
- #define DEBUG_MQTT true
- //#define USE_MQTT_TLS
- // currently does not work
- // ENABLE FEATURES
- #define ENABLE_FEATURE_NTP_TIME
- #define ENABLE_FEATURE_WEB_CONSOLE
- #define ENABLE_FEATURE_WEB_CONSOLE_WEBSOCKETS
- #define ENABLE_FEATURE_PW_ENCRYPTION
- #define ENABLE_FEATURE_HTTP_UPDATER
- #define WEB_CONSOLE_BUFFER_SIZE 4000
- #ifdef ENABLE_FEATURE_NTP_TIME
- #include <time.h>
- #endif
- //#ifdef ENABLE_FEATURE_WEB_CONSOLE_WEBSOCKETS
- #include <WebSocketsServer.h>
- //#endif
- // ENCRYPTION KEY used for passwords - up to 100 chars
- #define PW_ENCRYPTION_KEY "PLhg2i7fPoYSoipq1hTF1KOqyzp3OPWtUzufCDWmD9KgxbaKYOG5WbxoO4QoLDj3F6Iif4R55UbHX1nRo7GKNqT6QXQCTsdFvFem"
- // default values, can later be overridden via configuration
- #define MAX_MEASUREMENT_AGE 30000 // in ms, for measured inside Temp/Hum
- #define MAX_MEASUREMENT_AGE_OUT 300000 // in ms, for received outside Temp/Hum
- // NTP defaults
- #ifdef ENABLE_FEATURE_NTP_TIME
- #define DEFAULT_NTP_ENABLED true
- #define DEFAULT_NTP_SERVER "pool.ntp.org"
- #define DEFAULT_NTP_SYNC_INTERVAL 7200
- #define DEFAULT_TIMEZONE "CET-1CEST,M3.5.0/02,M10.5.0/03"
- #endif
- // confDevWiFi
- //#define DEVICE_NAME "WTherm-1" // now created from FIRMWARE_SHORTNAME + last 2 octets of MAC address
- //#define DEFAULT_HOST_NAME "" // now created from FIRMWARE_SHORTNAME + last 2 octets of MAC address
- #define DEFAULT_WIFI_APMODE_PASSWORD "nichtsicher" // min 8 chars!
- #define DEFAULT_WIFI_APMODE_TIMEOUT 5 //min
- #define DEFAULT_WIFI_RETRY_INTERVAL 5 //min
- #define DEFAULT_WIFI_CONNCHECK_INTERVAL 20 //s
- #define DEFAULT_WIFI_REBOOT_ONNOCONNECT 60 //min
- // confWeb
- #define HTTP_SET_TOKEN ""
- #define DEFAULT_HTTP_USER ""
- #define DEFAULT_HTTP_PASS ""
- #define DEFAULT_HTTP_USER_AUTH false
- #define DEFAULT_ENABLE_WEBCONSOLE true
- // confMqtt
- #define MQTT_ENABLE false
- #define MQTT_SERVER ""
- #define MQTT_PORT 1883
- #define MQTT_USER ""
- #define MQTT_PASS ""
- #define MQTT_TOPIC_IN "Test/WTherm"
- #define MQTT_TOPIC_OUT "Test/WTherm/stat"
- #define MQTT_OUT_RETAIN false
- #define MQTT_OUT_RETAIN_SENSORS false
- #define MQTT_OUT_PUBLISH_INTERVAL 0 // min, 0=only on change
- #define MQTT_OUT_PUBLISH_INTERVAL_SENSORS 5 // min, 0=only on change
- #define MQTT_WILLTOPIC "Test/WTherm/availability"
- #define MQTT_WILLQOS 2
- #define MQTT_WILLRETAIN false
- #define MQTT_WILLMSG "offline"
- #define MQTT_CONNMSG "online"
- #define MQTT_ENABLE_HEARTBEAT true
- // max interval for MQTT heartbeat message. only applicable if MQTT
- // IN-topic is defined. after this timeout MQTT reconnect is forced
- #define MQTT_HEARTBEAT_MAXAGE 180000
- // max interval for MQTT heartbeat message. only applicable if MQTT
- // IN-topic is defined. after this timeout the ESP will reboot
- #define MQTT_HEARTBEAT_MAXAGE_REBOOT 1800000
- // confBas
- #define DEFAULT_SETTEMP_MIN 16.0 // minimal temperature that can be set
- #define DEFAULT_SETTEMP_MAX 26.0 // maximal temperature that can be set
- #define AUTOSAVE_SETTEMP true
- #define AUTOSAVE_SETMODE false
- #define SAVE_TO_MQTT_RETAINED false
- #define DEFAULT_MEASURE_INTERVAL 15 // interval for temp/hum measurement
- // interval for display updates (if out-temp is active, display will toggle
- // in this interval)
- #define DEFAULT_DISPLAY_INTERVAL 5
- #define DEFAULT_DISPLAY_TIMEOUT 30 // display timeout after keypress (illumination)
- #define DEFAULT_PIR_ENABLES_DISPLAY false
- #define DEFAULT_PIR_ENABLES_DISPLAY_PRESET0_ONLY true
- #define DEFAULT_TOGGLING_I_O_TEMPHUM false
- // confAdv
- #define DEFAULT_HYSTERESIS 0.15 // hysteresis, normally 0.1 - 0.3
- #define DEFAULT_HEATING_MIN_OFFTIME 300 // minimal time the heating must keep turned off until it can start again, in s
- // correction value for temperature sensor reading
- #define TEMPSENSOR_CORRECTION_VALUE 0.0
- #define HUMSENSOR_CORRECTION_VALUE 0 // correction value for humidity sensor reading
- // decreases the set temp to overcome further temperature rise when the
- // heating is already switched off
- #define SETTEMP_DECREASE_VALUE 0.0
- #define OFF_MESSAGE "HEATING OFF"
- #define INSIDE_TEMP_LABEL "I"
- #define OUTSIDE_TEMP_LABEL "O"
- #define MODE_NAME_0 "off"
- #define MODE_NAME_1 "heat"
- #define PRESET_NAME_0 "Normal"
- #define PRESET_NAME_1 "Reduction 1"
- #define PRESET_NAME_2 "Reduction 2"
- // confAdd
- #define OUTTEMP_TOPIC_IN ""
- #define OUTHUM_TOPIC_IN ""
- #define MQTT_TOPIC_PIR "" // extra publish topic for PIR sensor
- #define MQTT_TOPIC_PIR_ON "ON"
- #define MQTT_TOPIC_PIR_OFF "OFF"
- // confLog
- #define DEFAULT_LOGLEVEL_SERIAL LOGLEVEL_DEBUG
- #define DEFAULT_LOGLEVEL_WEB LOGLEVEL_INFO
- #define DEFAULT_LOGLEVEL_MQTT LOGLEVEL_INFO
- #define DEFAULT_LOGLEVEL_SYSLOG LOGLEVEL_DEBUG // SYSLOG not implemented yet
- #define LOG_WEB_REQUESTS false
- // other (not configurable via commands/WebIF)
- #define DEFAULT_SETTEMP_HEATOFF 5.0 // heating target temperature in OFF mode (freezing guard, therefore > 0)
- #define SETTEMP_LOW_MIN 14.0 // minimal configurable temperature for reduction mode
- #define SETTEMP_LOW_MAX 21.5 // maximal configurable temperature for reduction mode
- // default initial values
- #define DEFAULT_SETTEMP 21.5
- #define DEFAULT_HEATINGMODE 1
- #define DEFAULT_PRESET 1
- #define DEFAULT_SETTEMP_LOW 20.0 // set temperature in night/low mode
- #define DEFAULT_SETTEMP_LOW2 17.0 // set temperature in night/low mode
- // COMPILE TIME SETTINGS
- // default values that can only be configured at compile time / hardware configuration
- #define BUTTON_DEBOUNCE_TIME 120
- #define BUTTON_HOLD_TIME 750
- // pin assignments and I2C addresses
- #define PIN_DHTSENSOR 13
- #define PIN_RELAIS 15 // 16
- #define PIN_BUTTON_PLUS 2
- #define PIN_BUTTON_MINUS 0
- #define PIN_BUTTON_MODE 14
- #define PIN_PIRSENSOR 12
- #define DHTTYPE DHT22 // DHT sensor type
- #define LCDADDR 0x27 // I2C address LCD
- #define LCDCOLS 16 // LCD cols
- #define LCDLINES 2 // LCD lines
- // default logic levels
- #define RELAISONSTATE HIGH
- #define BUTTONONSTATE LOW
- // SPIFFS settings
- #define SPIFFS_DBG
- #define SPIFFS_USE_MAGIC
- // LOG LEVELS
- #define LOGLEVEL_OFF 0
- #define LOGLEVEL_ERROR 1
- #define LOGLEVEL_WARN 2
- #define LOGLEVEL_INFO 3
- #define LOGLEVEL_DEBUG 4
- #define LOGLEVEL_VERBOSE 5
- // END PRE-COMPILE CONFIGURATION
- #ifdef USE_MQTT_TLS
- static const char *MQTT_TLS_fingerprint PROGMEM = "EC 0E 4B 32 77 6B 6A 03 C6 60 37 A4 DD 0C 4C 47 BC 2D 11 23";
- //static const char *MQTT_TLS_fingerprint PROGMEM = "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00";
- #endif
|