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 SLAMPHER
  10. //#define S20
  11. //#define SONOFF_SV
  12. //#define SONOFF_POW
  13. //#define SONOFF_DUAL
  14. //#define SONOFF_4CH
  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_SV)
  53. #define MANUFACTURER "ITEAD"
  54. #define DEVICE "SONOFF_SV"
  55. #define BUTTON1_PIN 0
  56. #define RELAY1_PIN 12
  57. #define LED1_PIN 13
  58. #define LED1_PIN_INVERSE 1
  59. #elif defined(SLAMPHER)
  60. #define MANUFACTURER "ITEAD"
  61. #define DEVICE "SLAMPHER"
  62. #define BUTTON1_PIN 0
  63. #define RELAY1_PIN 12
  64. #define LED1_PIN 13
  65. #define LED1_PIN_INVERSE 1
  66. #elif defined(S20)
  67. #define MANUFACTURER "ITEAD"
  68. #define DEVICE "S20"
  69. #define BUTTON1_PIN 0
  70. #define RELAY1_PIN 12
  71. #define LED1_PIN 13
  72. #define LED1_PIN_INVERSE 1
  73. #elif defined(SONOFF_TOUCH)
  74. #define MANUFACTURER "ITEAD"
  75. #define DEVICE "SONOFF_TOUCH"
  76. #define BUTTON1_PIN 0
  77. #define RELAY1_PIN 12
  78. #define LED1_PIN 13
  79. #define LED1_PIN_INVERSE 1
  80. #elif defined(SONOFF_POW)
  81. #define MANUFACTURER "ITEAD"
  82. #define DEVICE "SONOFF_POW"
  83. #define BUTTON1_PIN 0
  84. #define RELAY1_PIN 12
  85. #define LED1_PIN 15
  86. #define LED1_PIN_INVERSE 0
  87. #define ENABLE_POW 1
  88. #elif defined(SONOFF_DUAL)
  89. #define MANUFACTURER "ITEAD"
  90. #define DEVICE "SONOFF_DUAL"
  91. #define BUTTON1_PIN 0
  92. #define LED1_PIN 13
  93. #define LED1_PIN_INVERSE 1
  94. #undef SERIAL_BAUDRATE
  95. #define SERIAL_BAUDRATE 19230
  96. #elif defined(SONOFF_4CH)
  97. #define MANUFACTURER "ITEAD"
  98. #define DEVICE "SONOFF_4CH"
  99. #define BUTTON1_PIN 0
  100. #define BUTTON2_PIN 9
  101. #define BUTTON3_PIN 10
  102. #define BUTTON4_PIN 14
  103. #define RELAY1_PIN 12
  104. #define RELAY2_PIN 5
  105. #define RELAY3_PIN 4
  106. #define RELAY4_PIN 15
  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