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.

1327 lines
38 KiB

7 years ago
7 years ago
  1. // -----------------------------------------------------------------------------
  2. // Configuration HELP
  3. // -----------------------------------------------------------------------------
  4. //
  5. // MANUFACTURER: Name of the manufacturer of the board ("string")
  6. // DEVICE: Name of the device ("string")
  7. // BUTTON#_PIN: GPIO for the n-th button (1-based, up to 4 buttons)
  8. // BUTTON#_RELAY: Relay number that will be bind to the n-th button (1-based)
  9. // BUTTON#_MODE: A mask of options (BUTTON_PUSHBUTTON and BUTTON_SWITCH cannot be together)
  10. // - BUTTON_PUSHBUTTON: button event is fired when released
  11. // - BUTTON_SWITCH: button event is fired when pressed or released
  12. // - BUTTON_DEFAULT_HIGH: there is a pull up in place
  13. // - BUTTON_SET_PULLUP: set pullup by software
  14. // RELAY#_PIN: GPIO for the n-th relay (1-based, up to 4 relays)
  15. // RELAY#_TYPE: Relay can be RELAY_TYPE_NORMAL, RELAY_TYPE_INVERSE or RELAY_TYPE_LATCHED
  16. // RELAY#_LED: LED number that will be bind to the n-th relay (1-based)
  17. // LED#_PIN: GPIO for the n-th LED (1-based, up to 4 LEDs)
  18. // LED#_PIN_INVERSE: LED has inversed logic (lit when pulled down)
  19. //
  20. // Besides, other hardware specific information should be stated here
  21. // -----------------------------------------------------------------------------
  22. // Development boards
  23. // -----------------------------------------------------------------------------
  24. #if defined(NODEMCU_LOLIN)
  25. // Info
  26. #define MANUFACTURER "NODEMCU"
  27. #define DEVICE "LOLIN"
  28. // Buttons
  29. #define BUTTON1_PIN 0
  30. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  31. #define BUTTON1_RELAY 1
  32. // Relays
  33. #define RELAY1_PIN 12
  34. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  35. // LEDs
  36. #define LED1_PIN 2
  37. #define LED1_PIN_INVERSE 1
  38. #elif defined(WEMOS_D1_MINI_RELAYSHIELD)
  39. // Info
  40. #define MANUFACTURER "WEMOS"
  41. #define DEVICE "D1_MINI_RELAYSHIELD"
  42. // Buttons
  43. // No buttons on the D1 MINI alone, but defining it without adding a button doen't create problems
  44. #define BUTTON1_PIN 0 // Connect a pushbutton between D3 and GND,
  45. // it's the same as using a Wemos one button shield
  46. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  47. #define BUTTON1_RELAY 1
  48. // Relays
  49. #define RELAY1_PIN 5
  50. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  51. // LEDs
  52. #define LED1_PIN 2
  53. #define LED1_PIN_INVERSE 1
  54. // -----------------------------------------------------------------------------
  55. // ESPurna
  56. // -----------------------------------------------------------------------------
  57. #elif defined(TINKERMAN_ESPURNA_H06)
  58. // Info
  59. #define MANUFACTURER "TINKERMAN"
  60. #define DEVICE "ESPURNA_H06"
  61. // Buttons
  62. #define BUTTON1_PIN 4
  63. #define BUTTON1_RELAY 1
  64. #ifdef USE_TOUCH_BUTTON
  65. // Touch button
  66. #define BUTTON1_MODE BUTTON_PUSHBUTTON
  67. #define BUTTON1_PRESS BUTTON_MODE_TOGGLE
  68. #define BUTTON1_CLICK BUTTON_MODE_NONE
  69. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  70. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  71. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_NONE
  72. #else
  73. // Normal pushbutton
  74. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  75. #endif
  76. // Relays
  77. #define RELAY1_PIN 12
  78. #define RELAY1_TYPE RELAY_TYPE_INVERSE
  79. // LEDs
  80. #define LED1_PIN 5
  81. #define LED1_PIN_INVERSE 0
  82. // HLW8012
  83. #define POWER_PROVIDER POWER_PROVIDER_HLW8012
  84. #define HLW8012_SEL_PIN 2
  85. #define HLW8012_CF1_PIN 13
  86. #define HLW8012_CF_PIN 14
  87. #elif defined(TINKERMAN_ESPURNA_H07)
  88. // Info
  89. #define MANUFACTURER "TINKERMAN"
  90. #define DEVICE "ESPURNA_H07"
  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 0
  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_CH1_PIN 12
  357. #define LIGHT_CH1_INVERSE 0
  358. #elif defined(ITEAD_SONOFF_RFBRIDGE)
  359. // Info
  360. #define MANUFACTURER "ITEAD"
  361. #define DEVICE "SONOFF_RFBRIDGE"
  362. #define SERIAL_BAUDRATE 19200
  363. #define RELAY_PROVIDER RELAY_PROVIDER_RFBRIDGE
  364. #ifndef DUMMY_RELAY_COUNT
  365. #define DUMMY_RELAY_COUNT 6
  366. #endif
  367. #define TERMINAL_SUPPORT 0
  368. #define TRACK_RELAY_STATUS 0
  369. // Buttons
  370. #define BUTTON1_PIN 0
  371. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  372. // LEDs
  373. #define LED1_PIN 13
  374. #define LED1_PIN_INVERSE 1
  375. #elif defined(ITEAD_SONOFF_B1)
  376. // Info
  377. #define MANUFACTURER "ITEAD"
  378. #define DEVICE "SONOFF_B1"
  379. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  380. #define LIGHT_PROVIDER LIGHT_PROVIDER_MY9192
  381. #define DUMMY_RELAY_COUNT 1
  382. #define MY9291_DI_PIN 12
  383. #define MY9291_DCKI_PIN 14
  384. #define MY9291_COMMAND MY9291_COMMAND_DEFAULT
  385. #define MY9291_CHANNELS 5
  386. #elif defined(ITEAD_SONOFF_LED)
  387. // Info
  388. #define MANUFACTURER "ITEAD"
  389. #define DEVICE "SONOFF_LED"
  390. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  391. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  392. #define DUMMY_RELAY_COUNT 1
  393. // LEDs
  394. #define LED1_PIN 13
  395. #define LED1_PIN_INVERSE 1
  396. // Channels
  397. #define LIGHT_CH1_PIN 12 // Cold white
  398. #define LIGHT_CH2_PIN 14 // Warm white
  399. #define LIGHT_CH1_INVERSE 0
  400. #define LIGHT_CH2_INVERSE 0
  401. #elif defined(ITEAD_SONOFF_T1_1CH)
  402. // Info
  403. #define MANUFACTURER "ITEAD"
  404. #define DEVICE "SONOFF_T1_1CH"
  405. // Buttons
  406. #define BUTTON1_PIN 9
  407. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  408. #define BUTTON1_RELAY 1
  409. // Relays
  410. #define RELAY1_PIN 5
  411. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  412. // LEDs
  413. #define LED1_PIN 13
  414. #define LED1_PIN_INVERSE 1
  415. #elif defined(ITEAD_SONOFF_T1_2CH)
  416. // Info
  417. #define MANUFACTURER "ITEAD"
  418. #define DEVICE "SONOFF_T1_2CH"
  419. // Buttons
  420. #define BUTTON1_PIN 0
  421. #define BUTTON2_PIN 10
  422. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  423. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  424. #define BUTTON1_RELAY 1
  425. #define BUTTON2_RELAY 2
  426. // Relays
  427. #define RELAY1_PIN 12
  428. #define RELAY2_PIN 4
  429. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  430. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  431. // LEDs
  432. #define LED1_PIN 13
  433. #define LED1_PIN_INVERSE 1
  434. #elif defined(ITEAD_SONOFF_T1_3CH)
  435. // Info
  436. #define MANUFACTURER "ITEAD"
  437. #define DEVICE "SONOFF_T1_3CH"
  438. // Buttons
  439. #define BUTTON1_PIN 0
  440. #define BUTTON2_PIN 9
  441. #define BUTTON3_PIN 10
  442. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  443. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  444. #define BUTTON3_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  445. #define BUTTON1_RELAY 1
  446. #define BUTTON2_RELAY 2
  447. #define BUTTON3_RELAY 3
  448. // Relays
  449. #define RELAY1_PIN 12
  450. #define RELAY2_PIN 5
  451. #define RELAY3_PIN 4
  452. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  453. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  454. #define RELAY3_TYPE RELAY_TYPE_NORMAL
  455. // LEDs
  456. #define LED1_PIN 13
  457. #define LED1_PIN_INVERSE 1
  458. // -----------------------------------------------------------------------------
  459. // Electrodragon boards
  460. // -----------------------------------------------------------------------------
  461. #elif defined(ELECTRODRAGON_WIFI_IOT)
  462. // Info
  463. #define MANUFACTURER "ELECTRODRAGON"
  464. #define DEVICE "WIFI_IOT"
  465. // Buttons
  466. #define BUTTON1_PIN 0
  467. #define BUTTON2_PIN 2
  468. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  469. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  470. #define BUTTON1_RELAY 1
  471. #define BUTTON2_RELAY 2
  472. // Relays
  473. #define RELAY1_PIN 12
  474. #define RELAY2_PIN 13
  475. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  476. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  477. // LEDs
  478. #define LED1_PIN 16
  479. #define LED1_PIN_INVERSE 0
  480. // -----------------------------------------------------------------------------
  481. // WorkChoice ecoPlug
  482. // -----------------------------------------------------------------------------
  483. #elif defined(WORKCHOICE_ECOPLUG)
  484. // Info
  485. #define MANUFACTURER "WORKCHOICE"
  486. #define DEVICE "ECOPLUG"
  487. // Buttons
  488. #define BUTTON1_PIN 13
  489. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  490. #define BUTTON1_RELAY 1
  491. // Relays
  492. #define RELAY1_PIN 15
  493. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  494. // LEDs
  495. #define LED1_PIN 2
  496. #define LED1_PIN_INVERSE 0
  497. // -----------------------------------------------------------------------------
  498. // AI Thinker
  499. // -----------------------------------------------------------------------------
  500. #elif defined(AITHINKER_AI_LIGHT)
  501. // Info
  502. #define MANUFACTURER "AITHINKER"
  503. #define DEVICE "AI_LIGHT"
  504. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  505. #define LIGHT_PROVIDER LIGHT_PROVIDER_MY9192
  506. #define DUMMY_RELAY_COUNT 1
  507. #define MY9291_DI_PIN 13
  508. #define MY9291_DCKI_PIN 15
  509. #define MY9291_COMMAND MY9291_COMMAND_DEFAULT
  510. #define MY9291_CHANNELS 4
  511. // -----------------------------------------------------------------------------
  512. // LED Controller
  513. // -----------------------------------------------------------------------------
  514. #elif defined(MAGICHOME_LED_CONTROLLER)
  515. // Info
  516. #define MANUFACTURER "MAGICHOME"
  517. #define DEVICE "LED_CONTROLLER"
  518. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  519. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  520. #define DUMMY_RELAY_COUNT 1
  521. // LEDs
  522. #define LED1_PIN 2
  523. #define LED1_PIN_INVERSE 1
  524. // Channels
  525. #define LIGHT_CH1_PIN 14 // RED
  526. #define LIGHT_CH2_PIN 5 // GREEN
  527. #define LIGHT_CH3_PIN 12 // BLUE
  528. #define LIGHT_CH4_PIN 13 // WHITE
  529. #define LIGHT_CH1_INVERSE 0
  530. #define LIGHT_CH2_INVERSE 0
  531. #define LIGHT_CH3_INVERSE 0
  532. #define LIGHT_CH4_INVERSE 0
  533. #elif defined(MAGICHOME_LED_CONTROLLER_20)
  534. // Info
  535. #define MANUFACTURER "MAGICHOME"
  536. #define DEVICE "LED_CONTROLLER_20"
  537. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  538. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  539. #define DUMMY_RELAY_COUNT 1
  540. // LEDs
  541. #define LED1_PIN 2
  542. #define LED1_PIN_INVERSE 1
  543. // Channels
  544. #define LIGHT_CH1_PIN 5 // RED
  545. #define LIGHT_CH2_PIN 12 // GREEN
  546. #define LIGHT_CH3_PIN 13 // BLUE
  547. #define LIGHT_CH4_PIN 15 // WHITE
  548. #define LIGHT_CH1_INVERSE 0
  549. #define LIGHT_CH2_INVERSE 0
  550. #define LIGHT_CH3_INVERSE 0
  551. #define LIGHT_CH4_INVERSE 0
  552. #define LIGHT_IR_PIN 4 // IR LED
  553. #define LIGHT_PROVIDER_EXPERIMENTAL_RGB_ONLY_HSV_IR 0
  554. // 24 Buttons Set of the IR Remote
  555. #ifndef IR_BUTTONS_SET
  556. #define IR_BUTTONS_SET 1
  557. #endif
  558. //Remote Buttons SET 1 (for the original Remote shipped with the controller)
  559. #if IR_BUTTONS_SET == 1
  560. #define IR_BUTTON_0 0xFF906F // Brightness +
  561. #define IR_BUTTON_1 0xFFB847 // Brightness -
  562. #define IR_BUTTON_2 0xFFF807 // OFF
  563. #define IR_BUTTON_3 0xFFB04F // ON
  564. #define IR_BUTTON_4 0xFF9867 // RED
  565. #define IR_BUTTON_5 0xFFD827 // GREEN
  566. #define IR_BUTTON_6 0xFF8877 // BLUE
  567. #define IR_BUTTON_7 0xFFA857 // WHITE
  568. #define IR_BUTTON_8 0xFFE817 // "Red" 1
  569. #define IR_BUTTON_9 0xFF48B7 // "Green" 1
  570. #define IR_BUTTON_10 0xFF6897 // "Blue" 1
  571. #define IR_BUTTON_11 0xFFB24D // FLASH Mode
  572. #define IR_BUTTON_12 0xFF02FD // "Red" 2
  573. #define IR_BUTTON_13 0xFF32CD // "Green" 2
  574. #define IR_BUTTON_14 0xFF20DF // "Blue" 2
  575. #define IR_BUTTON_15 0xFF00FF // STROBE Mode
  576. #define IR_BUTTON_16 0xFF50AF // "Red" 3
  577. #define IR_BUTTON_17 0xFF7887 // "Green" 3
  578. #define IR_BUTTON_18 0xFF708F // "Blue" 3
  579. #define IR_BUTTON_19 0xFF58A7 // FADE Mode
  580. #define IR_BUTTON_20 0xFF38C7 // "Red" 4
  581. #define IR_BUTTON_21 0xFF28D7 // "Green" 4
  582. #define IR_BUTTON_22 0xFFF00F // "Blue" 4
  583. #define IR_BUTTON_23 0xFF30CF // SMOOTH Mode
  584. #endif
  585. //Remote Buttons SET 2 (another identical IR Remote shipped with another controller)
  586. #if IR_BUTTONS_SET == 2
  587. #define IR_BUTTON_0 0xFF00FF // Brightness +
  588. #define IR_BUTTON_1 0xFF807F // Brightness -
  589. #define IR_BUTTON_2 0xFF40BF // OFF
  590. #define IR_BUTTON_3 0xFFC03F // ON
  591. #define IR_BUTTON_4 0xFF20DF // RED
  592. #define IR_BUTTON_5 0xFFA05F // GREEN
  593. #define IR_BUTTON_6 0xFF609F // BLUE
  594. #define IR_BUTTON_7 0xFFE01F // WHITE
  595. #define IR_BUTTON_8 0xFF10EF // "Red" 1
  596. #define IR_BUTTON_9 0xFF906F // "Green" 1
  597. #define IR_BUTTON_10 0xFF50AF // "Blue" 1
  598. #define IR_BUTTON_11 0xFFD02F // FLASH Mode
  599. #define IR_BUTTON_12 0xFF30CF // "Red" 2
  600. #define IR_BUTTON_13 0xFFB04F // "Green" 2
  601. #define IR_BUTTON_14 0xFF708F // "Blue" 2
  602. #define IR_BUTTON_15 0xFFF00F // STROBE Mode
  603. #define IR_BUTTON_16 0xFF08F7 // "Red" 3
  604. #define IR_BUTTON_17 0xFF8877 // "Green" 3
  605. #define IR_BUTTON_18 0xFF48B7 // "Blue" 3
  606. #define IR_BUTTON_19 0xFFC837 // FADE Mode
  607. #define IR_BUTTON_20 0xFF28D7 // "Red" 4
  608. #define IR_BUTTON_21 0xFFA857 // "Green" 4
  609. #define IR_BUTTON_22 0xFF6897 // "Blue" 4
  610. #define IR_BUTTON_23 0xFFE817 // SMOOTH Mode
  611. #endif
  612. // -----------------------------------------------------------------------------
  613. // HUACANXING H801 & H802
  614. // -----------------------------------------------------------------------------
  615. #elif defined(HUACANXING_H801)
  616. // Info
  617. #define MANUFACTURER "HUACANXING"
  618. #define DEVICE "H801"
  619. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  620. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  621. #define DUMMY_RELAY_COUNT 1
  622. // LEDs
  623. #define LED1_PIN 5
  624. #define LED1_PIN_INVERSE 1
  625. // Channels
  626. #define LIGHT_CH1_PIN 15 // RED
  627. #define LIGHT_CH2_PIN 13 // GREEN
  628. #define LIGHT_CH3_PIN 12 // BLUE
  629. #define LIGHT_CH4_PIN 14 // WHITE1
  630. #define LIGHT_CH5_PIN 4 // WHITE2
  631. #define LIGHT_CH1_INVERSE 0
  632. #define LIGHT_CH2_INVERSE 0
  633. #define LIGHT_CH3_INVERSE 0
  634. #define LIGHT_CH4_INVERSE 0
  635. #define LIGHT_CH5_INVERSE 0
  636. #elif defined(HUACANXING_H802)
  637. // Info
  638. #define MANUFACTURER "HUACANXING"
  639. #define DEVICE "H802"
  640. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  641. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  642. #define DUMMY_RELAY_COUNT 1
  643. // Channels
  644. #define LIGHT_CH1_PIN 12 // RED
  645. #define LIGHT_CH2_PIN 14 // GREEN
  646. #define LIGHT_CH3_PIN 13 // BLUE
  647. #define LIGHT_CH4_PIN 15 // WHITE
  648. #define LIGHT_CH1_INVERSE 0
  649. #define LIGHT_CH2_INVERSE 0
  650. #define LIGHT_CH3_INVERSE 0
  651. #define LIGHT_CH4_INVERSE 0
  652. // -----------------------------------------------------------------------------
  653. // Jan Goedeke Wifi Relay
  654. // https://github.com/JanGoe/esp8266-wifi-relay
  655. // -----------------------------------------------------------------------------
  656. #elif defined(JANGOE_WIFI_RELAY_NC)
  657. // Info
  658. #define MANUFACTURER "JANGOE"
  659. #define DEVICE "WIFI_RELAY_NC"
  660. // Buttons
  661. #define BUTTON1_PIN 12
  662. #define BUTTON2_PIN 13
  663. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  664. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  665. #define BUTTON1_RELAY 1
  666. #define BUTTON2_RELAY 2
  667. // Relays
  668. #define RELAY1_PIN 2
  669. #define RELAY2_PIN 14
  670. #define RELAY1_TYPE RELAY_TYPE_INVERSE
  671. #define RELAY2_TYPE RELAY_TYPE_INVERSE
  672. #elif defined(JANGOE_WIFI_RELAY_NO)
  673. // Info
  674. #define MANUFACTURER "JANGOE"
  675. #define DEVICE "WIFI_RELAY_NO"
  676. // Buttons
  677. #define BUTTON1_PIN 12
  678. #define BUTTON2_PIN 13
  679. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  680. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  681. #define BUTTON1_RELAY 1
  682. #define BUTTON2_RELAY 2
  683. // Relays
  684. #define RELAY1_PIN 2
  685. #define RELAY2_PIN 14
  686. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  687. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  688. // -----------------------------------------------------------------------------
  689. // Jorge García Wifi+Relays Board Kit
  690. // https://www.tindie.com/products/jorgegarciadev/wifi--relays-board-kit
  691. // https://github.com/jorgegarciadev/wifikit
  692. // -----------------------------------------------------------------------------
  693. #elif defined(JORGEGARCIA_WIFI_RELAYS)
  694. // Info
  695. #define MANUFACTURER "JORGEGARCIA"
  696. #define DEVICE "WIFI_RELAYS"
  697. // Relays
  698. #define RELAY1_PIN 0
  699. #define RELAY2_PIN 2
  700. #define RELAY1_TYPE RELAY_TYPE_INVERSE
  701. #define RELAY2_TYPE RELAY_TYPE_INVERSE
  702. // -----------------------------------------------------------------------------
  703. // WiFi MQTT Relay / Thermostat
  704. // -----------------------------------------------------------------------------
  705. #elif defined(OPENENERGYMONITOR_MQTT_RELAY)
  706. // Info
  707. #define MANUFACTURER "OPENENERGYMONITOR"
  708. #define DEVICE "MQTT_RELAY"
  709. // Buttons
  710. #define BUTTON1_PIN 0
  711. #define BUTTON1_RELAY 1
  712. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  713. // Relays
  714. #define RELAY1_PIN 12
  715. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  716. // LEDs
  717. #define LED1_PIN 16
  718. #define LED1_PIN_INVERSE 0
  719. // -----------------------------------------------------------------------------
  720. // WiOn 50055 Indoor Wi-Fi Wall Outlet & Tap
  721. // 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
  722. // 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
  723. // -----------------------------------------------------------------------------
  724. #elif defined(WION_50055)
  725. // Currently untested, does not support energy monitoring
  726. // Info
  727. #define MANUFACTURER "WION"
  728. #define DEVICE "50055"
  729. // Buttons
  730. #define BUTTON1_PIN 13
  731. #define BUTTON1_RELAY 1
  732. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  733. // Relays
  734. #define RELAY1_PIN 15
  735. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  736. // LEDs
  737. #define LED1_PIN 2
  738. #define LED1_PIN_INVERSE 0
  739. // -----------------------------------------------------------------------------
  740. // EX-Store Wifi Relay v3.1
  741. // https://ex-store.de/ESP8266-WiFi-Relay-V31
  742. // -----------------------------------------------------------------------------
  743. #elif defined(EXS_WIFI_RELAY_V31)
  744. // Untested
  745. // Info
  746. #define MANUFACTURER "EXS"
  747. #define DEVICE "WIFI_RELAY_V31"
  748. // Buttons
  749. #define BUTTON1_PIN 0
  750. #define BUTTON1_RELAY 1
  751. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  752. // Relays
  753. #define RELAY1_PIN 13
  754. #define RELAY1_TYPE RELAY_TYPE_LATCHED
  755. #define RELAY1_RESET_PIN 12
  756. // -----------------------------------------------------------------------------
  757. // V9261F
  758. // -----------------------------------------------------------------------------
  759. #elif defined(GENERIC_V9261F)
  760. // Info
  761. #define MANUFACTURER "GENERIC"
  762. #define DEVICE "V9261F"
  763. // V9261F
  764. #define POWER_PROVIDER POWER_PROVIDER_V9261F
  765. #define V9261F_PIN 2
  766. #define V9261F_PIN_INVERSE 1
  767. // -----------------------------------------------------------------------------
  768. // ECH1560
  769. // -----------------------------------------------------------------------------
  770. #elif defined(GENERIC_ECH1560)
  771. // Info
  772. #define MANUFACTURER "GENERIC"
  773. #define DEVICE "ECH1560"
  774. // ECH1560
  775. #define POWER_PROVIDER POWER_PROVIDER_ECH1560
  776. #define ECH1560_CLK_PIN 4
  777. #define ECH1560_MISO_PIN 5
  778. #define ECH1560_INVERTED 0
  779. // -----------------------------------------------------------------------------
  780. // ESPLive
  781. // https://github.com/ManCaveMade/ESP-Live
  782. // -----------------------------------------------------------------------------
  783. #elif defined(MANCAVEMADE_ESPLIVE)
  784. // Info
  785. #define MANUFACTURER "MANCAVEMADE"
  786. #define DEVICE "ESPLIVE"
  787. // Buttons
  788. #define BUTTON1_PIN 4
  789. #define BUTTON2_PIN 5
  790. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  791. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  792. #define BUTTON1_RELAY 1
  793. #define BUTTON2_RELAY 2
  794. // Relays
  795. #define RELAY1_PIN 12
  796. #define RELAY2_PIN 13
  797. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  798. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  799. // DB18B20
  800. #define DS18B20_SUPPORT 1
  801. #define DS18B20_PIN 2
  802. #define DS18B20_UPDATE_INTERVAL 5000
  803. #define DS18B20_UPDATE_ON_CHANGE 1.0
  804. // -----------------------------------------------------------------------------
  805. // QuinLED
  806. // http://blog.quindorian.org/2017/02/esp8266-led-lighting-quinled-v2-6-pcb.html
  807. // -----------------------------------------------------------------------------
  808. #elif defined(INTERMITTECH_QUINLED)
  809. // Info
  810. #define MANUFACTURER "INTERMITTECH"
  811. #define DEVICE "QUINLED"
  812. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  813. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  814. #define DUMMY_RELAY_COUNT 1
  815. // LEDs
  816. #define LED1_PIN 5
  817. #define LED1_PIN_INVERSE 1
  818. // Channels
  819. #define LIGHT_CH1_PIN 0
  820. #define LIGHT_CH2_PIN 2
  821. #define LIGHT_CH1_INVERSE 0
  822. #define LIGHT_CH2_INVERSE 0
  823. // -----------------------------------------------------------------------------
  824. // Arilux AL-LC06
  825. // -----------------------------------------------------------------------------
  826. #elif defined(ARILUX_AL_LC06)
  827. // Info
  828. #define MANUFACTURER "ARILUX"
  829. #define DEVICE "AL-LC06"
  830. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  831. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  832. #define DUMMY_RELAY_COUNT 1
  833. // Channels
  834. #define LIGHT_CH1_PIN 12 // RED
  835. #define LIGHT_CH2_PIN 14 // GREEN
  836. #define LIGHT_CH3_PIN 13 // BLUE
  837. #define LIGHT_CH4_PIN 15 // WHITE1
  838. #define LIGHT_CH5_PIN 5 // WHITE2
  839. #define LIGHT_CH1_INVERSE 0
  840. #define LIGHT_CH2_INVERSE 0
  841. #define LIGHT_CH3_INVERSE 0
  842. #define LIGHT_CH4_INVERSE 0
  843. #define LIGHT_CH5_INVERSE 0
  844. // -----------------------------------------------------------------------------
  845. // XENON SM-PW701U
  846. // -----------------------------------------------------------------------------
  847. #elif defined(XENON_SM_PW702U)
  848. // Info
  849. #define MANUFACTURER "XENON"
  850. #define DEVICE "SM_PW702U"
  851. // Buttons
  852. #define BUTTON1_PIN 13
  853. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  854. #define BUTTON1_RELAY 1
  855. // Relays
  856. #define RELAY1_PIN 12
  857. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  858. // LEDs
  859. #define LED1_PIN 4
  860. #define LED1_PIN_INVERSE 1
  861. // -----------------------------------------------------------------------------
  862. // AUTHOMETION LYT8266
  863. // https://authometion.com/shop/en/home/13-lyt8266.html
  864. // -----------------------------------------------------------------------------
  865. #elif defined(AUTHOMETION_LYT8266)
  866. // Info
  867. #define MANUFACTURER "AUTHOMETION"
  868. #define DEVICE "LYT8266"
  869. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  870. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  871. #define DUMMY_RELAY_COUNT 1
  872. // Channels
  873. #define LIGHT_CH1_PIN 13 // RED
  874. #define LIGHT_CH2_PIN 12 // GREEN
  875. #define LIGHT_CH3_PIN 14 // BLUE
  876. #define LIGHT_CH4_PIN 2 // WHITE
  877. #define LIGHT_CH1_INVERSE 0
  878. #define LIGHT_CH2_INVERSE 0
  879. #define LIGHT_CH3_INVERSE 0
  880. #define LIGHT_CH4_INVERSE 0
  881. #define LIGHT_ENABLE_PIN 15
  882. // -----------------------------------------------------------------------------
  883. // Unknown hardware
  884. // -----------------------------------------------------------------------------
  885. #else
  886. #error "UNSUPPORTED HARDWARE!"
  887. #endif
  888. // -----------------------------------------------------------------------------
  889. // Default values
  890. // -----------------------------------------------------------------------------
  891. #ifndef BUTTON1_PRESS
  892. #define BUTTON1_PRESS BUTTON_MODE_NONE
  893. #endif
  894. #ifndef BUTTON2_PRESS
  895. #define BUTTON2_PRESS BUTTON_MODE_NONE
  896. #endif
  897. #ifndef BUTTON3_PRESS
  898. #define BUTTON3_PRESS BUTTON_MODE_NONE
  899. #endif
  900. #ifndef BUTTON4_PRESS
  901. #define BUTTON4_PRESS BUTTON_MODE_NONE
  902. #endif
  903. #ifndef BUTTON1_CLICK
  904. #define BUTTON1_CLICK BUTTON_MODE_TOGGLE
  905. #endif
  906. #ifndef BUTTON2_CLICK
  907. #define BUTTON2_CLICK BUTTON_MODE_TOGGLE
  908. #endif
  909. #ifndef BUTTON3_CLICK
  910. #define BUTTON3_CLICK BUTTON_MODE_TOGGLE
  911. #endif
  912. #ifndef BUTTON4_CLICK
  913. #define BUTTON4_CLICK BUTTON_MODE_TOGGLE
  914. #endif
  915. #ifndef BUTTON1_DBLCLICK
  916. #define BUTTON1_DBLCLICK BUTTON_MODE_AP
  917. #endif
  918. #ifndef BUTTON2_DBLCLICK
  919. #define BUTTON2_DBLCLICK BUTTON_MODE_NONE
  920. #endif
  921. #ifndef BUTTON3_DBLCLICK
  922. #define BUTTON3_DBLCLICK BUTTON_MODE_NONE
  923. #endif
  924. #ifndef BUTTON4_DBLCLICK
  925. #define BUTTON4_DBLCLICK BUTTON_MODE_NONE
  926. #endif
  927. #ifndef BUTTON1_LNGCLICK
  928. #define BUTTON1_LNGCLICK BUTTON_MODE_RESET
  929. #endif
  930. #ifndef BUTTON2_LNGCLICK
  931. #define BUTTON2_LNGCLICK BUTTON_MODE_NONE
  932. #endif
  933. #ifndef BUTTON3_LNGCLICK
  934. #define BUTTON3_LNGCLICK BUTTON_MODE_NONE
  935. #endif
  936. #ifndef BUTTON4_LNGCLICK
  937. #define BUTTON4_LNGCLICK BUTTON_MODE_NONE
  938. #endif
  939. #ifndef BUTTON1_LNGLNGCLICK
  940. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_FACTORY
  941. #endif
  942. #ifndef BUTTON2_LNGLNGCLICK
  943. #define BUTTON2_LNGLNGCLICK BUTTON_MODE_NONE
  944. #endif
  945. #ifndef BUTTON3_LNGLNGCLICK
  946. #define BUTTON3_LNGLNGCLICK BUTTON_MODE_NONE
  947. #endif
  948. #ifndef BUTTON4_LNGLNGCLICK
  949. #define BUTTON4_LNGLNGCLICK BUTTON_MODE_NONE
  950. #endif
  951. #ifndef BUTTON1_RELAY
  952. #define BUTTON1_RELAY 0
  953. #endif
  954. #ifndef BUTTON2_RELAY
  955. #define BUTTON2_RELAY 0
  956. #endif
  957. #ifndef BUTTON3_RELAY
  958. #define BUTTON3_RELAY 0
  959. #endif
  960. #ifndef BUTTON4_RELAY
  961. #define BUTTON4_RELAY 0
  962. #endif
  963. #ifndef RELAY1_RESET_PIN
  964. #define RELAY1_RESET_PIN 0
  965. #endif
  966. #ifndef RELAY2_RESET_PIN
  967. #define RELAY2_RESET_PIN 0
  968. #endif
  969. #ifndef RELAY3_RESET_PIN
  970. #define RELAY3_RESET_PIN 0
  971. #endif
  972. #ifndef RELAY4_RESET_PIN
  973. #define RELAY4_RESET_PIN 0
  974. #endif
  975. #ifndef RELAY1_DELAY_ON
  976. #define RELAY1_DELAY_ON 0
  977. #endif
  978. #ifndef RELAY2_DELAY_ON
  979. #define RELAY2_DELAY_ON 0
  980. #endif
  981. #ifndef RELAY3_DELAY_ON
  982. #define RELAY3_DELAY_ON 0
  983. #endif
  984. #ifndef RELAY4_DELAY_ON
  985. #define RELAY4_DELAY_ON 0
  986. #endif
  987. #ifndef RELAY1_DELAY_OFF
  988. #define RELAY1_DELAY_OFF 0
  989. #endif
  990. #ifndef RELAY2_DELAY_OFF
  991. #define RELAY2_DELAY_OFF 0
  992. #endif
  993. #ifndef RELAY3_DELAY_OFF
  994. #define RELAY3_DELAY_OFF 0
  995. #endif
  996. #ifndef RELAY4_DELAY_OFF
  997. #define RELAY4_DELAY_OFF 0
  998. #endif
  999. #ifndef RELAY1_LED
  1000. #define RELAY1_LED 0
  1001. #endif
  1002. #ifndef RELAY2_LED
  1003. #define RELAY2_LED 0
  1004. #endif
  1005. #ifndef RELAY3_LED
  1006. #define RELAY3_LED 0
  1007. #endif
  1008. #ifndef RELAY4_LED
  1009. #define RELAY4_LED 0
  1010. #endif
  1011. // Needed for ESP8285 boards under Windows using PlatformIO (?)
  1012. #ifndef BUTTON_PUSHBUTTON
  1013. #define BUTTON_PUSHBUTTON 0
  1014. #define BUTTON_SWITCH 1
  1015. #define BUTTON_DEFAULT_HIGH 2
  1016. #define BUTTON_SET_PULLUP 4
  1017. #endif
  1018. // Does the board track the relay status?
  1019. #ifndef TRACK_RELAY_STATUS
  1020. #define TRACK_RELAY_STATUS 1
  1021. #endif
  1022. // Serial baudrate
  1023. #ifndef SERIAL_BAUDRATE
  1024. #define SERIAL_BAUDRATE 115200
  1025. #endif
  1026. // Relay providers
  1027. #ifndef RELAY_PROVIDER
  1028. #define RELAY_PROVIDER RELAY_PROVIDER_RELAY
  1029. #endif
  1030. // Light provider
  1031. #ifndef LIGHT_PROVIDER
  1032. #define LIGHT_PROVIDER LIGHT_PROVIDER_NONE
  1033. #endif