Fork of the espurna firmware for `mhsw` switches
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

143 lines
4.5 KiB

6 years ago
  1. #pragma once
  2. //------------------------------------------------------------------------------
  3. // Do not change this file unless you know what you are doing
  4. // Configuration settings are in the general.h file
  5. //------------------------------------------------------------------------------
  6. #define DEBUG_SUPPORT (DEBUG_SERIAL_SUPPORT || DEBUG_UDP_SUPPORT || DEBUG_TELNET_SUPPORT || DEBUG_WEB_SUPPORT)
  7. #if DEBUG_TELNET_SUPPORT
  8. #undef TELNET_SUPPORT
  9. #define TELNET_SUPPORT 1
  10. #endif
  11. #if not WEB_SUPPORT
  12. #undef DEBUG_WEB_SUPPORT
  13. #define DEBUG_WEB_SUPPORT 0
  14. #endif
  15. #if not WEB_SUPPORT
  16. #undef API_SUPPORT
  17. #define API_SUPPORT 0 // API support requires web support
  18. #endif
  19. #if not WEB_SUPPORT
  20. #undef SSDP_SUPPORT
  21. #define SSDP_SUPPORT 0 // SSDP support requires web support
  22. #endif
  23. #if UART_MQTT_SUPPORT
  24. #define MQTT_SUPPORT 1
  25. #undef TERMINAL_SUPPORT
  26. #define TERMINAL_SUPPORT 0
  27. #undef DEBUG_SERIAL_SUPPORT
  28. #define DEBUG_SERIAL_SUPPORT 0
  29. #endif
  30. #if ALEXA_SUPPORT
  31. #undef BROKER_SUPPORT
  32. #define BROKER_SUPPORT 1 // If Alexa enabled enable BROKER
  33. #endif
  34. #if RPN_RULES_SUPPORT
  35. #undef BROKER_SUPPORT
  36. #define BROKER_SUPPORT 1 // If RPN Rules enabled enable BROKER
  37. #undef WEB_SUPPORT
  38. #define WEB_SUPPORT 1
  39. #undef MQTT_SUPPORT
  40. #define MQTT_SUPPORT 1
  41. #endif
  42. #if LED_SUPPORT
  43. #undef BROKER_SUPPORT
  44. #define BROKER_SUPPORT 1 // If LED is enabled enable BROKER to supply status changes
  45. #endif
  46. #if INFLUXDB_SUPPORT
  47. #undef BROKER_SUPPORT
  48. #define BROKER_SUPPORT 1 // If InfluxDB enabled enable BROKER
  49. #endif
  50. #if DOMOTICZ_SUPPORT
  51. #undef MQTT_SUPPORT
  52. #define MQTT_SUPPORT 1 // If Domoticz enabled enable MQTT
  53. #undef BROKER_SUPPORT
  54. #define BROKER_SUPPORT 1 // If Domoticz enabled enable BROKER
  55. #endif
  56. #if HOMEASSISTANT_SUPPORT
  57. #undef MQTT_SUPPORT
  58. #define MQTT_SUPPORT 1 // If Home Assistant enabled enable MQTT
  59. #endif
  60. #if THINGSPEAK_SUPPORT
  61. #undef BROKER_SUPPORT
  62. #define BROKER_SUPPORT 1 // If Thingspeak enabled enable BROKER
  63. #endif
  64. #if SCHEDULER_SUPPORT
  65. #undef NTP_SUPPORT
  66. #define NTP_SUPPORT 1 // Scheduler needs NTP
  67. #endif
  68. #if LWIP_VERSION_MAJOR != 1
  69. #undef MDNS_CLIENT_SUPPORT
  70. #define MDNS_CLIENT_SUPPORT 0 // default resolver already handles this
  71. #endif
  72. #if not defined(ARDUINO_ESP8266_RELEASE_2_3_0)
  73. #undef TELNET_SERVER_ASYNC_BUFFERED
  74. #define TELNET_SERVER_ASYNC_BUFFERED 1 // enable buffered telnet by default on latest Cores
  75. #endif
  76. #if LLMNR_SUPPORT && defined(ARDUINO_ESP8266_RELEASE_2_3_0)
  77. #undef LLMNR_SUPPORT
  78. #define LLMNR_SUPPORT 0
  79. #endif
  80. #if NETBIOS_SUPPORT && defined(ARDUINO_ESP8266_RELEASE_2_3_0)
  81. #undef NETBIOS_SUPPORT
  82. #define NETBIOS_SUPPORT 0
  83. #endif
  84. #if SSDP_SUPPORT && defined(ARDUINO_ESP8266_RELEASE_2_3_0)
  85. #undef SSDP_SUPPORT
  86. #define SSDP_SUPPORT 0
  87. #endif
  88. #if LIGHT_PROVIDER == LIGHT_PROVIDER_TUYA
  89. #undef TUYA_SUPPORT
  90. #define TUYA_SUPPORT 1 // Need base Tuya module for this to work
  91. #undef LIGHT_USE_TRANSITIONS
  92. #define LIGHT_USE_TRANSITIONS 0 // TODO: temporary, maybe slower step instead?
  93. #endif
  94. #if TUYA_SUPPORT
  95. #undef BROKER_SUPPORT
  96. #define BROKER_SUPPORT 1 // Broker is required to process relay & lights events
  97. #endif
  98. // TODO: clean-up SSL_ENABLED and USE_SSL settings for 1.15.0
  99. #if ASYNC_TCP_SSL_ENABLED && SECURE_CLIENT == SECURE_CLIENT_NONE
  100. #undef SECURE_CLIENT
  101. #define SECURE_CLIENT SECURE_CLIENT_AXTLS
  102. #endif
  103. #if THINGSPEAK_USE_SSL && THINGSPEAK_USE_ASYNC && (!ASYNC_TCP_SSL_ENABLED)
  104. #warning "Thingspeak in ASYNC mode requires a globally defined ASYNC_TCP_SSL_ENABLED=1"
  105. #undef THINGSPEAK_SUPPORT
  106. #define THINGSPEAK_SUPPORT 0 // Thingspeak in ASYNC mode requires ASYNC_TCP_SSL_ENABLED
  107. #endif
  108. #if WEB_SUPPORT && WEB_SSL_ENABLED && (!ASYNC_TCP_SSL_ENABLED)
  109. #warning "WEB_SUPPORT with SSL requires a globally defined ASYNC_TCP_SSL_ENABLED=1"
  110. #undef WEB_SSL_ENABLED
  111. #define WEB_SSL_ENABLED 0 // WEB_SUPPORT mode th SSL requires ASYNC_TCP_SSL_ENABLED
  112. #endif
  113. #if !DEBUG_SUPPORT
  114. #undef DEBUG_LOG_BUFFER_SUPPORT
  115. #define DEBUG_LOG_BUFFER_SUPPORT 0 // Can't buffer if there is no debugging enabled.
  116. // Helps to avoid checking twice for both DEBUG_SUPPORT and BUFFER_LOG_SUPPORT
  117. #endif