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.

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