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.

119 lines
4.2 KiB

8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
  1. //------------------------------------------------------------------------------
  2. // GENERAL
  3. //------------------------------------------------------------------------------
  4. #define SERIAL_BAUDRATE 115200
  5. #define HOSTNAME DEVICE
  6. #define BUFFER_SIZE 1024
  7. #define HEARTBEAT_INTERVAL 300000
  8. //--------------------------------------------------------------------------------
  9. // RELAY
  10. //--------------------------------------------------------------------------------
  11. #define RELAY_MODE_OFF 0
  12. #define RELAY_MODE_ON 1
  13. #define RELAY_MODE_SAME 2
  14. #define RELAY_SYNC_ANY 0
  15. #define RELAY_SYNC_NONE_OR_ONE 1
  16. #define RELAY_SYNC_ONE 2
  17. #define RELAY_SYNC_SAME 3
  18. #define RELAY_INCHING_NONE 0
  19. #define RELAY_INCHING_OFF 1
  20. #define RELAY_INCHING_ON 2
  21. // Inching time in seconds
  22. #define RELAY_INCHING_TIME 1
  23. // 0 means OFF, 1 ON and 2 whatever was before
  24. #define RELAY_MODE RELAY_MODE_OFF
  25. // 0 means ANY, 1 zero or one and 2 one and only one
  26. #define RELAY_SYNC RELAY_SYNC_ANY
  27. // 0 means no inching, 1 means normally off, 2 normally on
  28. #define RELAY_INCHING RELAY_INCHING_NONE
  29. //--------------------------------------------------------------------------------
  30. // LED
  31. //--------------------------------------------------------------------------------
  32. // All defined LEDs in the board can be managed through MQTT
  33. // except the first one when LED_AUTO is set to 1.
  34. // If LED_AUTO is set to 1 the board will use first defined LED to show wifi status.
  35. #define LED_AUTO 1
  36. // -----------------------------------------------------------------------------
  37. // WIFI & WEB
  38. // -----------------------------------------------------------------------------
  39. #define WIFI_RECONNECT_INTERVAL 300000
  40. #define WIFI_MAX_NETWORKS 5
  41. #define ADMIN_PASS "fibonacci"
  42. #define HTTP_USERNAME "admin"
  43. #define WS_BUFFER_SIZE 5
  44. #define WS_TIMEOUT 1800000
  45. #define DNS_PORT 53
  46. // -----------------------------------------------------------------------------
  47. // OTA & NOFUSS
  48. // -----------------------------------------------------------------------------
  49. #define OTA_PORT 8266
  50. #define NOFUSS_SERVER "http://192.168.1.100"
  51. #define NOFUSS_INTERVAL 3600000
  52. // -----------------------------------------------------------------------------
  53. // MQTT
  54. // -----------------------------------------------------------------------------
  55. #define MQTT_SERVER "192.168.1.100"
  56. #define MQTT_PORT 1883
  57. #define MQTT_TOPIC "/test/switch/{identifier}"
  58. #define MQTT_RETAIN true
  59. #define MQTT_QOS 0
  60. #define MQTT_KEEPALIVE 30
  61. #define MQTT_RECONNECT_DELAY 10000
  62. #define MQTT_SKIP_RETAINED 1
  63. #define MQTT_SKIP_TIME 1000
  64. #define MQTT_RELAY_TOPIC "/relay"
  65. #define MQTT_LED_TOPIC "/led"
  66. #define MQTT_IP_TOPIC "/ip"
  67. #define MQTT_VERSION_TOPIC "/version"
  68. #define MQTT_FSVERSION_TOPIC "/fsversion"
  69. #define MQTT_HEARTBEAT_TOPIC "/heartbeat"
  70. #define MQTT_CONNECT_EVENT 0
  71. #define MQTT_DISCONNECT_EVENT 1
  72. #define MQTT_MESSAGE_EVENT 2
  73. // Custom get and set postfixes
  74. // Use something like "/status" or "/set", with trailing slash
  75. #define MQTT_USE_GETTER ""
  76. #define MQTT_USE_SETTER ""
  77. // -----------------------------------------------------------------------------
  78. // DOMOTICZ
  79. // -----------------------------------------------------------------------------
  80. #define ENABLE_DOMOTICZ 1
  81. #define DOMOTICZ_IN_TOPIC "domoticz/in"
  82. #define DOMOTICZ_OUT_TOPIC "domoticz/out"
  83. // -----------------------------------------------------------------------------
  84. // NTP
  85. // -----------------------------------------------------------------------------
  86. #define NTP_SERVER "pool.ntp.org"
  87. #define NTP_TIME_OFFSET 1
  88. #define NTP_DAY_LIGHT true
  89. #define NTP_UPDATE_INTERVAL 1800
  90. // -----------------------------------------------------------------------------
  91. // FAUXO
  92. // -----------------------------------------------------------------------------
  93. #define FAUXMO_ENABLED 1