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.

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