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.

181 lines
5.4 KiB

  1. //--------------------------------------------------------------------------------
  2. // HARDWARE
  3. // This setting is normally provided by PlatformIO
  4. // Uncomment the appropiate line to build from the Arduino IDE
  5. //--------------------------------------------------------------------------------
  6. //#define NODEMCUV2
  7. //#define SONOFF
  8. //#define SONOFF_TH
  9. //#define SONOFF_POW
  10. //#define SONOFF_DUAL
  11. //#define SONOFF_4CH
  12. //#define SONOFF_SV
  13. //#define SLAMPHER
  14. //#define S20
  15. //#define ESP_RELAY_BOARD
  16. //#define ECOPLUG
  17. //#define ESPURNA
  18. //#define ENABLE_DHT 1
  19. //#define ENABLE_DS18B20 1
  20. //#define ENABLE_EMON 1
  21. //#define ENABLE_HLW8018 1
  22. //#define ENABLE_RF 1
  23. //#define ENABLE_FAUXMO 1
  24. //#define ENABLE_NOFUSS 1
  25. // -----------------------------------------------------------------------------
  26. // NODEMCUv2 development board
  27. // -----------------------------------------------------------------------------
  28. #if defined(NODEMCUV2)
  29. #define MANUFACTURER "NODEMCU"
  30. #define DEVICE "LOLIN"
  31. #define BUTTON1_PIN 0
  32. #define RELAY1_PIN 12
  33. #define LED1_PIN 2
  34. #define LED1_PIN_INVERSE 1
  35. // -----------------------------------------------------------------------------
  36. // Itead Studio boards
  37. // -----------------------------------------------------------------------------
  38. #elif defined(SONOFF)
  39. #define MANUFACTURER "ITEAD"
  40. #define DEVICE "SONOFF"
  41. #define BUTTON1_PIN 0
  42. #define RELAY1_PIN 12
  43. #define LED1_PIN 13
  44. #define LED1_PIN_INVERSE 1
  45. #elif defined(SONOFF_TH)
  46. #define MANUFACTURER "ITEAD"
  47. #define DEVICE "SONOFF_TH"
  48. #define BUTTON1_PIN 0
  49. #define RELAY1_PIN 12
  50. #define LED1_PIN 13
  51. #define LED1_PIN_INVERSE 1
  52. #elif defined(SONOFF_TOUCH)
  53. #define MANUFACTURER "ITEAD"
  54. #define DEVICE "SONOFF_TOUCH"
  55. #define BUTTON1_PIN 0
  56. #define RELAY1_PIN 12
  57. #define LED1_PIN 13
  58. #define LED1_PIN_INVERSE 1
  59. #elif defined(SONOFF_POW)
  60. #define MANUFACTURER "ITEAD"
  61. #define DEVICE "SONOFF_POW"
  62. #define BUTTON1_PIN 0
  63. #define RELAY1_PIN 12
  64. #define LED1_PIN 15
  65. #define LED1_PIN_INVERSE 0
  66. #define ENABLE_POW 1
  67. #elif defined(SONOFF_DUAL)
  68. #define MANUFACTURER "ITEAD"
  69. #define DEVICE "SONOFF_DUAL"
  70. #define BUTTON1_PIN 0
  71. #define LED1_PIN 13
  72. #define LED1_PIN_INVERSE 1
  73. #undef SERIAL_BAUDRATE
  74. #define SERIAL_BAUDRATE 19230
  75. #elif defined(SONOFF_4CH)
  76. #define MANUFACTURER "ITEAD"
  77. #define DEVICE "SONOFF_4CH"
  78. #define BUTTON1_PIN 0
  79. #define BUTTON2_PIN 9
  80. #define BUTTON3_PIN 10
  81. #define BUTTON4_PIN 14
  82. #define RELAY1_PIN 12
  83. #define RELAY2_PIN 5
  84. #define RELAY3_PIN 4
  85. #define RELAY4_PIN 15
  86. #define LED1_PIN 13
  87. #define LED1_PIN_INVERSE 1
  88. #elif defined(SONOFF_SV)
  89. #define MANUFACTURER "ITEAD"
  90. #define DEVICE "SONOFF_SV"
  91. #define BUTTON1_PIN 0
  92. #define RELAY1_PIN 12
  93. #define LED1_PIN 13
  94. #define LED1_PIN_INVERSE 1
  95. #elif defined(SLAMPHER)
  96. #define MANUFACTURER "ITEAD"
  97. #define DEVICE "SLAMPHER"
  98. #define BUTTON1_PIN 0
  99. #define RELAY1_PIN 12
  100. #define LED1_PIN 13
  101. #define LED1_PIN_INVERSE 1
  102. #elif defined(S20)
  103. #define MANUFACTURER "ITEAD"
  104. #define DEVICE "S20"
  105. #define BUTTON1_PIN 0
  106. #define RELAY1_PIN 12
  107. #define LED1_PIN 13
  108. #define LED1_PIN_INVERSE 1
  109. // -----------------------------------------------------------------------------
  110. // Electrodragon boards
  111. // -----------------------------------------------------------------------------
  112. #elif defined(ESP_RELAY_BOARD)
  113. #define MANUFACTURER "ELECTRODRAGON"
  114. #define DEVICE "ESP_RELAY_BOARD"
  115. #define BUTTON1_PIN 0
  116. #define BUTTON2_PIN 2
  117. #define RELAY1_PIN 12
  118. #define RELAY2_PIN 13
  119. #define LED1_PIN 16
  120. #define LED1_PIN_INVERSE 0
  121. // -----------------------------------------------------------------------------
  122. // WorkChoice ecoPlug
  123. // -----------------------------------------------------------------------------
  124. #elif defined(ECOPLUG)
  125. #define MANUFACTURER "WORKCHOICE"
  126. #define DEVICE "ECOPLUG"
  127. #define BUTTON1_PIN 13
  128. #define RELAY1_PIN 15
  129. #define LED1_PIN 2
  130. #define LED1_PIN_INVERSE 0
  131. // -----------------------------------------------------------------------------
  132. // ESPurna board (still beta)
  133. // -----------------------------------------------------------------------------
  134. #elif defined(ESPURNA)
  135. #define MANUFACTURER "TINKERMAN"
  136. #define DEVICE "ESPURNA"
  137. #define BUTTON1_PIN 0
  138. #define RELAY1_PIN 12
  139. #define LED1_PIN 13
  140. #define LED1_PIN_INVERSE 0
  141. // -----------------------------------------------------------------------------
  142. // Unknown hardware
  143. // -----------------------------------------------------------------------------
  144. #else
  145. #error "UNSUPPORTED HARDWARE!"
  146. #endif