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.

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