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.

1265 lines
38 KiB

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