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.

576 lines
18 KiB

  1. // -----------------------------------------------------------------------------
  2. // Configuration HELP
  3. // -----------------------------------------------------------------------------
  4. //
  5. // MANUFACTURER: Name of the manufacturer of the board ("string")
  6. // DEVICE: Name of the device ("string")
  7. // BUTTON#_PIN: GPIO for the n-th button (1-based, up to 4 buttons)
  8. // BUTTON#_RELAY: Relay number that will be bind to the n-th button (1-based)
  9. // BUTTON#_MODE: A mask of options (BUTTON_PUSHBUTTON and BUTTON_SWITCH cannot be together)
  10. // - BUTTON_PUSHBUTTON: button event is fired when released
  11. // - BUTTON_SWITCH: button event is fired when pressed or released
  12. // - BUTTON_DEFAULT_HIGH: there is a pull up in place
  13. // - BUTTON_SET_PULLUP: set pullup by software
  14. // RELAY#_PIN: GPIO for the n-th relay (1-based, up to 4 relays)
  15. // RELAY#_PIN_INVERSE: Relay has inversed logic (closed or ON when pulled down)
  16. // RELAY#_LED: LED number that will be bind to the n-th relay (1-based)
  17. // LED#_PIN: GPIO for the n-th LED (1-based, up to 4 LEDs)
  18. // LED#_PIN_INVERSE: LED has inversed logic (lit when pulled down)
  19. // WIFI_LED: LED number that will used for WIFI notifications (1-based, defaults to 1)
  20. // -----------------------------------------------------------------------------
  21. // Development boards
  22. // -----------------------------------------------------------------------------
  23. #if defined(NODEMCUV2)
  24. #define MANUFACTURER "NODEMCU"
  25. #define DEVICE "LOLIN"
  26. #define BUTTON1_PIN 0
  27. #define BUTTON1_RELAY 1
  28. #define BUTTON1_LNGCLICK BUTTON_MODE_PULSE
  29. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  30. #define RELAY1_PIN 12
  31. #define RELAY1_PIN_INVERSE 0
  32. #define LED1_PIN 2
  33. #define LED1_PIN_INVERSE 1
  34. #elif defined(D1_RELAYSHIELD)
  35. #define MANUFACTURER "WEMOS"
  36. #define DEVICE "D1_MINI"
  37. #define RELAY1_PIN 5
  38. #define RELAY1_PIN_INVERSE 0
  39. #define LED1_PIN 2
  40. #define LED1_PIN_INVERSE 1
  41. // -----------------------------------------------------------------------------
  42. // ESPurna
  43. // -----------------------------------------------------------------------------
  44. #elif defined(ESPURNA_H)
  45. #define MANUFACTURER "TINKERMAN"
  46. #define DEVICE "ESPURNA_H"
  47. #define RELAY1_PIN 12
  48. #define RELAY1_PIN_INVERSE 1
  49. #define LED1_PIN 5
  50. #define LED1_PIN_INVERSE 0
  51. #define BUTTON1_PIN 4
  52. #define BUTTON1_RELAY 1
  53. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  54. #define ENABLE_HLW8012 1
  55. // -----------------------------------------------------------------------------
  56. // Itead Studio boards
  57. // -----------------------------------------------------------------------------
  58. #elif defined(SONOFF)
  59. #define MANUFACTURER "ITEAD"
  60. #define DEVICE "SONOFF"
  61. #define BUTTON1_PIN 0
  62. #define BUTTON1_RELAY 1
  63. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  64. #define RELAY1_PIN 12
  65. #define RELAY1_PIN_INVERSE 0
  66. #define LED1_PIN 13
  67. #define LED1_PIN_INVERSE 1
  68. #elif defined(SONOFF_TH)
  69. #define MANUFACTURER "ITEAD"
  70. #define DEVICE "SONOFF_TH"
  71. #define BUTTON1_PIN 0
  72. #define BUTTON1_RELAY 1
  73. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  74. #define RELAY1_PIN 12
  75. #define RELAY1_PIN_INVERSE 0
  76. #define LED1_PIN 13
  77. #define LED1_PIN_INVERSE 1
  78. #elif defined(SONOFF_SV)
  79. #define MANUFACTURER "ITEAD"
  80. #define DEVICE "SONOFF_SV"
  81. #define BUTTON1_PIN 0
  82. #define BUTTON1_RELAY 1
  83. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  84. #define RELAY1_PIN 12
  85. #define RELAY1_PIN_INVERSE 0
  86. #define LED1_PIN 13
  87. #define LED1_PIN_INVERSE 1
  88. #elif defined(SLAMPHER)
  89. #define MANUFACTURER "ITEAD"
  90. #define DEVICE "SLAMPHER"
  91. #define BUTTON1_PIN 0
  92. #define BUTTON1_RELAY 1
  93. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  94. #define RELAY1_PIN 12
  95. #define RELAY1_PIN_INVERSE 0
  96. #define LED1_PIN 13
  97. #define LED1_PIN_INVERSE 1
  98. #elif defined(S20)
  99. #define MANUFACTURER "ITEAD"
  100. #define DEVICE "S20"
  101. #define BUTTON1_PIN 0
  102. #define BUTTON1_RELAY 1
  103. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  104. #define RELAY1_PIN 12
  105. #define RELAY1_PIN_INVERSE 0
  106. #define LED1_PIN 13
  107. #define LED1_PIN_INVERSE 1
  108. #elif defined(SONOFF_TOUCH)
  109. #define MANUFACTURER "ITEAD"
  110. #define DEVICE "SONOFF_TOUCH"
  111. #define BUTTON1_PIN 0
  112. #define BUTTON1_RELAY 1
  113. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  114. #define RELAY1_PIN 12
  115. #define RELAY1_PIN_INVERSE 0
  116. #define LED1_PIN 13
  117. #define LED1_PIN_INVERSE 1
  118. #elif defined(SONOFF_POW)
  119. #define MANUFACTURER "ITEAD"
  120. #define DEVICE "SONOFF_POW"
  121. #define BUTTON1_PIN 0
  122. #define BUTTON1_RELAY 1
  123. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  124. #define RELAY1_PIN 12
  125. #define RELAY1_PIN_INVERSE 0
  126. #define LED1_PIN 15
  127. #define LED1_PIN_INVERSE 0
  128. #define ENABLE_HLW8012 1
  129. #elif defined(SONOFF_DUAL)
  130. #define MANUFACTURER "ITEAD"
  131. #define DEVICE "SONOFF_DUAL"
  132. #define BUTTON3_RELAY 1
  133. #define LED1_PIN 13
  134. #define LED1_PIN_INVERSE 1
  135. #undef SERIAL_BAUDRATE
  136. #define SERIAL_BAUDRATE 19230
  137. #undef RELAY_PROVIDER
  138. #define RELAY_PROVIDER RELAY_PROVIDER_DUAL
  139. #define DUMMY_RELAY_COUNT 2
  140. #elif defined(SONOFF_4CH)
  141. #define MANUFACTURER "ITEAD"
  142. #define DEVICE "SONOFF_4CH"
  143. #define BUTTON1_PIN 0
  144. #define BUTTON1_RELAY 1
  145. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  146. #define BUTTON2_PIN 9
  147. #define BUTTON2_RELAY 2
  148. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  149. #define BUTTON3_PIN 10
  150. #define BUTTON3_RELAY 3
  151. #define BUTTON3_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  152. #define BUTTON4_PIN 14
  153. #define BUTTON4_RELAY 4
  154. #define BUTTON4_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  155. #define RELAY1_PIN 12
  156. #define RELAY1_PIN_INVERSE 0
  157. #define RELAY2_PIN 5
  158. #define RELAY2_PIN_INVERSE 0
  159. #define RELAY3_PIN 4
  160. #define RELAY3_PIN_INVERSE 0
  161. #define RELAY4_PIN 15
  162. #define RELAY4_PIN_INVERSE 0
  163. #define LED1_PIN 13
  164. #define LED1_PIN_INVERSE 1
  165. #elif defined(ITEAD_1CH_INCHING)
  166. // The inching functionality is managed by a misterious IC in the board.
  167. // You cannot control the inching button and functionality from the ESP8266
  168. // Besides, enabling the inching functionality using the hardware button
  169. // will result in the relay switching on and off continuously.
  170. // Fortunately the unkown IC keeps memory of the hardware inching status
  171. // so you can just disable it and forget. The inching LED must be lit.
  172. // You can still use the pulse options from the web interface
  173. // without problem.
  174. #define MANUFACTURER "ITEAD"
  175. #define DEVICE "1CH_INCHING"
  176. #define BUTTON1_PIN 0
  177. #define BUTTON1_RELAY 1
  178. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  179. #define RELAY1_PIN 12
  180. #define RELAY1_PIN_INVERSE 0
  181. #define LED1_PIN 13
  182. #define LED1_PIN_INVERSE 1
  183. #elif defined(ITEAD_MOTOR)
  184. #define MANUFACTURER "ITEAD"
  185. #define DEVICE "MOTOR"
  186. #define BUTTON1_PIN 0
  187. #define BUTTON1_RELAY 1
  188. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  189. #define RELAY1_PIN 12
  190. #define RELAY1_PIN_INVERSE 0
  191. #define LED1_PIN 13
  192. #define LED1_PIN_INVERSE 1
  193. #elif defined(ITEAD_BNSZ01)
  194. #define MANUFACTURER "ITEAD"
  195. #define DEVICE "BN-SZ01"
  196. #define LED1_PIN 13
  197. #define LED1_PIN_INVERSE 1
  198. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  199. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  200. #define DUMMY_RELAY_COUNT 1
  201. #define LIGHT_CH1_PIN 12
  202. #define LIGHT_CH1_INVERSE 0
  203. #elif defined(SONOFF_RFBRIDGE)
  204. #define MANUFACTURER "ITEAD"
  205. #define DEVICE "RFBRIDGE"
  206. #define BUTTON1_PIN 0
  207. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  208. #define LED1_PIN 13
  209. #define LED1_PIN_INVERSE 1
  210. #undef SERIAL_BAUDRATE
  211. #define SERIAL_BAUDRATE 19200
  212. #undef RELAY_PROVIDER
  213. #define RELAY_PROVIDER RELAY_PROVIDER_RFBRIDGE
  214. #define DUMMY_RELAY_COUNT 6
  215. #define TRACK_RELAY_STATUS 0
  216. // -----------------------------------------------------------------------------
  217. // Electrodragon boards
  218. // -----------------------------------------------------------------------------
  219. #elif defined(ESP_RELAY_BOARD)
  220. #define MANUFACTURER "ELECTRODRAGON"
  221. #define DEVICE "ESP_RELAY_BOARD"
  222. #define BUTTON1_PIN 0
  223. #define BUTTON1_RELAY 1
  224. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  225. #define BUTTON2_PIN 2
  226. #define BUTTON2_RELAY 2
  227. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  228. #define RELAY1_PIN 12
  229. #define RELAY1_PIN_INVERSE 0
  230. #define RELAY2_PIN 13
  231. #define RELAY2_PIN_INVERSE 0
  232. #define LED1_PIN 16
  233. #define LED1_PIN_INVERSE 0
  234. // -----------------------------------------------------------------------------
  235. // WorkChoice ecoPlug
  236. // -----------------------------------------------------------------------------
  237. #elif defined(ECOPLUG)
  238. #define MANUFACTURER "WORKCHOICE"
  239. #define DEVICE "ECOPLUG"
  240. #define BUTTON1_PIN 13
  241. #define BUTTON1_RELAY 1
  242. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  243. #define RELAY1_PIN 15
  244. #define RELAY1_PIN_INVERSE 0
  245. #define LED1_PIN 2
  246. #define LED1_PIN_INVERSE 0
  247. // -----------------------------------------------------------------------------
  248. // AI Thinker
  249. // -----------------------------------------------------------------------------
  250. #elif defined(AI_LIGHT)
  251. #define MANUFACTURER "AI_THINKER"
  252. #define DEVICE "AI_LIGHT"
  253. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  254. #define LIGHT_PROVIDER LIGHT_PROVIDER_MY9192
  255. #define DUMMY_RELAY_COUNT 1
  256. #define MY9291_DI_PIN 13
  257. #define MY9291_DCKI_PIN 15
  258. #define MY9291_COMMAND MY9291_COMMAND_DEFAULT
  259. // -----------------------------------------------------------------------------
  260. // LED Controller
  261. // -----------------------------------------------------------------------------
  262. #elif defined(LED_CONTROLLER)
  263. #define MANUFACTURER "MAGIC_HOME"
  264. #define DEVICE "LED_CONTROLLER"
  265. #define LED1_PIN 2
  266. #define LED1_PIN_INVERSE 1
  267. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  268. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  269. #define DUMMY_RELAY_COUNT 1
  270. #define LIGHT_CH1_PIN 14 // RED
  271. #define LIGHT_CH2_PIN 5 // GREEN
  272. #define LIGHT_CH3_PIN 12 // BLUE
  273. #define LIGHT_CH4_PIN 13 // WHITE
  274. #define LIGHT_CH1_INVERSE 0
  275. #define LIGHT_CH2_INVERSE 0
  276. #define LIGHT_CH3_INVERSE 0
  277. #define LIGHT_CH4_INVERSE 0
  278. // -----------------------------------------------------------------------------
  279. // HUACANXING H801
  280. // -----------------------------------------------------------------------------
  281. #elif defined(H801_LED_CONTROLLER)
  282. #define MANUFACTURER "HUACANXING"
  283. #define DEVICE "H801"
  284. #define LED1_PIN 5
  285. #define LED1_PIN_INVERSE 1
  286. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  287. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  288. #define DUMMY_RELAY_COUNT 1
  289. #define LIGHT_CH1_PIN 15 // RED
  290. #define LIGHT_CH2_PIN 13 // GREEN
  291. #define LIGHT_CH3_PIN 12 // BLUE
  292. #define LIGHT_CH4_PIN 14 // WHITE1
  293. #define LIGHT_CH5_PIN 4 // WHITE2
  294. #define LIGHT_CH1_INVERSE 0
  295. #define LIGHT_CH2_INVERSE 0
  296. #define LIGHT_CH3_INVERSE 0
  297. #define LIGHT_CH4_INVERSE 0
  298. #define LIGHT_CH5_INVERSE 0
  299. // -----------------------------------------------------------------------------
  300. // Jan Goedeke Wifi Relay
  301. // https://github.com/JanGoe/esp8266-wifi-relay
  302. // -----------------------------------------------------------------------------
  303. #elif defined(WIFI_RELAY_NC)
  304. #define MANUFACTURER "JAN_GOEDEKE"
  305. #define DEVICE "WIFI_RELAY_NC"
  306. #define BUTTON1_PIN 12
  307. #define BUTTON1_RELAY 1
  308. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  309. #define BUTTON2_PIN 13
  310. #define BUTTON2_RELAY 2
  311. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  312. #define RELAY1_PIN 2
  313. #define RELAY1_PIN_INVERSE 1
  314. #define RELAY2_PIN 14
  315. #define RELAY2_PIN_INVERSE 1
  316. #elif defined(WIFI_RELAY_NO)
  317. #define MANUFACTURER "JAN_GOEDEKE"
  318. #define DEVICE "WIFI_RELAY_NO"
  319. #define BUTTON1_PIN 12
  320. #define BUTTON1_RELAY 1
  321. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  322. #define BUTTON2_PIN 13
  323. #define BUTTON2_RELAY 2
  324. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  325. #define RELAY1_PIN 2
  326. #define RELAY1_PIN_INVERSE 0
  327. #define RELAY2_PIN 14
  328. #define RELAY2_PIN_INVERSE 0
  329. // -----------------------------------------------------------------------------
  330. // Jorge García Wifi+Relays Board Kit
  331. // https://www.tindie.com/products/jorgegarciadev/wifi--relays-board-kit
  332. // https://github.com/jorgegarciadev/wifikit
  333. // -----------------------------------------------------------------------------
  334. #elif defined(WIFI_RELAYS_BOARD_KIT)
  335. #define MANUFACTURER "JORGE_GARCIA"
  336. #define DEVICE "WIFI_RELAYS_BOARD_KIT"
  337. #define RELAY1_PIN 0
  338. #define RELAY1_PIN_INVERSE 1
  339. #define RELAY2_PIN 2
  340. #define RELAY2_PIN_INVERSE 1
  341. // -----------------------------------------------------------------------------
  342. // WiFi MQTT Relay / Thermostat
  343. // -----------------------------------------------------------------------------
  344. #elif defined(MQTT_RELAY)
  345. #define MANUFACTURER "OPENENERGYMONITOR"
  346. #define DEVICE "MQTT_RELAY"
  347. #define BUTTON1_PIN 0
  348. #define BUTTON1_RELAY 1
  349. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  350. #define RELAY1_PIN 12
  351. #define RELAY1_PIN_INVERSE 0
  352. #define LED1_PIN 16
  353. #define LED1_PIN_INVERSE 0
  354. // -----------------------------------------------------------------------------
  355. // Unknown hardware
  356. // -----------------------------------------------------------------------------
  357. #else
  358. #error "UNSUPPORTED HARDWARE!"
  359. #endif
  360. // -----------------------------------------------------------------------------
  361. // Default values
  362. // -----------------------------------------------------------------------------
  363. #ifndef BUTTON1_PRESS
  364. #define BUTTON1_PRESS BUTTON_MODE_NONE
  365. #endif
  366. #ifndef BUTTON2_PRESS
  367. #define BUTTON2_PRESS BUTTON_MODE_NONE
  368. #endif
  369. #ifndef BUTTON3_PRESS
  370. #define BUTTON3_PRESS BUTTON_MODE_NONE
  371. #endif
  372. #ifndef BUTTON4_PRESS
  373. #define BUTTON4_PRESS BUTTON_MODE_NONE
  374. #endif
  375. #ifndef BUTTON1_CLICK
  376. #define BUTTON1_CLICK BUTTON_MODE_TOGGLE
  377. #endif
  378. #ifndef BUTTON2_CLICK
  379. #define BUTTON2_CLICK BUTTON_MODE_TOGGLE
  380. #endif
  381. #ifndef BUTTON3_CLICK
  382. #define BUTTON3_CLICK BUTTON_MODE_TOGGLE
  383. #endif
  384. #ifndef BUTTON4_CLICK
  385. #define BUTTON4_CLICK BUTTON_MODE_TOGGLE
  386. #endif
  387. #ifndef BUTTON1_DBLCLICK
  388. #define BUTTON1_DBLCLICK BUTTON_MODE_AP
  389. #endif
  390. #ifndef BUTTON2_DBLCLICK
  391. #define BUTTON2_DBLCLICK BUTTON_MODE_NONE
  392. #endif
  393. #ifndef BUTTON3_DBLCLICK
  394. #define BUTTON3_DBLCLICK BUTTON_MODE_NONE
  395. #endif
  396. #ifndef BUTTON4_DBLCLICK
  397. #define BUTTON4_DBLCLICK BUTTON_MODE_NONE
  398. #endif
  399. #ifndef BUTTON1_LNGCLICK
  400. #define BUTTON1_LNGCLICK BUTTON_MODE_RESET
  401. #endif
  402. #ifndef BUTTON2_LNGCLICK
  403. #define BUTTON2_LNGCLICK BUTTON_MODE_NONE
  404. #endif
  405. #ifndef BUTTON3_LNGCLICK
  406. #define BUTTON3_LNGCLICK BUTTON_MODE_NONE
  407. #endif
  408. #ifndef BUTTON4_LNGCLICK
  409. #define BUTTON4_LNGCLICK BUTTON_MODE_NONE
  410. #endif
  411. #ifndef BUTTON1_LNGLNGCLICK
  412. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_FACTORY
  413. #endif
  414. #ifndef BUTTON2_LNGLNGCLICK
  415. #define BUTTON2_LNGLNGCLICK BUTTON_MODE_NONE
  416. #endif
  417. #ifndef BUTTON3_LNGLNGCLICK
  418. #define BUTTON3_LNGLNGCLICK BUTTON_MODE_NONE
  419. #endif
  420. #ifndef BUTTON4_LNGLNGCLICK
  421. #define BUTTON4_LNGLNGCLICK BUTTON_MODE_NONE
  422. #endif
  423. #ifndef BUTTON1_RELAY
  424. #define BUTTON1_RELAY 0
  425. #endif
  426. #ifndef BUTTON2_RELAY
  427. #define BUTTON2_RELAY 0
  428. #endif
  429. #ifndef BUTTON3_RELAY
  430. #define BUTTON3_RELAY 0
  431. #endif
  432. #ifndef BUTTON4_RELAY
  433. #define BUTTON4_RELAY 0
  434. #endif
  435. #ifndef RELAY1_DELAY_ON
  436. #define RELAY1_DELAY_ON 0
  437. #endif
  438. #ifndef RELAY2_DELAY_ON
  439. #define RELAY2_DELAY_ON 0
  440. #endif
  441. #ifndef RELAY3_DELAY_ON
  442. #define RELAY3_DELAY_ON 0
  443. #endif
  444. #ifndef RELAY4_DELAY_ON
  445. #define RELAY4_DELAY_ON 0
  446. #endif
  447. #ifndef RELAY1_DELAY_OFF
  448. #define RELAY1_DELAY_OFF 0
  449. #endif
  450. #ifndef RELAY2_DELAY_OFF
  451. #define RELAY2_DELAY_OFF 0
  452. #endif
  453. #ifndef RELAY3_DELAY_OFF
  454. #define RELAY3_DELAY_OFF 0
  455. #endif
  456. #ifndef RELAY4_DELAY_OFF
  457. #define RELAY4_DELAY_OFF 0
  458. #endif
  459. #ifndef RELAY1_LED
  460. #define RELAY1_LED 0
  461. #endif
  462. #ifndef RELAY2_LED
  463. #define RELAY2_LED 0
  464. #endif
  465. #ifndef RELAY3_LED
  466. #define RELAY3_LED 0
  467. #endif
  468. #ifndef RELAY4_LED
  469. #define RELAY4_LED 0
  470. #endif
  471. #ifndef WIFI_LED
  472. #define WIFI_LED 1
  473. #endif
  474. // Needed for ESP8285 boards under Windows using PlatformIO (?)
  475. #ifndef BUTTON_PUSHBUTTON
  476. #define BUTTON_PUSHBUTTON 0
  477. #define BUTTON_SWITCH 1
  478. #define BUTTON_DEFAULT_HIGH 2
  479. #define BUTTON_SET_PULLUP 4
  480. #endif
  481. // Does the board track the relay status?
  482. #ifndef TRACK_RELAY_STATUS
  483. #define TRACK_RELAY_STATUS 1
  484. #endif
  485. // Relay providers
  486. #ifndef RELAY_PROVIDER
  487. #define RELAY_PROVIDER RELAY_PROVIDER_RELAY
  488. #endif
  489. // Light provider
  490. #ifndef LIGHT_PROVIDER
  491. #define LIGHT_PROVIDER LIGHT_PROVIDER_NONE
  492. #endif