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.

1358 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. #define ALEXA_SUPPORT 0
  778. // V9261F
  779. #define POWER_PROVIDER POWER_PROVIDER_V9261F
  780. #define V9261F_PIN 2
  781. #define V9261F_PIN_INVERSE 1
  782. // -----------------------------------------------------------------------------
  783. // ECH1560
  784. // -----------------------------------------------------------------------------
  785. #elif defined(GENERIC_ECH1560)
  786. // Info
  787. #define MANUFACTURER "GENERIC"
  788. #define DEVICE "ECH1560"
  789. #define ALEXA_SUPPORT 0
  790. // ECH1560
  791. #define POWER_PROVIDER POWER_PROVIDER_ECH1560
  792. #define ECH1560_CLK_PIN 4
  793. #define ECH1560_MISO_PIN 5
  794. #define ECH1560_INVERTED 0
  795. // -----------------------------------------------------------------------------
  796. // ESPLive
  797. // https://github.com/ManCaveMade/ESP-Live
  798. // -----------------------------------------------------------------------------
  799. #elif defined(MANCAVEMADE_ESPLIVE)
  800. // Info
  801. #define MANUFACTURER "MANCAVEMADE"
  802. #define DEVICE "ESPLIVE"
  803. // Buttons
  804. #define BUTTON1_PIN 4
  805. #define BUTTON2_PIN 5
  806. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  807. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  808. #define BUTTON1_RELAY 1
  809. #define BUTTON2_RELAY 2
  810. // Relays
  811. #define RELAY1_PIN 12
  812. #define RELAY2_PIN 13
  813. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  814. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  815. // DB18B20
  816. #define DS18B20_SUPPORT 1
  817. #define DS18B20_PIN 2
  818. #define DS18B20_UPDATE_INTERVAL 5000
  819. #define TEMPERATURE_MIN_CHANGE 1.0
  820. // -----------------------------------------------------------------------------
  821. // QuinLED
  822. // http://blog.quindorian.org/2017/02/esp8266-led-lighting-quinled-v2-6-pcb.html
  823. // -----------------------------------------------------------------------------
  824. #elif defined(INTERMITTECH_QUINLED)
  825. // Info
  826. #define MANUFACTURER "INTERMITTECH"
  827. #define DEVICE "QUINLED"
  828. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  829. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  830. #define DUMMY_RELAY_COUNT 1
  831. // LEDs
  832. #define LED1_PIN 5
  833. #define LED1_PIN_INVERSE 1
  834. // Light
  835. #define LIGHT_CHANNELS 2
  836. #define LIGHT_CH1_PIN 0
  837. #define LIGHT_CH2_PIN 2
  838. #define LIGHT_CH1_INVERSE 0
  839. #define LIGHT_CH2_INVERSE 0
  840. // -----------------------------------------------------------------------------
  841. // Arilux AL-LC06
  842. // -----------------------------------------------------------------------------
  843. #elif defined(ARILUX_AL_LC06)
  844. // Info
  845. #define MANUFACTURER "ARILUX"
  846. #define DEVICE "AL_LC06"
  847. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  848. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  849. #define DUMMY_RELAY_COUNT 1
  850. // Light
  851. #define LIGHT_CHANNELS 5
  852. #define LIGHT_CH1_PIN 14 // RED
  853. #define LIGHT_CH2_PIN 12 // GREEN
  854. #define LIGHT_CH3_PIN 13 // BLUE
  855. #define LIGHT_CH4_PIN 15 // WHITE1
  856. #define LIGHT_CH5_PIN 5 // WHITE2
  857. #define LIGHT_CH1_INVERSE 0
  858. #define LIGHT_CH2_INVERSE 0
  859. #define LIGHT_CH3_INVERSE 0
  860. #define LIGHT_CH4_INVERSE 0
  861. #define LIGHT_CH5_INVERSE 0
  862. #elif defined(ARILUX_E27)
  863. // Info
  864. #define MANUFACTURER "ARILUX"
  865. #define DEVICE "E27"
  866. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  867. #define LIGHT_PROVIDER LIGHT_PROVIDER_MY92XX
  868. #define DUMMY_RELAY_COUNT 1
  869. // Light
  870. #define LIGHT_CHANNELS 4
  871. #define MY92XX_MODEL MY92XX_MODEL_MY9291
  872. #define MY92XX_CHIPS 1
  873. #define MY92XX_DI_PIN 13
  874. #define MY92XX_DCKI_PIN 15
  875. #define MY92XX_COMMAND MY92XX_COMMAND_DEFAULT
  876. #define MY92XX_MAPPING 0, 1, 2, 3
  877. // -----------------------------------------------------------------------------
  878. // XENON SM-PW701U
  879. // -----------------------------------------------------------------------------
  880. #elif defined(XENON_SM_PW702U)
  881. // Info
  882. #define MANUFACTURER "XENON"
  883. #define DEVICE "SM_PW702U"
  884. // Buttons
  885. #define BUTTON1_PIN 13
  886. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  887. #define BUTTON1_RELAY 1
  888. // Relays
  889. #define RELAY1_PIN 12
  890. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  891. // LEDs
  892. #define LED1_PIN 4
  893. #define LED1_PIN_INVERSE 1
  894. // -----------------------------------------------------------------------------
  895. // AUTHOMETION LYT8266
  896. // https://authometion.com/shop/en/home/13-lyt8266.html
  897. // -----------------------------------------------------------------------------
  898. #elif defined(AUTHOMETION_LYT8266)
  899. // Info
  900. #define MANUFACTURER "AUTHOMETION"
  901. #define DEVICE "LYT8266"
  902. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  903. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  904. #define DUMMY_RELAY_COUNT 1
  905. // Light
  906. #define LIGHT_CHANNELS 4
  907. #define LIGHT_CH1_PIN 13 // RED
  908. #define LIGHT_CH2_PIN 12 // GREEN
  909. #define LIGHT_CH3_PIN 14 // BLUE
  910. #define LIGHT_CH4_PIN 2 // WHITE
  911. #define LIGHT_CH1_INVERSE 0
  912. #define LIGHT_CH2_INVERSE 0
  913. #define LIGHT_CH3_INVERSE 0
  914. #define LIGHT_CH4_INVERSE 0
  915. #define LIGHT_ENABLE_PIN 15
  916. // -----------------------------------------------------------------------------
  917. // Unknown hardware
  918. // -----------------------------------------------------------------------------
  919. #else
  920. #error "UNSUPPORTED HARDWARE!"
  921. #endif
  922. // -----------------------------------------------------------------------------
  923. // Default values
  924. // -----------------------------------------------------------------------------
  925. #ifndef BUTTON1_PRESS
  926. #define BUTTON1_PRESS BUTTON_MODE_NONE
  927. #endif
  928. #ifndef BUTTON2_PRESS
  929. #define BUTTON2_PRESS BUTTON_MODE_NONE
  930. #endif
  931. #ifndef BUTTON3_PRESS
  932. #define BUTTON3_PRESS BUTTON_MODE_NONE
  933. #endif
  934. #ifndef BUTTON4_PRESS
  935. #define BUTTON4_PRESS BUTTON_MODE_NONE
  936. #endif
  937. #ifndef BUTTON1_CLICK
  938. #define BUTTON1_CLICK BUTTON_MODE_TOGGLE
  939. #endif
  940. #ifndef BUTTON2_CLICK
  941. #define BUTTON2_CLICK BUTTON_MODE_TOGGLE
  942. #endif
  943. #ifndef BUTTON3_CLICK
  944. #define BUTTON3_CLICK BUTTON_MODE_TOGGLE
  945. #endif
  946. #ifndef BUTTON4_CLICK
  947. #define BUTTON4_CLICK BUTTON_MODE_TOGGLE
  948. #endif
  949. #ifndef BUTTON1_DBLCLICK
  950. #define BUTTON1_DBLCLICK BUTTON_MODE_AP
  951. #endif
  952. #ifndef BUTTON2_DBLCLICK
  953. #define BUTTON2_DBLCLICK BUTTON_MODE_NONE
  954. #endif
  955. #ifndef BUTTON3_DBLCLICK
  956. #define BUTTON3_DBLCLICK BUTTON_MODE_NONE
  957. #endif
  958. #ifndef BUTTON4_DBLCLICK
  959. #define BUTTON4_DBLCLICK BUTTON_MODE_NONE
  960. #endif
  961. #ifndef BUTTON1_LNGCLICK
  962. #define BUTTON1_LNGCLICK BUTTON_MODE_RESET
  963. #endif
  964. #ifndef BUTTON2_LNGCLICK
  965. #define BUTTON2_LNGCLICK BUTTON_MODE_NONE
  966. #endif
  967. #ifndef BUTTON3_LNGCLICK
  968. #define BUTTON3_LNGCLICK BUTTON_MODE_NONE
  969. #endif
  970. #ifndef BUTTON4_LNGCLICK
  971. #define BUTTON4_LNGCLICK BUTTON_MODE_NONE
  972. #endif
  973. #ifndef BUTTON1_LNGLNGCLICK
  974. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_FACTORY
  975. #endif
  976. #ifndef BUTTON2_LNGLNGCLICK
  977. #define BUTTON2_LNGLNGCLICK BUTTON_MODE_NONE
  978. #endif
  979. #ifndef BUTTON3_LNGLNGCLICK
  980. #define BUTTON3_LNGLNGCLICK BUTTON_MODE_NONE
  981. #endif
  982. #ifndef BUTTON4_LNGLNGCLICK
  983. #define BUTTON4_LNGLNGCLICK BUTTON_MODE_NONE
  984. #endif
  985. #ifndef BUTTON1_RELAY
  986. #define BUTTON1_RELAY 0
  987. #endif
  988. #ifndef BUTTON2_RELAY
  989. #define BUTTON2_RELAY 0
  990. #endif
  991. #ifndef BUTTON3_RELAY
  992. #define BUTTON3_RELAY 0
  993. #endif
  994. #ifndef BUTTON4_RELAY
  995. #define BUTTON4_RELAY 0
  996. #endif
  997. #ifndef RELAY1_RESET_PIN
  998. #define RELAY1_RESET_PIN 0
  999. #endif
  1000. #ifndef RELAY2_RESET_PIN
  1001. #define RELAY2_RESET_PIN 0
  1002. #endif
  1003. #ifndef RELAY3_RESET_PIN
  1004. #define RELAY3_RESET_PIN 0
  1005. #endif
  1006. #ifndef RELAY4_RESET_PIN
  1007. #define RELAY4_RESET_PIN 0
  1008. #endif
  1009. #ifndef RELAY1_DELAY_ON
  1010. #define RELAY1_DELAY_ON 0
  1011. #endif
  1012. #ifndef RELAY2_DELAY_ON
  1013. #define RELAY2_DELAY_ON 0
  1014. #endif
  1015. #ifndef RELAY3_DELAY_ON
  1016. #define RELAY3_DELAY_ON 0
  1017. #endif
  1018. #ifndef RELAY4_DELAY_ON
  1019. #define RELAY4_DELAY_ON 0
  1020. #endif
  1021. #ifndef RELAY1_DELAY_OFF
  1022. #define RELAY1_DELAY_OFF 0
  1023. #endif
  1024. #ifndef RELAY2_DELAY_OFF
  1025. #define RELAY2_DELAY_OFF 0
  1026. #endif
  1027. #ifndef RELAY3_DELAY_OFF
  1028. #define RELAY3_DELAY_OFF 0
  1029. #endif
  1030. #ifndef RELAY4_DELAY_OFF
  1031. #define RELAY4_DELAY_OFF 0
  1032. #endif
  1033. #ifndef RELAY1_LED
  1034. #define RELAY1_LED 0
  1035. #endif
  1036. #ifndef RELAY2_LED
  1037. #define RELAY2_LED 0
  1038. #endif
  1039. #ifndef RELAY3_LED
  1040. #define RELAY3_LED 0
  1041. #endif
  1042. #ifndef RELAY4_LED
  1043. #define RELAY4_LED 0
  1044. #endif
  1045. // Needed for ESP8285 boards under Windows using PlatformIO (?)
  1046. #ifndef BUTTON_PUSHBUTTON
  1047. #define BUTTON_PUSHBUTTON 0
  1048. #define BUTTON_SWITCH 1
  1049. #define BUTTON_DEFAULT_HIGH 2
  1050. #define BUTTON_SET_PULLUP 4
  1051. #endif
  1052. // Serial baudrate
  1053. #ifndef SERIAL_BAUDRATE
  1054. #define SERIAL_BAUDRATE 115200
  1055. #endif
  1056. // Relay providers
  1057. #ifndef RELAY_PROVIDER
  1058. #define RELAY_PROVIDER RELAY_PROVIDER_RELAY
  1059. #endif
  1060. // Light provider
  1061. #ifndef LIGHT_PROVIDER
  1062. #define LIGHT_PROVIDER LIGHT_PROVIDER_NONE
  1063. #endif