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.

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