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.

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