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.

1353 lines
40 KiB

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