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.

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