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.

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