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.

1261 lines
36 KiB

7 years ago
7 years ago
  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#_TYPE: Relay can be RELAY_TYPE_NORMAL, RELAY_TYPE_INVERSE or RELAY_TYPE_LATCHED
  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. //
  20. // Besides, other hardware specific information should be stated here
  21. // -----------------------------------------------------------------------------
  22. // Development boards
  23. // -----------------------------------------------------------------------------
  24. #if defined(NODEMCU_LOLIN)
  25. // Info
  26. #define MANUFACTURER "NODEMCU"
  27. #define DEVICE "LOLIN"
  28. // Buttons
  29. #define BUTTON1_PIN 0
  30. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  31. #define BUTTON1_RELAY 1
  32. // Relays
  33. #define RELAY1_PIN 12
  34. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  35. // LEDs
  36. #define LED1_PIN 2
  37. #define LED1_PIN_INVERSE 1
  38. #elif defined(WEMOS_D1_MINI_RELAYSHIELD)
  39. // Info
  40. #define MANUFACTURER "WEMOS"
  41. #define DEVICE "D1_MINI_RELAYSHIELD"
  42. // Buttons
  43. // No buttons on the D1 MINI alone, but defining it without adding a button doen't create problems
  44. #define BUTTON1_PIN 0 // Connect a pushbutton between D3 and GND,
  45. // it's the same as using a Wemos one button shield
  46. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  47. #define BUTTON1_RELAY 1
  48. // Relays
  49. #define RELAY1_PIN 5
  50. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  51. // LEDs
  52. #define LED1_PIN 2
  53. #define LED1_PIN_INVERSE 1
  54. // Buttons
  55. // No buttons on the D1 MINI alone, but defining it without adding a button doen't create problems
  56. #define BUTTON1_PIN 0 // Connect a pushbutton between D3 and GND,
  57. // it's the same as using a Wemos one button shield
  58. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  59. #define BUTTON1_RELAY 1
  60. // -----------------------------------------------------------------------------
  61. // ESPurna
  62. // -----------------------------------------------------------------------------
  63. #elif defined(TINKERMAN_ESPURNA_H06)
  64. // Info
  65. #define MANUFACTURER "TINKERMAN"
  66. #define DEVICE "ESPURNA_H06"
  67. // Buttons
  68. #define BUTTON1_PIN 4
  69. #define BUTTON1_RELAY 1
  70. #ifdef USE_TOUCH_BUTTON
  71. // Touch button
  72. #define BUTTON1_MODE BUTTON_PUSHBUTTON
  73. #define BUTTON1_PRESS BUTTON_MODE_TOGGLE
  74. #define BUTTON1_CLICK BUTTON_MODE_NONE
  75. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  76. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  77. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_NONE
  78. #else
  79. // Normal pushbutton
  80. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  81. #endif
  82. // Relays
  83. #define RELAY1_PIN 12
  84. #define RELAY1_TYPE RELAY_TYPE_INVERSE
  85. // LEDs
  86. #define LED1_PIN 5
  87. #define LED1_PIN_INVERSE 0
  88. // HLW8012
  89. #define POWER_PROVIDER POWER_PROVIDER_HLW8012
  90. #define HLW8012_SEL_PIN 2
  91. #define HLW8012_CF1_PIN 13
  92. #define HLW8012_CF_PIN 14
  93. #elif defined(TINKERMAN_ESPURNA_H07)
  94. // Info
  95. #define MANUFACTURER "TINKERMAN"
  96. #define DEVICE "ESPURNA_H07"
  97. // Buttons
  98. #define BUTTON1_PIN 4
  99. #define BUTTON1_RELAY 1
  100. #ifdef USE_TOUCH_BUTTON
  101. // Touch button
  102. #define BUTTON1_MODE BUTTON_PUSHBUTTON
  103. #define BUTTON1_PRESS BUTTON_MODE_TOGGLE
  104. #define BUTTON1_CLICK BUTTON_MODE_NONE
  105. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  106. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  107. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_NONE
  108. #else
  109. // Normal pushbutton
  110. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  111. #endif
  112. // Relays
  113. #define RELAY1_PIN 12
  114. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  115. // LEDs
  116. #define LED1_PIN 2
  117. #define LED1_PIN_INVERSE 0
  118. // HLW8012
  119. #define POWER_PROVIDER POWER_PROVIDER_HLW8012
  120. #define HLW8012_SEL_PIN 5
  121. #define HLW8012_CF1_PIN 13
  122. #define HLW8012_CF_PIN 14
  123. // -----------------------------------------------------------------------------
  124. // Itead Studio boards
  125. // -----------------------------------------------------------------------------
  126. #elif defined(ITEAD_SONOFF_BASIC)
  127. // Info
  128. #define MANUFACTURER "ITEAD"
  129. #define DEVICE "SONOFF_BASIC"
  130. // Buttons
  131. #define BUTTON1_PIN 0
  132. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  133. #define BUTTON1_RELAY 1
  134. // Relays
  135. #define RELAY1_PIN 12
  136. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  137. // LEDs
  138. #define LED1_PIN 13
  139. #define LED1_PIN_INVERSE 1
  140. #elif defined(ITEAD_SONOFF_RF)
  141. // Info
  142. #define MANUFACTURER "ITEAD"
  143. #define DEVICE "SONOFF_RF"
  144. // Buttons
  145. #define BUTTON1_PIN 0
  146. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  147. #define BUTTON1_RELAY 1
  148. // Relays
  149. #define RELAY1_PIN 12
  150. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  151. // LEDs
  152. #define LED1_PIN 13
  153. #define LED1_PIN_INVERSE 1
  154. #elif defined(ITEAD_SONOFF_TH)
  155. // Info
  156. #define MANUFACTURER "ITEAD"
  157. #define DEVICE "SONOFF_TH"
  158. // Buttons
  159. #define BUTTON1_PIN 0
  160. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  161. #define BUTTON1_RELAY 1
  162. // Relays
  163. #define RELAY1_PIN 12
  164. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  165. // LEDs
  166. #define LED1_PIN 13
  167. #define LED1_PIN_INVERSE 1
  168. #elif defined(ITEAD_SONOFF_SV)
  169. // Info
  170. #define MANUFACTURER "ITEAD"
  171. #define DEVICE "SONOFF_SV"
  172. // Buttons
  173. #define BUTTON1_PIN 0
  174. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  175. #define BUTTON1_RELAY 1
  176. // Relays
  177. #define RELAY1_PIN 12
  178. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  179. // LEDs
  180. #define LED1_PIN 13
  181. #define LED1_PIN_INVERSE 1
  182. #elif defined(ITEAD_SLAMPHER)
  183. // Info
  184. #define MANUFACTURER "ITEAD"
  185. #define DEVICE "SLAMPHER"
  186. // Buttons
  187. #define BUTTON1_PIN 0
  188. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  189. #define BUTTON1_RELAY 1
  190. // Relays
  191. #define RELAY1_PIN 12
  192. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  193. // LEDs
  194. #define LED1_PIN 13
  195. #define LED1_PIN_INVERSE 1
  196. #elif defined(ITEAD_S20)
  197. // Info
  198. #define MANUFACTURER "ITEAD"
  199. #define DEVICE "S20"
  200. // Buttons
  201. #define BUTTON1_PIN 0
  202. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  203. #define BUTTON1_RELAY 1
  204. // Relays
  205. #define RELAY1_PIN 12
  206. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  207. // LEDs
  208. #define LED1_PIN 13
  209. #define LED1_PIN_INVERSE 1
  210. #elif defined(ITEAD_SONOFF_TOUCH)
  211. // Info
  212. #define MANUFACTURER "ITEAD"
  213. #define DEVICE "SONOFF_TOUCH"
  214. // Buttons
  215. #define BUTTON1_PIN 0
  216. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  217. #define BUTTON1_RELAY 1
  218. // Relays
  219. #define RELAY1_PIN 12
  220. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  221. // LEDs
  222. #define LED1_PIN 13
  223. #define LED1_PIN_INVERSE 1
  224. #elif defined(ITEAD_SONOFF_POW)
  225. // Info
  226. #define MANUFACTURER "ITEAD"
  227. #define DEVICE "SONOFF_POW"
  228. // Buttons
  229. #define BUTTON1_PIN 0
  230. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  231. #define BUTTON1_RELAY 1
  232. // Relays
  233. #define RELAY1_PIN 12
  234. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  235. // LEDs
  236. #define LED1_PIN 15
  237. #define LED1_PIN_INVERSE 0
  238. // HLW8012
  239. #define POWER_PROVIDER POWER_PROVIDER_HLW8012
  240. #define HLW8012_SEL_PIN 5
  241. #define HLW8012_CF1_PIN 13
  242. #define HLW8012_CF_PIN 14
  243. #elif defined(ITEAD_SONOFF_DUAL)
  244. // Info
  245. #define MANUFACTURER "ITEAD"
  246. #define DEVICE "SONOFF_DUAL"
  247. #define SERIAL_BAUDRATE 19230
  248. #define RELAY_PROVIDER RELAY_PROVIDER_DUAL
  249. #define DUMMY_RELAY_COUNT 2
  250. #define DEBUG_SERIAL_SUPPORT 0
  251. #define TERMINAL_SUPPORT 0
  252. // Buttons
  253. #define BUTTON3_RELAY 1
  254. // LEDs
  255. #define LED1_PIN 13
  256. #define LED1_PIN_INVERSE 1
  257. #elif defined(ITEAD_SONOFF_4CH)
  258. // Info
  259. #define MANUFACTURER "ITEAD"
  260. #define DEVICE "SONOFF_4CH"
  261. // Buttons
  262. #define BUTTON1_PIN 0
  263. #define BUTTON2_PIN 9
  264. #define BUTTON3_PIN 10
  265. #define BUTTON4_PIN 14
  266. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  267. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  268. #define BUTTON3_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  269. #define BUTTON4_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  270. #define BUTTON1_RELAY 1
  271. #define BUTTON2_RELAY 2
  272. #define BUTTON3_RELAY 3
  273. #define BUTTON4_RELAY 4
  274. // Relays
  275. #define RELAY1_PIN 12
  276. #define RELAY2_PIN 5
  277. #define RELAY3_PIN 4
  278. #define RELAY4_PIN 15
  279. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  280. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  281. #define RELAY3_TYPE RELAY_TYPE_NORMAL
  282. #define RELAY4_TYPE RELAY_TYPE_NORMAL
  283. // LEDs
  284. #define LED1_PIN 13
  285. #define LED1_PIN_INVERSE 1
  286. #elif defined(ITEAD_SONOFF_4CH_PRO)
  287. // Info
  288. #define MANUFACTURER "ITEAD"
  289. #define DEVICE "SONOFF_4CH_PRO"
  290. // Buttons
  291. #define BUTTON1_PIN 0
  292. #define BUTTON2_PIN 9
  293. #define BUTTON3_PIN 10
  294. #define BUTTON4_PIN 14
  295. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  296. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  297. #define BUTTON3_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  298. #define BUTTON4_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  299. #define BUTTON1_RELAY 1
  300. #define BUTTON2_RELAY 2
  301. #define BUTTON3_RELAY 3
  302. #define BUTTON4_RELAY 4
  303. // Relays
  304. #define RELAY1_PIN 12
  305. #define RELAY2_PIN 5
  306. #define RELAY3_PIN 4
  307. #define RELAY4_PIN 15
  308. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  309. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  310. #define RELAY3_TYPE RELAY_TYPE_NORMAL
  311. #define RELAY4_TYPE RELAY_TYPE_NORMAL
  312. // LEDs
  313. #define LED1_PIN 13
  314. #define LED1_PIN_INVERSE 1
  315. #elif defined(ITEAD_1CH_INCHING)
  316. // The inching functionality is managed by a misterious IC in the board.
  317. // You cannot control the inching button and functionality from the ESP8266
  318. // Besides, enabling the inching functionality using the hardware button
  319. // will result in the relay switching on and off continuously.
  320. // Fortunately the unkown IC keeps memory of the hardware inching status
  321. // so you can just disable it and forget. The inching LED must be lit.
  322. // You can still use the pulse options from the web interface
  323. // without problem.
  324. // Info
  325. #define MANUFACTURER "ITEAD"
  326. #define DEVICE "1CH_INCHING"
  327. // Buttons
  328. #define BUTTON1_PIN 0
  329. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  330. #define BUTTON1_RELAY 1
  331. // Relays
  332. #define RELAY1_PIN 12
  333. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  334. // LEDs
  335. #define LED1_PIN 13
  336. #define LED1_PIN_INVERSE 1
  337. #elif defined(ITEAD_MOTOR)
  338. // Info
  339. #define MANUFACTURER "ITEAD"
  340. #define DEVICE "MOTOR"
  341. // Buttons
  342. #define BUTTON1_PIN 0
  343. #define BUTTON1_RELAY 1
  344. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  345. // Relays
  346. #define RELAY1_PIN 12
  347. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  348. // LEDs
  349. #define LED1_PIN 13
  350. #define LED1_PIN_INVERSE 1
  351. #elif defined(ITEAD_BNSZ01)
  352. // Info
  353. #define MANUFACTURER "ITEAD"
  354. #define DEVICE "BNSZ01"
  355. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  356. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  357. #define DUMMY_RELAY_COUNT 1
  358. // LEDs
  359. #define LED1_PIN 13
  360. #define LED1_PIN_INVERSE 1
  361. // Channels
  362. #define LIGHT_CH1_PIN 12
  363. #define LIGHT_CH1_INVERSE 0
  364. #elif defined(ITEAD_SONOFF_RFBRIDGE)
  365. // Info
  366. #define MANUFACTURER "ITEAD"
  367. #define DEVICE "SONOFF_RFBRIDGE"
  368. #define SERIAL_BAUDRATE 19200
  369. #define RELAY_PROVIDER RELAY_PROVIDER_RFBRIDGE
  370. #ifndef DUMMY_RELAY_COUNT
  371. #define DUMMY_RELAY_COUNT 6
  372. #endif
  373. #define TERMINAL_SUPPORT 0
  374. #define TRACK_RELAY_STATUS 0
  375. // Buttons
  376. #define BUTTON1_PIN 0
  377. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  378. // LEDs
  379. #define LED1_PIN 13
  380. #define LED1_PIN_INVERSE 1
  381. #elif defined(ITEAD_SONOFF_B1)
  382. // Info
  383. #define MANUFACTURER "ITEAD"
  384. #define DEVICE "SONOFF_B1"
  385. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  386. #define LIGHT_PROVIDER LIGHT_PROVIDER_MY9192
  387. #define DUMMY_RELAY_COUNT 1
  388. #define MY9291_DI_PIN 12
  389. #define MY9291_DCKI_PIN 14
  390. #define MY9291_COMMAND MY9291_COMMAND_DEFAULT
  391. #define MY9291_CHANNELS 5
  392. #elif defined(ITEAD_SONOFF_LED)
  393. // Info
  394. #define MANUFACTURER "ITEAD"
  395. #define DEVICE "SONOFF_LED"
  396. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  397. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  398. #define DUMMY_RELAY_COUNT 1
  399. // LEDs
  400. #define LED1_PIN 13
  401. #define LED1_PIN_INVERSE 1
  402. // Channels
  403. #define LIGHT_CH1_PIN 12 // Cold white
  404. #define LIGHT_CH2_PIN 14 // Warm white
  405. #define LIGHT_CH1_INVERSE 0
  406. #define LIGHT_CH2_INVERSE 0
  407. #elif defined(ITEAD_SONOFF_T1_1CH)
  408. // Info
  409. #define MANUFACTURER "ITEAD"
  410. #define DEVICE "SONOFF_T1_1CH"
  411. // Buttons
  412. #define BUTTON1_PIN 9
  413. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  414. #define BUTTON1_RELAY 1
  415. // Relays
  416. #define RELAY1_PIN 5
  417. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  418. // LEDs
  419. #define LED1_PIN 13
  420. #define LED1_PIN_INVERSE 1
  421. #elif defined(ITEAD_SONOFF_T1_2CH)
  422. // Info
  423. #define MANUFACTURER "ITEAD"
  424. #define DEVICE "SONOFF_T1_2CH"
  425. // Buttons
  426. #define BUTTON1_PIN 0
  427. #define BUTTON2_PIN 10
  428. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  429. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  430. #define BUTTON1_RELAY 1
  431. #define BUTTON2_RELAY 2
  432. // Relays
  433. #define RELAY1_PIN 12
  434. #define RELAY2_PIN 4
  435. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  436. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  437. // LEDs
  438. #define LED1_PIN 13
  439. #define LED1_PIN_INVERSE 1
  440. #elif defined(ITEAD_SONOFF_T1_3CH)
  441. // Info
  442. #define MANUFACTURER "ITEAD"
  443. #define DEVICE "SONOFF_T1_3CH"
  444. // Buttons
  445. #define BUTTON1_PIN 0
  446. #define BUTTON2_PIN 9
  447. #define BUTTON3_PIN 10
  448. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  449. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  450. #define BUTTON3_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  451. #define BUTTON1_RELAY 1
  452. #define BUTTON2_RELAY 2
  453. #define BUTTON3_RELAY 3
  454. // Relays
  455. #define RELAY1_PIN 12
  456. #define RELAY2_PIN 5
  457. #define RELAY3_PIN 4
  458. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  459. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  460. #define RELAY3_TYPE RELAY_TYPE_NORMAL
  461. // LEDs
  462. #define LED1_PIN 13
  463. #define LED1_PIN_INVERSE 1
  464. // -----------------------------------------------------------------------------
  465. // Electrodragon boards
  466. // -----------------------------------------------------------------------------
  467. #elif defined(ELECTRODRAGON_WIFI_IOT)
  468. // Info
  469. #define MANUFACTURER "ELECTRODRAGON"
  470. #define DEVICE "WIFI_IOT"
  471. // Buttons
  472. #define BUTTON1_PIN 0
  473. #define BUTTON2_PIN 2
  474. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  475. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  476. #define BUTTON1_RELAY 1
  477. #define BUTTON2_RELAY 2
  478. // Relays
  479. #define RELAY1_PIN 12
  480. #define RELAY2_PIN 13
  481. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  482. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  483. // LEDs
  484. #define LED1_PIN 16
  485. #define LED1_PIN_INVERSE 0
  486. // -----------------------------------------------------------------------------
  487. // WorkChoice ecoPlug
  488. // -----------------------------------------------------------------------------
  489. #elif defined(WORKCHOICE_ECOPLUG)
  490. // Info
  491. #define MANUFACTURER "WORKCHOICE"
  492. #define DEVICE "ECOPLUG"
  493. // Buttons
  494. #define BUTTON1_PIN 13
  495. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  496. #define BUTTON1_RELAY 1
  497. // Relays
  498. #define RELAY1_PIN 15
  499. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  500. // LEDs
  501. #define LED1_PIN 2
  502. #define LED1_PIN_INVERSE 0
  503. // -----------------------------------------------------------------------------
  504. // AI Thinker
  505. // -----------------------------------------------------------------------------
  506. #elif defined(AITHINKER_AI_LIGHT)
  507. // Info
  508. #define MANUFACTURER "AITHINKER"
  509. #define DEVICE "AI_LIGHT"
  510. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  511. #define LIGHT_PROVIDER LIGHT_PROVIDER_MY9192
  512. #define DUMMY_RELAY_COUNT 1
  513. #define MY9291_DI_PIN 13
  514. #define MY9291_DCKI_PIN 15
  515. #define MY9291_COMMAND MY9291_COMMAND_DEFAULT
  516. #define MY9291_CHANNELS 4
  517. // -----------------------------------------------------------------------------
  518. // LED Controller
  519. // -----------------------------------------------------------------------------
  520. #elif defined(MAGICHOME_LED_CONTROLLER)
  521. // Info
  522. #define MANUFACTURER "MAGICHOME"
  523. #define DEVICE "LED_CONTROLLER"
  524. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  525. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  526. #define DUMMY_RELAY_COUNT 1
  527. // LEDs
  528. #define LED1_PIN 2
  529. #define LED1_PIN_INVERSE 1
  530. // Channels
  531. #define LIGHT_CH1_PIN 14 // RED
  532. #define LIGHT_CH2_PIN 5 // GREEN
  533. #define LIGHT_CH3_PIN 12 // BLUE
  534. #define LIGHT_CH4_PIN 13 // WHITE
  535. #define LIGHT_CH1_INVERSE 0
  536. #define LIGHT_CH2_INVERSE 0
  537. #define LIGHT_CH3_INVERSE 0
  538. #define LIGHT_CH4_INVERSE 0
  539. #elif defined(MAGICHOME_LED_CONTROLLER_20)
  540. // Info
  541. #define MANUFACTURER "MAGICHOME"
  542. #define DEVICE "LED_CONTROLLER_20"
  543. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  544. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  545. #define DUMMY_RELAY_COUNT 1
  546. // LEDs
  547. #define LED1_PIN 2
  548. #define LED1_PIN_INVERSE 1
  549. // Channels
  550. #define LIGHT_CH1_PIN 5 // RED
  551. #define LIGHT_CH2_PIN 12 // GREEN
  552. #define LIGHT_CH3_PIN 13 // BLUE
  553. #define LIGHT_CH4_PIN 15 // WHITE
  554. #define LIGHT_CH1_INVERSE 0
  555. #define LIGHT_CH2_INVERSE 0
  556. #define LIGHT_CH3_INVERSE 0
  557. #define LIGHT_CH4_INVERSE 0
  558. #define LIGHT_IR_PIN 4 // IR LED
  559. #define LIGHT_PROVIDER_EXPERIMENTAL_RGB_ONLY_HSV_IR 1
  560. // 24 Buttons Set of the IR Remote
  561. #ifndef IR_BUTTONS_SET
  562. #define IR_BUTTONS_SET 1
  563. #endif
  564. //Remote Buttons SET 1 (for the original Remote shipped with the controller)
  565. #if IR_BUTTONS_SET == 1
  566. #define IR_BUTTON_0 0xFF906F // Brightness +
  567. #define IR_BUTTON_1 0xFFB847 // Brightness -
  568. #define IR_BUTTON_2 0xFFF807 // OFF
  569. #define IR_BUTTON_3 0xFFB04F // ON
  570. #define IR_BUTTON_4 0xFF9867 // RED
  571. #define IR_BUTTON_5 0xFFD827 // GREEN
  572. #define IR_BUTTON_6 0xFF8877 // BLUE
  573. #define IR_BUTTON_7 0xFFA857 // WHITE
  574. #define IR_BUTTON_8 0xFFE817 // "Red" 1
  575. #define IR_BUTTON_9 0xFF48B7 // "Green" 1
  576. #define IR_BUTTON_10 0xFF6897 // "Blue" 1
  577. #define IR_BUTTON_11 0xFFB24D // FLASH Mode
  578. #define IR_BUTTON_12 0xFF02FD // "Red" 2
  579. #define IR_BUTTON_13 0xFF32CD // "Green" 2
  580. #define IR_BUTTON_14 0xFF20DF // "Blue" 2
  581. #define IR_BUTTON_15 0xFF00FF // STROBE Mode
  582. #define IR_BUTTON_16 0xFF50AF // "Red" 3
  583. #define IR_BUTTON_17 0xFF7887 // "Green" 3
  584. #define IR_BUTTON_18 0xFF708F // "Blue" 3
  585. #define IR_BUTTON_19 0xFF58A7 // FADE Mode
  586. #define IR_BUTTON_20 0xFF38C7 // "Red" 4
  587. #define IR_BUTTON_21 0xFF28D7 // "Green" 4
  588. #define IR_BUTTON_22 0xFFF00F // "Blue" 4
  589. #define IR_BUTTON_23 0xFF30CF // SMOOTH Mode
  590. #endif
  591. //Remote Buttons SET 2 (another identical IR Remote shipped with another controller)
  592. #if IR_BUTTONS_SET == 2
  593. #define IR_BUTTON_0 0xFF00FF // Brightness +
  594. #define IR_BUTTON_1 0xFF807F // Brightness -
  595. #define IR_BUTTON_2 0xFF40BF // OFF
  596. #define IR_BUTTON_3 0xFFC03F // ON
  597. #define IR_BUTTON_4 0xFF20DF // RED
  598. #define IR_BUTTON_5 0xFFA05F // GREEN
  599. #define IR_BUTTON_6 0xFF609F // BLUE
  600. #define IR_BUTTON_7 0xFFE01F // WHITE
  601. #define IR_BUTTON_8 0xFF10EF // "Red" 1
  602. #define IR_BUTTON_9 0xFF906F // "Green" 1
  603. #define IR_BUTTON_10 0xFF50AF // "Blue" 1
  604. #define IR_BUTTON_11 0xFFD02F // FLASH Mode
  605. #define IR_BUTTON_12 0xFF30CF // "Red" 2
  606. #define IR_BUTTON_13 0xFFB04F // "Green" 2
  607. #define IR_BUTTON_14 0xFF708F // "Blue" 2
  608. #define IR_BUTTON_15 0xFFF00F // STROBE Mode
  609. #define IR_BUTTON_16 0xFF08F7 // "Red" 3
  610. #define IR_BUTTON_17 0xFF8877 // "Green" 3
  611. #define IR_BUTTON_18 0xFF48B7 // "Blue" 3
  612. #define IR_BUTTON_19 0xFFC837 // FADE Mode
  613. #define IR_BUTTON_20 0xFF28D7 // "Red" 4
  614. #define IR_BUTTON_21 0xFFA857 // "Green" 4
  615. #define IR_BUTTON_22 0xFF6897 // "Blue" 4
  616. #define IR_BUTTON_23 0xFFE817 // SMOOTH Mode
  617. #endif
  618. // -----------------------------------------------------------------------------
  619. // HUACANXING H801
  620. // -----------------------------------------------------------------------------
  621. #elif defined(HUACANXING_H801)
  622. // Info
  623. #define MANUFACTURER "HUACANXING"
  624. #define DEVICE "H801"
  625. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  626. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  627. #define DUMMY_RELAY_COUNT 1
  628. // LEDs
  629. #define LED1_PIN 5
  630. #define LED1_PIN_INVERSE 1
  631. // Channels
  632. #define LIGHT_CH1_PIN 15 // RED
  633. #define LIGHT_CH2_PIN 13 // GREEN
  634. #define LIGHT_CH3_PIN 12 // BLUE
  635. #define LIGHT_CH4_PIN 14 // WHITE1
  636. #define LIGHT_CH5_PIN 4 // WHITE2
  637. #define LIGHT_CH1_INVERSE 0
  638. #define LIGHT_CH2_INVERSE 0
  639. #define LIGHT_CH3_INVERSE 0
  640. #define LIGHT_CH4_INVERSE 0
  641. #define LIGHT_CH5_INVERSE 0
  642. // -----------------------------------------------------------------------------
  643. // Jan Goedeke Wifi Relay
  644. // https://github.com/JanGoe/esp8266-wifi-relay
  645. // -----------------------------------------------------------------------------
  646. #elif defined(JANGOE_WIFI_RELAY_NC)
  647. // Info
  648. #define MANUFACTURER "JANGOE"
  649. #define DEVICE "WIFI_RELAY_NC"
  650. // Buttons
  651. #define BUTTON1_PIN 12
  652. #define BUTTON2_PIN 13
  653. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  654. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  655. #define BUTTON1_RELAY 1
  656. #define BUTTON2_RELAY 2
  657. // Relays
  658. #define RELAY1_PIN 2
  659. #define RELAY2_PIN 14
  660. #define RELAY1_TYPE RELAY_TYPE_INVERSE
  661. #define RELAY2_TYPE RELAY_TYPE_INVERSE
  662. #elif defined(JANGOE_WIFI_RELAY_NO)
  663. // Info
  664. #define MANUFACTURER "JANGOE"
  665. #define DEVICE "WIFI_RELAY_NO"
  666. // Buttons
  667. #define BUTTON1_PIN 12
  668. #define BUTTON2_PIN 13
  669. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  670. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  671. #define BUTTON1_RELAY 1
  672. #define BUTTON2_RELAY 2
  673. // Relays
  674. #define RELAY1_PIN 2
  675. #define RELAY2_PIN 14
  676. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  677. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  678. // -----------------------------------------------------------------------------
  679. // Jorge García Wifi+Relays Board Kit
  680. // https://www.tindie.com/products/jorgegarciadev/wifi--relays-board-kit
  681. // https://github.com/jorgegarciadev/wifikit
  682. // -----------------------------------------------------------------------------
  683. #elif defined(JORGEGARCIA_WIFI_RELAYS)
  684. // Info
  685. #define MANUFACTURER "JORGEGARCIA"
  686. #define DEVICE "WIFI_RELAYS"
  687. // Relays
  688. #define RELAY1_PIN 0
  689. #define RELAY2_PIN 2
  690. #define RELAY1_TYPE RELAY_TYPE_INVERSE
  691. #define RELAY2_TYPE RELAY_TYPE_INVERSE
  692. // -----------------------------------------------------------------------------
  693. // WiFi MQTT Relay / Thermostat
  694. // -----------------------------------------------------------------------------
  695. #elif defined(OPENENERGYMONITOR_MQTT_RELAY)
  696. // Info
  697. #define MANUFACTURER "OPENENERGYMONITOR"
  698. #define DEVICE "MQTT_RELAY"
  699. // Buttons
  700. #define BUTTON1_PIN 0
  701. #define BUTTON1_RELAY 1
  702. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  703. // Relays
  704. #define RELAY1_PIN 12
  705. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  706. // LEDs
  707. #define LED1_PIN 16
  708. #define LED1_PIN_INVERSE 0
  709. // -----------------------------------------------------------------------------
  710. // WiOn 50055 Indoor Wi-Fi Wall Outlet & Tap
  711. // https://rover.ebay.com/rover/1/711-53200-19255-0/1?icep_id=114&ipn=icep&toolid=20004&campid=5338044841&mpre=http%3A%2F%2Fwww.ebay.com%2Fitm%2FWiOn-50050-Indoor-Wi-Fi-Outlet-Wireless-Switch-Programmable-Timer-%2F263112281551
  712. // https://rover.ebay.com/rover/1/711-53200-19255-0/1?icep_id=114&ipn=icep&toolid=20004&campid=5338044841&mpre=http%3A%2F%2Fwww.ebay.com%2Fitm%2FWiOn-50055-Indoor-Wi-Fi-Wall-Tap-Monitor-Energy-Usage-Wireless-Smart-Switch-%2F263020837777
  713. // -----------------------------------------------------------------------------
  714. #elif defined(WION_50055)
  715. // Currently untested, does not support energy monitoring
  716. // Info
  717. #define MANUFACTURER "WION"
  718. #define DEVICE "50055"
  719. // Buttons
  720. #define BUTTON1_PIN 13
  721. #define BUTTON1_RELAY 1
  722. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  723. // Relays
  724. #define RELAY1_PIN 15
  725. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  726. // LEDs
  727. #define LED1_PIN 2
  728. #define LED1_PIN_INVERSE 0
  729. // -----------------------------------------------------------------------------
  730. // EX-Store Wifi Relay v3.1
  731. // https://ex-store.de/ESP8266-WiFi-Relay-V31
  732. // -----------------------------------------------------------------------------
  733. #elif defined(EXS_WIFI_RELAY_V31)
  734. // Untested
  735. // Info
  736. #define MANUFACTURER "EXS"
  737. #define DEVICE "WIFI_RELAY_V31"
  738. // Buttons
  739. #define BUTTON1_PIN 0
  740. #define BUTTON1_RELAY 1
  741. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  742. // Relays
  743. #define RELAY1_PIN 13
  744. #define RELAY1_TYPE RELAY_TYPE_LATCHED
  745. #define RELAY1_RESET_PIN 12
  746. // -----------------------------------------------------------------------------
  747. // HUACANXING H802
  748. // -----------------------------------------------------------------------------
  749. #elif defined(HUACANXING_H802)
  750. // Info
  751. #define MANUFACTURER "HUACANXING"
  752. #define DEVICE "H802"
  753. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  754. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  755. #define DUMMY_RELAY_COUNT 1
  756. // Channels
  757. #define LIGHT_CH1_PIN 12 // RED
  758. #define LIGHT_CH2_PIN 14 // GREEN
  759. #define LIGHT_CH3_PIN 13 // BLUE
  760. #define LIGHT_CH4_PIN 15 // WHITE
  761. #define LIGHT_CH1_INVERSE 0
  762. #define LIGHT_CH2_INVERSE 0
  763. #define LIGHT_CH3_INVERSE 0
  764. #define LIGHT_CH4_INVERSE 0
  765. // -----------------------------------------------------------------------------
  766. // V9261F
  767. // -----------------------------------------------------------------------------
  768. #elif defined(GENERIC_V9261F)
  769. // Info
  770. #define MANUFACTURER "GENERIC"
  771. #define DEVICE "V9261F"
  772. // V9261F
  773. #define POWER_PROVIDER POWER_PROVIDER_V9261F
  774. #define V9261F_PIN 2
  775. #define V9261F_PIN_INVERSE 1
  776. // -----------------------------------------------------------------------------
  777. // ECH1560
  778. // -----------------------------------------------------------------------------
  779. #elif defined(GENERIC_ECH1560)
  780. // Info
  781. #define MANUFACTURER "GENERIC"
  782. #define DEVICE "ECH1560"
  783. // ECH1560
  784. #define POWER_PROVIDER POWER_PROVIDER_ECH1560
  785. #define ECH1560_CLK_PIN 4
  786. #define ECH1560_MISO_PIN 5
  787. #define ECH1560_INVERTED 0
  788. // -----------------------------------------------------------------------------
  789. // ESPLive
  790. // https://github.com/ManCaveMade/ESP-Live
  791. // -----------------------------------------------------------------------------
  792. #elif defined(MANCAVEMADE_ESPLIVE)
  793. // Info
  794. #define MANUFACTURER "MANCAVEMADE"
  795. #define DEVICE "ESPLIVE"
  796. // Buttons
  797. #define BUTTON1_PIN 4
  798. #define BUTTON2_PIN 5
  799. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  800. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  801. #define BUTTON1_RELAY 1
  802. #define BUTTON2_RELAY 2
  803. // Relays
  804. #define RELAY1_PIN 12
  805. #define RELAY2_PIN 13
  806. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  807. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  808. // DB18B20
  809. #define DS18B20_SUPPORT 1
  810. #define DS18B20_PIN 2
  811. #define DS18B20_UPDATE_INTERVAL 5000
  812. #define DS18B20_UPDATE_ON_CHANGE 1.0
  813. // QuinLED
  814. // - http://blog.quindorian.org/2017/02/esp8266-led-lighting-quinled-v2-6-pcb.html/
  815. // -----------------------------------------------------------------------------
  816. #elif defined(INTERMITTECH_QUINLED)
  817. // Info
  818. #define MANUFACTURER "INTERMITTECH"
  819. #define DEVICE "QUINLED"
  820. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  821. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  822. #define DUMMY_RELAY_COUNT 1
  823. // LEDs
  824. #define LED1_PIN 5
  825. #define LED1_PIN_INVERSE 1
  826. // Channels
  827. #define LIGHT_CH1_PIN 0
  828. #define LIGHT_CH2_PIN 2
  829. #define LIGHT_CH1_INVERSE 0
  830. #define LIGHT_CH2_INVERSE 0
  831. // -----------------------------------------------------------------------------
  832. // Unknown hardware
  833. // -----------------------------------------------------------------------------
  834. #else
  835. #error "UNSUPPORTED HARDWARE!"
  836. #endif
  837. // -----------------------------------------------------------------------------
  838. // Default values
  839. // -----------------------------------------------------------------------------
  840. #ifndef BUTTON1_PRESS
  841. #define BUTTON1_PRESS BUTTON_MODE_NONE
  842. #endif
  843. #ifndef BUTTON2_PRESS
  844. #define BUTTON2_PRESS BUTTON_MODE_NONE
  845. #endif
  846. #ifndef BUTTON3_PRESS
  847. #define BUTTON3_PRESS BUTTON_MODE_NONE
  848. #endif
  849. #ifndef BUTTON4_PRESS
  850. #define BUTTON4_PRESS BUTTON_MODE_NONE
  851. #endif
  852. #ifndef BUTTON1_CLICK
  853. #define BUTTON1_CLICK BUTTON_MODE_TOGGLE
  854. #endif
  855. #ifndef BUTTON2_CLICK
  856. #define BUTTON2_CLICK BUTTON_MODE_TOGGLE
  857. #endif
  858. #ifndef BUTTON3_CLICK
  859. #define BUTTON3_CLICK BUTTON_MODE_TOGGLE
  860. #endif
  861. #ifndef BUTTON4_CLICK
  862. #define BUTTON4_CLICK BUTTON_MODE_TOGGLE
  863. #endif
  864. #ifndef BUTTON1_DBLCLICK
  865. #define BUTTON1_DBLCLICK BUTTON_MODE_AP
  866. #endif
  867. #ifndef BUTTON2_DBLCLICK
  868. #define BUTTON2_DBLCLICK BUTTON_MODE_NONE
  869. #endif
  870. #ifndef BUTTON3_DBLCLICK
  871. #define BUTTON3_DBLCLICK BUTTON_MODE_NONE
  872. #endif
  873. #ifndef BUTTON4_DBLCLICK
  874. #define BUTTON4_DBLCLICK BUTTON_MODE_NONE
  875. #endif
  876. #ifndef BUTTON1_LNGCLICK
  877. #define BUTTON1_LNGCLICK BUTTON_MODE_RESET
  878. #endif
  879. #ifndef BUTTON2_LNGCLICK
  880. #define BUTTON2_LNGCLICK BUTTON_MODE_NONE
  881. #endif
  882. #ifndef BUTTON3_LNGCLICK
  883. #define BUTTON3_LNGCLICK BUTTON_MODE_NONE
  884. #endif
  885. #ifndef BUTTON4_LNGCLICK
  886. #define BUTTON4_LNGCLICK BUTTON_MODE_NONE
  887. #endif
  888. #ifndef BUTTON1_LNGLNGCLICK
  889. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_FACTORY
  890. #endif
  891. #ifndef BUTTON2_LNGLNGCLICK
  892. #define BUTTON2_LNGLNGCLICK BUTTON_MODE_NONE
  893. #endif
  894. #ifndef BUTTON3_LNGLNGCLICK
  895. #define BUTTON3_LNGLNGCLICK BUTTON_MODE_NONE
  896. #endif
  897. #ifndef BUTTON4_LNGLNGCLICK
  898. #define BUTTON4_LNGLNGCLICK BUTTON_MODE_NONE
  899. #endif
  900. #ifndef BUTTON1_RELAY
  901. #define BUTTON1_RELAY 0
  902. #endif
  903. #ifndef BUTTON2_RELAY
  904. #define BUTTON2_RELAY 0
  905. #endif
  906. #ifndef BUTTON3_RELAY
  907. #define BUTTON3_RELAY 0
  908. #endif
  909. #ifndef BUTTON4_RELAY
  910. #define BUTTON4_RELAY 0
  911. #endif
  912. #ifndef RELAY1_RESET_PIN
  913. #define RELAY1_RESET_PIN 0
  914. #endif
  915. #ifndef RELAY2_RESET_PIN
  916. #define RELAY2_RESET_PIN 0
  917. #endif
  918. #ifndef RELAY3_RESET_PIN
  919. #define RELAY3_RESET_PIN 0
  920. #endif
  921. #ifndef RELAY4_RESET_PIN
  922. #define RELAY4_RESET_PIN 0
  923. #endif
  924. #ifndef RELAY1_DELAY_ON
  925. #define RELAY1_DELAY_ON 0
  926. #endif
  927. #ifndef RELAY2_DELAY_ON
  928. #define RELAY2_DELAY_ON 0
  929. #endif
  930. #ifndef RELAY3_DELAY_ON
  931. #define RELAY3_DELAY_ON 0
  932. #endif
  933. #ifndef RELAY4_DELAY_ON
  934. #define RELAY4_DELAY_ON 0
  935. #endif
  936. #ifndef RELAY1_DELAY_OFF
  937. #define RELAY1_DELAY_OFF 0
  938. #endif
  939. #ifndef RELAY2_DELAY_OFF
  940. #define RELAY2_DELAY_OFF 0
  941. #endif
  942. #ifndef RELAY3_DELAY_OFF
  943. #define RELAY3_DELAY_OFF 0
  944. #endif
  945. #ifndef RELAY4_DELAY_OFF
  946. #define RELAY4_DELAY_OFF 0
  947. #endif
  948. #ifndef RELAY1_LED
  949. #define RELAY1_LED 0
  950. #endif
  951. #ifndef RELAY2_LED
  952. #define RELAY2_LED 0
  953. #endif
  954. #ifndef RELAY3_LED
  955. #define RELAY3_LED 0
  956. #endif
  957. #ifndef RELAY4_LED
  958. #define RELAY4_LED 0
  959. #endif
  960. // Needed for ESP8285 boards under Windows using PlatformIO (?)
  961. #ifndef BUTTON_PUSHBUTTON
  962. #define BUTTON_PUSHBUTTON 0
  963. #define BUTTON_SWITCH 1
  964. #define BUTTON_DEFAULT_HIGH 2
  965. #define BUTTON_SET_PULLUP 4
  966. #endif
  967. // Does the board track the relay status?
  968. #ifndef TRACK_RELAY_STATUS
  969. #define TRACK_RELAY_STATUS 1
  970. #endif
  971. // Serial baudrate
  972. #ifndef SERIAL_BAUDRATE
  973. #define SERIAL_BAUDRATE 115200
  974. #endif
  975. // Relay providers
  976. #ifndef RELAY_PROVIDER
  977. #define RELAY_PROVIDER RELAY_PROVIDER_RELAY
  978. #endif
  979. // Light provider
  980. #ifndef LIGHT_PROVIDER
  981. #define LIGHT_PROVIDER LIGHT_PROVIDER_NONE
  982. #endif