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.

148 lines
4.8 KiB

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