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.

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