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.

1329 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. #define TRACK_RELAY_STATUS 0
  370. // Buttons
  371. #define BUTTON1_PIN 0
  372. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  373. // LEDs
  374. #define LED1_PIN 13
  375. #define LED1_PIN_INVERSE 1
  376. #elif defined(ITEAD_SONOFF_B1)
  377. // Info
  378. #define MANUFACTURER "ITEAD"
  379. #define DEVICE "SONOFF_B1"
  380. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  381. #define LIGHT_PROVIDER LIGHT_PROVIDER_MY92XX
  382. #define DUMMY_RELAY_COUNT 1
  383. // Light
  384. #define LIGHT_CHANNELS 5
  385. #define MY92XX_MODEL MY92XX_MODEL_MY9231
  386. #define MY92XX_CHIPS 2
  387. #define MY92XX_DI_PIN 12
  388. #define MY92XX_DCKI_PIN 14
  389. #define MY92XX_COMMAND MY92XX_COMMAND_DEFAULT
  390. #define MY92XX_MAPPING 4, 3, 5, 0, 1
  391. #elif defined(ITEAD_SONOFF_LED)
  392. // Info
  393. #define MANUFACTURER "ITEAD"
  394. #define DEVICE "SONOFF_LED"
  395. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  396. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  397. #define DUMMY_RELAY_COUNT 1
  398. // LEDs
  399. #define LED1_PIN 13
  400. #define LED1_PIN_INVERSE 1
  401. // Light
  402. #define LIGHT_CHANNELS 2
  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. // YJZK
  466. // -----------------------------------------------------------------------------
  467. #elif defined(YJZK_SWITCH_2CH)
  468. // Info
  469. #define MANUFACTURER "YJZK"
  470. #define DEVICE "SWITCH_2CH"
  471. // Buttons
  472. #define BUTTON1_PIN 0
  473. #define BUTTON2_PIN 9
  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 5
  481. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  482. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  483. // LEDs
  484. #define LED1_PIN 13
  485. #define LED1_PIN_INVERSE 0
  486. #define LED_WIFI 0
  487. // -----------------------------------------------------------------------------
  488. // Electrodragon boards
  489. // -----------------------------------------------------------------------------
  490. #elif defined(ELECTRODRAGON_WIFI_IOT)
  491. // Info
  492. #define MANUFACTURER "ELECTRODRAGON"
  493. #define DEVICE "WIFI_IOT"
  494. // Buttons
  495. #define BUTTON1_PIN 0
  496. #define BUTTON2_PIN 2
  497. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  498. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  499. #define BUTTON1_RELAY 1
  500. #define BUTTON2_RELAY 2
  501. // Relays
  502. #define RELAY1_PIN 12
  503. #define RELAY2_PIN 13
  504. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  505. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  506. // LEDs
  507. #define LED1_PIN 16
  508. #define LED1_PIN_INVERSE 0
  509. // -----------------------------------------------------------------------------
  510. // WorkChoice ecoPlug
  511. // -----------------------------------------------------------------------------
  512. #elif defined(WORKCHOICE_ECOPLUG)
  513. // Info
  514. #define MANUFACTURER "WORKCHOICE"
  515. #define DEVICE "ECOPLUG"
  516. // Buttons
  517. #define BUTTON1_PIN 13
  518. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  519. #define BUTTON1_RELAY 1
  520. // Relays
  521. #define RELAY1_PIN 15
  522. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  523. // LEDs
  524. #define LED1_PIN 2
  525. #define LED1_PIN_INVERSE 0
  526. // -----------------------------------------------------------------------------
  527. // AI Thinker
  528. // -----------------------------------------------------------------------------
  529. #elif defined(AITHINKER_AI_LIGHT)
  530. // Info
  531. #define MANUFACTURER "AITHINKER"
  532. #define DEVICE "AI_LIGHT"
  533. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  534. #define LIGHT_PROVIDER LIGHT_PROVIDER_MY92XX
  535. #define DUMMY_RELAY_COUNT 1
  536. // Light
  537. #define LIGHT_CHANNELS 4
  538. #define MY92XX_MODEL MY92XX_MODEL_MY9291
  539. #define MY92XX_CHIPS 1
  540. #define MY92XX_DI_PIN 13
  541. #define MY92XX_DCKI_PIN 15
  542. #define MY92XX_COMMAND MY92XX_COMMAND_DEFAULT
  543. #define MY92XX_MAPPING 0, 1, 2, 3
  544. // -----------------------------------------------------------------------------
  545. // LED Controller
  546. // -----------------------------------------------------------------------------
  547. #elif defined(MAGICHOME_LED_CONTROLLER)
  548. // Info
  549. #define MANUFACTURER "MAGICHOME"
  550. #define DEVICE "LED_CONTROLLER"
  551. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  552. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  553. #define DUMMY_RELAY_COUNT 1
  554. // LEDs
  555. #define LED1_PIN 2
  556. #define LED1_PIN_INVERSE 1
  557. // Light
  558. #define LIGHT_CHANNELS 4
  559. #define LIGHT_CH1_PIN 14 // RED
  560. #define LIGHT_CH2_PIN 5 // GREEN
  561. #define LIGHT_CH3_PIN 12 // BLUE
  562. #define LIGHT_CH4_PIN 13 // WHITE
  563. #define LIGHT_CH1_INVERSE 0
  564. #define LIGHT_CH2_INVERSE 0
  565. #define LIGHT_CH3_INVERSE 0
  566. #define LIGHT_CH4_INVERSE 0
  567. // IR
  568. #define IR_SUPPORT 1
  569. #define IR_PIN 4
  570. #define IR_BUTTON_SET 1
  571. #elif defined(MAGICHOME_LED_CONTROLLER_20)
  572. // Info
  573. #define MANUFACTURER "MAGICHOME"
  574. #define DEVICE "LED_CONTROLLER_20"
  575. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  576. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  577. #define DUMMY_RELAY_COUNT 1
  578. //#define LIGHT_PROVIDER_EXPERIMENTAL_RGB_ONLY_HSV_IR
  579. // LEDs
  580. #define LED1_PIN 2
  581. #define LED1_PIN_INVERSE 1
  582. // Light
  583. #define LIGHT_CHANNELS 4
  584. #define LIGHT_CH1_PIN 5 // RED
  585. #define LIGHT_CH2_PIN 12 // GREEN
  586. #define LIGHT_CH3_PIN 13 // BLUE
  587. #define LIGHT_CH4_PIN 15 // WHITE
  588. #define LIGHT_CH1_INVERSE 0
  589. #define LIGHT_CH2_INVERSE 0
  590. #define LIGHT_CH3_INVERSE 0
  591. #define LIGHT_CH4_INVERSE 0
  592. // IR
  593. #define IR_SUPPORT 1
  594. #define IR_PIN 4
  595. #define IR_BUTTON_SET 1
  596. // -----------------------------------------------------------------------------
  597. // HUACANXING H801 & H802
  598. // -----------------------------------------------------------------------------
  599. #elif defined(HUACANXING_H801)
  600. // Info
  601. #define MANUFACTURER "HUACANXING"
  602. #define DEVICE "H801"
  603. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  604. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  605. #define DUMMY_RELAY_COUNT 1
  606. // LEDs
  607. #define LED1_PIN 5
  608. #define LED1_PIN_INVERSE 1
  609. // Light
  610. #define LIGHT_CHANNELS 5
  611. #define LIGHT_CH1_PIN 15 // RED
  612. #define LIGHT_CH2_PIN 13 // GREEN
  613. #define LIGHT_CH3_PIN 12 // BLUE
  614. #define LIGHT_CH4_PIN 14 // WHITE1
  615. #define LIGHT_CH5_PIN 4 // WHITE2
  616. #define LIGHT_CH1_INVERSE 0
  617. #define LIGHT_CH2_INVERSE 0
  618. #define LIGHT_CH3_INVERSE 0
  619. #define LIGHT_CH4_INVERSE 0
  620. #define LIGHT_CH5_INVERSE 0
  621. #elif defined(HUACANXING_H802)
  622. // Info
  623. #define MANUFACTURER "HUACANXING"
  624. #define DEVICE "H802"
  625. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  626. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  627. #define DUMMY_RELAY_COUNT 1
  628. // Light
  629. #define LIGHT_CHANNELS 4
  630. #define LIGHT_CH1_PIN 12 // RED
  631. #define LIGHT_CH2_PIN 14 // GREEN
  632. #define LIGHT_CH3_PIN 13 // BLUE
  633. #define LIGHT_CH4_PIN 15 // WHITE
  634. #define LIGHT_CH1_INVERSE 0
  635. #define LIGHT_CH2_INVERSE 0
  636. #define LIGHT_CH3_INVERSE 0
  637. #define LIGHT_CH4_INVERSE 0
  638. // -----------------------------------------------------------------------------
  639. // Jan Goedeke Wifi Relay
  640. // https://github.com/JanGoe/esp8266-wifi-relay
  641. // -----------------------------------------------------------------------------
  642. #elif defined(JANGOE_WIFI_RELAY_NC)
  643. // Info
  644. #define MANUFACTURER "JANGOE"
  645. #define DEVICE "WIFI_RELAY_NC"
  646. // Buttons
  647. #define BUTTON1_PIN 12
  648. #define BUTTON2_PIN 13
  649. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  650. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  651. #define BUTTON1_RELAY 1
  652. #define BUTTON2_RELAY 2
  653. // Relays
  654. #define RELAY1_PIN 2
  655. #define RELAY2_PIN 14
  656. #define RELAY1_TYPE RELAY_TYPE_INVERSE
  657. #define RELAY2_TYPE RELAY_TYPE_INVERSE
  658. #elif defined(JANGOE_WIFI_RELAY_NO)
  659. // Info
  660. #define MANUFACTURER "JANGOE"
  661. #define DEVICE "WIFI_RELAY_NO"
  662. // Buttons
  663. #define BUTTON1_PIN 12
  664. #define BUTTON2_PIN 13
  665. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  666. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  667. #define BUTTON1_RELAY 1
  668. #define BUTTON2_RELAY 2
  669. // Relays
  670. #define RELAY1_PIN 2
  671. #define RELAY2_PIN 14
  672. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  673. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  674. // -----------------------------------------------------------------------------
  675. // Jorge García Wifi+Relays Board Kit
  676. // https://www.tindie.com/products/jorgegarciadev/wifi--relays-board-kit
  677. // https://github.com/jorgegarciadev/wifikit
  678. // -----------------------------------------------------------------------------
  679. #elif defined(JORGEGARCIA_WIFI_RELAYS)
  680. // Info
  681. #define MANUFACTURER "JORGEGARCIA"
  682. #define DEVICE "WIFI_RELAYS"
  683. // Relays
  684. #define RELAY1_PIN 0
  685. #define RELAY2_PIN 2
  686. #define RELAY1_TYPE RELAY_TYPE_INVERSE
  687. #define RELAY2_TYPE RELAY_TYPE_INVERSE
  688. // -----------------------------------------------------------------------------
  689. // WiFi MQTT Relay / Thermostat
  690. // -----------------------------------------------------------------------------
  691. #elif defined(OPENENERGYMONITOR_MQTT_RELAY)
  692. // Info
  693. #define MANUFACTURER "OPENENERGYMONITOR"
  694. #define DEVICE "MQTT_RELAY"
  695. // Buttons
  696. #define BUTTON1_PIN 0
  697. #define BUTTON1_RELAY 1
  698. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  699. // Relays
  700. #define RELAY1_PIN 12
  701. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  702. // LEDs
  703. #define LED1_PIN 16
  704. #define LED1_PIN_INVERSE 0
  705. // -----------------------------------------------------------------------------
  706. // WiOn 50055 Indoor Wi-Fi Wall Outlet & Tap
  707. // 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
  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-50055-Indoor-Wi-Fi-Wall-Tap-Monitor-Energy-Usage-Wireless-Smart-Switch-%2F263020837777
  709. // -----------------------------------------------------------------------------
  710. #elif defined(WION_50055)
  711. // Currently untested, does not support energy monitoring
  712. // Info
  713. #define MANUFACTURER "WION"
  714. #define DEVICE "50055"
  715. // Buttons
  716. #define BUTTON1_PIN 13
  717. #define BUTTON1_RELAY 1
  718. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  719. // Relays
  720. #define RELAY1_PIN 15
  721. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  722. // LEDs
  723. #define LED1_PIN 2
  724. #define LED1_PIN_INVERSE 0
  725. // -----------------------------------------------------------------------------
  726. // EX-Store Wifi Relay v3.1
  727. // https://ex-store.de/ESP8266-WiFi-Relay-V31
  728. // -----------------------------------------------------------------------------
  729. #elif defined(EXS_WIFI_RELAY_V31)
  730. // Untested
  731. // Info
  732. #define MANUFACTURER "EXS"
  733. #define DEVICE "WIFI_RELAY_V31"
  734. // Buttons
  735. #define BUTTON1_PIN 0
  736. #define BUTTON1_RELAY 1
  737. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  738. // Relays
  739. #define RELAY1_PIN 13
  740. #define RELAY1_TYPE RELAY_TYPE_LATCHED
  741. #define RELAY1_RESET_PIN 12
  742. // -----------------------------------------------------------------------------
  743. // V9261F
  744. // -----------------------------------------------------------------------------
  745. #elif defined(GENERIC_V9261F)
  746. // Info
  747. #define MANUFACTURER "GENERIC"
  748. #define DEVICE "V9261F"
  749. // V9261F
  750. #define POWER_PROVIDER POWER_PROVIDER_V9261F
  751. #define V9261F_PIN 2
  752. #define V9261F_PIN_INVERSE 1
  753. // -----------------------------------------------------------------------------
  754. // ECH1560
  755. // -----------------------------------------------------------------------------
  756. #elif defined(GENERIC_ECH1560)
  757. // Info
  758. #define MANUFACTURER "GENERIC"
  759. #define DEVICE "ECH1560"
  760. // ECH1560
  761. #define POWER_PROVIDER POWER_PROVIDER_ECH1560
  762. #define ECH1560_CLK_PIN 4
  763. #define ECH1560_MISO_PIN 5
  764. #define ECH1560_INVERTED 0
  765. // -----------------------------------------------------------------------------
  766. // ESPLive
  767. // https://github.com/ManCaveMade/ESP-Live
  768. // -----------------------------------------------------------------------------
  769. #elif defined(MANCAVEMADE_ESPLIVE)
  770. // Info
  771. #define MANUFACTURER "MANCAVEMADE"
  772. #define DEVICE "ESPLIVE"
  773. // Buttons
  774. #define BUTTON1_PIN 4
  775. #define BUTTON2_PIN 5
  776. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  777. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  778. #define BUTTON1_RELAY 1
  779. #define BUTTON2_RELAY 2
  780. // Relays
  781. #define RELAY1_PIN 12
  782. #define RELAY2_PIN 13
  783. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  784. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  785. // DB18B20
  786. #define DS18B20_SUPPORT 1
  787. #define DS18B20_PIN 2
  788. #define DS18B20_UPDATE_INTERVAL 5000
  789. #define DS18B20_UPDATE_ON_CHANGE 1.0
  790. // -----------------------------------------------------------------------------
  791. // QuinLED
  792. // http://blog.quindorian.org/2017/02/esp8266-led-lighting-quinled-v2-6-pcb.html
  793. // -----------------------------------------------------------------------------
  794. #elif defined(INTERMITTECH_QUINLED)
  795. // Info
  796. #define MANUFACTURER "INTERMITTECH"
  797. #define DEVICE "QUINLED"
  798. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  799. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  800. #define DUMMY_RELAY_COUNT 1
  801. // LEDs
  802. #define LED1_PIN 5
  803. #define LED1_PIN_INVERSE 1
  804. // Light
  805. #define LIGHT_CHANNELS 2
  806. #define LIGHT_CH1_PIN 0
  807. #define LIGHT_CH2_PIN 2
  808. #define LIGHT_CH1_INVERSE 0
  809. #define LIGHT_CH2_INVERSE 0
  810. // -----------------------------------------------------------------------------
  811. // Arilux AL-LC06
  812. // -----------------------------------------------------------------------------
  813. #elif defined(ARILUX_AL_LC06)
  814. // Info
  815. #define MANUFACTURER "ARILUX"
  816. #define DEVICE "AL_LC06"
  817. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  818. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  819. #define DUMMY_RELAY_COUNT 1
  820. // Light
  821. #define LIGHT_CHANNELS 5
  822. #define LIGHT_CH1_PIN 14 // RED
  823. #define LIGHT_CH2_PIN 12 // GREEN
  824. #define LIGHT_CH3_PIN 13 // BLUE
  825. #define LIGHT_CH4_PIN 15 // WHITE1
  826. #define LIGHT_CH5_PIN 5 // WHITE2
  827. #define LIGHT_CH1_INVERSE 0
  828. #define LIGHT_CH2_INVERSE 0
  829. #define LIGHT_CH3_INVERSE 0
  830. #define LIGHT_CH4_INVERSE 0
  831. #define LIGHT_CH5_INVERSE 0
  832. #elif defined(ARILUX_E27)
  833. // Info
  834. #define MANUFACTURER "ARILUX"
  835. #define DEVICE "E27"
  836. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  837. #define LIGHT_PROVIDER LIGHT_PROVIDER_MY92XX
  838. #define DUMMY_RELAY_COUNT 1
  839. // Light
  840. #define LIGHT_CHANNELS 4
  841. #define MY92XX_MODEL MY92XX_MODEL_MY9291
  842. #define MY92XX_CHIPS 1
  843. #define MY92XX_DI_PIN 13
  844. #define MY92XX_DCKI_PIN 15
  845. #define MY92XX_COMMAND MY92XX_COMMAND_DEFAULT
  846. #define MY92XX_MAPPING 0, 1, 2, 3
  847. // -----------------------------------------------------------------------------
  848. // XENON SM-PW701U
  849. // -----------------------------------------------------------------------------
  850. #elif defined(XENON_SM_PW702U)
  851. // Info
  852. #define MANUFACTURER "XENON"
  853. #define DEVICE "SM_PW702U"
  854. // Buttons
  855. #define BUTTON1_PIN 13
  856. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  857. #define BUTTON1_RELAY 1
  858. // Relays
  859. #define RELAY1_PIN 12
  860. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  861. // LEDs
  862. #define LED1_PIN 4
  863. #define LED1_PIN_INVERSE 1
  864. // -----------------------------------------------------------------------------
  865. // AUTHOMETION LYT8266
  866. // https://authometion.com/shop/en/home/13-lyt8266.html
  867. // -----------------------------------------------------------------------------
  868. #elif defined(AUTHOMETION_LYT8266)
  869. // Info
  870. #define MANUFACTURER "AUTHOMETION"
  871. #define DEVICE "LYT8266"
  872. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  873. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  874. #define DUMMY_RELAY_COUNT 1
  875. // Light
  876. #define LIGHT_CHANNELS 4
  877. #define LIGHT_CH1_PIN 13 // RED
  878. #define LIGHT_CH2_PIN 12 // GREEN
  879. #define LIGHT_CH3_PIN 14 // BLUE
  880. #define LIGHT_CH4_PIN 2 // WHITE
  881. #define LIGHT_CH1_INVERSE 0
  882. #define LIGHT_CH2_INVERSE 0
  883. #define LIGHT_CH3_INVERSE 0
  884. #define LIGHT_CH4_INVERSE 0
  885. #define LIGHT_ENABLE_PIN 15
  886. // -----------------------------------------------------------------------------
  887. // Unknown hardware
  888. // -----------------------------------------------------------------------------
  889. #else
  890. #error "UNSUPPORTED HARDWARE!"
  891. #endif
  892. // -----------------------------------------------------------------------------
  893. // Default values
  894. // -----------------------------------------------------------------------------
  895. #ifndef BUTTON1_PRESS
  896. #define BUTTON1_PRESS BUTTON_MODE_NONE
  897. #endif
  898. #ifndef BUTTON2_PRESS
  899. #define BUTTON2_PRESS BUTTON_MODE_NONE
  900. #endif
  901. #ifndef BUTTON3_PRESS
  902. #define BUTTON3_PRESS BUTTON_MODE_NONE
  903. #endif
  904. #ifndef BUTTON4_PRESS
  905. #define BUTTON4_PRESS BUTTON_MODE_NONE
  906. #endif
  907. #ifndef BUTTON1_CLICK
  908. #define BUTTON1_CLICK BUTTON_MODE_TOGGLE
  909. #endif
  910. #ifndef BUTTON2_CLICK
  911. #define BUTTON2_CLICK BUTTON_MODE_TOGGLE
  912. #endif
  913. #ifndef BUTTON3_CLICK
  914. #define BUTTON3_CLICK BUTTON_MODE_TOGGLE
  915. #endif
  916. #ifndef BUTTON4_CLICK
  917. #define BUTTON4_CLICK BUTTON_MODE_TOGGLE
  918. #endif
  919. #ifndef BUTTON1_DBLCLICK
  920. #define BUTTON1_DBLCLICK BUTTON_MODE_AP
  921. #endif
  922. #ifndef BUTTON2_DBLCLICK
  923. #define BUTTON2_DBLCLICK BUTTON_MODE_NONE
  924. #endif
  925. #ifndef BUTTON3_DBLCLICK
  926. #define BUTTON3_DBLCLICK BUTTON_MODE_NONE
  927. #endif
  928. #ifndef BUTTON4_DBLCLICK
  929. #define BUTTON4_DBLCLICK BUTTON_MODE_NONE
  930. #endif
  931. #ifndef BUTTON1_LNGCLICK
  932. #define BUTTON1_LNGCLICK BUTTON_MODE_RESET
  933. #endif
  934. #ifndef BUTTON2_LNGCLICK
  935. #define BUTTON2_LNGCLICK BUTTON_MODE_NONE
  936. #endif
  937. #ifndef BUTTON3_LNGCLICK
  938. #define BUTTON3_LNGCLICK BUTTON_MODE_NONE
  939. #endif
  940. #ifndef BUTTON4_LNGCLICK
  941. #define BUTTON4_LNGCLICK BUTTON_MODE_NONE
  942. #endif
  943. #ifndef BUTTON1_LNGLNGCLICK
  944. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_FACTORY
  945. #endif
  946. #ifndef BUTTON2_LNGLNGCLICK
  947. #define BUTTON2_LNGLNGCLICK BUTTON_MODE_NONE
  948. #endif
  949. #ifndef BUTTON3_LNGLNGCLICK
  950. #define BUTTON3_LNGLNGCLICK BUTTON_MODE_NONE
  951. #endif
  952. #ifndef BUTTON4_LNGLNGCLICK
  953. #define BUTTON4_LNGLNGCLICK BUTTON_MODE_NONE
  954. #endif
  955. #ifndef BUTTON1_RELAY
  956. #define BUTTON1_RELAY 0
  957. #endif
  958. #ifndef BUTTON2_RELAY
  959. #define BUTTON2_RELAY 0
  960. #endif
  961. #ifndef BUTTON3_RELAY
  962. #define BUTTON3_RELAY 0
  963. #endif
  964. #ifndef BUTTON4_RELAY
  965. #define BUTTON4_RELAY 0
  966. #endif
  967. #ifndef RELAY1_RESET_PIN
  968. #define RELAY1_RESET_PIN 0
  969. #endif
  970. #ifndef RELAY2_RESET_PIN
  971. #define RELAY2_RESET_PIN 0
  972. #endif
  973. #ifndef RELAY3_RESET_PIN
  974. #define RELAY3_RESET_PIN 0
  975. #endif
  976. #ifndef RELAY4_RESET_PIN
  977. #define RELAY4_RESET_PIN 0
  978. #endif
  979. #ifndef RELAY1_DELAY_ON
  980. #define RELAY1_DELAY_ON 0
  981. #endif
  982. #ifndef RELAY2_DELAY_ON
  983. #define RELAY2_DELAY_ON 0
  984. #endif
  985. #ifndef RELAY3_DELAY_ON
  986. #define RELAY3_DELAY_ON 0
  987. #endif
  988. #ifndef RELAY4_DELAY_ON
  989. #define RELAY4_DELAY_ON 0
  990. #endif
  991. #ifndef RELAY1_DELAY_OFF
  992. #define RELAY1_DELAY_OFF 0
  993. #endif
  994. #ifndef RELAY2_DELAY_OFF
  995. #define RELAY2_DELAY_OFF 0
  996. #endif
  997. #ifndef RELAY3_DELAY_OFF
  998. #define RELAY3_DELAY_OFF 0
  999. #endif
  1000. #ifndef RELAY4_DELAY_OFF
  1001. #define RELAY4_DELAY_OFF 0
  1002. #endif
  1003. #ifndef RELAY1_LED
  1004. #define RELAY1_LED 0
  1005. #endif
  1006. #ifndef RELAY2_LED
  1007. #define RELAY2_LED 0
  1008. #endif
  1009. #ifndef RELAY3_LED
  1010. #define RELAY3_LED 0
  1011. #endif
  1012. #ifndef RELAY4_LED
  1013. #define RELAY4_LED 0
  1014. #endif
  1015. // Needed for ESP8285 boards under Windows using PlatformIO (?)
  1016. #ifndef BUTTON_PUSHBUTTON
  1017. #define BUTTON_PUSHBUTTON 0
  1018. #define BUTTON_SWITCH 1
  1019. #define BUTTON_DEFAULT_HIGH 2
  1020. #define BUTTON_SET_PULLUP 4
  1021. #endif
  1022. // Does the board track the relay status?
  1023. #ifndef TRACK_RELAY_STATUS
  1024. #define TRACK_RELAY_STATUS 1
  1025. #endif
  1026. // Serial baudrate
  1027. #ifndef SERIAL_BAUDRATE
  1028. #define SERIAL_BAUDRATE 115200
  1029. #endif
  1030. // Relay providers
  1031. #ifndef RELAY_PROVIDER
  1032. #define RELAY_PROVIDER RELAY_PROVIDER_RELAY
  1033. #endif
  1034. // Light provider
  1035. #ifndef LIGHT_PROVIDER
  1036. #define LIGHT_PROVIDER LIGHT_PROVIDER_NONE
  1037. #endif