|
@ -10,36 +10,17 @@ |
|
|
#define DEVICE_NAME MANUFACTURER "_" DEVICE // Concatenate both to get a unique device name |
|
|
#define DEVICE_NAME MANUFACTURER "_" DEVICE // Concatenate both to get a unique device name |
|
|
|
|
|
|
|
|
#ifndef ADMIN_PASS |
|
|
#ifndef ADMIN_PASS |
|
|
#define ADMIN_PASS "fibonacci" // Default password (WEB, OTA, WIFI) |
|
|
|
|
|
|
|
|
#define ADMIN_PASS "fibonacci" // Default password (WEB, OTA, WIFI) |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef USE_PASSWORD |
|
|
#ifndef USE_PASSWORD |
|
|
#define USE_PASSWORD 1 // Insecurity caution! Disabling this will disable password querying completely. |
|
|
|
|
|
|
|
|
#define USE_PASSWORD 1 // Insecurity caution! Disabling this will disable password querying completely. |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef LOOP_DELAY_TIME |
|
|
#ifndef LOOP_DELAY_TIME |
|
|
#define LOOP_DELAY_TIME 10 // Delay for this millis in the main loop [0-250] |
|
|
|
|
|
|
|
|
#define LOOP_DELAY_TIME 10 // Delay for this millis in the main loop [0-250] |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define ARRAYINIT(type, name, ...) \ |
|
|
|
|
|
type name[] = {__VA_ARGS__}; |
|
|
|
|
|
|
|
|
|
|
|
//------------------------------------------------------------------------------ |
|
|
|
|
|
// TELNET |
|
|
|
|
|
//------------------------------------------------------------------------------ |
|
|
|
|
|
|
|
|
|
|
|
#ifndef TELNET_SUPPORT |
|
|
|
|
|
#define TELNET_SUPPORT 1 // Enable telnet support by default (3.34Kb) |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#ifndef TELNET_STA |
|
|
|
|
|
#define TELNET_STA 0 // By default, disallow connections via STA interface |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#define TELNET_PORT 23 // Port to listen to telnet clients |
|
|
|
|
|
#define TELNET_MAX_CLIENTS 1 // Max number of concurrent telnet clients |
|
|
|
|
|
|
|
|
|
|
|
//------------------------------------------------------------------------------ |
|
|
//------------------------------------------------------------------------------ |
|
|
// DEBUG |
|
|
// DEBUG |
|
|
//------------------------------------------------------------------------------ |
|
|
//------------------------------------------------------------------------------ |
|
@ -70,7 +51,7 @@ |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef SERIAL_RX_PORT |
|
|
#ifndef SERIAL_RX_PORT |
|
|
#define SERIAL_RX_PORT Serial // This setting is usually defined |
|
|
|
|
|
|
|
|
#define SERIAL_RX_PORT Serial // This setting is usually defined |
|
|
// in the hardware.h file for those |
|
|
// in the hardware.h file for those |
|
|
// boards that require it |
|
|
// boards that require it |
|
|
#endif |
|
|
#endif |
|
@ -100,44 +81,30 @@ |
|
|
//------------------------------------------------------------------------------ |
|
|
//------------------------------------------------------------------------------ |
|
|
|
|
|
|
|
|
#ifndef DEBUG_TELNET_SUPPORT |
|
|
#ifndef DEBUG_TELNET_SUPPORT |
|
|
#define DEBUG_TELNET_SUPPORT TELNET_SUPPORT // Enable telnet debug log if telnet is enabled too |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#if DEBUG_TELNET_SUPPORT |
|
|
|
|
|
#undef TELNET_SUPPORT |
|
|
|
|
|
#define TELNET_SUPPORT 1 |
|
|
|
|
|
|
|
|
#define DEBUG_TELNET_SUPPORT 1 // Enable telnet debug log (will only work if TELNET_SUPPORT is also 1) |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
//------------------------------------------------------------------------------ |
|
|
//------------------------------------------------------------------------------ |
|
|
|
|
|
|
|
|
#ifndef DEBUG_WEB_SUPPORT |
|
|
#ifndef DEBUG_WEB_SUPPORT |
|
|
#define DEBUG_WEB_SUPPORT WEB_SUPPORT // Enable web debug log if web is enabled too |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#if DEBUG_WEB_SUPPORT |
|
|
|
|
|
#undef WEB_SUPPORT |
|
|
|
|
|
#define WEB_SUPPORT 1 // Chicken and egg :) |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#ifndef DEBUG_WEB_ENABLED |
|
|
|
|
|
#define DEBUG_WEB_ENABLED 1 // Enable debug output by default |
|
|
|
|
|
|
|
|
#define DEBUG_WEB_SUPPORT 1 // Enable web debug log (will only work if WEB_SUPPORT is also 1) |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
//------------------------------------------------------------------------------ |
|
|
|
|
|
// TELNET |
|
|
//------------------------------------------------------------------------------ |
|
|
//------------------------------------------------------------------------------ |
|
|
|
|
|
|
|
|
// General debug options and macros |
|
|
|
|
|
#define DEBUG_SUPPORT DEBUG_SERIAL_SUPPORT || DEBUG_UDP_SUPPORT || DEBUG_TELNET_SUPPORT |
|
|
|
|
|
|
|
|
|
|
|
#if DEBUG_SUPPORT |
|
|
|
|
|
#define DEBUG_MSG(...) debugSend(__VA_ARGS__) |
|
|
|
|
|
#define DEBUG_MSG_P(...) debugSend_P(__VA_ARGS__) |
|
|
|
|
|
|
|
|
#ifndef TELNET_SUPPORT |
|
|
|
|
|
#define TELNET_SUPPORT 1 // Enable telnet support by default (3.34Kb) |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef DEBUG_MSG |
|
|
|
|
|
#define DEBUG_MSG(...) |
|
|
|
|
|
#define DEBUG_MSG_P(...) |
|
|
|
|
|
|
|
|
#ifndef TELNET_STA |
|
|
|
|
|
#define TELNET_STA 0 // By default, disallow connections via STA interface |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#define TELNET_PORT 23 // Port to listen to telnet clients |
|
|
|
|
|
#define TELNET_MAX_CLIENTS 1 // Max number of concurrent telnet clients |
|
|
|
|
|
|
|
|
//------------------------------------------------------------------------------ |
|
|
//------------------------------------------------------------------------------ |
|
|
// TERMINAL |
|
|
// TERMINAL |
|
|
//------------------------------------------------------------------------------ |
|
|
//------------------------------------------------------------------------------ |
|
@ -156,7 +123,9 @@ |
|
|
#define SYSTEM_CHECK_ENABLED 1 // Enable crash check by default |
|
|
#define SYSTEM_CHECK_ENABLED 1 // Enable crash check by default |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#ifndef SYSTEM_CHECK_MAX |
|
|
#define SYSTEM_CHECK_TIME 60000 // The system is considered stable after these many millis |
|
|
#define SYSTEM_CHECK_TIME 60000 // The system is considered stable after these many millis |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef SYSTEM_CHECK_MAX |
|
|
#ifndef SYSTEM_CHECK_MAX |
|
|
#define SYSTEM_CHECK_MAX 5 // After this many crashes on boot |
|
|
#define SYSTEM_CHECK_MAX 5 // After this many crashes on boot |
|
@ -183,7 +152,10 @@ |
|
|
#define HEARTBEAT_ENABLED 1 |
|
|
#define HEARTBEAT_ENABLED 1 |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#ifndef HEARTBEAT_INTERVAL |
|
|
#define HEARTBEAT_INTERVAL 300000 // Interval between heartbeat messages (in ms) |
|
|
#define HEARTBEAT_INTERVAL 300000 // Interval between heartbeat messages (in ms) |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
#define UPTIME_OVERFLOW 4294967295 // Uptime overflow value |
|
|
#define UPTIME_OVERFLOW 4294967295 // Uptime overflow value |
|
|
|
|
|
|
|
|
// Topics that will be reported in heartbeat |
|
|
// Topics that will be reported in heartbeat |
|
@ -206,48 +178,15 @@ |
|
|
//------------------------------------------------------------------------------ |
|
|
//------------------------------------------------------------------------------ |
|
|
// Load average |
|
|
// Load average |
|
|
//------------------------------------------------------------------------------ |
|
|
//------------------------------------------------------------------------------ |
|
|
|
|
|
|
|
|
#ifndef LOADAVG_INTERVAL |
|
|
#ifndef LOADAVG_INTERVAL |
|
|
#define LOADAVG_INTERVAL 30000 // Interval between calculating load average (in ms) |
|
|
|
|
|
|
|
|
#define LOADAVG_INTERVAL 30000 // Interval between calculating load average (in ms) |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef LOADAVG_REPORT |
|
|
#ifndef LOADAVG_REPORT |
|
|
#define LOADAVG_REPORT 1 // Should we report Load average over MQTT? |
|
|
|
|
|
|
|
|
#define LOADAVG_REPORT 1 // Should we report Load average over MQTT? |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
//------------------------------------------------------------------------------ |
|
|
|
|
|
// RESET |
|
|
|
|
|
//------------------------------------------------------------------------------ |
|
|
|
|
|
|
|
|
|
|
|
#define CUSTOM_RESET_HARDWARE 1 // Reset from hardware button |
|
|
|
|
|
#define CUSTOM_RESET_WEB 2 // Reset from web interface |
|
|
|
|
|
#define CUSTOM_RESET_TERMINAL 3 // Reset from terminal |
|
|
|
|
|
#define CUSTOM_RESET_MQTT 4 // Reset via MQTT |
|
|
|
|
|
#define CUSTOM_RESET_RPC 5 // Reset via RPC (HTTP) |
|
|
|
|
|
#define CUSTOM_RESET_OTA 6 // Reset after successful OTA update |
|
|
|
|
|
#define CUSTOM_RESET_HTTP 7 // Reset via HTTP GET |
|
|
|
|
|
#define CUSTOM_RESET_NOFUSS 8 // Reset after successful NOFUSS update |
|
|
|
|
|
#define CUSTOM_RESET_UPGRADE 9 // Reset after update from web interface |
|
|
|
|
|
#define CUSTOM_RESET_FACTORY 10 // Factory reset from terminal |
|
|
|
|
|
|
|
|
|
|
|
#define CUSTOM_RESET_MAX 10 |
|
|
|
|
|
|
|
|
|
|
|
PROGMEM const char custom_reset_hardware[] = "Hardware button"; |
|
|
|
|
|
PROGMEM const char custom_reset_web[] = "Reboot from web interface"; |
|
|
|
|
|
PROGMEM const char custom_reset_terminal[] = "Reboot from terminal"; |
|
|
|
|
|
PROGMEM const char custom_reset_mqtt[] = "Reboot from MQTT"; |
|
|
|
|
|
PROGMEM const char custom_reset_rpc[] = "Reboot from RPC"; |
|
|
|
|
|
PROGMEM const char custom_reset_ota[] = "Reboot after successful OTA update"; |
|
|
|
|
|
PROGMEM const char custom_reset_http[] = "Reboot from HTTP"; |
|
|
|
|
|
PROGMEM const char custom_reset_nofuss[] = "Reboot after successful NoFUSS update"; |
|
|
|
|
|
PROGMEM const char custom_reset_upgrade[] = "Reboot after successful web update"; |
|
|
|
|
|
PROGMEM const char custom_reset_factory[] = "Factory reset"; |
|
|
|
|
|
PROGMEM const char* const custom_reset_string[] = { |
|
|
|
|
|
custom_reset_hardware, custom_reset_web, custom_reset_terminal, |
|
|
|
|
|
custom_reset_mqtt, custom_reset_rpc, custom_reset_ota, |
|
|
|
|
|
custom_reset_http, custom_reset_nofuss, custom_reset_upgrade, |
|
|
|
|
|
custom_reset_factory |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
//------------------------------------------------------------------------------ |
|
|
//------------------------------------------------------------------------------ |
|
|
// BUTTON |
|
|
// BUTTON |
|
|
//------------------------------------------------------------------------------ |
|
|
//------------------------------------------------------------------------------ |
|
@ -268,52 +207,10 @@ PROGMEM const char* const custom_reset_string[] = { |
|
|
#define BUTTON_LNGLNGCLICK_DELAY 10000 // Time in ms holding the button down to get a long-long click |
|
|
#define BUTTON_LNGLNGCLICK_DELAY 10000 // Time in ms holding the button down to get a long-long click |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#define BUTTON_EVENT_NONE 0 |
|
|
|
|
|
#define BUTTON_EVENT_PRESSED 1 |
|
|
|
|
|
#define BUTTON_EVENT_RELEASED 2 |
|
|
|
|
|
#define BUTTON_EVENT_CLICK 2 |
|
|
|
|
|
#define BUTTON_EVENT_DBLCLICK 3 |
|
|
|
|
|
#define BUTTON_EVENT_LNGCLICK 4 |
|
|
|
|
|
#define BUTTON_EVENT_LNGLNGCLICK 5 |
|
|
|
|
|
|
|
|
|
|
|
#define BUTTON_MODE_NONE 0 |
|
|
|
|
|
#define BUTTON_MODE_TOGGLE 1 |
|
|
|
|
|
#define BUTTON_MODE_ON 2 |
|
|
|
|
|
#define BUTTON_MODE_OFF 3 |
|
|
|
|
|
#define BUTTON_MODE_AP 4 |
|
|
|
|
|
#define BUTTON_MODE_RESET 5 |
|
|
|
|
|
#define BUTTON_MODE_PULSE 6 |
|
|
|
|
|
#define BUTTON_MODE_FACTORY 7 |
|
|
|
|
|
|
|
|
|
|
|
//------------------------------------------------------------------------------ |
|
|
//------------------------------------------------------------------------------ |
|
|
// RELAY |
|
|
// RELAY |
|
|
//------------------------------------------------------------------------------ |
|
|
//------------------------------------------------------------------------------ |
|
|
|
|
|
|
|
|
#define RELAY_BOOT_OFF 0 |
|
|
|
|
|
#define RELAY_BOOT_ON 1 |
|
|
|
|
|
#define RELAY_BOOT_SAME 2 |
|
|
|
|
|
#define RELAY_BOOT_TOGGLE 3 |
|
|
|
|
|
|
|
|
|
|
|
#define RELAY_TYPE_NORMAL 0 |
|
|
|
|
|
#define RELAY_TYPE_INVERSE 1 |
|
|
|
|
|
#define RELAY_TYPE_LATCHED 2 |
|
|
|
|
|
#define RELAY_TYPE_LATCHED_INVERSE 3 |
|
|
|
|
|
|
|
|
|
|
|
#define RELAY_SYNC_ANY 0 |
|
|
|
|
|
#define RELAY_SYNC_NONE_OR_ONE 1 |
|
|
|
|
|
#define RELAY_SYNC_ONE 2 |
|
|
|
|
|
#define RELAY_SYNC_SAME 3 |
|
|
|
|
|
|
|
|
|
|
|
#define RELAY_PULSE_NONE 0 |
|
|
|
|
|
#define RELAY_PULSE_OFF 1 |
|
|
|
|
|
#define RELAY_PULSE_ON 2 |
|
|
|
|
|
|
|
|
|
|
|
#define RELAY_PROVIDER_RELAY 0 |
|
|
|
|
|
#define RELAY_PROVIDER_DUAL 1 |
|
|
|
|
|
#define RELAY_PROVIDER_LIGHT 2 |
|
|
|
|
|
#define RELAY_PROVIDER_RFBRIDGE 3 |
|
|
|
|
|
#define RELAY_PROVIDER_STM 4 |
|
|
|
|
|
|
|
|
|
|
|
// Default boot mode: 0 means OFF, 1 ON and 2 whatever was before |
|
|
// Default boot mode: 0 means OFF, 1 ON and 2 whatever was before |
|
|
#ifndef RELAY_BOOT_MODE |
|
|
#ifndef RELAY_BOOT_MODE |
|
|
#define RELAY_BOOT_MODE RELAY_BOOT_OFF |
|
|
#define RELAY_BOOT_MODE RELAY_BOOT_OFF |
|
@ -354,102 +251,87 @@ PROGMEM const char* const custom_reset_string[] = { |
|
|
#define RELAY_SAVE_DELAY 1000 |
|
|
#define RELAY_SAVE_DELAY 1000 |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
//------------------------------------------------------------------------------ |
|
|
|
|
|
// LED |
|
|
|
|
|
//------------------------------------------------------------------------------ |
|
|
|
|
|
|
|
|
|
|
|
#define LED_MODE_MQTT 0 // LED will be managed from MQTT (OFF by default) |
|
|
|
|
|
#define LED_MODE_WIFI 1 // LED will blink according to the WIFI status |
|
|
|
|
|
#define LED_MODE_FOLLOW 2 // LED will follow state of linked relay (check RELAY#_LED) |
|
|
|
|
|
#define LED_MODE_FOLLOW_INVERSE 3 // LED will follow the opposite state of linked relay (check RELAY#_LED) |
|
|
|
|
|
#define LED_MODE_FINDME 4 // LED will be ON if all relays are OFF |
|
|
|
|
|
#define LED_MODE_FINDME_WIFI 5 // A mixture between WIFI and FINDME |
|
|
|
|
|
#define LED_MODE_ON 6 // LED always ON |
|
|
|
|
|
#define LED_MODE_OFF 7 // LED always OFF |
|
|
|
|
|
#define LED_MODE_RELAY 8 // If any relay is ON, LED will be ON, otherwise OFF |
|
|
|
|
|
#define LED_MODE_RELAY_WIFI 9 // A mixture between WIFI and RELAY, the reverse of MIXED |
|
|
|
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------- |
|
|
// ----------------------------------------------------------------------------- |
|
|
// WIFI |
|
|
// WIFI |
|
|
// ----------------------------------------------------------------------------- |
|
|
// ----------------------------------------------------------------------------- |
|
|
|
|
|
|
|
|
#ifndef WIFI_CONNECT_TIMEOUT |
|
|
#ifndef WIFI_CONNECT_TIMEOUT |
|
|
#define WIFI_CONNECT_TIMEOUT 60000 // Connecting timeout for WIFI in ms |
|
|
|
|
|
|
|
|
#define WIFI_CONNECT_TIMEOUT 60000 // Connecting timeout for WIFI in ms |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef WIFI_RECONNECT_INTERVAL |
|
|
#ifndef WIFI_RECONNECT_INTERVAL |
|
|
#define WIFI_RECONNECT_INTERVAL 180000 // If could not connect to WIFI, retry after this time in ms |
|
|
|
|
|
|
|
|
#define WIFI_RECONNECT_INTERVAL 180000 // If could not connect to WIFI, retry after this time in ms |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#define WIFI_MAX_NETWORKS 5 // Max number of WIFI connection configurations |
|
|
|
|
|
|
|
|
#define WIFI_MAX_NETWORKS 5 // Max number of WIFI connection configurations |
|
|
|
|
|
|
|
|
#ifndef WIFI_AP_MODE |
|
|
#ifndef WIFI_AP_MODE |
|
|
#define WIFI_AP_MODE AP_MODE_ALONE |
|
|
|
|
|
|
|
|
#define WIFI_AP_MODE AP_MODE_ALONE |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef WIFI_SLEEP_MODE |
|
|
#ifndef WIFI_SLEEP_MODE |
|
|
#define WIFI_SLEEP_MODE WIFI_NONE_SLEEP // WIFI_NONE_SLEEP, WIFI_LIGHT_SLEEP or WIFI_MODEM_SLEEP |
|
|
|
|
|
|
|
|
#define WIFI_SLEEP_MODE WIFI_NONE_SLEEP // WIFI_NONE_SLEEP, WIFI_LIGHT_SLEEP or WIFI_MODEM_SLEEP |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef WIFI_SCAN_NETWORKS |
|
|
#ifndef WIFI_SCAN_NETWORKS |
|
|
#define WIFI_SCAN_NETWORKS 1 // Perform a network scan before connecting |
|
|
|
|
|
|
|
|
#define WIFI_SCAN_NETWORKS 1 // Perform a network scan before connecting |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
// Optional hardcoded configuration (up to 2 networks) |
|
|
// Optional hardcoded configuration (up to 2 networks) |
|
|
#ifndef WIFI1_SSID |
|
|
#ifndef WIFI1_SSID |
|
|
#define WIFI1_SSID "" |
|
|
|
|
|
|
|
|
#define WIFI1_SSID "" |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef WIFI1_PASS |
|
|
#ifndef WIFI1_PASS |
|
|
#define WIFI1_PASS "" |
|
|
|
|
|
|
|
|
#define WIFI1_PASS "" |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef WIFI1_IP |
|
|
#ifndef WIFI1_IP |
|
|
#define WIFI1_IP "" |
|
|
|
|
|
|
|
|
#define WIFI1_IP "" |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef WIFI1_GW |
|
|
#ifndef WIFI1_GW |
|
|
#define WIFI1_GW "" |
|
|
|
|
|
|
|
|
#define WIFI1_GW "" |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef WIFI1_MASK |
|
|
#ifndef WIFI1_MASK |
|
|
#define WIFI1_MASK "" |
|
|
|
|
|
|
|
|
#define WIFI1_MASK "" |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef WIFI1_DNS |
|
|
#ifndef WIFI1_DNS |
|
|
#define WIFI1_DNS "" |
|
|
|
|
|
|
|
|
#define WIFI1_DNS "" |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef WIFI2_SSID |
|
|
#ifndef WIFI2_SSID |
|
|
#define WIFI2_SSID "" |
|
|
|
|
|
|
|
|
#define WIFI2_SSID "" |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef WIFI2_PASS |
|
|
#ifndef WIFI2_PASS |
|
|
#define WIFI2_PASS "" |
|
|
|
|
|
|
|
|
#define WIFI2_PASS "" |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef WIFI2_IP |
|
|
#ifndef WIFI2_IP |
|
|
#define WIFI2_IP "" |
|
|
|
|
|
|
|
|
#define WIFI2_IP "" |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef WIFI2_GW |
|
|
#ifndef WIFI2_GW |
|
|
#define WIFI2_GW "" |
|
|
|
|
|
|
|
|
#define WIFI2_GW "" |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef WIFI2_MASK |
|
|
#ifndef WIFI2_MASK |
|
|
#define WIFI2_MASK "" |
|
|
|
|
|
|
|
|
#define WIFI2_MASK "" |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef WIFI2_DNS |
|
|
#ifndef WIFI2_DNS |
|
|
#define WIFI2_DNS "" |
|
|
|
|
|
|
|
|
#define WIFI2_DNS "" |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef WIFI_RSSI_1M |
|
|
#ifndef WIFI_RSSI_1M |
|
|
#define WIFI_RSSI_1M -30 // Calibrate it with your router reading the RSSI at 1m |
|
|
|
|
|
|
|
|
#define WIFI_RSSI_1M -30 // Calibrate it with your router reading the RSSI at 1m |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef WIFI_PROPAGATION_CONST |
|
|
#ifndef WIFI_PROPAGATION_CONST |
|
|
#define WIFI_PROPAGATION_CONST 4 // This is typically something between 2.7 to 4.3 (free space is 2) |
|
|
|
|
|
|
|
|
#define WIFI_PROPAGATION_CONST 4 // This is typically something between 2.7 to 4.3 (free space is 2) |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------- |
|
|
// ----------------------------------------------------------------------------- |
|
@ -457,32 +339,29 @@ PROGMEM const char* const custom_reset_string[] = { |
|
|
// ----------------------------------------------------------------------------- |
|
|
// ----------------------------------------------------------------------------- |
|
|
|
|
|
|
|
|
#ifndef WEB_SUPPORT |
|
|
#ifndef WEB_SUPPORT |
|
|
#define WEB_SUPPORT 1 // Enable web support (http, api, 121.65Kb) |
|
|
|
|
|
|
|
|
#define WEB_SUPPORT 1 // Enable web support (http, api, 121.65Kb) |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef WEB_EMBEDDED |
|
|
#ifndef WEB_EMBEDDED |
|
|
#define WEB_EMBEDDED 1 // Build the firmware with the web interface embedded in |
|
|
|
|
|
|
|
|
#define WEB_EMBEDDED 1 // Build the firmware with the web interface embedded in |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
// This is not working at the moment!! |
|
|
// This is not working at the moment!! |
|
|
// Requires ASYNC_TCP_SSL_ENABLED to 1 and ESP8266 Arduino Core 2.4.0 |
|
|
// Requires ASYNC_TCP_SSL_ENABLED to 1 and ESP8266 Arduino Core 2.4.0 |
|
|
#ifndef WEB_SSL_ENABLED |
|
|
#ifndef WEB_SSL_ENABLED |
|
|
#define WEB_SSL_ENABLED 0 // Use HTTPS web interface |
|
|
|
|
|
|
|
|
#define WEB_SSL_ENABLED 0 // Use HTTPS web interface |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#define WEB_MODE_NORMAL 0 |
|
|
|
|
|
#define WEB_MODE_PASSWORD 1 |
|
|
|
|
|
|
|
|
|
|
|
#ifndef WEB_USERNAME |
|
|
#ifndef WEB_USERNAME |
|
|
#define WEB_USERNAME "admin" // HTTP username |
|
|
|
|
|
|
|
|
#define WEB_USERNAME "admin" // HTTP username |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef WEB_FORCE_PASS_CHANGE |
|
|
#ifndef WEB_FORCE_PASS_CHANGE |
|
|
#define WEB_FORCE_PASS_CHANGE 1 // Force the user to change the password if default one |
|
|
|
|
|
|
|
|
#define WEB_FORCE_PASS_CHANGE 1 // Force the user to change the password if default one |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef WEB_PORT |
|
|
#ifndef WEB_PORT |
|
|
#define WEB_PORT 80 // HTTP port |
|
|
|
|
|
|
|
|
#define WEB_PORT 80 // HTTP port |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------- |
|
|
// ----------------------------------------------------------------------------- |
|
@ -491,19 +370,19 @@ PROGMEM const char* const custom_reset_string[] = { |
|
|
|
|
|
|
|
|
// This will only be enabled if WEB_SUPPORT is 1 (this is the default value) |
|
|
// This will only be enabled if WEB_SUPPORT is 1 (this is the default value) |
|
|
#ifndef WS_AUTHENTICATION |
|
|
#ifndef WS_AUTHENTICATION |
|
|
#define WS_AUTHENTICATION 1 // WS authentication ON by default (see #507) |
|
|
|
|
|
|
|
|
#define WS_AUTHENTICATION 1 // WS authentication ON by default (see #507) |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef WS_BUFFER_SIZE |
|
|
#ifndef WS_BUFFER_SIZE |
|
|
#define WS_BUFFER_SIZE 5 // Max number of secured websocket connections |
|
|
|
|
|
|
|
|
#define WS_BUFFER_SIZE 5 // Max number of secured websocket connections |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef WS_TIMEOUT |
|
|
#ifndef WS_TIMEOUT |
|
|
#define WS_TIMEOUT 1800000 // Timeout for secured websocket |
|
|
|
|
|
|
|
|
#define WS_TIMEOUT 1800000 // Timeout for secured websocket |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef WS_UPDATE_INTERVAL |
|
|
#ifndef WS_UPDATE_INTERVAL |
|
|
#define WS_UPDATE_INTERVAL 30000 // Update clients every 30 seconds |
|
|
|
|
|
|
|
|
#define WS_UPDATE_INTERVAL 30000 // Update clients every 30 seconds |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------- |
|
|
// ----------------------------------------------------------------------------- |
|
@ -512,67 +391,55 @@ PROGMEM const char* const custom_reset_string[] = { |
|
|
|
|
|
|
|
|
// This will only be enabled if WEB_SUPPORT is 1 (this is the default value) |
|
|
// This will only be enabled if WEB_SUPPORT is 1 (this is the default value) |
|
|
#ifndef API_ENABLED |
|
|
#ifndef API_ENABLED |
|
|
#define API_ENABLED 0 // Do not enable API by default |
|
|
|
|
|
|
|
|
#define API_ENABLED 0 // Do not enable API by default |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef API_BUFFER_SIZE |
|
|
#ifndef API_BUFFER_SIZE |
|
|
#define API_BUFFER_SIZE 15 // Size of the buffer for HTTP GET API responses |
|
|
|
|
|
|
|
|
#define API_BUFFER_SIZE 15 // Size of the buffer for HTTP GET API responses |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef API_REAL_TIME_VALUES |
|
|
#ifndef API_REAL_TIME_VALUES |
|
|
#define API_REAL_TIME_VALUES 0 // Show filtered/median values by default (0 => median, 1 => real time) |
|
|
|
|
|
|
|
|
#define API_REAL_TIME_VALUES 0 // Show filtered/median values by default (0 => median, 1 => real time) |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------- |
|
|
|
|
|
// UI |
|
|
|
|
|
// ----------------------------------------------------------------------------- |
|
|
|
|
|
|
|
|
|
|
|
#define UI_TAG_INPUT 0 |
|
|
|
|
|
#define UI_TAG_CHECKBOX 1 |
|
|
|
|
|
#define UI_TAG_SELECT 2 |
|
|
|
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------- |
|
|
// ----------------------------------------------------------------------------- |
|
|
// MDNS / LLMNR / NETBIOS / SSDP |
|
|
// MDNS / LLMNR / NETBIOS / SSDP |
|
|
// ----------------------------------------------------------------------------- |
|
|
// ----------------------------------------------------------------------------- |
|
|
|
|
|
|
|
|
#ifndef MDNS_SERVER_SUPPORT |
|
|
#ifndef MDNS_SERVER_SUPPORT |
|
|
#define MDNS_SERVER_SUPPORT 1 // Publish services using mDNS by default (1.48Kb) |
|
|
|
|
|
|
|
|
#define MDNS_SERVER_SUPPORT 1 // Publish services using mDNS by default (1.48Kb) |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef MDNS_CLIENT_SUPPORT |
|
|
#ifndef MDNS_CLIENT_SUPPORT |
|
|
#define MDNS_CLIENT_SUPPORT 0 // Resolve mDNS names (3.44Kb) |
|
|
|
|
|
|
|
|
#define MDNS_CLIENT_SUPPORT 0 // Resolve mDNS names (3.44Kb) |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef LLMNR_SUPPORT |
|
|
#ifndef LLMNR_SUPPORT |
|
|
#define LLMNR_SUPPORT 0 // Publish device using LLMNR protocol by default (1.95Kb) - requires 2.4.0 |
|
|
|
|
|
|
|
|
#define LLMNR_SUPPORT 0 // Publish device using LLMNR protocol by default (1.95Kb) - requires 2.4.0 |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef NETBIOS_SUPPORT |
|
|
#ifndef NETBIOS_SUPPORT |
|
|
#define NETBIOS_SUPPORT 0 // Publish device using NetBIOS protocol by default (1.26Kb) - requires 2.4.0 |
|
|
|
|
|
|
|
|
#define NETBIOS_SUPPORT 0 // Publish device using NetBIOS protocol by default (1.26Kb) - requires 2.4.0 |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef SSDP_SUPPORT |
|
|
#ifndef SSDP_SUPPORT |
|
|
#define SSDP_SUPPORT 0 // Publish device using SSDP protocol by default (4.59Kb) |
|
|
|
|
|
// Not compatible with ALEXA_SUPPORT at the moment |
|
|
|
|
|
|
|
|
#define SSDP_SUPPORT 0 // Publish device using SSDP protocol by default (4.59Kb) |
|
|
|
|
|
// Not compatible with ALEXA_SUPPORT at the moment |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef SSDP_DEVICE_TYPE |
|
|
#ifndef SSDP_DEVICE_TYPE |
|
|
#define SSDP_DEVICE_TYPE "upnp:rootdevice" |
|
|
|
|
|
//#define SSDP_DEVICE_TYPE "urn:schemas-upnp-org:device:BinaryLight:1" |
|
|
|
|
|
|
|
|
#define SSDP_DEVICE_TYPE "upnp:rootdevice" |
|
|
|
|
|
//#define SSDP_DEVICE_TYPE "urn:schemas-upnp-org:device:BinaryLight:1" |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#if WEB_SUPPORT == 0 |
|
|
|
|
|
#undef SSDP_SUPPORT |
|
|
|
|
|
#define SSDP_SUPPORT 0 // SSDP support requires web support |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------- |
|
|
// ----------------------------------------------------------------------------- |
|
|
// SPIFFS |
|
|
// SPIFFS |
|
|
// ----------------------------------------------------------------------------- |
|
|
// ----------------------------------------------------------------------------- |
|
|
|
|
|
|
|
|
#ifndef SPIFFS_SUPPORT |
|
|
#ifndef SPIFFS_SUPPORT |
|
|
#define SPIFFS_SUPPORT 0 // Do not add support for SPIFFS by default |
|
|
|
|
|
|
|
|
#define SPIFFS_SUPPORT 0 // Do not add support for SPIFFS by default |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------- |
|
|
// ----------------------------------------------------------------------------- |
|
@ -580,29 +447,29 @@ PROGMEM const char* const custom_reset_string[] = { |
|
|
// ----------------------------------------------------------------------------- |
|
|
// ----------------------------------------------------------------------------- |
|
|
|
|
|
|
|
|
#ifndef OTA_PORT |
|
|
#ifndef OTA_PORT |
|
|
#define OTA_PORT 8266 // OTA port |
|
|
|
|
|
|
|
|
#define OTA_PORT 8266 // OTA port |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#define OTA_GITHUB_FP "D7:9F:07:61:10:B3:92:93:E3:49:AC:89:84:5B:03:80:C1:9E:2F:8B" |
|
|
|
|
|
|
|
|
#define OTA_GITHUB_FP "D7:9F:07:61:10:B3:92:93:E3:49:AC:89:84:5B:03:80:C1:9E:2F:8B" |
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------- |
|
|
// ----------------------------------------------------------------------------- |
|
|
// NOFUSS |
|
|
// NOFUSS |
|
|
// ----------------------------------------------------------------------------- |
|
|
// ----------------------------------------------------------------------------- |
|
|
|
|
|
|
|
|
#ifndef NOFUSS_SUPPORT |
|
|
#ifndef NOFUSS_SUPPORT |
|
|
#define NOFUSS_SUPPORT 0 // Do not enable support for NoFuss by default (12.65Kb) |
|
|
|
|
|
|
|
|
#define NOFUSS_SUPPORT 0 // Do not enable support for NoFuss by default (12.65Kb) |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef NOFUSS_ENABLED |
|
|
#ifndef NOFUSS_ENABLED |
|
|
#define NOFUSS_ENABLED 0 // Do not perform NoFUSS updates by default |
|
|
|
|
|
|
|
|
#define NOFUSS_ENABLED 0 // Do not perform NoFUSS updates by default |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef NOFUSS_SERVER |
|
|
#ifndef NOFUSS_SERVER |
|
|
#define NOFUSS_SERVER "" // Default NoFuss Server |
|
|
|
|
|
|
|
|
#define NOFUSS_SERVER "" // Default NoFuss Server |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef NOFUSS_INTERVAL |
|
|
#ifndef NOFUSS_INTERVAL |
|
|
#define NOFUSS_INTERVAL 3600000 // Check for updates every hour |
|
|
|
|
|
|
|
|
#define NOFUSS_INTERVAL 3600000 // Check for updates every hour |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------- |
|
|
// ----------------------------------------------------------------------------- |
|
@ -610,50 +477,42 @@ PROGMEM const char* const custom_reset_string[] = { |
|
|
// ----------------------------------------------------------------------------- |
|
|
// ----------------------------------------------------------------------------- |
|
|
|
|
|
|
|
|
#ifndef UART_MQTT_SUPPORT |
|
|
#ifndef UART_MQTT_SUPPORT |
|
|
#define UART_MQTT_SUPPORT 0 // No support by default |
|
|
|
|
|
|
|
|
#define UART_MQTT_SUPPORT 0 // No support by default |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef UART_MQTT_USE_SOFT |
|
|
#ifndef UART_MQTT_USE_SOFT |
|
|
#define UART_MQTT_USE_SOFT 0 // Use SoftwareSerial |
|
|
|
|
|
|
|
|
#define UART_MQTT_USE_SOFT 0 // Use SoftwareSerial |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef UART_MQTT_HW_PORT |
|
|
#ifndef UART_MQTT_HW_PORT |
|
|
#define UART_MQTT_HW_PORT Serial // Hardware serial port (if UART_MQTT_USE_SOFT == 0) |
|
|
|
|
|
|
|
|
#define UART_MQTT_HW_PORT Serial // Hardware serial port (if UART_MQTT_USE_SOFT == 0) |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef UART_MQTT_RX_PIN |
|
|
#ifndef UART_MQTT_RX_PIN |
|
|
#define UART_MQTT_RX_PIN 4 // RX PIN (if UART_MQTT_USE_SOFT == 1) |
|
|
|
|
|
|
|
|
#define UART_MQTT_RX_PIN 4 // RX PIN (if UART_MQTT_USE_SOFT == 1) |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef UART_MQTT_TX_PIN |
|
|
#ifndef UART_MQTT_TX_PIN |
|
|
#define UART_MQTT_TX_PIN 5 // TX PIN (if UART_MQTT_USE_SOFT == 1) |
|
|
|
|
|
|
|
|
#define UART_MQTT_TX_PIN 5 // TX PIN (if UART_MQTT_USE_SOFT == 1) |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef UART_MQTT_BAUDRATE |
|
|
#ifndef UART_MQTT_BAUDRATE |
|
|
#define UART_MQTT_BAUDRATE 115200 // Serial speed |
|
|
|
|
|
|
|
|
#define UART_MQTT_BAUDRATE 115200 // Serial speed |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#define UART_MQTT_BUFFER_SIZE 100 // UART buffer size |
|
|
|
|
|
|
|
|
|
|
|
#if UART_MQTT_SUPPORT |
|
|
|
|
|
#define MQTT_SUPPORT 1 |
|
|
|
|
|
#undef TERMINAL_SUPPORT |
|
|
|
|
|
#define TERMINAL_SUPPORT 0 |
|
|
|
|
|
#undef DEBUG_SERIAL_SUPPORT |
|
|
|
|
|
#define DEBUG_SERIAL_SUPPORT 0 |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
#define UART_MQTT_BUFFER_SIZE 100 // UART buffer size |
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------- |
|
|
// ----------------------------------------------------------------------------- |
|
|
// MQTT |
|
|
// MQTT |
|
|
// ----------------------------------------------------------------------------- |
|
|
// ----------------------------------------------------------------------------- |
|
|
|
|
|
|
|
|
#ifndef MQTT_SUPPORT |
|
|
#ifndef MQTT_SUPPORT |
|
|
#define MQTT_SUPPORT 1 // MQTT support (22.38Kb async, 12.48Kb sync) |
|
|
|
|
|
|
|
|
#define MQTT_SUPPORT 1 // MQTT support (22.38Kb async, 12.48Kb sync) |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef MQTT_USE_ASYNC |
|
|
#ifndef MQTT_USE_ASYNC |
|
|
#define MQTT_USE_ASYNC 1 // Use AysncMQTTClient (1) or PubSubClient (0) |
|
|
|
|
|
|
|
|
#define MQTT_USE_ASYNC 1 // Use AysncMQTTClient (1) or PubSubClient (0) |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
// MQTT OVER SSL |
|
|
// MQTT OVER SSL |
|
@ -763,78 +622,78 @@ PROGMEM const char* const custom_reset_string[] = { |
|
|
#ifndef MQTT_ENQUEUE_IP |
|
|
#ifndef MQTT_ENQUEUE_IP |
|
|
#define MQTT_ENQUEUE_IP 1 |
|
|
#define MQTT_ENQUEUE_IP 1 |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef MQTT_ENQUEUE_MAC |
|
|
#ifndef MQTT_ENQUEUE_MAC |
|
|
#define MQTT_ENQUEUE_MAC 1 |
|
|
#define MQTT_ENQUEUE_MAC 1 |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef MQTT_ENQUEUE_HOSTNAME |
|
|
#ifndef MQTT_ENQUEUE_HOSTNAME |
|
|
#define MQTT_ENQUEUE_HOSTNAME 1 |
|
|
#define MQTT_ENQUEUE_HOSTNAME 1 |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef MQTT_ENQUEUE_DATETIME |
|
|
#ifndef MQTT_ENQUEUE_DATETIME |
|
|
#define MQTT_ENQUEUE_DATETIME 1 |
|
|
#define MQTT_ENQUEUE_DATETIME 1 |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef MQTT_ENQUEUE_MESSAGE_ID |
|
|
#ifndef MQTT_ENQUEUE_MESSAGE_ID |
|
|
#define MQTT_ENQUEUE_MESSAGE_ID 1 |
|
|
#define MQTT_ENQUEUE_MESSAGE_ID 1 |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
// These particles will be concatenated to the MQTT_TOPIC base to form the actual topic |
|
|
// These particles will be concatenated to the MQTT_TOPIC base to form the actual topic |
|
|
#define MQTT_TOPIC_JSON "data" |
|
|
|
|
|
#define MQTT_TOPIC_ACTION "action" |
|
|
|
|
|
#define MQTT_TOPIC_RELAY "relay" |
|
|
|
|
|
#define MQTT_TOPIC_LED "led" |
|
|
|
|
|
#define MQTT_TOPIC_BUTTON "button" |
|
|
|
|
|
#define MQTT_TOPIC_IP "ip" |
|
|
|
|
|
#define MQTT_TOPIC_VERSION "version" |
|
|
|
|
|
#define MQTT_TOPIC_UPTIME "uptime" |
|
|
|
|
|
#define MQTT_TOPIC_DATETIME "datetime" |
|
|
|
|
|
#define MQTT_TOPIC_FREEHEAP "freeheap" |
|
|
|
|
|
#define MQTT_TOPIC_VCC "vcc" |
|
|
|
|
|
#define MQTT_TOPIC_STATUS "status" |
|
|
|
|
|
#define MQTT_TOPIC_MAC "mac" |
|
|
|
|
|
#define MQTT_TOPIC_RSSI "rssi" |
|
|
|
|
|
#define MQTT_TOPIC_MESSAGE_ID "id" |
|
|
|
|
|
#define MQTT_TOPIC_APP "app" |
|
|
|
|
|
#define MQTT_TOPIC_INTERVAL "interval" |
|
|
|
|
|
#define MQTT_TOPIC_HOSTNAME "host" |
|
|
|
|
|
#define MQTT_TOPIC_TIME "time" |
|
|
|
|
|
#define MQTT_TOPIC_RFOUT "rfout" |
|
|
|
|
|
#define MQTT_TOPIC_RFIN "rfin" |
|
|
|
|
|
#define MQTT_TOPIC_RFLEARN "rflearn" |
|
|
|
|
|
#define MQTT_TOPIC_RFRAW "rfraw" |
|
|
|
|
|
#define MQTT_TOPIC_UARTIN "uartin" |
|
|
|
|
|
#define MQTT_TOPIC_UARTOUT "uartout" |
|
|
|
|
|
#define MQTT_TOPIC_LOADAVG "loadavg" |
|
|
|
|
|
#define MQTT_TOPIC_BOARD "board" |
|
|
|
|
|
|
|
|
#define MQTT_TOPIC_JSON "data" |
|
|
|
|
|
#define MQTT_TOPIC_ACTION "action" |
|
|
|
|
|
#define MQTT_TOPIC_RELAY "relay" |
|
|
|
|
|
#define MQTT_TOPIC_LED "led" |
|
|
|
|
|
#define MQTT_TOPIC_BUTTON "button" |
|
|
|
|
|
#define MQTT_TOPIC_IP "ip" |
|
|
|
|
|
#define MQTT_TOPIC_VERSION "version" |
|
|
|
|
|
#define MQTT_TOPIC_UPTIME "uptime" |
|
|
|
|
|
#define MQTT_TOPIC_DATETIME "datetime" |
|
|
|
|
|
#define MQTT_TOPIC_FREEHEAP "freeheap" |
|
|
|
|
|
#define MQTT_TOPIC_VCC "vcc" |
|
|
|
|
|
#define MQTT_TOPIC_STATUS "status" |
|
|
|
|
|
#define MQTT_TOPIC_MAC "mac" |
|
|
|
|
|
#define MQTT_TOPIC_RSSI "rssi" |
|
|
|
|
|
#define MQTT_TOPIC_MESSAGE_ID "id" |
|
|
|
|
|
#define MQTT_TOPIC_APP "app" |
|
|
|
|
|
#define MQTT_TOPIC_INTERVAL "interval" |
|
|
|
|
|
#define MQTT_TOPIC_HOSTNAME "host" |
|
|
|
|
|
#define MQTT_TOPIC_TIME "time" |
|
|
|
|
|
#define MQTT_TOPIC_RFOUT "rfout" |
|
|
|
|
|
#define MQTT_TOPIC_RFIN "rfin" |
|
|
|
|
|
#define MQTT_TOPIC_RFLEARN "rflearn" |
|
|
|
|
|
#define MQTT_TOPIC_RFRAW "rfraw" |
|
|
|
|
|
#define MQTT_TOPIC_UARTIN "uartin" |
|
|
|
|
|
#define MQTT_TOPIC_UARTOUT "uartout" |
|
|
|
|
|
#define MQTT_TOPIC_LOADAVG "loadavg" |
|
|
|
|
|
#define MQTT_TOPIC_BOARD "board" |
|
|
|
|
|
|
|
|
// Light module |
|
|
// Light module |
|
|
#define MQTT_TOPIC_CHANNEL "channel" |
|
|
|
|
|
#define MQTT_TOPIC_COLOR_RGB "rgb" |
|
|
|
|
|
#define MQTT_TOPIC_COLOR_HSV "hsv" |
|
|
|
|
|
#define MQTT_TOPIC_ANIM_MODE "anim_mode" |
|
|
|
|
|
#define MQTT_TOPIC_ANIM_SPEED "anim_speed" |
|
|
|
|
|
#define MQTT_TOPIC_BRIGHTNESS "brightness" |
|
|
|
|
|
#define MQTT_TOPIC_MIRED "mired" |
|
|
|
|
|
#define MQTT_TOPIC_KELVIN "kelvin" |
|
|
|
|
|
|
|
|
#define MQTT_TOPIC_CHANNEL "channel" |
|
|
|
|
|
#define MQTT_TOPIC_COLOR_RGB "rgb" |
|
|
|
|
|
#define MQTT_TOPIC_COLOR_HSV "hsv" |
|
|
|
|
|
#define MQTT_TOPIC_ANIM_MODE "anim_mode" |
|
|
|
|
|
#define MQTT_TOPIC_ANIM_SPEED "anim_speed" |
|
|
|
|
|
#define MQTT_TOPIC_BRIGHTNESS "brightness" |
|
|
|
|
|
#define MQTT_TOPIC_MIRED "mired" |
|
|
|
|
|
#define MQTT_TOPIC_KELVIN "kelvin" |
|
|
|
|
|
|
|
|
#define MQTT_STATUS_ONLINE "1" // Value for the device ON message |
|
|
|
|
|
#define MQTT_STATUS_OFFLINE "0" // Value for the device OFF message (will) |
|
|
|
|
|
|
|
|
#define MQTT_STATUS_ONLINE "1" // Value for the device ON message |
|
|
|
|
|
#define MQTT_STATUS_OFFLINE "0" // Value for the device OFF message (will) |
|
|
|
|
|
|
|
|
#define MQTT_ACTION_RESET "reboot" // RESET MQTT topic particle |
|
|
|
|
|
|
|
|
#define MQTT_ACTION_RESET "reboot" // RESET MQTT topic particle |
|
|
|
|
|
|
|
|
// Internal MQTT events (do not change) |
|
|
|
|
|
#define MQTT_CONNECT_EVENT 0 |
|
|
|
|
|
#define MQTT_DISCONNECT_EVENT 1 |
|
|
|
|
|
#define MQTT_MESSAGE_EVENT 2 |
|
|
|
|
|
|
|
|
|
|
|
#define MQTT_MESSAGE_ID_SHIFT 1000 // Store MQTT message id into EEPROM every these many |
|
|
|
|
|
|
|
|
#define MQTT_MESSAGE_ID_SHIFT 1000 // Store MQTT message id into EEPROM every these many |
|
|
|
|
|
|
|
|
// Custom get and set postfixes |
|
|
// Custom get and set postfixes |
|
|
// Use something like "/status" or "/set", with leading slash |
|
|
// Use something like "/status" or "/set", with leading slash |
|
|
// Since 1.9.0 the default value is "" for getter and "/set" for setter |
|
|
// Since 1.9.0 the default value is "" for getter and "/set" for setter |
|
|
#ifndef MQTT_GETTER |
|
|
#ifndef MQTT_GETTER |
|
|
#define MQTT_GETTER "" |
|
|
|
|
|
|
|
|
#define MQTT_GETTER "" |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef MQTT_SETTER |
|
|
#ifndef MQTT_SETTER |
|
|
#define MQTT_SETTER "/set" |
|
|
|
|
|
|
|
|
#define MQTT_SETTER "/set" |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------- |
|
|
// ----------------------------------------------------------------------------- |
|
@ -859,11 +718,6 @@ PROGMEM const char* const custom_reset_string[] = { |
|
|
// LIGHT |
|
|
// LIGHT |
|
|
// ----------------------------------------------------------------------------- |
|
|
// ----------------------------------------------------------------------------- |
|
|
|
|
|
|
|
|
// Available light providers (do not change) |
|
|
|
|
|
#define LIGHT_PROVIDER_NONE 0 |
|
|
|
|
|
#define LIGHT_PROVIDER_MY92XX 1 // works with MY9291 and MY9231 |
|
|
|
|
|
#define LIGHT_PROVIDER_DIMMER 2 |
|
|
|
|
|
|
|
|
|
|
|
// LIGHT_PROVIDER_DIMMER can have from 1 to 5 different channels. |
|
|
// LIGHT_PROVIDER_DIMMER can have from 1 to 5 different channels. |
|
|
// They have to be defined for each device in the hardware.h file. |
|
|
// They have to be defined for each device in the hardware.h file. |
|
|
// If 3 or more channels first 3 will be considered RGB. |
|
|
// If 3 or more channels first 3 will be considered RGB. |
|
@ -970,11 +824,6 @@ PROGMEM const char* const custom_reset_string[] = { |
|
|
#define DOMOTICZ_SUPPORT MQTT_SUPPORT // Build with domoticz (if MQTT) support (1.72Kb) |
|
|
#define DOMOTICZ_SUPPORT MQTT_SUPPORT // Build with domoticz (if MQTT) support (1.72Kb) |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#if DOMOTICZ_SUPPORT |
|
|
|
|
|
#undef MQTT_SUPPORT |
|
|
|
|
|
#define MQTT_SUPPORT 1 // If Domoticz enabled enable MQTT |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#define DOMOTICZ_ENABLED 0 // Disable domoticz by default |
|
|
#define DOMOTICZ_ENABLED 0 // Disable domoticz by default |
|
|
#define DOMOTICZ_IN_TOPIC "domoticz/in" // Default subscription topic |
|
|
#define DOMOTICZ_IN_TOPIC "domoticz/in" // Default subscription topic |
|
|
#define DOMOTICZ_OUT_TOPIC "domoticz/out" // Default publication topic |
|
|
#define DOMOTICZ_OUT_TOPIC "domoticz/out" // Default publication topic |
|
@ -987,11 +836,6 @@ PROGMEM const char* const custom_reset_string[] = { |
|
|
#define HOMEASSISTANT_SUPPORT MQTT_SUPPORT // Build with home assistant support (if MQTT, 1.64Kb) |
|
|
#define HOMEASSISTANT_SUPPORT MQTT_SUPPORT // Build with home assistant support (if MQTT, 1.64Kb) |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#if HOMEASSISTANT_SUPPORT |
|
|
|
|
|
#undef MQTT_SUPPORT |
|
|
|
|
|
#define MQTT_SUPPORT 1 // If Home Assistant enabled enable MQTT |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#define HOMEASSISTANT_ENABLED 0 // Integration not enabled by default |
|
|
#define HOMEASSISTANT_ENABLED 0 // Integration not enabled by default |
|
|
#define HOMEASSISTANT_PREFIX "homeassistant" // Default MQTT prefix |
|
|
#define HOMEASSISTANT_PREFIX "homeassistant" // Default MQTT prefix |
|
|
|
|
|
|
|
@ -1033,92 +877,88 @@ PROGMEM const char* const custom_reset_string[] = { |
|
|
// ----------------------------------------------------------------------------- |
|
|
// ----------------------------------------------------------------------------- |
|
|
|
|
|
|
|
|
#ifndef THINGSPEAK_SUPPORT |
|
|
#ifndef THINGSPEAK_SUPPORT |
|
|
#define THINGSPEAK_SUPPORT 1 // Enable Thingspeak support by default (2.56Kb) |
|
|
|
|
|
|
|
|
#define THINGSPEAK_SUPPORT 1 // Enable Thingspeak support by default (2.56Kb) |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#define THINGSPEAK_ENABLED 0 // Thingspeak disabled by default |
|
|
|
|
|
#define THINGSPEAK_APIKEY "" // Default API KEY |
|
|
|
|
|
|
|
|
#ifndef THINGSPEAK_ENABLED |
|
|
|
|
|
#define THINGSPEAK_ENABLED 0 // Thingspeak disabled by default |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
#define THINGSPEAK_USE_ASYNC 1 // Use AsyncClient instead of WiFiClientSecure |
|
|
|
|
|
|
|
|
#ifndef THINGSPEAK_APIKEY |
|
|
|
|
|
#define THINGSPEAK_APIKEY "" // Default API KEY |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#define THINGSPEAK_USE_ASYNC 1 // Use AsyncClient instead of WiFiClientSecure |
|
|
|
|
|
|
|
|
// THINGSPEAK OVER SSL |
|
|
// THINGSPEAK OVER SSL |
|
|
// Using THINGSPEAK over SSL works well but generates problems with the web interface, |
|
|
// Using THINGSPEAK over SSL works well but generates problems with the web interface, |
|
|
// so you should compile it with WEB_SUPPORT to 0. |
|
|
// so you should compile it with WEB_SUPPORT to 0. |
|
|
// When THINGSPEAK_USE_ASYNC is 1, requires ASYNC_TCP_SSL_ENABLED to 1 and ESP8266 Arduino Core 2.4.0. |
|
|
// When THINGSPEAK_USE_ASYNC is 1, requires ASYNC_TCP_SSL_ENABLED to 1 and ESP8266 Arduino Core 2.4.0. |
|
|
#define THINGSPEAK_USE_SSL 0 // Use secure connection |
|
|
|
|
|
#define THINGSPEAK_FINGERPRINT "78 60 18 44 81 35 BF DF 77 84 D4 0A 22 0D 9B 4E 6C DC 57 2C" |
|
|
|
|
|
|
|
|
#define THINGSPEAK_USE_SSL 0 // Use secure connection |
|
|
|
|
|
|
|
|
|
|
|
#define THINGSPEAK_FINGERPRINT "78 60 18 44 81 35 BF DF 77 84 D4 0A 22 0D 9B 4E 6C DC 57 2C" |
|
|
|
|
|
|
|
|
#define THINGSPEAK_HOST "api.thingspeak.com" |
|
|
|
|
|
|
|
|
#define THINGSPEAK_HOST "api.thingspeak.com" |
|
|
#if THINGSPEAK_USE_SSL |
|
|
#if THINGSPEAK_USE_SSL |
|
|
#define THINGSPEAK_PORT 443 |
|
|
|
|
|
|
|
|
#define THINGSPEAK_PORT 443 |
|
|
#else |
|
|
#else |
|
|
#define THINGSPEAK_PORT 80 |
|
|
|
|
|
|
|
|
#define THINGSPEAK_PORT 80 |
|
|
#endif |
|
|
#endif |
|
|
#define THINGSPEAK_URL "/update" |
|
|
|
|
|
#define THINGSPEAK_MIN_INTERVAL 15000 // Minimum interval between POSTs (in millis) |
|
|
|
|
|
|
|
|
|
|
|
#ifndef ASYNC_TCP_SSL_ENABLED |
|
|
|
|
|
#if THINGSPEAK_USE_SSL && THINGSPEAK_USE_ASYNC |
|
|
|
|
|
#undef THINGSPEAK_SUPPORT // Thingspeak in ASYNC mode requires ASYNC_TCP_SSL_ENABLED |
|
|
|
|
|
#endif |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
#define THINGSPEAK_URL "/update" |
|
|
|
|
|
|
|
|
|
|
|
#define THINGSPEAK_MIN_INTERVAL 15000 // Minimum interval between POSTs (in millis) |
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------- |
|
|
// ----------------------------------------------------------------------------- |
|
|
// SCHEDULER |
|
|
// SCHEDULER |
|
|
// ----------------------------------------------------------------------------- |
|
|
// ----------------------------------------------------------------------------- |
|
|
|
|
|
|
|
|
#define SCHEDULER_TYPE_SWITCH 1 |
|
|
|
|
|
#define SCHEDULER_TYPE_DIM 2 |
|
|
|
|
|
|
|
|
|
|
|
#ifndef SCHEDULER_SUPPORT |
|
|
#ifndef SCHEDULER_SUPPORT |
|
|
#define SCHEDULER_SUPPORT 1 // Enable scheduler (1.77Kb) |
|
|
#define SCHEDULER_SUPPORT 1 // Enable scheduler (1.77Kb) |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#if SCHEDULER_SUPPORT |
|
|
|
|
|
#undef NTP_SUPPORT |
|
|
|
|
|
#define NTP_SUPPORT 1 // Scheduler needs NTP |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef SCHEDULER_MAX_SCHEDULES |
|
|
#define SCHEDULER_MAX_SCHEDULES 10 // Max schedules alowed |
|
|
#define SCHEDULER_MAX_SCHEDULES 10 // Max schedules alowed |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------- |
|
|
// ----------------------------------------------------------------------------- |
|
|
// NTP |
|
|
// NTP |
|
|
// ----------------------------------------------------------------------------- |
|
|
// ----------------------------------------------------------------------------- |
|
|
|
|
|
|
|
|
#ifndef NTP_SUPPORT |
|
|
#ifndef NTP_SUPPORT |
|
|
#define NTP_SUPPORT 1 // Build with NTP support by default (6.78Kb) |
|
|
|
|
|
|
|
|
#define NTP_SUPPORT 1 // Build with NTP support by default (6.78Kb) |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef NTP_SERVER |
|
|
#ifndef NTP_SERVER |
|
|
#define NTP_SERVER "pool.ntp.org" // Default NTP server |
|
|
|
|
|
|
|
|
#define NTP_SERVER "pool.ntp.org" // Default NTP server |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef NTP_TIMEOUT |
|
|
#ifndef NTP_TIMEOUT |
|
|
#define NTP_TIMEOUT 2000 // Set NTP request timeout to 2 seconds (issue #452) |
|
|
|
|
|
|
|
|
#define NTP_TIMEOUT 1000 // Set NTP request timeout to 2 seconds (issue #452) |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef NTP_TIME_OFFSET |
|
|
#ifndef NTP_TIME_OFFSET |
|
|
#define NTP_TIME_OFFSET 60 // Default timezone offset (GMT+1) |
|
|
|
|
|
|
|
|
#define NTP_TIME_OFFSET 60 // Default timezone offset (GMT+1) |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef NTP_DAY_LIGHT |
|
|
#ifndef NTP_DAY_LIGHT |
|
|
#define NTP_DAY_LIGHT true // Enable daylight time saving by default |
|
|
|
|
|
|
|
|
#define NTP_DAY_LIGHT 1 // Enable daylight time saving by default |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef NTP_SYNC_INTERVAL |
|
|
#ifndef NTP_SYNC_INTERVAL |
|
|
#define NTP_SYNC_INTERVAL 60 // NTP initial check every minute |
|
|
|
|
|
|
|
|
#define NTP_SYNC_INTERVAL 60 // NTP initial check every minute |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef NTP_UPDATE_INTERVAL |
|
|
#ifndef NTP_UPDATE_INTERVAL |
|
|
#define NTP_UPDATE_INTERVAL 1800 // NTP check every 30 minutes |
|
|
|
|
|
|
|
|
#define NTP_UPDATE_INTERVAL 1800 // NTP check every 30 minutes |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef NTP_START_DELAY |
|
|
#ifndef NTP_START_DELAY |
|
|
#define NTP_START_DELAY 1000 // Delay NTP start 1 second |
|
|
|
|
|
|
|
|
#define NTP_START_DELAY 1000 // Delay NTP start 1 second |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef NTP_DST_REGION |
|
|
#ifndef NTP_DST_REGION |
|
|
#define NTP_DST_REGION 0 // 0 for Europe, 1 for USA (defined in NtpClientLib) |
|
|
|
|
|
|
|
|
#define NTP_DST_REGION 0 // 0 for Europe, 1 for USA (defined in NtpClientLib) |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------- |
|
|
// ----------------------------------------------------------------------------- |
|
@ -1127,13 +967,15 @@ PROGMEM const char* const custom_reset_string[] = { |
|
|
|
|
|
|
|
|
// This setting defines whether Alexa support should be built into the firmware |
|
|
// This setting defines whether Alexa support should be built into the firmware |
|
|
#ifndef ALEXA_SUPPORT |
|
|
#ifndef ALEXA_SUPPORT |
|
|
#define ALEXA_SUPPORT 1 // Enable Alexa support by default (10.84Kb) |
|
|
|
|
|
|
|
|
#define ALEXA_SUPPORT 1 // Enable Alexa support by default (10.84Kb) |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
// This is default value for the alexaEnabled setting that defines whether |
|
|
// This is default value for the alexaEnabled setting that defines whether |
|
|
// this device should be discoberable and respond to Alexa commands. |
|
|
// this device should be discoberable and respond to Alexa commands. |
|
|
// Both ALEXA_SUPPORT and alexaEnabled should be 1 for Alexa support to work. |
|
|
// Both ALEXA_SUPPORT and alexaEnabled should be 1 for Alexa support to work. |
|
|
#define ALEXA_ENABLED 1 |
|
|
|
|
|
|
|
|
#ifndef ALEXA_ENABLED |
|
|
|
|
|
#define ALEXA_ENABLED 1 |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------- |
|
|
// ----------------------------------------------------------------------------- |
|
|
// RFBRIDGE |
|
|
// RFBRIDGE |
|
@ -1141,20 +983,20 @@ PROGMEM const char* const custom_reset_string[] = { |
|
|
// ----------------------------------------------------------------------------- |
|
|
// ----------------------------------------------------------------------------- |
|
|
|
|
|
|
|
|
#ifndef RF_SEND_TIMES |
|
|
#ifndef RF_SEND_TIMES |
|
|
#define RF_SEND_TIMES 4 // How many times to send the message |
|
|
|
|
|
|
|
|
#define RF_SEND_TIMES 4 // How many times to send the message |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef RF_SEND_DELAY |
|
|
#ifndef RF_SEND_DELAY |
|
|
#define RF_SEND_DELAY 500 // Interval between sendings in ms |
|
|
|
|
|
|
|
|
#define RF_SEND_DELAY 500 // Interval between sendings in ms |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef RF_RECEIVE_DELAY |
|
|
#ifndef RF_RECEIVE_DELAY |
|
|
#define RF_RECEIVE_DELAY 500 // Interval between recieving in ms (avoid debouncing) |
|
|
|
|
|
|
|
|
#define RF_RECEIVE_DELAY 500 // Interval between recieving in ms (avoid debouncing) |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef RF_RAW_SUPPORT |
|
|
#ifndef RF_RAW_SUPPORT |
|
|
#define RF_RAW_SUPPORT 0 // RF raw codes require a specific firmware for the EFM8BB1 |
|
|
|
|
|
|
|
|
#define RF_RAW_SUPPORT 0 // RF raw codes require a specific firmware for the EFM8BB1 |
|
|
// https://github.com/rhx/RF-Bridge-EFM8BB1 |
|
|
// https://github.com/rhx/RF-Bridge-EFM8BB1 |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
@ -1164,32 +1006,18 @@ PROGMEM const char* const custom_reset_string[] = { |
|
|
// ----------------------------------------------------------------------------- |
|
|
// ----------------------------------------------------------------------------- |
|
|
|
|
|
|
|
|
#ifndef IR_SUPPORT |
|
|
#ifndef IR_SUPPORT |
|
|
#define IR_SUPPORT 0 // Do not build with IR support by default (10.25Kb) |
|
|
|
|
|
|
|
|
#define IR_SUPPORT 0 // Do not build with IR support by default (10.25Kb) |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifndef IR_PIN |
|
|
#ifndef IR_PIN |
|
|
#define IR_PIN 4 // IR LED |
|
|
|
|
|
|
|
|
#define IR_PIN 4 // IR LED |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
// 24 Buttons Set of the IR Remote |
|
|
// 24 Buttons Set of the IR Remote |
|
|
#ifndef IR_BUTTON_SET |
|
|
#ifndef IR_BUTTON_SET |
|
|
#define IR_BUTTON_SET 1 // IR button set to use (see below) |
|
|
|
|
|
|
|
|
#define IR_BUTTON_SET 1 // IR button set to use (see below) |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
// IR Button modes |
|
|
|
|
|
#define IR_BUTTON_MODE_NONE 0 |
|
|
|
|
|
#define IR_BUTTON_MODE_RGB 1 |
|
|
|
|
|
#define IR_BUTTON_MODE_HSV 2 |
|
|
|
|
|
#define IR_BUTTON_MODE_BRIGHTER 3 |
|
|
|
|
|
#define IR_BUTTON_MODE_STATE 4 |
|
|
|
|
|
#define IR_BUTTON_MODE_EFFECT 5 |
|
|
|
|
|
|
|
|
|
|
|
#define LIGHT_EFFECT_SOLID 0 |
|
|
|
|
|
#define LIGHT_EFFECT_FLASH 1 |
|
|
|
|
|
#define LIGHT_EFFECT_STROBE 2 |
|
|
|
|
|
#define LIGHT_EFFECT_FADE 3 |
|
|
|
|
|
#define LIGHT_EFFECT_SMOOTH 4 |
|
|
|
|
|
|
|
|
|
|
|
//Remote Buttons SET 1 (for the original Remote shipped with the controller) |
|
|
//Remote Buttons SET 1 (for the original Remote shipped with the controller) |
|
|
#if IR_SUPPORT |
|
|
#if IR_SUPPORT |
|
|
#if IR_BUTTON_SET == 1 |
|
|
#if IR_BUTTON_SET == 1 |
|
@ -1311,7 +1139,7 @@ PROGMEM const char* const custom_reset_string[] = { |
|
|
// Custom RF module |
|
|
// Custom RF module |
|
|
// Check http://tinkerman.cat/adding-rf-to-a-non-rf-itead-sonoff/ |
|
|
// Check http://tinkerman.cat/adding-rf-to-a-non-rf-itead-sonoff/ |
|
|
// Enable support by passing RF_SUPPORT=1 build flag |
|
|
// Enable support by passing RF_SUPPORT=1 build flag |
|
|
// This module is not compatible with RFBRIDGE |
|
|
|
|
|
|
|
|
// This module is not compatible with RFBRIDGE or SONOFF RF |
|
|
//-------------------------------------------------------------------------------- |
|
|
//-------------------------------------------------------------------------------- |
|
|
|
|
|
|
|
|
#ifndef RF_SUPPORT |
|
|
#ifndef RF_SUPPORT |
|
|