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.

1341 lines
40 KiB

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