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.

1324 lines
38 KiB

7 years ago
7 years ago
  1. // -----------------------------------------------------------------------------
  2. // Configuration HELP
  3. // -----------------------------------------------------------------------------
  4. //
  5. // MANUFACTURER: Name of the manufacturer of the board ("string")
  6. // DEVICE: Name of the device ("string")
  7. // BUTTON#_PIN: GPIO for the n-th button (1-based, up to 4 buttons)
  8. // BUTTON#_RELAY: Relay number that will be bind to the n-th button (1-based)
  9. // BUTTON#_MODE: A mask of options (BUTTON_PUSHBUTTON and BUTTON_SWITCH cannot be together)
  10. // - BUTTON_PUSHBUTTON: button event is fired when released
  11. // - BUTTON_SWITCH: button event is fired when pressed or released
  12. // - BUTTON_DEFAULT_HIGH: there is a pull up in place
  13. // - BUTTON_SET_PULLUP: set pullup by software
  14. // RELAY#_PIN: GPIO for the n-th relay (1-based, up to 4 relays)
  15. // RELAY#_TYPE: Relay can be RELAY_TYPE_NORMAL, RELAY_TYPE_INVERSE or RELAY_TYPE_LATCHED
  16. // RELAY#_LED: LED number that will be bind to the n-th relay (1-based)
  17. // LED#_PIN: GPIO for the n-th LED (1-based, up to 4 LEDs)
  18. // LED#_PIN_INVERSE: LED has inversed logic (lit when pulled down)
  19. //
  20. // Besides, other hardware specific information should be stated here
  21. // -----------------------------------------------------------------------------
  22. // Development boards
  23. // -----------------------------------------------------------------------------
  24. #if defined(NODEMCU_LOLIN)
  25. // Info
  26. #define MANUFACTURER "NODEMCU"
  27. #define DEVICE "LOLIN"
  28. // Buttons
  29. #define BUTTON1_PIN 0
  30. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  31. #define BUTTON1_RELAY 1
  32. // Relays
  33. #define RELAY1_PIN 12
  34. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  35. // LEDs
  36. #define LED1_PIN 2
  37. #define LED1_PIN_INVERSE 1
  38. #elif defined(WEMOS_D1_MINI_RELAYSHIELD)
  39. // Info
  40. #define MANUFACTURER "WEMOS"
  41. #define DEVICE "D1_MINI_RELAYSHIELD"
  42. // Buttons
  43. // No buttons on the D1 MINI alone, but defining it without adding a button doen't create problems
  44. #define BUTTON1_PIN 0 // Connect a pushbutton between D3 and GND,
  45. // it's the same as using a Wemos one button shield
  46. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  47. #define BUTTON1_RELAY 1
  48. // Relays
  49. #define RELAY1_PIN 5
  50. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  51. // LEDs
  52. #define LED1_PIN 2
  53. #define LED1_PIN_INVERSE 1
  54. // -----------------------------------------------------------------------------
  55. // ESPurna
  56. // -----------------------------------------------------------------------------
  57. #elif defined(TINKERMAN_ESPURNA_H06)
  58. // Info
  59. #define MANUFACTURER "TINKERMAN"
  60. #define DEVICE "ESPURNA_H06"
  61. // Buttons
  62. #define BUTTON1_PIN 4
  63. #define BUTTON1_RELAY 1
  64. #ifdef USE_TOUCH_BUTTON
  65. // Touch button
  66. #define BUTTON1_MODE BUTTON_PUSHBUTTON
  67. #define BUTTON1_PRESS BUTTON_MODE_TOGGLE
  68. #define BUTTON1_CLICK BUTTON_MODE_NONE
  69. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  70. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  71. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_NONE
  72. #else
  73. // Normal pushbutton
  74. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  75. #endif
  76. // Relays
  77. #define RELAY1_PIN 12
  78. #define RELAY1_TYPE RELAY_TYPE_INVERSE
  79. // LEDs
  80. #define LED1_PIN 5
  81. #define LED1_PIN_INVERSE 0
  82. // HLW8012
  83. #define POWER_PROVIDER POWER_PROVIDER_HLW8012
  84. #define HLW8012_SEL_PIN 2
  85. #define HLW8012_CF1_PIN 13
  86. #define HLW8012_CF_PIN 14
  87. #elif defined(TINKERMAN_ESPURNA_H08)
  88. // Info
  89. #define MANUFACTURER "TINKERMAN"
  90. #define DEVICE "ESPURNA_H08"
  91. // Buttons
  92. #define BUTTON1_PIN 4
  93. #define BUTTON1_RELAY 1
  94. #ifdef USE_TOUCH_BUTTON
  95. // Touch button
  96. #define BUTTON1_MODE BUTTON_PUSHBUTTON
  97. #define BUTTON1_PRESS BUTTON_MODE_TOGGLE
  98. #define BUTTON1_CLICK BUTTON_MODE_NONE
  99. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  100. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  101. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_NONE
  102. #else
  103. // Normal pushbutton
  104. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  105. #endif
  106. // Relays
  107. #define RELAY1_PIN 12
  108. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  109. // LEDs
  110. #define LED1_PIN 2
  111. #define LED1_PIN_INVERSE 1
  112. // HLW8012
  113. #define POWER_PROVIDER POWER_PROVIDER_HLW8012
  114. #define HLW8012_SEL_PIN 5
  115. #define HLW8012_CF1_PIN 13
  116. #define HLW8012_CF_PIN 14
  117. // -----------------------------------------------------------------------------
  118. // Itead Studio boards
  119. // -----------------------------------------------------------------------------
  120. #elif defined(ITEAD_SONOFF_BASIC)
  121. // Info
  122. #define MANUFACTURER "ITEAD"
  123. #define DEVICE "SONOFF_BASIC"
  124. // Buttons
  125. #define BUTTON1_PIN 0
  126. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  127. #define BUTTON1_RELAY 1
  128. // Relays
  129. #define RELAY1_PIN 12
  130. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  131. // LEDs
  132. #define LED1_PIN 13
  133. #define LED1_PIN_INVERSE 1
  134. #elif defined(ITEAD_SONOFF_RF)
  135. // Info
  136. #define MANUFACTURER "ITEAD"
  137. #define DEVICE "SONOFF_RF"
  138. // Buttons
  139. #define BUTTON1_PIN 0
  140. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  141. #define BUTTON1_RELAY 1
  142. // Relays
  143. #define RELAY1_PIN 12
  144. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  145. // LEDs
  146. #define LED1_PIN 13
  147. #define LED1_PIN_INVERSE 1
  148. #elif defined(ITEAD_SONOFF_TH)
  149. // Info
  150. #define MANUFACTURER "ITEAD"
  151. #define DEVICE "SONOFF_TH"
  152. // Buttons
  153. #define BUTTON1_PIN 0
  154. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  155. #define BUTTON1_RELAY 1
  156. // Relays
  157. #define RELAY1_PIN 12
  158. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  159. // LEDs
  160. #define LED1_PIN 13
  161. #define LED1_PIN_INVERSE 1
  162. #elif defined(ITEAD_SONOFF_SV)
  163. // Info
  164. #define MANUFACTURER "ITEAD"
  165. #define DEVICE "SONOFF_SV"
  166. // Buttons
  167. #define BUTTON1_PIN 0
  168. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  169. #define BUTTON1_RELAY 1
  170. // Relays
  171. #define RELAY1_PIN 12
  172. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  173. // LEDs
  174. #define LED1_PIN 13
  175. #define LED1_PIN_INVERSE 1
  176. #elif defined(ITEAD_SLAMPHER)
  177. // Info
  178. #define MANUFACTURER "ITEAD"
  179. #define DEVICE "SLAMPHER"
  180. // Buttons
  181. #define BUTTON1_PIN 0
  182. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  183. #define BUTTON1_RELAY 1
  184. // Relays
  185. #define RELAY1_PIN 12
  186. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  187. // LEDs
  188. #define LED1_PIN 13
  189. #define LED1_PIN_INVERSE 1
  190. #elif defined(ITEAD_S20)
  191. // Info
  192. #define MANUFACTURER "ITEAD"
  193. #define DEVICE "S20"
  194. // Buttons
  195. #define BUTTON1_PIN 0
  196. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  197. #define BUTTON1_RELAY 1
  198. // Relays
  199. #define RELAY1_PIN 12
  200. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  201. // LEDs
  202. #define LED1_PIN 13
  203. #define LED1_PIN_INVERSE 1
  204. #elif defined(ITEAD_SONOFF_TOUCH)
  205. // Info
  206. #define MANUFACTURER "ITEAD"
  207. #define DEVICE "SONOFF_TOUCH"
  208. // Buttons
  209. #define BUTTON1_PIN 0
  210. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  211. #define BUTTON1_RELAY 1
  212. // Relays
  213. #define RELAY1_PIN 12
  214. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  215. // LEDs
  216. #define LED1_PIN 13
  217. #define LED1_PIN_INVERSE 1
  218. #elif defined(ITEAD_SONOFF_POW)
  219. // Info
  220. #define MANUFACTURER "ITEAD"
  221. #define DEVICE "SONOFF_POW"
  222. // Buttons
  223. #define BUTTON1_PIN 0
  224. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  225. #define BUTTON1_RELAY 1
  226. // Relays
  227. #define RELAY1_PIN 12
  228. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  229. // LEDs
  230. #define LED1_PIN 15
  231. #define LED1_PIN_INVERSE 0
  232. // HLW8012
  233. #define POWER_PROVIDER POWER_PROVIDER_HLW8012
  234. #define HLW8012_SEL_PIN 5
  235. #define HLW8012_CF1_PIN 13
  236. #define HLW8012_CF_PIN 14
  237. #elif defined(ITEAD_SONOFF_DUAL)
  238. // Info
  239. #define MANUFACTURER "ITEAD"
  240. #define DEVICE "SONOFF_DUAL"
  241. #define SERIAL_BAUDRATE 19230
  242. #define RELAY_PROVIDER RELAY_PROVIDER_DUAL
  243. #define DUMMY_RELAY_COUNT 2
  244. #define DEBUG_SERIAL_SUPPORT 0
  245. #define TERMINAL_SUPPORT 0
  246. // Buttons
  247. #define BUTTON3_RELAY 1
  248. // LEDs
  249. #define LED1_PIN 13
  250. #define LED1_PIN_INVERSE 1
  251. #elif defined(ITEAD_SONOFF_4CH)
  252. // Info
  253. #define MANUFACTURER "ITEAD"
  254. #define DEVICE "SONOFF_4CH"
  255. // Buttons
  256. #define BUTTON1_PIN 0
  257. #define BUTTON2_PIN 9
  258. #define BUTTON3_PIN 10
  259. #define BUTTON4_PIN 14
  260. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  261. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  262. #define BUTTON3_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  263. #define BUTTON4_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  264. #define BUTTON1_RELAY 1
  265. #define BUTTON2_RELAY 2
  266. #define BUTTON3_RELAY 3
  267. #define BUTTON4_RELAY 4
  268. // Relays
  269. #define RELAY1_PIN 12
  270. #define RELAY2_PIN 5
  271. #define RELAY3_PIN 4
  272. #define RELAY4_PIN 15
  273. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  274. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  275. #define RELAY3_TYPE RELAY_TYPE_NORMAL
  276. #define RELAY4_TYPE RELAY_TYPE_NORMAL
  277. // LEDs
  278. #define LED1_PIN 13
  279. #define LED1_PIN_INVERSE 1
  280. #elif defined(ITEAD_SONOFF_4CH_PRO)
  281. // Info
  282. #define MANUFACTURER "ITEAD"
  283. #define DEVICE "SONOFF_4CH_PRO"
  284. // Buttons
  285. #define BUTTON1_PIN 0
  286. #define BUTTON2_PIN 9
  287. #define BUTTON3_PIN 10
  288. #define BUTTON4_PIN 14
  289. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  290. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  291. #define BUTTON3_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  292. #define BUTTON4_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  293. #define BUTTON1_RELAY 1
  294. #define BUTTON2_RELAY 2
  295. #define BUTTON3_RELAY 3
  296. #define BUTTON4_RELAY 4
  297. // Relays
  298. #define RELAY1_PIN 12
  299. #define RELAY2_PIN 5
  300. #define RELAY3_PIN 4
  301. #define RELAY4_PIN 15
  302. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  303. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  304. #define RELAY3_TYPE RELAY_TYPE_NORMAL
  305. #define RELAY4_TYPE RELAY_TYPE_NORMAL
  306. // LEDs
  307. #define LED1_PIN 13
  308. #define LED1_PIN_INVERSE 1
  309. #elif defined(ITEAD_1CH_INCHING)
  310. // The inching functionality is managed by a misterious IC in the board.
  311. // You cannot control the inching button and functionality from the ESP8266
  312. // Besides, enabling the inching functionality using the hardware button
  313. // will result in the relay switching on and off continuously.
  314. // Fortunately the unkown IC keeps memory of the hardware inching status
  315. // so you can just disable it and forget. The inching LED must be lit.
  316. // You can still use the pulse options from the web interface
  317. // without problem.
  318. // Info
  319. #define MANUFACTURER "ITEAD"
  320. #define DEVICE "1CH_INCHING"
  321. // Buttons
  322. #define BUTTON1_PIN 0
  323. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  324. #define BUTTON1_RELAY 1
  325. // Relays
  326. #define RELAY1_PIN 12
  327. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  328. // LEDs
  329. #define LED1_PIN 13
  330. #define LED1_PIN_INVERSE 1
  331. #elif defined(ITEAD_MOTOR)
  332. // Info
  333. #define MANUFACTURER "ITEAD"
  334. #define DEVICE "MOTOR"
  335. // Buttons
  336. #define BUTTON1_PIN 0
  337. #define BUTTON1_RELAY 1
  338. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  339. // Relays
  340. #define RELAY1_PIN 12
  341. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  342. // LEDs
  343. #define LED1_PIN 13
  344. #define LED1_PIN_INVERSE 1
  345. #elif defined(ITEAD_BNSZ01)
  346. // Info
  347. #define MANUFACTURER "ITEAD"
  348. #define DEVICE "BNSZ01"
  349. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  350. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  351. #define DUMMY_RELAY_COUNT 1
  352. // LEDs
  353. #define LED1_PIN 13
  354. #define LED1_PIN_INVERSE 1
  355. // Light
  356. #define LIGHT_CHANNELS 1
  357. #define LIGHT_CH1_PIN 12
  358. #define LIGHT_CH1_INVERSE 0
  359. #elif defined(ITEAD_SONOFF_RFBRIDGE)
  360. // Info
  361. #define MANUFACTURER "ITEAD"
  362. #define DEVICE "SONOFF_RFBRIDGE"
  363. #define SERIAL_BAUDRATE 19200
  364. #define RELAY_PROVIDER RELAY_PROVIDER_RFBRIDGE
  365. #ifndef DUMMY_RELAY_COUNT
  366. #define DUMMY_RELAY_COUNT 6
  367. #endif
  368. #define TERMINAL_SUPPORT 0
  369. #define DEBUG_SERIAL_SUPPORT 0
  370. // 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. #define DEBUG_PORT Serial1
  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. #define DEBUG_PORT Serial1
  629. // Light
  630. #define LIGHT_CHANNELS 4
  631. #define LIGHT_CH1_PIN 12 // RED
  632. #define LIGHT_CH2_PIN 14 // GREEN
  633. #define LIGHT_CH3_PIN 13 // BLUE
  634. #define LIGHT_CH4_PIN 15 // WHITE
  635. #define LIGHT_CH1_INVERSE 0
  636. #define LIGHT_CH2_INVERSE 0
  637. #define LIGHT_CH3_INVERSE 0
  638. #define LIGHT_CH4_INVERSE 0
  639. // -----------------------------------------------------------------------------
  640. // Jan Goedeke Wifi Relay
  641. // https://github.com/JanGoe/esp8266-wifi-relay
  642. // -----------------------------------------------------------------------------
  643. #elif defined(JANGOE_WIFI_RELAY_NC)
  644. // Info
  645. #define MANUFACTURER "JANGOE"
  646. #define DEVICE "WIFI_RELAY_NC"
  647. // Buttons
  648. #define BUTTON1_PIN 12
  649. #define BUTTON2_PIN 13
  650. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  651. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  652. #define BUTTON1_RELAY 1
  653. #define BUTTON2_RELAY 2
  654. // Relays
  655. #define RELAY1_PIN 2
  656. #define RELAY2_PIN 14
  657. #define RELAY1_TYPE RELAY_TYPE_INVERSE
  658. #define RELAY2_TYPE RELAY_TYPE_INVERSE
  659. #elif defined(JANGOE_WIFI_RELAY_NO)
  660. // Info
  661. #define MANUFACTURER "JANGOE"
  662. #define DEVICE "WIFI_RELAY_NO"
  663. // Buttons
  664. #define BUTTON1_PIN 12
  665. #define BUTTON2_PIN 13
  666. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  667. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  668. #define BUTTON1_RELAY 1
  669. #define BUTTON2_RELAY 2
  670. // Relays
  671. #define RELAY1_PIN 2
  672. #define RELAY2_PIN 14
  673. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  674. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  675. // -----------------------------------------------------------------------------
  676. // Jorge García Wifi+Relays Board Kit
  677. // https://www.tindie.com/products/jorgegarciadev/wifi--relays-board-kit
  678. // https://github.com/jorgegarciadev/wifikit
  679. // -----------------------------------------------------------------------------
  680. #elif defined(JORGEGARCIA_WIFI_RELAYS)
  681. // Info
  682. #define MANUFACTURER "JORGEGARCIA"
  683. #define DEVICE "WIFI_RELAYS"
  684. // Relays
  685. #define RELAY1_PIN 0
  686. #define RELAY2_PIN 2
  687. #define RELAY1_TYPE RELAY_TYPE_INVERSE
  688. #define RELAY2_TYPE RELAY_TYPE_INVERSE
  689. // -----------------------------------------------------------------------------
  690. // WiFi MQTT Relay / Thermostat
  691. // -----------------------------------------------------------------------------
  692. #elif defined(OPENENERGYMONITOR_MQTT_RELAY)
  693. // Info
  694. #define MANUFACTURER "OPENENERGYMONITOR"
  695. #define DEVICE "MQTT_RELAY"
  696. // Buttons
  697. #define BUTTON1_PIN 0
  698. #define BUTTON1_RELAY 1
  699. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  700. // Relays
  701. #define RELAY1_PIN 12
  702. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  703. // LEDs
  704. #define LED1_PIN 16
  705. #define LED1_PIN_INVERSE 0
  706. // -----------------------------------------------------------------------------
  707. // WiOn 50055 Indoor Wi-Fi Wall Outlet & Tap
  708. // https://rover.ebay.com/rover/1/711-53200-19255-0/1?icep_id=114&ipn=icep&toolid=20004&campid=5338044841&mpre=http%3A%2F%2Fwww.ebay.com%2Fitm%2FWiOn-50050-Indoor-Wi-Fi-Outlet-Wireless-Switch-Programmable-Timer-%2F263112281551
  709. // https://rover.ebay.com/rover/1/711-53200-19255-0/1?icep_id=114&ipn=icep&toolid=20004&campid=5338044841&mpre=http%3A%2F%2Fwww.ebay.com%2Fitm%2FWiOn-50055-Indoor-Wi-Fi-Wall-Tap-Monitor-Energy-Usage-Wireless-Smart-Switch-%2F263020837777
  710. // -----------------------------------------------------------------------------
  711. #elif defined(WION_50055)
  712. // Currently untested, does not support energy monitoring
  713. // Info
  714. #define MANUFACTURER "WION"
  715. #define DEVICE "50055"
  716. // Buttons
  717. #define BUTTON1_PIN 13
  718. #define BUTTON1_RELAY 1
  719. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  720. // Relays
  721. #define RELAY1_PIN 15
  722. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  723. // LEDs
  724. #define LED1_PIN 2
  725. #define LED1_PIN_INVERSE 0
  726. // -----------------------------------------------------------------------------
  727. // EX-Store Wifi Relay v3.1
  728. // https://ex-store.de/ESP8266-WiFi-Relay-V31
  729. // -----------------------------------------------------------------------------
  730. #elif defined(EXS_WIFI_RELAY_V31)
  731. // Untested
  732. // Info
  733. #define MANUFACTURER "EXS"
  734. #define DEVICE "WIFI_RELAY_V31"
  735. // Buttons
  736. #define BUTTON1_PIN 0
  737. #define BUTTON1_RELAY 1
  738. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  739. // Relays
  740. #define RELAY1_PIN 13
  741. #define RELAY1_TYPE RELAY_TYPE_LATCHED
  742. #define RELAY1_RESET_PIN 12
  743. // -----------------------------------------------------------------------------
  744. // V9261F
  745. // -----------------------------------------------------------------------------
  746. #elif defined(GENERIC_V9261F)
  747. // Info
  748. #define MANUFACTURER "GENERIC"
  749. #define DEVICE "V9261F"
  750. // V9261F
  751. #define POWER_PROVIDER POWER_PROVIDER_V9261F
  752. #define V9261F_PIN 2
  753. #define V9261F_PIN_INVERSE 1
  754. // -----------------------------------------------------------------------------
  755. // ECH1560
  756. // -----------------------------------------------------------------------------
  757. #elif defined(GENERIC_ECH1560)
  758. // Info
  759. #define MANUFACTURER "GENERIC"
  760. #define DEVICE "ECH1560"
  761. // ECH1560
  762. #define POWER_PROVIDER POWER_PROVIDER_ECH1560
  763. #define ECH1560_CLK_PIN 4
  764. #define ECH1560_MISO_PIN 5
  765. #define ECH1560_INVERTED 0
  766. // -----------------------------------------------------------------------------
  767. // ESPLive
  768. // https://github.com/ManCaveMade/ESP-Live
  769. // -----------------------------------------------------------------------------
  770. #elif defined(MANCAVEMADE_ESPLIVE)
  771. // Info
  772. #define MANUFACTURER "MANCAVEMADE"
  773. #define DEVICE "ESPLIVE"
  774. // Buttons
  775. #define BUTTON1_PIN 4
  776. #define BUTTON2_PIN 5
  777. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  778. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  779. #define BUTTON1_RELAY 1
  780. #define BUTTON2_RELAY 2
  781. // Relays
  782. #define RELAY1_PIN 12
  783. #define RELAY2_PIN 13
  784. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  785. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  786. // DB18B20
  787. #define DS18B20_SUPPORT 1
  788. #define DS18B20_PIN 2
  789. #define DS18B20_UPDATE_INTERVAL 5000
  790. #define TEMPERATURE_MIN_CHANGE 1.0
  791. // -----------------------------------------------------------------------------
  792. // QuinLED
  793. // http://blog.quindorian.org/2017/02/esp8266-led-lighting-quinled-v2-6-pcb.html
  794. // -----------------------------------------------------------------------------
  795. #elif defined(INTERMITTECH_QUINLED)
  796. // Info
  797. #define MANUFACTURER "INTERMITTECH"
  798. #define DEVICE "QUINLED"
  799. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  800. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  801. #define DUMMY_RELAY_COUNT 1
  802. // LEDs
  803. #define LED1_PIN 5
  804. #define LED1_PIN_INVERSE 1
  805. // Light
  806. #define LIGHT_CHANNELS 2
  807. #define LIGHT_CH1_PIN 0
  808. #define LIGHT_CH2_PIN 2
  809. #define LIGHT_CH1_INVERSE 0
  810. #define LIGHT_CH2_INVERSE 0
  811. // -----------------------------------------------------------------------------
  812. // Arilux AL-LC06
  813. // -----------------------------------------------------------------------------
  814. #elif defined(ARILUX_AL_LC06)
  815. // Info
  816. #define MANUFACTURER "ARILUX"
  817. #define DEVICE "AL_LC06"
  818. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  819. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  820. #define DUMMY_RELAY_COUNT 1
  821. // Light
  822. #define LIGHT_CHANNELS 5
  823. #define LIGHT_CH1_PIN 14 // RED
  824. #define LIGHT_CH2_PIN 12 // GREEN
  825. #define LIGHT_CH3_PIN 13 // BLUE
  826. #define LIGHT_CH4_PIN 15 // WHITE1
  827. #define LIGHT_CH5_PIN 5 // WHITE2
  828. #define LIGHT_CH1_INVERSE 0
  829. #define LIGHT_CH2_INVERSE 0
  830. #define LIGHT_CH3_INVERSE 0
  831. #define LIGHT_CH4_INVERSE 0
  832. #define LIGHT_CH5_INVERSE 0
  833. #elif defined(ARILUX_E27)
  834. // Info
  835. #define MANUFACTURER "ARILUX"
  836. #define DEVICE "E27"
  837. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  838. #define LIGHT_PROVIDER LIGHT_PROVIDER_MY92XX
  839. #define DUMMY_RELAY_COUNT 1
  840. // Light
  841. #define LIGHT_CHANNELS 4
  842. #define MY92XX_MODEL MY92XX_MODEL_MY9291
  843. #define MY92XX_CHIPS 1
  844. #define MY92XX_DI_PIN 13
  845. #define MY92XX_DCKI_PIN 15
  846. #define MY92XX_COMMAND MY92XX_COMMAND_DEFAULT
  847. #define MY92XX_MAPPING 0, 1, 2, 3
  848. // -----------------------------------------------------------------------------
  849. // XENON SM-PW701U
  850. // -----------------------------------------------------------------------------
  851. #elif defined(XENON_SM_PW702U)
  852. // Info
  853. #define MANUFACTURER "XENON"
  854. #define DEVICE "SM_PW702U"
  855. // Buttons
  856. #define BUTTON1_PIN 13
  857. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  858. #define BUTTON1_RELAY 1
  859. // Relays
  860. #define RELAY1_PIN 12
  861. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  862. // LEDs
  863. #define LED1_PIN 4
  864. #define LED1_PIN_INVERSE 1
  865. // -----------------------------------------------------------------------------
  866. // AUTHOMETION LYT8266
  867. // https://authometion.com/shop/en/home/13-lyt8266.html
  868. // -----------------------------------------------------------------------------
  869. #elif defined(AUTHOMETION_LYT8266)
  870. // Info
  871. #define MANUFACTURER "AUTHOMETION"
  872. #define DEVICE "LYT8266"
  873. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  874. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  875. #define DUMMY_RELAY_COUNT 1
  876. // Light
  877. #define LIGHT_CHANNELS 4
  878. #define LIGHT_CH1_PIN 13 // RED
  879. #define LIGHT_CH2_PIN 12 // GREEN
  880. #define LIGHT_CH3_PIN 14 // BLUE
  881. #define LIGHT_CH4_PIN 2 // WHITE
  882. #define LIGHT_CH1_INVERSE 0
  883. #define LIGHT_CH2_INVERSE 0
  884. #define LIGHT_CH3_INVERSE 0
  885. #define LIGHT_CH4_INVERSE 0
  886. #define LIGHT_ENABLE_PIN 15
  887. // -----------------------------------------------------------------------------
  888. // Unknown hardware
  889. // -----------------------------------------------------------------------------
  890. #else
  891. #error "UNSUPPORTED HARDWARE!"
  892. #endif
  893. // -----------------------------------------------------------------------------
  894. // Default values
  895. // -----------------------------------------------------------------------------
  896. #ifndef BUTTON1_PRESS
  897. #define BUTTON1_PRESS BUTTON_MODE_NONE
  898. #endif
  899. #ifndef BUTTON2_PRESS
  900. #define BUTTON2_PRESS BUTTON_MODE_NONE
  901. #endif
  902. #ifndef BUTTON3_PRESS
  903. #define BUTTON3_PRESS BUTTON_MODE_NONE
  904. #endif
  905. #ifndef BUTTON4_PRESS
  906. #define BUTTON4_PRESS BUTTON_MODE_NONE
  907. #endif
  908. #ifndef BUTTON1_CLICK
  909. #define BUTTON1_CLICK BUTTON_MODE_TOGGLE
  910. #endif
  911. #ifndef BUTTON2_CLICK
  912. #define BUTTON2_CLICK BUTTON_MODE_TOGGLE
  913. #endif
  914. #ifndef BUTTON3_CLICK
  915. #define BUTTON3_CLICK BUTTON_MODE_TOGGLE
  916. #endif
  917. #ifndef BUTTON4_CLICK
  918. #define BUTTON4_CLICK BUTTON_MODE_TOGGLE
  919. #endif
  920. #ifndef BUTTON1_DBLCLICK
  921. #define BUTTON1_DBLCLICK BUTTON_MODE_AP
  922. #endif
  923. #ifndef BUTTON2_DBLCLICK
  924. #define BUTTON2_DBLCLICK BUTTON_MODE_NONE
  925. #endif
  926. #ifndef BUTTON3_DBLCLICK
  927. #define BUTTON3_DBLCLICK BUTTON_MODE_NONE
  928. #endif
  929. #ifndef BUTTON4_DBLCLICK
  930. #define BUTTON4_DBLCLICK BUTTON_MODE_NONE
  931. #endif
  932. #ifndef BUTTON1_LNGCLICK
  933. #define BUTTON1_LNGCLICK BUTTON_MODE_RESET
  934. #endif
  935. #ifndef BUTTON2_LNGCLICK
  936. #define BUTTON2_LNGCLICK BUTTON_MODE_NONE
  937. #endif
  938. #ifndef BUTTON3_LNGCLICK
  939. #define BUTTON3_LNGCLICK BUTTON_MODE_NONE
  940. #endif
  941. #ifndef BUTTON4_LNGCLICK
  942. #define BUTTON4_LNGCLICK BUTTON_MODE_NONE
  943. #endif
  944. #ifndef BUTTON1_LNGLNGCLICK
  945. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_FACTORY
  946. #endif
  947. #ifndef BUTTON2_LNGLNGCLICK
  948. #define BUTTON2_LNGLNGCLICK BUTTON_MODE_NONE
  949. #endif
  950. #ifndef BUTTON3_LNGLNGCLICK
  951. #define BUTTON3_LNGLNGCLICK BUTTON_MODE_NONE
  952. #endif
  953. #ifndef BUTTON4_LNGLNGCLICK
  954. #define BUTTON4_LNGLNGCLICK BUTTON_MODE_NONE
  955. #endif
  956. #ifndef BUTTON1_RELAY
  957. #define BUTTON1_RELAY 0
  958. #endif
  959. #ifndef BUTTON2_RELAY
  960. #define BUTTON2_RELAY 0
  961. #endif
  962. #ifndef BUTTON3_RELAY
  963. #define BUTTON3_RELAY 0
  964. #endif
  965. #ifndef BUTTON4_RELAY
  966. #define BUTTON4_RELAY 0
  967. #endif
  968. #ifndef RELAY1_RESET_PIN
  969. #define RELAY1_RESET_PIN 0
  970. #endif
  971. #ifndef RELAY2_RESET_PIN
  972. #define RELAY2_RESET_PIN 0
  973. #endif
  974. #ifndef RELAY3_RESET_PIN
  975. #define RELAY3_RESET_PIN 0
  976. #endif
  977. #ifndef RELAY4_RESET_PIN
  978. #define RELAY4_RESET_PIN 0
  979. #endif
  980. #ifndef RELAY1_DELAY_ON
  981. #define RELAY1_DELAY_ON 0
  982. #endif
  983. #ifndef RELAY2_DELAY_ON
  984. #define RELAY2_DELAY_ON 0
  985. #endif
  986. #ifndef RELAY3_DELAY_ON
  987. #define RELAY3_DELAY_ON 0
  988. #endif
  989. #ifndef RELAY4_DELAY_ON
  990. #define RELAY4_DELAY_ON 0
  991. #endif
  992. #ifndef RELAY1_DELAY_OFF
  993. #define RELAY1_DELAY_OFF 0
  994. #endif
  995. #ifndef RELAY2_DELAY_OFF
  996. #define RELAY2_DELAY_OFF 0
  997. #endif
  998. #ifndef RELAY3_DELAY_OFF
  999. #define RELAY3_DELAY_OFF 0
  1000. #endif
  1001. #ifndef RELAY4_DELAY_OFF
  1002. #define RELAY4_DELAY_OFF 0
  1003. #endif
  1004. #ifndef RELAY1_LED
  1005. #define RELAY1_LED 0
  1006. #endif
  1007. #ifndef RELAY2_LED
  1008. #define RELAY2_LED 0
  1009. #endif
  1010. #ifndef RELAY3_LED
  1011. #define RELAY3_LED 0
  1012. #endif
  1013. #ifndef RELAY4_LED
  1014. #define RELAY4_LED 0
  1015. #endif
  1016. // Needed for ESP8285 boards under Windows using PlatformIO (?)
  1017. #ifndef BUTTON_PUSHBUTTON
  1018. #define BUTTON_PUSHBUTTON 0
  1019. #define BUTTON_SWITCH 1
  1020. #define BUTTON_DEFAULT_HIGH 2
  1021. #define BUTTON_SET_PULLUP 4
  1022. #endif
  1023. // Serial baudrate
  1024. #ifndef SERIAL_BAUDRATE
  1025. #define SERIAL_BAUDRATE 115200
  1026. #endif
  1027. // Relay providers
  1028. #ifndef RELAY_PROVIDER
  1029. #define RELAY_PROVIDER RELAY_PROVIDER_RELAY
  1030. #endif
  1031. // Light provider
  1032. #ifndef LIGHT_PROVIDER
  1033. #define LIGHT_PROVIDER LIGHT_PROVIDER_NONE
  1034. #endif