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.

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