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.

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