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.

1394 lines
42 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. // 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. // Sonoff 4CH Pro uses a secondary STM32 microcontroller to handle
  355. // buttons and relays, but it also forwards button presses to the ESP8285.
  356. // This allows ESPurna to handle button presses -almost- the same way
  357. // as with other devices except:
  358. // * Double click seems to break/disable the button on the STM32 side
  359. // * With S6 switch to 1 (self-locking and inching modes) everything's OK
  360. // * With S6 switch to 0 (interlock mode) if there is a relay ON
  361. // and you click on another relay button, the STM32 sends a "press"
  362. // event for the button of the first relay (to turn it OFF) but it
  363. // does not send a "release" event. It's like it's holding the
  364. // button down since you can see it is still LOW.
  365. // Whatever reason the result is that it may actually perform a
  366. // long click or long-long click.
  367. // The configuration below make the button toggle the relay on press events
  368. // and disables any possibly harmful combination with S6 set to 0.
  369. // If you are sure you will only use S6 to 1 you can comment the
  370. // BUTTON1_LNGCLICK and BUTTON1_LNGLNGCLICK options below to recover the
  371. // AP mode and factory reset functionalities.
  372. #define BUTTON1_PRESS BUTTON_MODE_TOGGLE
  373. #define BUTTON1_CLICK BUTTON_MODE_NONE
  374. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  375. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  376. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_NONE
  377. #define BUTTON2_PRESS BUTTON_MODE_TOGGLE
  378. #define BUTTON2_CLICK BUTTON_MODE_NONE
  379. #define BUTTON3_PRESS BUTTON_MODE_TOGGLE
  380. #define BUTTON3_CLICK BUTTON_MODE_NONE
  381. #define BUTTON4_PRESS BUTTON_MODE_TOGGLE
  382. #define BUTTON4_CLICK BUTTON_MODE_NONE
  383. // Relays
  384. #define RELAY1_PIN 12
  385. #define RELAY2_PIN 5
  386. #define RELAY3_PIN 4
  387. #define RELAY4_PIN 15
  388. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  389. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  390. #define RELAY3_TYPE RELAY_TYPE_NORMAL
  391. #define RELAY4_TYPE RELAY_TYPE_NORMAL
  392. // LEDs
  393. #define LED1_PIN 13
  394. #define LED1_PIN_INVERSE 1
  395. #elif defined(ITEAD_1CH_INCHING)
  396. // The inching functionality is managed by a misterious IC in the board.
  397. // You cannot control the inching button and functionality from the ESP8266
  398. // Besides, enabling the inching functionality using the hardware button
  399. // will result in the relay switching on and off continuously.
  400. // Fortunately the unkown IC keeps memory of the hardware inching status
  401. // so you can just disable it and forget. The inching LED must be lit.
  402. // You can still use the pulse options from the web interface
  403. // without problem.
  404. // Info
  405. #define MANUFACTURER "ITEAD"
  406. #define DEVICE "1CH_INCHING"
  407. // Buttons
  408. #define BUTTON1_PIN 0
  409. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  410. #define BUTTON1_RELAY 1
  411. // Relays
  412. #define RELAY1_PIN 12
  413. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  414. // LEDs
  415. #define LED1_PIN 13
  416. #define LED1_PIN_INVERSE 1
  417. #elif defined(ITEAD_MOTOR)
  418. // Info
  419. #define MANUFACTURER "ITEAD"
  420. #define DEVICE "MOTOR"
  421. // Buttons
  422. #define BUTTON1_PIN 0
  423. #define BUTTON1_RELAY 1
  424. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  425. // Relays
  426. #define RELAY1_PIN 12
  427. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  428. // LEDs
  429. #define LED1_PIN 13
  430. #define LED1_PIN_INVERSE 1
  431. #elif defined(ITEAD_BNSZ01)
  432. // Info
  433. #define MANUFACTURER "ITEAD"
  434. #define DEVICE "BNSZ01"
  435. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  436. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  437. #define DUMMY_RELAY_COUNT 1
  438. // LEDs
  439. #define LED1_PIN 13
  440. #define LED1_PIN_INVERSE 1
  441. // Light
  442. #define LIGHT_CHANNELS 1
  443. #define LIGHT_CH1_PIN 12
  444. #define LIGHT_CH1_INVERSE 0
  445. #elif defined(ITEAD_SONOFF_RFBRIDGE)
  446. // Info
  447. #define MANUFACTURER "ITEAD"
  448. #define DEVICE "SONOFF_RFBRIDGE"
  449. #define SERIAL_BAUDRATE 19200
  450. #define RELAY_PROVIDER RELAY_PROVIDER_RFBRIDGE
  451. #ifndef DUMMY_RELAY_COUNT
  452. #define DUMMY_RELAY_COUNT 8
  453. #endif
  454. // Remove UART noise on serial line
  455. #define TERMINAL_SUPPORT 0
  456. #define DEBUG_SERIAL_SUPPORT 0
  457. // Buttons
  458. #define BUTTON1_PIN 0
  459. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  460. // LEDs
  461. #define LED1_PIN 13
  462. #define LED1_PIN_INVERSE 1
  463. #elif defined(ITEAD_SONOFF_B1)
  464. // Info
  465. #define MANUFACTURER "ITEAD"
  466. #define DEVICE "SONOFF_B1"
  467. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  468. #define LIGHT_PROVIDER LIGHT_PROVIDER_MY92XX
  469. #define DUMMY_RELAY_COUNT 1
  470. // Light
  471. #define LIGHT_CHANNELS 5
  472. #define MY92XX_MODEL MY92XX_MODEL_MY9231
  473. #define MY92XX_CHIPS 2
  474. #define MY92XX_DI_PIN 12
  475. #define MY92XX_DCKI_PIN 14
  476. #define MY92XX_COMMAND MY92XX_COMMAND_DEFAULT
  477. #define MY92XX_MAPPING 4, 3, 5, 0, 1
  478. #elif defined(ITEAD_SONOFF_LED)
  479. // Info
  480. #define MANUFACTURER "ITEAD"
  481. #define DEVICE "SONOFF_LED"
  482. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  483. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  484. #define DUMMY_RELAY_COUNT 1
  485. // LEDs
  486. #define LED1_PIN 13
  487. #define LED1_PIN_INVERSE 1
  488. // Light
  489. #define LIGHT_CHANNELS 2
  490. #define LIGHT_CH1_PIN 12 // Cold white
  491. #define LIGHT_CH2_PIN 14 // Warm white
  492. #define LIGHT_CH1_INVERSE 0
  493. #define LIGHT_CH2_INVERSE 0
  494. #elif defined(ITEAD_SONOFF_T1_1CH)
  495. // Info
  496. #define MANUFACTURER "ITEAD"
  497. #define DEVICE "SONOFF_T1_1CH"
  498. // Buttons
  499. #define BUTTON1_PIN 0
  500. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  501. #define BUTTON1_PRESS BUTTON_MODE_TOGGLE
  502. #define BUTTON1_CLICK BUTTON_MODE_NONE
  503. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  504. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  505. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_RESET
  506. #define BUTTON1_RELAY 1
  507. // Relays
  508. #define RELAY1_PIN 12
  509. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  510. // LEDs
  511. #define LED1_PIN 13
  512. #define LED1_PIN_INVERSE 1
  513. #elif defined(ITEAD_SONOFF_T1_2CH)
  514. // Info
  515. #define MANUFACTURER "ITEAD"
  516. #define DEVICE "SONOFF_T1_2CH"
  517. // Buttons
  518. #define BUTTON1_PIN 0
  519. #define BUTTON2_PIN 9
  520. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  521. #define BUTTON1_PRESS BUTTON_MODE_TOGGLE
  522. #define BUTTON1_CLICK BUTTON_MODE_NONE
  523. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  524. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  525. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_RESET
  526. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  527. #define BUTTON2_PRESS BUTTON_MODE_TOGGLE
  528. #define BUTTON2_CLICK BUTTON_MODE_NONE
  529. #define BUTTON2_DBLCLICK BUTTON_MODE_NONE
  530. #define BUTTON2_LNGCLICK BUTTON_MODE_NONE
  531. #define BUTTON2_LNGLNGCLICK BUTTON_MODE_RESET
  532. #define BUTTON1_RELAY 1
  533. #define BUTTON2_RELAY 2
  534. // Relays
  535. #define RELAY1_PIN 12
  536. #define RELAY2_PIN 5
  537. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  538. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  539. // LEDs
  540. #define LED1_PIN 13
  541. #define LED1_PIN_INVERSE 1
  542. #elif defined(ITEAD_SONOFF_T1_3CH)
  543. // Info
  544. #define MANUFACTURER "ITEAD"
  545. #define DEVICE "SONOFF_T1_3CH"
  546. // Buttons
  547. #define BUTTON1_PIN 0
  548. #define BUTTON2_PIN 9
  549. #define BUTTON3_PIN 10
  550. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  551. #define BUTTON1_PRESS BUTTON_MODE_TOGGLE
  552. #define BUTTON1_CLICK BUTTON_MODE_NONE
  553. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  554. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  555. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_RESET
  556. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  557. #define BUTTON2_PRESS BUTTON_MODE_TOGGLE
  558. #define BUTTON2_CLICK BUTTON_MODE_NONE
  559. #define BUTTON2_DBLCLICK BUTTON_MODE_NONE
  560. #define BUTTON2_LNGCLICK BUTTON_MODE_NONE
  561. #define BUTTON2_LNGLNGCLICK BUTTON_MODE_RESET
  562. #define BUTTON3_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  563. #define BUTTON3_PRESS BUTTON_MODE_TOGGLE
  564. #define BUTTON3_CLICK BUTTON_MODE_NONE
  565. #define BUTTON3_DBLCLICK BUTTON_MODE_NONE
  566. #define BUTTON3_LNGCLICK BUTTON_MODE_NONE
  567. #define BUTTON3_LNGLNGCLICK BUTTON_MODE_RESET
  568. #define BUTTON1_RELAY 1
  569. #define BUTTON2_RELAY 2
  570. #define BUTTON3_RELAY 3
  571. // Relays
  572. #define RELAY1_PIN 12
  573. #define RELAY2_PIN 5
  574. #define RELAY3_PIN 4
  575. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  576. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  577. #define RELAY3_TYPE RELAY_TYPE_NORMAL
  578. // LEDs
  579. #define LED1_PIN 13
  580. #define LED1_PIN_INVERSE 1
  581. // -----------------------------------------------------------------------------
  582. // YJZK
  583. // -----------------------------------------------------------------------------
  584. #elif defined(YJZK_SWITCH_2CH)
  585. // Info
  586. #define MANUFACTURER "YJZK"
  587. #define DEVICE "SWITCH_2CH"
  588. // Buttons
  589. #define BUTTON1_PIN 0
  590. #define BUTTON2_PIN 9
  591. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  592. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  593. #define BUTTON1_RELAY 1
  594. #define BUTTON2_RELAY 2
  595. // Relays
  596. #define RELAY1_PIN 12
  597. #define RELAY2_PIN 5
  598. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  599. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  600. // LEDs
  601. #define LED1_PIN 13
  602. #define LED1_PIN_INVERSE 0
  603. // -----------------------------------------------------------------------------
  604. // Electrodragon boards
  605. // -----------------------------------------------------------------------------
  606. #elif defined(ELECTRODRAGON_WIFI_IOT)
  607. // Info
  608. #define MANUFACTURER "ELECTRODRAGON"
  609. #define DEVICE "WIFI_IOT"
  610. // Buttons
  611. #define BUTTON1_PIN 0
  612. #define BUTTON2_PIN 2
  613. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  614. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  615. #define BUTTON1_RELAY 1
  616. #define BUTTON2_RELAY 2
  617. // Relays
  618. #define RELAY1_PIN 12
  619. #define RELAY2_PIN 13
  620. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  621. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  622. // LEDs
  623. #define LED1_PIN 16
  624. #define LED1_PIN_INVERSE 0
  625. // -----------------------------------------------------------------------------
  626. // WorkChoice ecoPlug
  627. // -----------------------------------------------------------------------------
  628. #elif defined(WORKCHOICE_ECOPLUG)
  629. // Info
  630. #define MANUFACTURER "WORKCHOICE"
  631. #define DEVICE "ECOPLUG"
  632. // Buttons
  633. #define BUTTON1_PIN 13
  634. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  635. #define BUTTON1_RELAY 1
  636. // Relays
  637. #define RELAY1_PIN 15
  638. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  639. // LEDs
  640. #define LED1_PIN 2
  641. #define LED1_PIN_INVERSE 0
  642. // -----------------------------------------------------------------------------
  643. // AI Thinker
  644. // -----------------------------------------------------------------------------
  645. #elif defined(AITHINKER_AI_LIGHT)
  646. // Info
  647. #define MANUFACTURER "AITHINKER"
  648. #define DEVICE "AI_LIGHT"
  649. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  650. #define LIGHT_PROVIDER LIGHT_PROVIDER_MY92XX
  651. #define DUMMY_RELAY_COUNT 1
  652. // Light
  653. #define LIGHT_CHANNELS 4
  654. #define MY92XX_MODEL MY92XX_MODEL_MY9291
  655. #define MY92XX_CHIPS 1
  656. #define MY92XX_DI_PIN 13
  657. #define MY92XX_DCKI_PIN 15
  658. #define MY92XX_COMMAND MY92XX_COMMAND_DEFAULT
  659. #define MY92XX_MAPPING 0, 1, 2, 3
  660. // -----------------------------------------------------------------------------
  661. // LED Controller
  662. // -----------------------------------------------------------------------------
  663. #elif defined(MAGICHOME_LED_CONTROLLER)
  664. // Info
  665. #define MANUFACTURER "MAGICHOME"
  666. #define DEVICE "LED_CONTROLLER"
  667. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  668. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  669. #define DUMMY_RELAY_COUNT 1
  670. // LEDs
  671. #define LED1_PIN 2
  672. #define LED1_PIN_INVERSE 1
  673. // Light
  674. #define LIGHT_CHANNELS 4
  675. #define LIGHT_CH1_PIN 14 // RED
  676. #define LIGHT_CH2_PIN 5 // GREEN
  677. #define LIGHT_CH3_PIN 12 // BLUE
  678. #define LIGHT_CH4_PIN 13 // WHITE
  679. #define LIGHT_CH1_INVERSE 0
  680. #define LIGHT_CH2_INVERSE 0
  681. #define LIGHT_CH3_INVERSE 0
  682. #define LIGHT_CH4_INVERSE 0
  683. // IR
  684. #define IR_SUPPORT 1
  685. #define IR_PIN 4
  686. #define IR_BUTTON_SET 1
  687. #elif defined(MAGICHOME_LED_CONTROLLER_20)
  688. // Info
  689. #define MANUFACTURER "MAGICHOME"
  690. #define DEVICE "LED_CONTROLLER_20"
  691. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  692. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  693. #define DUMMY_RELAY_COUNT 1
  694. // LEDs
  695. #define LED1_PIN 2
  696. #define LED1_PIN_INVERSE 1
  697. // Light
  698. #define LIGHT_CHANNELS 4
  699. #define LIGHT_CH1_PIN 5 // RED
  700. #define LIGHT_CH2_PIN 12 // GREEN
  701. #define LIGHT_CH3_PIN 13 // BLUE
  702. #define LIGHT_CH4_PIN 15 // WHITE
  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. // IR
  708. #define IR_SUPPORT 1
  709. #define IR_PIN 4
  710. #define IR_BUTTON_SET 1
  711. // -----------------------------------------------------------------------------
  712. // HUACANXING H801 & H802
  713. // -----------------------------------------------------------------------------
  714. #elif defined(HUACANXING_H801)
  715. // Info
  716. #define MANUFACTURER "HUACANXING"
  717. #define DEVICE "H801"
  718. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  719. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  720. #define DUMMY_RELAY_COUNT 1
  721. #define DEBUG_PORT Serial1
  722. // LEDs
  723. #define LED1_PIN 5
  724. #define LED1_PIN_INVERSE 1
  725. // Light
  726. #define LIGHT_CHANNELS 5
  727. #define LIGHT_CH1_PIN 15 // RED
  728. #define LIGHT_CH2_PIN 13 // GREEN
  729. #define LIGHT_CH3_PIN 12 // BLUE
  730. #define LIGHT_CH4_PIN 14 // WHITE1
  731. #define LIGHT_CH5_PIN 4 // WHITE2
  732. #define LIGHT_CH1_INVERSE 0
  733. #define LIGHT_CH2_INVERSE 0
  734. #define LIGHT_CH3_INVERSE 0
  735. #define LIGHT_CH4_INVERSE 0
  736. #define LIGHT_CH5_INVERSE 0
  737. #elif defined(HUACANXING_H802)
  738. // Info
  739. #define MANUFACTURER "HUACANXING"
  740. #define DEVICE "H802"
  741. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  742. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  743. #define DUMMY_RELAY_COUNT 1
  744. #define DEBUG_PORT Serial1
  745. // Light
  746. #define LIGHT_CHANNELS 4
  747. #define LIGHT_CH1_PIN 12 // RED
  748. #define LIGHT_CH2_PIN 14 // GREEN
  749. #define LIGHT_CH3_PIN 13 // BLUE
  750. #define LIGHT_CH4_PIN 15 // WHITE
  751. #define LIGHT_CH1_INVERSE 0
  752. #define LIGHT_CH2_INVERSE 0
  753. #define LIGHT_CH3_INVERSE 0
  754. #define LIGHT_CH4_INVERSE 0
  755. // -----------------------------------------------------------------------------
  756. // Jan Goedeke Wifi Relay
  757. // https://github.com/JanGoe/esp8266-wifi-relay
  758. // -----------------------------------------------------------------------------
  759. #elif defined(JANGOE_WIFI_RELAY_NC)
  760. // Info
  761. #define MANUFACTURER "JANGOE"
  762. #define DEVICE "WIFI_RELAY_NC"
  763. // Buttons
  764. #define BUTTON1_PIN 12
  765. #define BUTTON2_PIN 13
  766. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  767. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  768. #define BUTTON1_RELAY 1
  769. #define BUTTON2_RELAY 2
  770. // Relays
  771. #define RELAY1_PIN 2
  772. #define RELAY2_PIN 14
  773. #define RELAY1_TYPE RELAY_TYPE_INVERSE
  774. #define RELAY2_TYPE RELAY_TYPE_INVERSE
  775. #elif defined(JANGOE_WIFI_RELAY_NO)
  776. // Info
  777. #define MANUFACTURER "JANGOE"
  778. #define DEVICE "WIFI_RELAY_NO"
  779. // Buttons
  780. #define BUTTON1_PIN 12
  781. #define BUTTON2_PIN 13
  782. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  783. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  784. #define BUTTON1_RELAY 1
  785. #define BUTTON2_RELAY 2
  786. // Relays
  787. #define RELAY1_PIN 2
  788. #define RELAY2_PIN 14
  789. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  790. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  791. // -----------------------------------------------------------------------------
  792. // Jorge García Wifi+Relays Board Kit
  793. // https://www.tindie.com/products/jorgegarciadev/wifi--relays-board-kit
  794. // https://github.com/jorgegarciadev/wifikit
  795. // -----------------------------------------------------------------------------
  796. #elif defined(JORGEGARCIA_WIFI_RELAYS)
  797. // Info
  798. #define MANUFACTURER "JORGEGARCIA"
  799. #define DEVICE "WIFI_RELAYS"
  800. // Relays
  801. #define RELAY1_PIN 0
  802. #define RELAY2_PIN 2
  803. #define RELAY1_TYPE RELAY_TYPE_INVERSE
  804. #define RELAY2_TYPE RELAY_TYPE_INVERSE
  805. // -----------------------------------------------------------------------------
  806. // WiFi MQTT Relay / Thermostat
  807. // -----------------------------------------------------------------------------
  808. #elif defined(OPENENERGYMONITOR_MQTT_RELAY)
  809. // Info
  810. #define MANUFACTURER "OPENENERGYMONITOR"
  811. #define DEVICE "MQTT_RELAY"
  812. // Buttons
  813. #define BUTTON1_PIN 0
  814. #define BUTTON1_RELAY 1
  815. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  816. // Relays
  817. #define RELAY1_PIN 12
  818. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  819. // LEDs
  820. #define LED1_PIN 16
  821. #define LED1_PIN_INVERSE 0
  822. // -----------------------------------------------------------------------------
  823. // WiOn 50055 Indoor Wi-Fi Wall Outlet & Tap
  824. // 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
  825. // 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
  826. // -----------------------------------------------------------------------------
  827. #elif defined(WION_50055)
  828. // Currently untested, does not support energy monitoring
  829. // Info
  830. #define MANUFACTURER "WION"
  831. #define DEVICE "50055"
  832. // Buttons
  833. #define BUTTON1_PIN 13
  834. #define BUTTON1_RELAY 1
  835. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  836. // Relays
  837. #define RELAY1_PIN 15
  838. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  839. // LEDs
  840. #define LED1_PIN 2
  841. #define LED1_PIN_INVERSE 0
  842. // -----------------------------------------------------------------------------
  843. // EX-Store Wifi Relay v3.1
  844. // https://ex-store.de/ESP8266-WiFi-Relay-V31
  845. // -----------------------------------------------------------------------------
  846. #elif defined(EXS_WIFI_RELAY_V31)
  847. // Untested
  848. // Info
  849. #define MANUFACTURER "EXS"
  850. #define DEVICE "WIFI_RELAY_V31"
  851. // Buttons
  852. #define BUTTON1_PIN 0
  853. #define BUTTON1_RELAY 1
  854. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  855. // Relays
  856. #define RELAY1_PIN 13
  857. #define RELAY1_TYPE RELAY_TYPE_LATCHED
  858. #define RELAY1_RESET_PIN 12
  859. // -----------------------------------------------------------------------------
  860. // V9261F
  861. // -----------------------------------------------------------------------------
  862. #elif defined(GENERIC_V9261F)
  863. // Info
  864. #define MANUFACTURER "GENERIC"
  865. #define DEVICE "V9261F"
  866. #define ALEXA_SUPPORT 0
  867. // V9261F
  868. #define V9261F_SUPPORT 1
  869. #define V9261F_PIN 2
  870. #define V9261F_PIN_INVERSE 1
  871. // -----------------------------------------------------------------------------
  872. // ECH1560
  873. // -----------------------------------------------------------------------------
  874. #elif defined(GENERIC_ECH1560)
  875. // Info
  876. #define MANUFACTURER "GENERIC"
  877. #define DEVICE "ECH1560"
  878. #define ALEXA_SUPPORT 0
  879. // ECH1560
  880. #define ECH1560_SUPPORT 1
  881. #define ECH1560_CLK_PIN 4
  882. #define ECH1560_MISO_PIN 5
  883. #define ECH1560_INVERTED 0
  884. // -----------------------------------------------------------------------------
  885. // ESPLive
  886. // https://github.com/ManCaveMade/ESP-Live
  887. // -----------------------------------------------------------------------------
  888. #elif defined(MANCAVEMADE_ESPLIVE)
  889. // Info
  890. #define MANUFACTURER "MANCAVEMADE"
  891. #define DEVICE "ESPLIVE"
  892. // Buttons
  893. #define BUTTON1_PIN 4
  894. #define BUTTON2_PIN 5
  895. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  896. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  897. #define BUTTON1_RELAY 1
  898. #define BUTTON2_RELAY 2
  899. // Relays
  900. #define RELAY1_PIN 12
  901. #define RELAY2_PIN 13
  902. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  903. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  904. // DB18B20
  905. #ifndef DALLAS_SUPPORT
  906. #define DALLAS_SUPPORT 1
  907. #endif
  908. #define DALLAS_PIN 2
  909. #define DALLAS_UPDATE_INTERVAL 5000
  910. #define TEMPERATURE_MIN_CHANGE 1.0
  911. // -----------------------------------------------------------------------------
  912. // QuinLED
  913. // http://blog.quindorian.org/2017/02/esp8266-led-lighting-quinled-v2-6-pcb.html
  914. // -----------------------------------------------------------------------------
  915. #elif defined(INTERMITTECH_QUINLED)
  916. // Info
  917. #define MANUFACTURER "INTERMITTECH"
  918. #define DEVICE "QUINLED"
  919. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  920. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  921. #define DUMMY_RELAY_COUNT 1
  922. // LEDs
  923. #define LED1_PIN 5
  924. #define LED1_PIN_INVERSE 1
  925. // Light
  926. #define LIGHT_CHANNELS 2
  927. #define LIGHT_CH1_PIN 0
  928. #define LIGHT_CH2_PIN 2
  929. #define LIGHT_CH1_INVERSE 0
  930. #define LIGHT_CH2_INVERSE 0
  931. // -----------------------------------------------------------------------------
  932. // Arilux AL-LC06
  933. // -----------------------------------------------------------------------------
  934. #elif defined(ARILUX_AL_LC01)
  935. // Info
  936. #define MANUFACTURER "ARILUX"
  937. #define DEVICE "AL_LC01"
  938. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  939. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  940. #define DUMMY_RELAY_COUNT 1
  941. // Light
  942. #define LIGHT_CHANNELS 4
  943. #define LIGHT_CH1_PIN 5 // RED
  944. #define LIGHT_CH2_PIN 12 // GREEN
  945. #define LIGHT_CH3_PIN 13 // BLUE
  946. #define LIGHT_CH4_PIN 14 // WHITE1
  947. #define LIGHT_CH1_INVERSE 0
  948. #define LIGHT_CH2_INVERSE 0
  949. #define LIGHT_CH3_INVERSE 0
  950. #define LIGHT_CH4_INVERSE 0
  951. #elif defined(ARILUX_AL_LC02)
  952. // Info
  953. #define MANUFACTURER "ARILUX"
  954. #define DEVICE "AL_LC02"
  955. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  956. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  957. #define DUMMY_RELAY_COUNT 1
  958. // Light
  959. #define LIGHT_CHANNELS 4
  960. #define LIGHT_CH1_PIN 12 // RED
  961. #define LIGHT_CH2_PIN 5 // GREEN
  962. #define LIGHT_CH3_PIN 13 // BLUE
  963. #define LIGHT_CH4_PIN 15 // WHITE1
  964. #define LIGHT_CH1_INVERSE 0
  965. #define LIGHT_CH2_INVERSE 0
  966. #define LIGHT_CH3_INVERSE 0
  967. #define LIGHT_CH4_INVERSE 0
  968. #elif defined(ARILUX_AL_LC06)
  969. // Info
  970. #define MANUFACTURER "ARILUX"
  971. #define DEVICE "AL_LC06"
  972. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  973. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  974. #define DUMMY_RELAY_COUNT 1
  975. // Light
  976. #define LIGHT_CHANNELS 5
  977. #define LIGHT_CH1_PIN 14 // RED
  978. #define LIGHT_CH2_PIN 12 // GREEN
  979. #define LIGHT_CH3_PIN 13 // BLUE
  980. #define LIGHT_CH4_PIN 15 // WHITE1
  981. #define LIGHT_CH5_PIN 5 // WHITE2
  982. #define LIGHT_CH1_INVERSE 0
  983. #define LIGHT_CH2_INVERSE 0
  984. #define LIGHT_CH3_INVERSE 0
  985. #define LIGHT_CH4_INVERSE 0
  986. #define LIGHT_CH5_INVERSE 0
  987. #elif defined(ARILUX_AL_LC11)
  988. // Info
  989. #define MANUFACTURER "ARILUX"
  990. #define DEVICE "AL_LC11"
  991. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  992. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  993. #define DUMMY_RELAY_COUNT 1
  994. // Light
  995. #define LIGHT_CHANNELS 5
  996. #define LIGHT_CH1_PIN 5 // RED
  997. #define LIGHT_CH2_PIN 4 // GREEN
  998. #define LIGHT_CH3_PIN 14 // BLUE
  999. #define LIGHT_CH4_PIN 13 // WHITE1
  1000. #define LIGHT_CH5_PIN 12 // WHITE1
  1001. #define LIGHT_CH1_INVERSE 0
  1002. #define LIGHT_CH2_INVERSE 0
  1003. #define LIGHT_CH3_INVERSE 0
  1004. #define LIGHT_CH4_INVERSE 0
  1005. #define LIGHT_CH5_INVERSE 0
  1006. #elif defined(ARILUX_E27)
  1007. // Info
  1008. #define MANUFACTURER "ARILUX"
  1009. #define DEVICE "E27"
  1010. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  1011. #define LIGHT_PROVIDER LIGHT_PROVIDER_MY92XX
  1012. #define DUMMY_RELAY_COUNT 1
  1013. // Light
  1014. #define LIGHT_CHANNELS 4
  1015. #define MY92XX_MODEL MY92XX_MODEL_MY9291
  1016. #define MY92XX_CHIPS 1
  1017. #define MY92XX_DI_PIN 13
  1018. #define MY92XX_DCKI_PIN 15
  1019. #define MY92XX_COMMAND MY92XX_COMMAND_DEFAULT
  1020. #define MY92XX_MAPPING 0, 1, 2, 3
  1021. // -----------------------------------------------------------------------------
  1022. // XENON SM-PW701U
  1023. // -----------------------------------------------------------------------------
  1024. #elif defined(XENON_SM_PW702U)
  1025. // Info
  1026. #define MANUFACTURER "XENON"
  1027. #define DEVICE "SM_PW702U"
  1028. // Buttons
  1029. #define BUTTON1_PIN 13
  1030. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1031. #define BUTTON1_RELAY 1
  1032. // Relays
  1033. #define RELAY1_PIN 12
  1034. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1035. // LEDs
  1036. #define LED1_PIN 4
  1037. #define LED1_PIN_INVERSE 1
  1038. // -----------------------------------------------------------------------------
  1039. // AUTHOMETION LYT8266
  1040. // https://authometion.com/shop/en/home/13-lyt8266.html
  1041. // -----------------------------------------------------------------------------
  1042. #elif defined(AUTHOMETION_LYT8266)
  1043. // Info
  1044. #define MANUFACTURER "AUTHOMETION"
  1045. #define DEVICE "LYT8266"
  1046. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  1047. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  1048. #define DUMMY_RELAY_COUNT 1
  1049. // Light
  1050. #define LIGHT_CHANNELS 4
  1051. #define LIGHT_CH1_PIN 13 // RED
  1052. #define LIGHT_CH2_PIN 12 // GREEN
  1053. #define LIGHT_CH3_PIN 14 // BLUE
  1054. #define LIGHT_CH4_PIN 2 // WHITE
  1055. #define LIGHT_CH1_INVERSE 0
  1056. #define LIGHT_CH2_INVERSE 0
  1057. #define LIGHT_CH3_INVERSE 0
  1058. #define LIGHT_CH4_INVERSE 0
  1059. #define LIGHT_ENABLE_PIN 15
  1060. // -----------------------------------------------------------------------------
  1061. // Generic 8CH
  1062. // -----------------------------------------------------------------------------
  1063. #elif defined(GENERIC_8CH)
  1064. // Info
  1065. #define MANUFACTURER "GENERIC"
  1066. #define DEVICE "8CH"
  1067. // Relays
  1068. #define RELAY1_PIN 0
  1069. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1070. #define RELAY2_PIN 2
  1071. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  1072. #define RELAY3_PIN 4
  1073. #define RELAY3_TYPE RELAY_TYPE_NORMAL
  1074. #define RELAY4_PIN 5
  1075. #define RELAY4_TYPE RELAY_TYPE_NORMAL
  1076. #define RELAY5_PIN 12
  1077. #define RELAY5_TYPE RELAY_TYPE_NORMAL
  1078. #define RELAY6_PIN 13
  1079. #define RELAY6_TYPE RELAY_TYPE_NORMAL
  1080. #define RELAY7_PIN 14
  1081. #define RELAY7_TYPE RELAY_TYPE_NORMAL
  1082. #define RELAY8_PIN 15
  1083. #define RELAY8_TYPE RELAY_TYPE_NORMAL
  1084. // -----------------------------------------------------------------------------
  1085. // Unknown hardware
  1086. // -----------------------------------------------------------------------------
  1087. #else
  1088. #error "UNSUPPORTED HARDWARE!"
  1089. #endif