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.

1287 lines
37 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_2_0)
  540. // Info
  541. #define MANUFACTURER "MAGICHOME"
  542. #define DEVICE "LED_CONTROLLER_2_0"
  543. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  544. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  545. #define DUMMY_RELAY_COUNT 1
  546. // Channels
  547. #define LIGHT_CH1_PIN 5 // RED
  548. #define LIGHT_CH2_PIN 12 // GREEN
  549. #define LIGHT_CH3_PIN 13 // BLUE
  550. #define LIGHT_CH4_PIN 15 // WHITE
  551. #define LIGHT_CH1_INVERSE 0
  552. #define LIGHT_CH2_INVERSE 0
  553. #define LIGHT_CH3_INVERSE 0
  554. #define LIGHT_CH4_INVERSE 0
  555. // -----------------------------------------------------------------------------
  556. // LED Controller With IR
  557. // -----------------------------------------------------------------------------
  558. #elif defined(MAGICHOME_LED_CONTROLLER_IR)
  559. // Info
  560. #define MANUFACTURER "MAGICHOME"
  561. #define DEVICE "LED_CONTROLLER_IR"
  562. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  563. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  564. #define DUMMY_RELAY_COUNT 1
  565. // LEDs
  566. #define LED1_PIN 2
  567. #define LED1_PIN_INVERSE 1
  568. // Channels (for board version 2.0)
  569. #define LIGHT_CH1_PIN 5 // RED
  570. #define LIGHT_CH2_PIN 12 // GREEN
  571. #define LIGHT_CH3_PIN 13 // BLUE
  572. //#define LIGHT_CH4_PIN 14 // WHITE ?
  573. #define LIGHT_IR_PIN 4 // IR LED
  574. #define LIGHT_CH1_INVERSE 0
  575. #define LIGHT_CH2_INVERSE 0
  576. #define LIGHT_CH3_INVERSE 0
  577. #define LIGHT_CH4_INVERSE 0
  578. #define LIGHT_PROVIDER_EXPERIMENTAL_RGB_ONLY_HSV_IR 1
  579. // 24 Buttons Set of the IR Remote
  580. #ifndef IR_BUTTONS_SET
  581. #define IR_BUTTONS_SET 1
  582. #endif
  583. //Remote Buttons SET 1 (for the original Remote shipped with the controller)
  584. #if IR_BUTTONS_SET == 1
  585. #define IR_BUTTON_0 0xFF906F // Brightness +
  586. #define IR_BUTTON_1 0xFFB847 // Brightness -
  587. #define IR_BUTTON_2 0xFFF807 // OFF
  588. #define IR_BUTTON_3 0xFFB04F // ON
  589. #define IR_BUTTON_4 0xFF9867 // RED
  590. #define IR_BUTTON_5 0xFFD827 // GREEN
  591. #define IR_BUTTON_6 0xFF8877 // BLUE
  592. #define IR_BUTTON_7 0xFFA857 // WHITE
  593. #define IR_BUTTON_8 0xFFE817 // "Red" 1
  594. #define IR_BUTTON_9 0xFF48B7 // "Green" 1
  595. #define IR_BUTTON_10 0xFF6897 // "Blue" 1
  596. #define IR_BUTTON_11 0xFFB24D // FLASH Mode
  597. #define IR_BUTTON_12 0xFF02FD // "Red" 2
  598. #define IR_BUTTON_13 0xFF32CD // "Green" 2
  599. #define IR_BUTTON_14 0xFF20DF // "Blue" 2
  600. #define IR_BUTTON_15 0xFF00FF // STROBE Mode
  601. #define IR_BUTTON_16 0xFF50AF // "Red" 3
  602. #define IR_BUTTON_17 0xFF7887 // "Green" 3
  603. #define IR_BUTTON_18 0xFF708F // "Blue" 3
  604. #define IR_BUTTON_19 0xFF58A7 // FADE Mode
  605. #define IR_BUTTON_20 0xFF38C7 // "Red" 4
  606. #define IR_BUTTON_21 0xFF28D7 // "Green" 4
  607. #define IR_BUTTON_22 0xFFF00F // "Blue" 4
  608. #define IR_BUTTON_23 0xFF30CF // SMOOTH Mode
  609. #endif
  610. //Remote Buttons SET 2 (another identical IR Remote shipped with another controller)
  611. #if IR_BUTTONS_SET == 2
  612. #define IR_BUTTON_0 0xFF00FF // Brightness +
  613. #define IR_BUTTON_1 0xFF807F // Brightness -
  614. #define IR_BUTTON_2 0xFF40BF // OFF
  615. #define IR_BUTTON_3 0xFFC03F // ON
  616. #define IR_BUTTON_4 0xFF20DF // RED
  617. #define IR_BUTTON_5 0xFFA05F // GREEN
  618. #define IR_BUTTON_6 0xFF609F // BLUE
  619. #define IR_BUTTON_7 0xFFE01F // WHITE
  620. #define IR_BUTTON_8 0xFF10EF // "Red" 1
  621. #define IR_BUTTON_9 0xFF906F // "Green" 1
  622. #define IR_BUTTON_10 0xFF50AF // "Blue" 1
  623. #define IR_BUTTON_11 0xFFD02F // FLASH Mode
  624. #define IR_BUTTON_12 0xFF30CF // "Red" 2
  625. #define IR_BUTTON_13 0xFFB04F // "Green" 2
  626. #define IR_BUTTON_14 0xFF708F // "Blue" 2
  627. #define IR_BUTTON_15 0xFFF00F // STROBE Mode
  628. #define IR_BUTTON_16 0xFF08F7 // "Red" 3
  629. #define IR_BUTTON_17 0xFF8877 // "Green" 3
  630. #define IR_BUTTON_18 0xFF48B7 // "Blue" 3
  631. #define IR_BUTTON_19 0xFFC837 // FADE Mode
  632. #define IR_BUTTON_20 0xFF28D7 // "Red" 4
  633. #define IR_BUTTON_21 0xFFA857 // "Green" 4
  634. #define IR_BUTTON_22 0xFF6897 // "Blue" 4
  635. #define IR_BUTTON_23 0xFFE817 // SMOOTH Mode
  636. #endif
  637. // -----------------------------------------------------------------------------
  638. // HUACANXING H801
  639. // -----------------------------------------------------------------------------
  640. #elif defined(HUACANXING_H801)
  641. // Info
  642. #define MANUFACTURER "HUACANXING"
  643. #define DEVICE "H801"
  644. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  645. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  646. #define DUMMY_RELAY_COUNT 1
  647. // LEDs
  648. #define LED1_PIN 5
  649. #define LED1_PIN_INVERSE 1
  650. // Channels
  651. #define LIGHT_CH1_PIN 15 // RED
  652. #define LIGHT_CH2_PIN 13 // GREEN
  653. #define LIGHT_CH3_PIN 12 // BLUE
  654. #define LIGHT_CH4_PIN 14 // WHITE1
  655. #define LIGHT_CH5_PIN 4 // WHITE2
  656. #define LIGHT_CH1_INVERSE 0
  657. #define LIGHT_CH2_INVERSE 0
  658. #define LIGHT_CH3_INVERSE 0
  659. #define LIGHT_CH4_INVERSE 0
  660. #define LIGHT_CH5_INVERSE 0
  661. // -----------------------------------------------------------------------------
  662. // Jan Goedeke Wifi Relay
  663. // https://github.com/JanGoe/esp8266-wifi-relay
  664. // -----------------------------------------------------------------------------
  665. #elif defined(JANGOE_WIFI_RELAY_NC)
  666. // Info
  667. #define MANUFACTURER "JANGOE"
  668. #define DEVICE "WIFI_RELAY_NC"
  669. // Buttons
  670. #define BUTTON1_PIN 12
  671. #define BUTTON2_PIN 13
  672. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  673. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  674. #define BUTTON1_RELAY 1
  675. #define BUTTON2_RELAY 2
  676. // Relays
  677. #define RELAY1_PIN 2
  678. #define RELAY2_PIN 14
  679. #define RELAY1_TYPE RELAY_TYPE_INVERSE
  680. #define RELAY2_TYPE RELAY_TYPE_INVERSE
  681. #elif defined(JANGOE_WIFI_RELAY_NO)
  682. // Info
  683. #define MANUFACTURER "JANGOE"
  684. #define DEVICE "WIFI_RELAY_NO"
  685. // Buttons
  686. #define BUTTON1_PIN 12
  687. #define BUTTON2_PIN 13
  688. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  689. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  690. #define BUTTON1_RELAY 1
  691. #define BUTTON2_RELAY 2
  692. // Relays
  693. #define RELAY1_PIN 2
  694. #define RELAY2_PIN 14
  695. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  696. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  697. // -----------------------------------------------------------------------------
  698. // Jorge García Wifi+Relays Board Kit
  699. // https://www.tindie.com/products/jorgegarciadev/wifi--relays-board-kit
  700. // https://github.com/jorgegarciadev/wifikit
  701. // -----------------------------------------------------------------------------
  702. #elif defined(JORGEGARCIA_WIFI_RELAYS)
  703. // Info
  704. #define MANUFACTURER "JORGEGARCIA"
  705. #define DEVICE "WIFI_RELAYS"
  706. // Relays
  707. #define RELAY1_PIN 0
  708. #define RELAY2_PIN 2
  709. #define RELAY1_TYPE RELAY_TYPE_INVERSE
  710. #define RELAY2_TYPE RELAY_TYPE_INVERSE
  711. // -----------------------------------------------------------------------------
  712. // WiFi MQTT Relay / Thermostat
  713. // -----------------------------------------------------------------------------
  714. #elif defined(OPENENERGYMONITOR_MQTT_RELAY)
  715. // Info
  716. #define MANUFACTURER "OPENENERGYMONITOR"
  717. #define DEVICE "MQTT_RELAY"
  718. // Buttons
  719. #define BUTTON1_PIN 0
  720. #define BUTTON1_RELAY 1
  721. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  722. // Relays
  723. #define RELAY1_PIN 12
  724. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  725. // LEDs
  726. #define LED1_PIN 16
  727. #define LED1_PIN_INVERSE 0
  728. // -----------------------------------------------------------------------------
  729. // WiOn 50055 Indoor Wi-Fi Wall Outlet & Tap
  730. // 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
  731. // 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
  732. // -----------------------------------------------------------------------------
  733. #elif defined(WION_50055)
  734. // Currently untested, does not support energy monitoring
  735. // Info
  736. #define MANUFACTURER "WION"
  737. #define DEVICE "50055"
  738. // Buttons
  739. #define BUTTON1_PIN 13
  740. #define BUTTON1_RELAY 1
  741. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  742. // Relays
  743. #define RELAY1_PIN 15
  744. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  745. // LEDs
  746. #define LED1_PIN 2
  747. #define LED1_PIN_INVERSE 0
  748. // -----------------------------------------------------------------------------
  749. // EX-Store Wifi Relay v3.1
  750. // https://ex-store.de/ESP8266-WiFi-Relay-V31
  751. // -----------------------------------------------------------------------------
  752. #elif defined(EXS_WIFI_RELAY_V31)
  753. // Untested
  754. // Info
  755. #define MANUFACTURER "EXS"
  756. #define DEVICE "WIFI_RELAY_V31"
  757. // Buttons
  758. #define BUTTON1_PIN 0
  759. #define BUTTON1_RELAY 1
  760. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  761. // Relays
  762. #define RELAY1_PIN 13
  763. #define RELAY1_TYPE RELAY_TYPE_LATCHED
  764. #define RELAY1_RESET_PIN 12
  765. // -----------------------------------------------------------------------------
  766. // HUACANXING H802
  767. // -----------------------------------------------------------------------------
  768. #elif defined(HUACANXING_H802)
  769. // Info
  770. #define MANUFACTURER "HUACANXING"
  771. #define DEVICE "H802"
  772. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  773. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  774. #define DUMMY_RELAY_COUNT 1
  775. // Channels
  776. #define LIGHT_CH1_PIN 12 // RED
  777. #define LIGHT_CH2_PIN 14 // GREEN
  778. #define LIGHT_CH3_PIN 13 // BLUE
  779. #define LIGHT_CH4_PIN 15 // WHITE
  780. #define LIGHT_CH1_INVERSE 0
  781. #define LIGHT_CH2_INVERSE 0
  782. #define LIGHT_CH3_INVERSE 0
  783. #define LIGHT_CH4_INVERSE 0
  784. // -----------------------------------------------------------------------------
  785. // V9261F
  786. // -----------------------------------------------------------------------------
  787. #elif defined(GENERIC_V9261F)
  788. // Info
  789. #define MANUFACTURER "GENERIC"
  790. #define DEVICE "V9261F"
  791. // V9261F
  792. #define POWER_PROVIDER POWER_PROVIDER_V9261F
  793. #define V9261F_PIN 2
  794. #define V9261F_PIN_INVERSE 1
  795. // -----------------------------------------------------------------------------
  796. // ECH1560
  797. // -----------------------------------------------------------------------------
  798. #elif defined(GENERIC_ECH1560)
  799. // Info
  800. #define MANUFACTURER "GENERIC"
  801. #define DEVICE "ECH1560"
  802. // ECH1560
  803. #define POWER_PROVIDER POWER_PROVIDER_ECH1560
  804. #define ECH1560_CLK_PIN 4
  805. #define ECH1560_MISO_PIN 5
  806. #define ECH1560_INVERTED 0
  807. // -----------------------------------------------------------------------------
  808. // ESPLive
  809. // https://github.com/ManCaveMade/ESP-Live
  810. // -----------------------------------------------------------------------------
  811. #elif defined(MANCAVEMADE_ESPLIVE)
  812. // Info
  813. #define MANUFACTURER "MANCAVEMADE"
  814. #define DEVICE "ESPLIVE"
  815. // Buttons
  816. #define BUTTON1_PIN 4
  817. #define BUTTON2_PIN 5
  818. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  819. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  820. #define BUTTON1_RELAY 1
  821. #define BUTTON2_RELAY 2
  822. // Relays
  823. #define RELAY1_PIN 12
  824. #define RELAY2_PIN 13
  825. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  826. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  827. // DB18B20
  828. #define DS18B20_SUPPORT 1
  829. #define DS18B20_PIN 2
  830. #define DS18B20_UPDATE_INTERVAL 5000
  831. #define DS18B20_UPDATE_ON_CHANGE 1.0
  832. // QuinLED
  833. // - http://blog.quindorian.org/2017/02/esp8266-led-lighting-quinled-v2-6-pcb.html/
  834. // -----------------------------------------------------------------------------
  835. #elif defined(INTERMITTECH_QUINLED)
  836. // Info
  837. #define MANUFACTURER "INTERMITTECH"
  838. #define DEVICE "QUINLED"
  839. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  840. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  841. #define DUMMY_RELAY_COUNT 1
  842. // LEDs
  843. #define LED1_PIN 5
  844. #define LED1_PIN_INVERSE 1
  845. // Channels
  846. #define LIGHT_CH1_PIN 0
  847. #define LIGHT_CH2_PIN 2
  848. #define LIGHT_CH1_INVERSE 0
  849. #define LIGHT_CH2_INVERSE 0
  850. // -----------------------------------------------------------------------------
  851. // Unknown hardware
  852. // -----------------------------------------------------------------------------
  853. #else
  854. #error "UNSUPPORTED HARDWARE!"
  855. #endif
  856. // -----------------------------------------------------------------------------
  857. // Default values
  858. // -----------------------------------------------------------------------------
  859. #ifndef BUTTON1_PRESS
  860. #define BUTTON1_PRESS BUTTON_MODE_NONE
  861. #endif
  862. #ifndef BUTTON2_PRESS
  863. #define BUTTON2_PRESS BUTTON_MODE_NONE
  864. #endif
  865. #ifndef BUTTON3_PRESS
  866. #define BUTTON3_PRESS BUTTON_MODE_NONE
  867. #endif
  868. #ifndef BUTTON4_PRESS
  869. #define BUTTON4_PRESS BUTTON_MODE_NONE
  870. #endif
  871. #ifndef BUTTON1_CLICK
  872. #define BUTTON1_CLICK BUTTON_MODE_TOGGLE
  873. #endif
  874. #ifndef BUTTON2_CLICK
  875. #define BUTTON2_CLICK BUTTON_MODE_TOGGLE
  876. #endif
  877. #ifndef BUTTON3_CLICK
  878. #define BUTTON3_CLICK BUTTON_MODE_TOGGLE
  879. #endif
  880. #ifndef BUTTON4_CLICK
  881. #define BUTTON4_CLICK BUTTON_MODE_TOGGLE
  882. #endif
  883. #ifndef BUTTON1_DBLCLICK
  884. #define BUTTON1_DBLCLICK BUTTON_MODE_AP
  885. #endif
  886. #ifndef BUTTON2_DBLCLICK
  887. #define BUTTON2_DBLCLICK BUTTON_MODE_NONE
  888. #endif
  889. #ifndef BUTTON3_DBLCLICK
  890. #define BUTTON3_DBLCLICK BUTTON_MODE_NONE
  891. #endif
  892. #ifndef BUTTON4_DBLCLICK
  893. #define BUTTON4_DBLCLICK BUTTON_MODE_NONE
  894. #endif
  895. #ifndef BUTTON1_LNGCLICK
  896. #define BUTTON1_LNGCLICK BUTTON_MODE_RESET
  897. #endif
  898. #ifndef BUTTON2_LNGCLICK
  899. #define BUTTON2_LNGCLICK BUTTON_MODE_NONE
  900. #endif
  901. #ifndef BUTTON3_LNGCLICK
  902. #define BUTTON3_LNGCLICK BUTTON_MODE_NONE
  903. #endif
  904. #ifndef BUTTON4_LNGCLICK
  905. #define BUTTON4_LNGCLICK BUTTON_MODE_NONE
  906. #endif
  907. #ifndef BUTTON1_LNGLNGCLICK
  908. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_FACTORY
  909. #endif
  910. #ifndef BUTTON2_LNGLNGCLICK
  911. #define BUTTON2_LNGLNGCLICK BUTTON_MODE_NONE
  912. #endif
  913. #ifndef BUTTON3_LNGLNGCLICK
  914. #define BUTTON3_LNGLNGCLICK BUTTON_MODE_NONE
  915. #endif
  916. #ifndef BUTTON4_LNGLNGCLICK
  917. #define BUTTON4_LNGLNGCLICK BUTTON_MODE_NONE
  918. #endif
  919. #ifndef BUTTON1_RELAY
  920. #define BUTTON1_RELAY 0
  921. #endif
  922. #ifndef BUTTON2_RELAY
  923. #define BUTTON2_RELAY 0
  924. #endif
  925. #ifndef BUTTON3_RELAY
  926. #define BUTTON3_RELAY 0
  927. #endif
  928. #ifndef BUTTON4_RELAY
  929. #define BUTTON4_RELAY 0
  930. #endif
  931. #ifndef RELAY1_RESET_PIN
  932. #define RELAY1_RESET_PIN 0
  933. #endif
  934. #ifndef RELAY2_RESET_PIN
  935. #define RELAY2_RESET_PIN 0
  936. #endif
  937. #ifndef RELAY3_RESET_PIN
  938. #define RELAY3_RESET_PIN 0
  939. #endif
  940. #ifndef RELAY4_RESET_PIN
  941. #define RELAY4_RESET_PIN 0
  942. #endif
  943. #ifndef RELAY1_DELAY_ON
  944. #define RELAY1_DELAY_ON 0
  945. #endif
  946. #ifndef RELAY2_DELAY_ON
  947. #define RELAY2_DELAY_ON 0
  948. #endif
  949. #ifndef RELAY3_DELAY_ON
  950. #define RELAY3_DELAY_ON 0
  951. #endif
  952. #ifndef RELAY4_DELAY_ON
  953. #define RELAY4_DELAY_ON 0
  954. #endif
  955. #ifndef RELAY1_DELAY_OFF
  956. #define RELAY1_DELAY_OFF 0
  957. #endif
  958. #ifndef RELAY2_DELAY_OFF
  959. #define RELAY2_DELAY_OFF 0
  960. #endif
  961. #ifndef RELAY3_DELAY_OFF
  962. #define RELAY3_DELAY_OFF 0
  963. #endif
  964. #ifndef RELAY4_DELAY_OFF
  965. #define RELAY4_DELAY_OFF 0
  966. #endif
  967. #ifndef RELAY1_LED
  968. #define RELAY1_LED 0
  969. #endif
  970. #ifndef RELAY2_LED
  971. #define RELAY2_LED 0
  972. #endif
  973. #ifndef RELAY3_LED
  974. #define RELAY3_LED 0
  975. #endif
  976. #ifndef RELAY4_LED
  977. #define RELAY4_LED 0
  978. #endif
  979. // Needed for ESP8285 boards under Windows using PlatformIO (?)
  980. #ifndef BUTTON_PUSHBUTTON
  981. #define BUTTON_PUSHBUTTON 0
  982. #define BUTTON_SWITCH 1
  983. #define BUTTON_DEFAULT_HIGH 2
  984. #define BUTTON_SET_PULLUP 4
  985. #endif
  986. // Does the board track the relay status?
  987. #ifndef TRACK_RELAY_STATUS
  988. #define TRACK_RELAY_STATUS 1
  989. #endif
  990. // Serial baudrate
  991. #ifndef SERIAL_BAUDRATE
  992. #define SERIAL_BAUDRATE 115200
  993. #endif
  994. // Relay providers
  995. #ifndef RELAY_PROVIDER
  996. #define RELAY_PROVIDER RELAY_PROVIDER_RELAY
  997. #endif
  998. // Light provider
  999. #ifndef LIGHT_PROVIDER
  1000. #define LIGHT_PROVIDER LIGHT_PROVIDER_NONE
  1001. #endif