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.

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