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