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.

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