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.

1251 lines
37 KiB

7 years ago
7 years ago
7 years ago
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. // LED#_PIN: GPIO for the n-th LED (1-based, up to 4 LEDs)
  17. // LED#_PIN_INVERSE: LED has inversed logic (lit when pulled down)
  18. // LED#_MODE: Check hardware.h for LED_MODE_%
  19. // LED#_RELAY: Linked relay (1-based)
  20. //
  21. // Besides, other hardware specific information should be stated here
  22. // -----------------------------------------------------------------------------
  23. // Development boards
  24. // -----------------------------------------------------------------------------
  25. #if defined(NODEMCU_LOLIN)
  26. // Info
  27. #define MANUFACTURER "NODEMCU"
  28. #define DEVICE "LOLIN"
  29. // Buttons
  30. #define BUTTON1_PIN 0
  31. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  32. #define BUTTON1_RELAY 1
  33. // Relays
  34. #define RELAY1_PIN 12
  35. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  36. // LEDs
  37. #define LED1_PIN 2
  38. #define LED1_PIN_INVERSE 1
  39. #elif defined(WEMOS_D1_MINI_RELAYSHIELD)
  40. // Info
  41. #define MANUFACTURER "WEMOS"
  42. #define DEVICE "D1_MINI_RELAYSHIELD"
  43. // Buttons
  44. // No buttons on the D1 MINI alone, but defining it without adding a button doen't create problems
  45. #define BUTTON1_PIN 0 // Connect a pushbutton between D3 and GND,
  46. // it's the same as using a Wemos one button shield
  47. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  48. #define BUTTON1_RELAY 1
  49. // Relays
  50. #define RELAY1_PIN 5
  51. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  52. // LEDs
  53. #define LED1_PIN 2
  54. #define LED1_PIN_INVERSE 1
  55. // -----------------------------------------------------------------------------
  56. // ESPurna
  57. // -----------------------------------------------------------------------------
  58. #elif defined(TINKERMAN_ESPURNA_H06)
  59. // Info
  60. #define MANUFACTURER "TINKERMAN"
  61. #define DEVICE "ESPURNA_H06"
  62. // Buttons
  63. #define BUTTON1_PIN 4
  64. #define BUTTON1_RELAY 1
  65. #ifdef USE_TOUCH_BUTTON
  66. // Touch button
  67. #define BUTTON1_MODE BUTTON_PUSHBUTTON
  68. #define BUTTON1_PRESS BUTTON_MODE_TOGGLE
  69. #define BUTTON1_CLICK BUTTON_MODE_NONE
  70. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  71. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  72. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_NONE
  73. #else
  74. // Normal pushbutton
  75. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  76. #endif
  77. // Relays
  78. #define RELAY1_PIN 12
  79. #define RELAY1_TYPE RELAY_TYPE_INVERSE
  80. // LEDs
  81. #define LED1_PIN 2
  82. #define LED1_PIN_INVERSE 1
  83. // HLW8012
  84. #define HLW8012_SUPPORT 1
  85. #define HLW8012_SEL_PIN 2
  86. #define HLW8012_CF1_PIN 13
  87. #define HLW8012_CF_PIN 14
  88. #elif defined(TINKERMAN_ESPURNA_H08)
  89. // Info
  90. #define MANUFACTURER "TINKERMAN"
  91. #define DEVICE "ESPURNA_H08"
  92. // Buttons
  93. #define BUTTON1_PIN 4
  94. #define BUTTON1_RELAY 1
  95. #ifdef USE_TOUCH_BUTTON
  96. // Touch button
  97. #define BUTTON1_MODE BUTTON_PUSHBUTTON
  98. #define BUTTON1_PRESS BUTTON_MODE_TOGGLE
  99. #define BUTTON1_CLICK BUTTON_MODE_NONE
  100. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  101. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  102. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_NONE
  103. #else
  104. // Normal pushbutton
  105. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  106. #endif
  107. // Relays
  108. #define RELAY1_PIN 12
  109. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  110. // LEDs
  111. #define LED1_PIN 2
  112. #define LED1_PIN_INVERSE 0
  113. // HLW8012
  114. #define HLW8012_SUPPORT 1
  115. #define HLW8012_SEL_PIN 5
  116. #define HLW8012_CF1_PIN 13
  117. #define HLW8012_CF_PIN 14
  118. // -----------------------------------------------------------------------------
  119. // Itead Studio boards
  120. // -----------------------------------------------------------------------------
  121. #elif defined(ITEAD_SONOFF_BASIC)
  122. // Info
  123. #define MANUFACTURER "ITEAD"
  124. #define DEVICE "SONOFF_BASIC"
  125. // Buttons
  126. #define BUTTON1_PIN 0
  127. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  128. #define BUTTON1_RELAY 1
  129. #define BUTTON2_PIN 14
  130. #define BUTTON2_MODE BUTTON_SWITCH | BUTTON_SET_PULLUP
  131. #define BUTTON2_RELAY 1
  132. // Relays
  133. #define RELAY1_PIN 12
  134. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  135. // LEDs
  136. #define LED1_PIN 13
  137. #define LED1_PIN_INVERSE 1
  138. #elif defined(ITEAD_SONOFF_RF)
  139. // Info
  140. #define MANUFACTURER "ITEAD"
  141. #define DEVICE "SONOFF_RF"
  142. // Buttons
  143. #define BUTTON1_PIN 0
  144. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  145. #define BUTTON1_RELAY 1
  146. #define BUTTON2_PIN 14
  147. #define BUTTON2_MODE BUTTON_SWITCH | BUTTON_SET_PULLUP
  148. #define BUTTON2_RELAY 1
  149. // Relays
  150. #define RELAY1_PIN 12
  151. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  152. // LEDs
  153. #define LED1_PIN 13
  154. #define LED1_PIN_INVERSE 1
  155. #elif defined(ITEAD_SONOFF_TH)
  156. // Info
  157. #define MANUFACTURER "ITEAD"
  158. #define DEVICE "SONOFF_TH"
  159. // Buttons
  160. #define BUTTON1_PIN 0
  161. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  162. #define BUTTON1_RELAY 1
  163. // Relays
  164. #define RELAY1_PIN 12
  165. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  166. // LEDs
  167. #define LED1_PIN 13
  168. #define LED1_PIN_INVERSE 1
  169. // Jack is connected to GPIO14 (and with a small hack to GPIO4)
  170. #define DALLAS_SUPPORT 1
  171. #define DALLAS_PIN 14
  172. #define DHT_SUPPORT 1
  173. #define DHT_PIN 14
  174. //#define I2C_SDA_PIN 4
  175. //#define I2C_SCL_PIN 14
  176. #elif defined(ITEAD_SONOFF_SV)
  177. // Info
  178. #define MANUFACTURER "ITEAD"
  179. #define DEVICE "SONOFF_SV"
  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_SLAMPHER)
  191. // Info
  192. #define MANUFACTURER "ITEAD"
  193. #define DEVICE "SLAMPHER"
  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_S20)
  205. // Info
  206. #define MANUFACTURER "ITEAD"
  207. #define DEVICE "S20"
  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_TOUCH)
  219. // Info
  220. #define MANUFACTURER "ITEAD"
  221. #define DEVICE "SONOFF_TOUCH"
  222. // Buttons
  223. #define BUTTON1_PIN 0
  224. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  225. #define BUTTON1_PRESS BUTTON_MODE_TOGGLE
  226. #define BUTTON1_CLICK BUTTON_MODE_NONE
  227. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  228. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  229. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_RESET
  230. #define BUTTON1_RELAY 1
  231. // Relays
  232. #define RELAY1_PIN 12
  233. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  234. // LEDs
  235. #define LED1_PIN 13
  236. #define LED1_PIN_INVERSE 1
  237. #elif defined(ITEAD_SONOFF_POW)
  238. // Info
  239. #define MANUFACTURER "ITEAD"
  240. #define DEVICE "SONOFF_POW"
  241. // Buttons
  242. #define BUTTON1_PIN 0
  243. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  244. #define BUTTON1_RELAY 1
  245. // Relays
  246. #define RELAY1_PIN 12
  247. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  248. // LEDs
  249. #define LED1_PIN 15
  250. #define LED1_PIN_INVERSE 0
  251. // HLW8012
  252. #define HLW8012_SUPPORT 1
  253. #define HLW8012_SEL_PIN 5
  254. #define HLW8012_CF1_PIN 13
  255. #define HLW8012_CF_PIN 14
  256. #elif defined(ITEAD_SONOFF_DUAL)
  257. // Info
  258. #define MANUFACTURER "ITEAD"
  259. #define DEVICE "SONOFF_DUAL"
  260. #define SERIAL_BAUDRATE 19230
  261. #define RELAY_PROVIDER RELAY_PROVIDER_DUAL
  262. #define DUMMY_RELAY_COUNT 2
  263. #define DEBUG_SERIAL_SUPPORT 0
  264. #define TERMINAL_SUPPORT 0
  265. // Buttons
  266. #define BUTTON3_RELAY 1
  267. // LEDs
  268. #define LED1_PIN 13
  269. #define LED1_PIN_INVERSE 1
  270. #elif defined(ITEAD_SONOFF_DUAL_R2)
  271. #define MANUFACTURER "ITEAD"
  272. #define DEVICE "SONOFF_DUAL_R2"
  273. // Buttons
  274. #define BUTTON1_PIN 0
  275. #define BUTTON2_PIN 9
  276. #define BUTTON3_PIN 10
  277. #define BUTTON1_RELAY 1
  278. #define BUTTON2_RELAY 2
  279. #define BUTTON3_RELAY 1
  280. #define BUTTON1_MODE BUTTON_SWITCH | BUTTON_SET_PULLUP
  281. #define BUTTON2_MODE BUTTON_SWITCH | BUTTON_SET_PULLUP
  282. #define BUTTON3_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  283. // Relays
  284. #define RELAY1_PIN 12
  285. #define RELAY2_PIN 5
  286. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  287. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  288. // LEDs
  289. #define LED1_PIN 13
  290. #define LED1_PIN_INVERSE 1
  291. #elif defined(ITEAD_SONOFF_4CH)
  292. // Info
  293. #define MANUFACTURER "ITEAD"
  294. #define DEVICE "SONOFF_4CH"
  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_SONOFF_4CH_PRO)
  321. // Info
  322. #define MANUFACTURER "ITEAD"
  323. #define DEVICE "SONOFF_4CH_PRO"
  324. // Buttons
  325. #define BUTTON1_PIN 0
  326. #define BUTTON2_PIN 9
  327. #define BUTTON3_PIN 10
  328. #define BUTTON4_PIN 14
  329. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  330. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  331. #define BUTTON3_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  332. #define BUTTON4_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  333. #define BUTTON1_RELAY 1
  334. #define BUTTON2_RELAY 2
  335. #define BUTTON3_RELAY 3
  336. #define BUTTON4_RELAY 4
  337. // Relays
  338. #define RELAY1_PIN 12
  339. #define RELAY2_PIN 5
  340. #define RELAY3_PIN 4
  341. #define RELAY4_PIN 15
  342. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  343. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  344. #define RELAY3_TYPE RELAY_TYPE_NORMAL
  345. #define RELAY4_TYPE RELAY_TYPE_NORMAL
  346. // LEDs
  347. #define LED1_PIN 13
  348. #define LED1_PIN_INVERSE 1
  349. #elif defined(ITEAD_1CH_INCHING)
  350. // The inching functionality is managed by a misterious IC in the board.
  351. // You cannot control the inching button and functionality from the ESP8266
  352. // Besides, enabling the inching functionality using the hardware button
  353. // will result in the relay switching on and off continuously.
  354. // Fortunately the unkown IC keeps memory of the hardware inching status
  355. // so you can just disable it and forget. The inching LED must be lit.
  356. // You can still use the pulse options from the web interface
  357. // without problem.
  358. // Info
  359. #define MANUFACTURER "ITEAD"
  360. #define DEVICE "1CH_INCHING"
  361. // Buttons
  362. #define BUTTON1_PIN 0
  363. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  364. #define BUTTON1_RELAY 1
  365. // Relays
  366. #define RELAY1_PIN 12
  367. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  368. // LEDs
  369. #define LED1_PIN 13
  370. #define LED1_PIN_INVERSE 1
  371. #elif defined(ITEAD_MOTOR)
  372. // Info
  373. #define MANUFACTURER "ITEAD"
  374. #define DEVICE "MOTOR"
  375. // Buttons
  376. #define BUTTON1_PIN 0
  377. #define BUTTON1_RELAY 1
  378. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  379. // Relays
  380. #define RELAY1_PIN 12
  381. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  382. // LEDs
  383. #define LED1_PIN 13
  384. #define LED1_PIN_INVERSE 1
  385. #elif defined(ITEAD_BNSZ01)
  386. // Info
  387. #define MANUFACTURER "ITEAD"
  388. #define DEVICE "BNSZ01"
  389. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  390. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  391. #define DUMMY_RELAY_COUNT 1
  392. // LEDs
  393. #define LED1_PIN 13
  394. #define LED1_PIN_INVERSE 1
  395. // Light
  396. #define LIGHT_CHANNELS 1
  397. #define LIGHT_CH1_PIN 12
  398. #define LIGHT_CH1_INVERSE 0
  399. #elif defined(ITEAD_SONOFF_RFBRIDGE)
  400. // Info
  401. #define MANUFACTURER "ITEAD"
  402. #define DEVICE "SONOFF_RFBRIDGE"
  403. #define SERIAL_BAUDRATE 19200
  404. #define RELAY_PROVIDER RELAY_PROVIDER_RFBRIDGE
  405. #ifndef DUMMY_RELAY_COUNT
  406. #define DUMMY_RELAY_COUNT 8
  407. #endif
  408. // Remove UART noise on serial line
  409. #define TERMINAL_SUPPORT 0
  410. #define DEBUG_SERIAL_SUPPORT 0
  411. // Buttons
  412. #define BUTTON1_PIN 0
  413. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  414. // LEDs
  415. #define LED1_PIN 13
  416. #define LED1_PIN_INVERSE 1
  417. #elif defined(ITEAD_SONOFF_B1)
  418. // Info
  419. #define MANUFACTURER "ITEAD"
  420. #define DEVICE "SONOFF_B1"
  421. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  422. #define LIGHT_PROVIDER LIGHT_PROVIDER_MY92XX
  423. #define DUMMY_RELAY_COUNT 1
  424. // Light
  425. #define LIGHT_CHANNELS 5
  426. #define MY92XX_MODEL MY92XX_MODEL_MY9231
  427. #define MY92XX_CHIPS 2
  428. #define MY92XX_DI_PIN 12
  429. #define MY92XX_DCKI_PIN 14
  430. #define MY92XX_COMMAND MY92XX_COMMAND_DEFAULT
  431. #define MY92XX_MAPPING 4, 3, 5, 0, 1
  432. #elif defined(ITEAD_SONOFF_LED)
  433. // Info
  434. #define MANUFACTURER "ITEAD"
  435. #define DEVICE "SONOFF_LED"
  436. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  437. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  438. #define DUMMY_RELAY_COUNT 1
  439. // LEDs
  440. #define LED1_PIN 13
  441. #define LED1_PIN_INVERSE 1
  442. // Light
  443. #define LIGHT_CHANNELS 2
  444. #define LIGHT_CH1_PIN 12 // Cold white
  445. #define LIGHT_CH2_PIN 14 // Warm white
  446. #define LIGHT_CH1_INVERSE 0
  447. #define LIGHT_CH2_INVERSE 0
  448. #elif defined(ITEAD_SONOFF_T1_1CH)
  449. // Info
  450. #define MANUFACTURER "ITEAD"
  451. #define DEVICE "SONOFF_T1_1CH"
  452. // Buttons
  453. #define BUTTON1_PIN 0
  454. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  455. #define BUTTON1_PRESS BUTTON_MODE_TOGGLE
  456. #define BUTTON1_CLICK BUTTON_MODE_NONE
  457. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  458. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  459. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_RESET
  460. #define BUTTON1_RELAY 1
  461. // Relays
  462. #define RELAY1_PIN 12
  463. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  464. // LEDs
  465. #define LED1_PIN 13
  466. #define LED1_PIN_INVERSE 1
  467. #elif defined(ITEAD_SONOFF_T1_2CH)
  468. // Info
  469. #define MANUFACTURER "ITEAD"
  470. #define DEVICE "SONOFF_T1_2CH"
  471. // Buttons
  472. #define BUTTON1_PIN 0
  473. #define BUTTON2_PIN 9
  474. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  475. #define BUTTON1_PRESS BUTTON_MODE_TOGGLE
  476. #define BUTTON1_CLICK BUTTON_MODE_NONE
  477. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  478. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  479. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_RESET
  480. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  481. #define BUTTON2_PRESS BUTTON_MODE_TOGGLE
  482. #define BUTTON2_CLICK BUTTON_MODE_NONE
  483. #define BUTTON2_DBLCLICK BUTTON_MODE_NONE
  484. #define BUTTON2_LNGCLICK BUTTON_MODE_NONE
  485. #define BUTTON2_LNGLNGCLICK BUTTON_MODE_RESET
  486. #define BUTTON1_RELAY 1
  487. #define BUTTON2_RELAY 2
  488. // Relays
  489. #define RELAY1_PIN 12
  490. #define RELAY2_PIN 5
  491. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  492. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  493. // LEDs
  494. #define LED1_PIN 13
  495. #define LED1_PIN_INVERSE 1
  496. #elif defined(ITEAD_SONOFF_T1_3CH)
  497. // Info
  498. #define MANUFACTURER "ITEAD"
  499. #define DEVICE "SONOFF_T1_3CH"
  500. // Buttons
  501. #define BUTTON1_PIN 0
  502. #define BUTTON2_PIN 9
  503. #define BUTTON3_PIN 10
  504. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  505. #define BUTTON1_PRESS BUTTON_MODE_TOGGLE
  506. #define BUTTON1_CLICK BUTTON_MODE_NONE
  507. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  508. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  509. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_RESET
  510. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  511. #define BUTTON2_PRESS BUTTON_MODE_TOGGLE
  512. #define BUTTON2_CLICK BUTTON_MODE_NONE
  513. #define BUTTON2_DBLCLICK BUTTON_MODE_NONE
  514. #define BUTTON2_LNGCLICK BUTTON_MODE_NONE
  515. #define BUTTON2_LNGLNGCLICK BUTTON_MODE_RESET
  516. #define BUTTON3_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  517. #define BUTTON3_PRESS BUTTON_MODE_TOGGLE
  518. #define BUTTON3_CLICK BUTTON_MODE_NONE
  519. #define BUTTON3_DBLCLICK BUTTON_MODE_NONE
  520. #define BUTTON3_LNGCLICK BUTTON_MODE_NONE
  521. #define BUTTON3_LNGLNGCLICK BUTTON_MODE_RESET
  522. #define BUTTON1_RELAY 1
  523. #define BUTTON2_RELAY 2
  524. #define BUTTON3_RELAY 3
  525. // Relays
  526. #define RELAY1_PIN 12
  527. #define RELAY2_PIN 5
  528. #define RELAY3_PIN 4
  529. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  530. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  531. #define RELAY3_TYPE RELAY_TYPE_NORMAL
  532. // LEDs
  533. #define LED1_PIN 13
  534. #define LED1_PIN_INVERSE 1
  535. // -----------------------------------------------------------------------------
  536. // YJZK
  537. // -----------------------------------------------------------------------------
  538. #elif defined(YJZK_SWITCH_2CH)
  539. // Info
  540. #define MANUFACTURER "YJZK"
  541. #define DEVICE "SWITCH_2CH"
  542. // Buttons
  543. #define BUTTON1_PIN 0
  544. #define BUTTON2_PIN 9
  545. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  546. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  547. #define BUTTON1_RELAY 1
  548. #define BUTTON2_RELAY 2
  549. // Relays
  550. #define RELAY1_PIN 12
  551. #define RELAY2_PIN 5
  552. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  553. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  554. // LEDs
  555. #define LED1_PIN 13
  556. #define LED1_PIN_INVERSE 0
  557. #define LED_WIFI 0
  558. // -----------------------------------------------------------------------------
  559. // Electrodragon boards
  560. // -----------------------------------------------------------------------------
  561. #elif defined(ELECTRODRAGON_WIFI_IOT)
  562. // Info
  563. #define MANUFACTURER "ELECTRODRAGON"
  564. #define DEVICE "WIFI_IOT"
  565. // Buttons
  566. #define BUTTON1_PIN 0
  567. #define BUTTON2_PIN 2
  568. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  569. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  570. #define BUTTON1_RELAY 1
  571. #define BUTTON2_RELAY 2
  572. // Relays
  573. #define RELAY1_PIN 12
  574. #define RELAY2_PIN 13
  575. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  576. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  577. // LEDs
  578. #define LED1_PIN 16
  579. #define LED1_PIN_INVERSE 0
  580. // -----------------------------------------------------------------------------
  581. // WorkChoice ecoPlug
  582. // -----------------------------------------------------------------------------
  583. #elif defined(WORKCHOICE_ECOPLUG)
  584. // Info
  585. #define MANUFACTURER "WORKCHOICE"
  586. #define DEVICE "ECOPLUG"
  587. // Buttons
  588. #define BUTTON1_PIN 13
  589. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  590. #define BUTTON1_RELAY 1
  591. // Relays
  592. #define RELAY1_PIN 15
  593. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  594. // LEDs
  595. #define LED1_PIN 2
  596. #define LED1_PIN_INVERSE 0
  597. // -----------------------------------------------------------------------------
  598. // AI Thinker
  599. // -----------------------------------------------------------------------------
  600. #elif defined(AITHINKER_AI_LIGHT)
  601. // Info
  602. #define MANUFACTURER "AITHINKER"
  603. #define DEVICE "AI_LIGHT"
  604. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  605. #define LIGHT_PROVIDER LIGHT_PROVIDER_MY92XX
  606. #define DUMMY_RELAY_COUNT 1
  607. // Light
  608. #define LIGHT_CHANNELS 4
  609. #define MY92XX_MODEL MY92XX_MODEL_MY9291
  610. #define MY92XX_CHIPS 1
  611. #define MY92XX_DI_PIN 13
  612. #define MY92XX_DCKI_PIN 15
  613. #define MY92XX_COMMAND MY92XX_COMMAND_DEFAULT
  614. #define MY92XX_MAPPING 0, 1, 2, 3
  615. // -----------------------------------------------------------------------------
  616. // LED Controller
  617. // -----------------------------------------------------------------------------
  618. #elif defined(MAGICHOME_LED_CONTROLLER)
  619. // Info
  620. #define MANUFACTURER "MAGICHOME"
  621. #define DEVICE "LED_CONTROLLER"
  622. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  623. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  624. #define DUMMY_RELAY_COUNT 1
  625. // LEDs
  626. #define LED1_PIN 2
  627. #define LED1_PIN_INVERSE 1
  628. // Light
  629. #define LIGHT_CHANNELS 4
  630. #define LIGHT_CH1_PIN 14 // RED
  631. #define LIGHT_CH2_PIN 5 // GREEN
  632. #define LIGHT_CH3_PIN 12 // BLUE
  633. #define LIGHT_CH4_PIN 13 // WHITE
  634. #define LIGHT_CH1_INVERSE 0
  635. #define LIGHT_CH2_INVERSE 0
  636. #define LIGHT_CH3_INVERSE 0
  637. #define LIGHT_CH4_INVERSE 0
  638. // IR
  639. #define IR_SUPPORT 1
  640. #define IR_PIN 4
  641. #define IR_BUTTON_SET 1
  642. #elif defined(MAGICHOME_LED_CONTROLLER_20)
  643. // Info
  644. #define MANUFACTURER "MAGICHOME"
  645. #define DEVICE "LED_CONTROLLER_20"
  646. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  647. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  648. #define DUMMY_RELAY_COUNT 1
  649. // LEDs
  650. #define LED1_PIN 2
  651. #define LED1_PIN_INVERSE 1
  652. // Light
  653. #define LIGHT_CHANNELS 4
  654. #define LIGHT_CH1_PIN 5 // RED
  655. #define LIGHT_CH2_PIN 12 // GREEN
  656. #define LIGHT_CH3_PIN 13 // BLUE
  657. #define LIGHT_CH4_PIN 15 // WHITE
  658. #define LIGHT_CH1_INVERSE 0
  659. #define LIGHT_CH2_INVERSE 0
  660. #define LIGHT_CH3_INVERSE 0
  661. #define LIGHT_CH4_INVERSE 0
  662. // IR
  663. #define IR_SUPPORT 1
  664. #define IR_PIN 4
  665. #define IR_BUTTON_SET 1
  666. // -----------------------------------------------------------------------------
  667. // HUACANXING H801 & H802
  668. // -----------------------------------------------------------------------------
  669. #elif defined(HUACANXING_H801)
  670. // Info
  671. #define MANUFACTURER "HUACANXING"
  672. #define DEVICE "H801"
  673. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  674. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  675. #define DUMMY_RELAY_COUNT 1
  676. #define DEBUG_PORT Serial1
  677. // LEDs
  678. #define LED1_PIN 5
  679. #define LED1_PIN_INVERSE 1
  680. // Light
  681. #define LIGHT_CHANNELS 5
  682. #define LIGHT_CH1_PIN 15 // RED
  683. #define LIGHT_CH2_PIN 13 // GREEN
  684. #define LIGHT_CH3_PIN 12 // BLUE
  685. #define LIGHT_CH4_PIN 14 // WHITE1
  686. #define LIGHT_CH5_PIN 4 // WHITE2
  687. #define LIGHT_CH1_INVERSE 0
  688. #define LIGHT_CH2_INVERSE 0
  689. #define LIGHT_CH3_INVERSE 0
  690. #define LIGHT_CH4_INVERSE 0
  691. #define LIGHT_CH5_INVERSE 0
  692. #elif defined(HUACANXING_H802)
  693. // Info
  694. #define MANUFACTURER "HUACANXING"
  695. #define DEVICE "H802"
  696. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  697. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  698. #define DUMMY_RELAY_COUNT 1
  699. #define DEBUG_PORT Serial1
  700. // Light
  701. #define LIGHT_CHANNELS 4
  702. #define LIGHT_CH1_PIN 12 // RED
  703. #define LIGHT_CH2_PIN 14 // GREEN
  704. #define LIGHT_CH3_PIN 13 // BLUE
  705. #define LIGHT_CH4_PIN 15 // WHITE
  706. #define LIGHT_CH1_INVERSE 0
  707. #define LIGHT_CH2_INVERSE 0
  708. #define LIGHT_CH3_INVERSE 0
  709. #define LIGHT_CH4_INVERSE 0
  710. // -----------------------------------------------------------------------------
  711. // Jan Goedeke Wifi Relay
  712. // https://github.com/JanGoe/esp8266-wifi-relay
  713. // -----------------------------------------------------------------------------
  714. #elif defined(JANGOE_WIFI_RELAY_NC)
  715. // Info
  716. #define MANUFACTURER "JANGOE"
  717. #define DEVICE "WIFI_RELAY_NC"
  718. // Buttons
  719. #define BUTTON1_PIN 12
  720. #define BUTTON2_PIN 13
  721. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  722. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  723. #define BUTTON1_RELAY 1
  724. #define BUTTON2_RELAY 2
  725. // Relays
  726. #define RELAY1_PIN 2
  727. #define RELAY2_PIN 14
  728. #define RELAY1_TYPE RELAY_TYPE_INVERSE
  729. #define RELAY2_TYPE RELAY_TYPE_INVERSE
  730. #elif defined(JANGOE_WIFI_RELAY_NO)
  731. // Info
  732. #define MANUFACTURER "JANGOE"
  733. #define DEVICE "WIFI_RELAY_NO"
  734. // Buttons
  735. #define BUTTON1_PIN 12
  736. #define BUTTON2_PIN 13
  737. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  738. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  739. #define BUTTON1_RELAY 1
  740. #define BUTTON2_RELAY 2
  741. // Relays
  742. #define RELAY1_PIN 2
  743. #define RELAY2_PIN 14
  744. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  745. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  746. // -----------------------------------------------------------------------------
  747. // Jorge García Wifi+Relays Board Kit
  748. // https://www.tindie.com/products/jorgegarciadev/wifi--relays-board-kit
  749. // https://github.com/jorgegarciadev/wifikit
  750. // -----------------------------------------------------------------------------
  751. #elif defined(JORGEGARCIA_WIFI_RELAYS)
  752. // Info
  753. #define MANUFACTURER "JORGEGARCIA"
  754. #define DEVICE "WIFI_RELAYS"
  755. // Relays
  756. #define RELAY1_PIN 0
  757. #define RELAY2_PIN 2
  758. #define RELAY1_TYPE RELAY_TYPE_INVERSE
  759. #define RELAY2_TYPE RELAY_TYPE_INVERSE
  760. // -----------------------------------------------------------------------------
  761. // WiFi MQTT Relay / Thermostat
  762. // -----------------------------------------------------------------------------
  763. #elif defined(OPENENERGYMONITOR_MQTT_RELAY)
  764. // Info
  765. #define MANUFACTURER "OPENENERGYMONITOR"
  766. #define DEVICE "MQTT_RELAY"
  767. // Buttons
  768. #define BUTTON1_PIN 0
  769. #define BUTTON1_RELAY 1
  770. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  771. // Relays
  772. #define RELAY1_PIN 12
  773. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  774. // LEDs
  775. #define LED1_PIN 16
  776. #define LED1_PIN_INVERSE 0
  777. // -----------------------------------------------------------------------------
  778. // WiOn 50055 Indoor Wi-Fi Wall Outlet & Tap
  779. // 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
  780. // 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
  781. // -----------------------------------------------------------------------------
  782. #elif defined(WION_50055)
  783. // Currently untested, does not support energy monitoring
  784. // Info
  785. #define MANUFACTURER "WION"
  786. #define DEVICE "50055"
  787. // Buttons
  788. #define BUTTON1_PIN 13
  789. #define BUTTON1_RELAY 1
  790. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  791. // Relays
  792. #define RELAY1_PIN 15
  793. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  794. // LEDs
  795. #define LED1_PIN 2
  796. #define LED1_PIN_INVERSE 0
  797. // -----------------------------------------------------------------------------
  798. // EX-Store Wifi Relay v3.1
  799. // https://ex-store.de/ESP8266-WiFi-Relay-V31
  800. // -----------------------------------------------------------------------------
  801. #elif defined(EXS_WIFI_RELAY_V31)
  802. // Untested
  803. // Info
  804. #define MANUFACTURER "EXS"
  805. #define DEVICE "WIFI_RELAY_V31"
  806. // Buttons
  807. #define BUTTON1_PIN 0
  808. #define BUTTON1_RELAY 1
  809. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  810. // Relays
  811. #define RELAY1_PIN 13
  812. #define RELAY1_TYPE RELAY_TYPE_LATCHED
  813. #define RELAY1_RESET_PIN 12
  814. // -----------------------------------------------------------------------------
  815. // V9261F
  816. // -----------------------------------------------------------------------------
  817. #elif defined(GENERIC_V9261F)
  818. // Info
  819. #define MANUFACTURER "GENERIC"
  820. #define DEVICE "V9261F"
  821. #define ALEXA_SUPPORT 0
  822. // V9261F
  823. #define V9261F_SUPPORT 1
  824. #define V9261F_PIN 2
  825. #define V9261F_PIN_INVERSE 1
  826. // -----------------------------------------------------------------------------
  827. // ECH1560
  828. // -----------------------------------------------------------------------------
  829. #elif defined(GENERIC_ECH1560)
  830. // Info
  831. #define MANUFACTURER "GENERIC"
  832. #define DEVICE "ECH1560"
  833. #define ALEXA_SUPPORT 0
  834. // ECH1560
  835. #define ECH1560_SUPPORT 1
  836. #define ECH1560_CLK_PIN 4
  837. #define ECH1560_MISO_PIN 5
  838. #define ECH1560_INVERTED 0
  839. // -----------------------------------------------------------------------------
  840. // ESPLive
  841. // https://github.com/ManCaveMade/ESP-Live
  842. // -----------------------------------------------------------------------------
  843. #elif defined(MANCAVEMADE_ESPLIVE)
  844. // Info
  845. #define MANUFACTURER "MANCAVEMADE"
  846. #define DEVICE "ESPLIVE"
  847. // Buttons
  848. #define BUTTON1_PIN 4
  849. #define BUTTON2_PIN 5
  850. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  851. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  852. #define BUTTON1_RELAY 1
  853. #define BUTTON2_RELAY 2
  854. // Relays
  855. #define RELAY1_PIN 12
  856. #define RELAY2_PIN 13
  857. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  858. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  859. // DB18B20
  860. #define DALLAS_SUPPORT 1
  861. #define DALLAS_PIN 2
  862. #define DALLAS_UPDATE_INTERVAL 5000
  863. #define TEMPERATURE_MIN_CHANGE 1.0
  864. // -----------------------------------------------------------------------------
  865. // QuinLED
  866. // http://blog.quindorian.org/2017/02/esp8266-led-lighting-quinled-v2-6-pcb.html
  867. // -----------------------------------------------------------------------------
  868. #elif defined(INTERMITTECH_QUINLED)
  869. // Info
  870. #define MANUFACTURER "INTERMITTECH"
  871. #define DEVICE "QUINLED"
  872. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  873. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  874. #define DUMMY_RELAY_COUNT 1
  875. // LEDs
  876. #define LED1_PIN 5
  877. #define LED1_PIN_INVERSE 1
  878. // Light
  879. #define LIGHT_CHANNELS 2
  880. #define LIGHT_CH1_PIN 0
  881. #define LIGHT_CH2_PIN 2
  882. #define LIGHT_CH1_INVERSE 0
  883. #define LIGHT_CH2_INVERSE 0
  884. // -----------------------------------------------------------------------------
  885. // Arilux AL-LC06
  886. // -----------------------------------------------------------------------------
  887. #elif defined(ARILUX_AL_LC06)
  888. // Info
  889. #define MANUFACTURER "ARILUX"
  890. #define DEVICE "AL_LC06"
  891. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  892. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  893. #define DUMMY_RELAY_COUNT 1
  894. // Light
  895. #define LIGHT_CHANNELS 5
  896. #define LIGHT_CH1_PIN 14 // RED
  897. #define LIGHT_CH2_PIN 12 // GREEN
  898. #define LIGHT_CH3_PIN 13 // BLUE
  899. #define LIGHT_CH4_PIN 15 // WHITE1
  900. #define LIGHT_CH5_PIN 5 // WHITE2
  901. #define LIGHT_CH1_INVERSE 0
  902. #define LIGHT_CH2_INVERSE 0
  903. #define LIGHT_CH3_INVERSE 0
  904. #define LIGHT_CH4_INVERSE 0
  905. #define LIGHT_CH5_INVERSE 0
  906. #elif defined(ARILUX_E27)
  907. // Info
  908. #define MANUFACTURER "ARILUX"
  909. #define DEVICE "E27"
  910. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  911. #define LIGHT_PROVIDER LIGHT_PROVIDER_MY92XX
  912. #define DUMMY_RELAY_COUNT 1
  913. // Light
  914. #define LIGHT_CHANNELS 4
  915. #define MY92XX_MODEL MY92XX_MODEL_MY9291
  916. #define MY92XX_CHIPS 1
  917. #define MY92XX_DI_PIN 13
  918. #define MY92XX_DCKI_PIN 15
  919. #define MY92XX_COMMAND MY92XX_COMMAND_DEFAULT
  920. #define MY92XX_MAPPING 0, 1, 2, 3
  921. // -----------------------------------------------------------------------------
  922. // XENON SM-PW701U
  923. // -----------------------------------------------------------------------------
  924. #elif defined(XENON_SM_PW702U)
  925. // Info
  926. #define MANUFACTURER "XENON"
  927. #define DEVICE "SM_PW702U"
  928. // Buttons
  929. #define BUTTON1_PIN 13
  930. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  931. #define BUTTON1_RELAY 1
  932. // Relays
  933. #define RELAY1_PIN 12
  934. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  935. // LEDs
  936. #define LED1_PIN 4
  937. #define LED1_PIN_INVERSE 1
  938. // -----------------------------------------------------------------------------
  939. // AUTHOMETION LYT8266
  940. // https://authometion.com/shop/en/home/13-lyt8266.html
  941. // -----------------------------------------------------------------------------
  942. #elif defined(AUTHOMETION_LYT8266)
  943. // Info
  944. #define MANUFACTURER "AUTHOMETION"
  945. #define DEVICE "LYT8266"
  946. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  947. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  948. #define DUMMY_RELAY_COUNT 1
  949. // Light
  950. #define LIGHT_CHANNELS 4
  951. #define LIGHT_CH1_PIN 13 // RED
  952. #define LIGHT_CH2_PIN 12 // GREEN
  953. #define LIGHT_CH3_PIN 14 // BLUE
  954. #define LIGHT_CH4_PIN 2 // WHITE
  955. #define LIGHT_CH1_INVERSE 0
  956. #define LIGHT_CH2_INVERSE 0
  957. #define LIGHT_CH3_INVERSE 0
  958. #define LIGHT_CH4_INVERSE 0
  959. #define LIGHT_ENABLE_PIN 15
  960. // -----------------------------------------------------------------------------
  961. // Unknown hardware
  962. // -----------------------------------------------------------------------------
  963. #else
  964. #error "UNSUPPORTED HARDWARE!"
  965. #endif