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.

1804 lines
55 KiB

7 years ago
7 years ago
7 years ago
7 years ago
7 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, RELAY_TYPE_LATCHED or RELAY_TYPE_LATCHED_INVERSE
  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. // ESPurna Core
  24. // -----------------------------------------------------------------------------
  25. #if defined(ESPURNA_CORE)
  26. // This is a special device targeted to generate a light-weight binary image
  27. // meant to be able to do two-step-updates:
  28. // https://github.com/xoseperez/espurna/wiki/TwoStepUpdates
  29. // Info
  30. #define MANUFACTURER "ESPRESSIF"
  31. #define DEVICE "ESPURNA_CORE"
  32. // Disable non-core modules
  33. #define ALEXA_SUPPORT 0
  34. #define BROKER_SUPPORT 0
  35. #define DOMOTICZ_SUPPORT 0
  36. #define HOMEASSISTANT_SUPPORT 0
  37. #define I2C_SUPPORT 0
  38. #define MQTT_SUPPORT 0
  39. #define NTP_SUPPORT 0
  40. #define SCHEDULER_SUPPORT 0
  41. #define SENSOR_SUPPORT 0
  42. #define THINGSPEAK_SUPPORT 0
  43. #define WEB_SUPPORT 0
  44. // -----------------------------------------------------------------------------
  45. // Development boards
  46. // -----------------------------------------------------------------------------
  47. #elif defined(NODEMCU_LOLIN)
  48. // Info
  49. #define MANUFACTURER "NODEMCU"
  50. #define DEVICE "LOLIN"
  51. // Buttons
  52. #define BUTTON1_PIN 0
  53. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  54. #define BUTTON1_RELAY 1
  55. // Relays
  56. #define RELAY1_PIN 12
  57. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  58. // LEDs
  59. #define LED1_PIN 2
  60. #define LED1_PIN_INVERSE 1
  61. #elif defined(WEMOS_D1_MINI_RELAYSHIELD)
  62. // Info
  63. #define MANUFACTURER "WEMOS"
  64. #define DEVICE "D1_MINI_RELAYSHIELD"
  65. // Buttons
  66. // No buttons on the D1 MINI alone, but defining it without adding a button doen't create problems
  67. #define BUTTON1_PIN 0 // Connect a pushbutton between D3 and GND,
  68. // it's the same as using a Wemos one button shield
  69. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  70. #define BUTTON1_RELAY 1
  71. // Relays
  72. #define RELAY1_PIN 5
  73. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  74. // LEDs
  75. #define LED1_PIN 2
  76. #define LED1_PIN_INVERSE 1
  77. // When Wemos relay shield is connected GPIO5 (D1) is used for relay,
  78. // so I2C must be remapped to other pins
  79. #define I2C_SDA_PIN 12 // D6
  80. #define I2C_SCL_PIN 14 // D5
  81. #elif defined(WEMOS_D1_TARPUNA_SHIELD)
  82. // Info
  83. #define MANUFACTURER "WEMOS"
  84. #define DEVICE "D1_TARPUNA_SHIELD"
  85. // -----------------------------------------------------------------------------
  86. // ESPurna
  87. // -----------------------------------------------------------------------------
  88. #elif defined(TINKERMAN_ESPURNA_H06)
  89. // Info
  90. #define MANUFACTURER "TINKERMAN"
  91. #define DEVICE "ESPURNA_H06"
  92. // Buttons
  93. #define BUTTON1_PIN 4
  94. #define BUTTON1_RELAY 1
  95. // Normal pushbutton
  96. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  97. // Relays
  98. #define RELAY1_PIN 12
  99. #define RELAY1_TYPE RELAY_TYPE_INVERSE
  100. // LEDs
  101. #define LED1_PIN 2
  102. #define LED1_PIN_INVERSE 1
  103. // HLW8012
  104. #ifndef HLW8012_SUPPORT
  105. #define HLW8012_SUPPORT 1
  106. #endif
  107. #define HLW8012_SEL_PIN 2
  108. #define HLW8012_CF1_PIN 13
  109. #define HLW8012_CF_PIN 14
  110. #elif defined(TINKERMAN_ESPURNA_H08)
  111. // Info
  112. #define MANUFACTURER "TINKERMAN"
  113. #define DEVICE "ESPURNA_H08"
  114. // Buttons
  115. #define BUTTON1_PIN 4
  116. #define BUTTON1_RELAY 1
  117. // Normal pushbutton
  118. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  119. // Relays
  120. #define RELAY1_PIN 12
  121. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  122. // LEDs
  123. #define LED1_PIN 2
  124. #define LED1_PIN_INVERSE 0
  125. // HLW8012
  126. #ifndef HLW8012_SUPPORT
  127. #define HLW8012_SUPPORT 1
  128. #endif
  129. #define HLW8012_SEL_PIN 5
  130. #define HLW8012_CF1_PIN 13
  131. #define HLW8012_CF_PIN 14
  132. #elif defined(TINKERMAN_ESPURNA_SWITCH)
  133. // Info
  134. #define MANUFACTURER "TINKERMAN"
  135. #define DEVICE "ESPURNA_SWITCH"
  136. // Buttons
  137. #define BUTTON1_PIN 4
  138. #define BUTTON1_RELAY 1
  139. // Touch button
  140. #define BUTTON1_MODE BUTTON_PUSHBUTTON
  141. #define BUTTON1_PRESS BUTTON_MODE_TOGGLE
  142. #define BUTTON1_CLICK BUTTON_MODE_NONE
  143. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  144. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  145. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_NONE
  146. // LEDs
  147. #define LED1_PIN 2
  148. #define LED1_PIN_INVERSE 0
  149. // Relays
  150. #define RELAY1_PIN 12
  151. #define RELAY1_TYPE RELAY_TYPE_INVERSE
  152. // -----------------------------------------------------------------------------
  153. // Itead Studio boards
  154. // -----------------------------------------------------------------------------
  155. #elif defined(ITEAD_SONOFF_BASIC)
  156. // Info
  157. #define MANUFACTURER "ITEAD"
  158. #define DEVICE "SONOFF_BASIC"
  159. // Buttons
  160. #define BUTTON1_PIN 0
  161. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  162. #define BUTTON1_RELAY 1
  163. #define BUTTON2_PIN 14
  164. #define BUTTON2_MODE BUTTON_SWITCH | BUTTON_SET_PULLUP | BUTTON_DEFAULT_HIGH
  165. #define BUTTON2_RELAY 1
  166. // Relays
  167. #define RELAY1_PIN 12
  168. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  169. // LEDs
  170. #define LED1_PIN 13
  171. #define LED1_PIN_INVERSE 1
  172. #elif defined(ITEAD_SONOFF_RF)
  173. // Info
  174. #define MANUFACTURER "ITEAD"
  175. #define DEVICE "SONOFF_RF"
  176. // Buttons
  177. #define BUTTON1_PIN 0
  178. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  179. #define BUTTON1_RELAY 1
  180. #define BUTTON2_PIN 14
  181. #define BUTTON2_MODE BUTTON_SWITCH | BUTTON_SET_PULLUP | BUTTON_DEFAULT_HIGH
  182. #define BUTTON2_RELAY 1
  183. // Relays
  184. #define RELAY1_PIN 12
  185. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  186. // LEDs
  187. #define LED1_PIN 13
  188. #define LED1_PIN_INVERSE 1
  189. #elif defined(ITEAD_SONOFF_TH)
  190. // Info
  191. #define MANUFACTURER "ITEAD"
  192. #define DEVICE "SONOFF_TH"
  193. // Buttons
  194. #define BUTTON1_PIN 0
  195. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  196. #define BUTTON1_RELAY 1
  197. // Relays
  198. #define RELAY1_PIN 12
  199. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  200. // LEDs
  201. #define LED1_PIN 13
  202. #define LED1_PIN_INVERSE 1
  203. // Jack is connected to GPIO14 (and with a small hack to GPIO4)
  204. #ifndef DALLAS_SUPPORT
  205. #define DALLAS_SUPPORT 1
  206. #endif
  207. #define DALLAS_PIN 14
  208. #ifndef DHT_SUPPORT
  209. #define DHT_SUPPORT 1
  210. #endif
  211. #define DHT_PIN 14
  212. //#define I2C_SDA_PIN 4
  213. //#define I2C_SCL_PIN 14
  214. #elif defined(ITEAD_SONOFF_SV)
  215. // Info
  216. #define MANUFACTURER "ITEAD"
  217. #define DEVICE "SONOFF_SV"
  218. // Buttons
  219. #define BUTTON1_PIN 0
  220. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  221. #define BUTTON1_RELAY 1
  222. // Relays
  223. #define RELAY1_PIN 12
  224. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  225. // LEDs
  226. #define LED1_PIN 13
  227. #define LED1_PIN_INVERSE 1
  228. #elif defined(ITEAD_SLAMPHER)
  229. // Info
  230. #define MANUFACTURER "ITEAD"
  231. #define DEVICE "SLAMPHER"
  232. // Buttons
  233. #define BUTTON1_PIN 0
  234. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  235. #define BUTTON1_RELAY 1
  236. // Relays
  237. #define RELAY1_PIN 12
  238. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  239. // LEDs
  240. #define LED1_PIN 13
  241. #define LED1_PIN_INVERSE 1
  242. #elif defined(ITEAD_S20)
  243. // Info
  244. #define MANUFACTURER "ITEAD"
  245. #define DEVICE "S20"
  246. // Buttons
  247. #define BUTTON1_PIN 0
  248. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  249. #define BUTTON1_RELAY 1
  250. // Relays
  251. #define RELAY1_PIN 12
  252. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  253. // LEDs
  254. #define LED1_PIN 13
  255. #define LED1_PIN_INVERSE 1
  256. #elif defined(ITEAD_SONOFF_TOUCH)
  257. // Info
  258. #define MANUFACTURER "ITEAD"
  259. #define DEVICE "SONOFF_TOUCH"
  260. // Buttons
  261. #define BUTTON1_PIN 0
  262. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  263. #define BUTTON1_PRESS BUTTON_MODE_TOGGLE
  264. #define BUTTON1_CLICK BUTTON_MODE_NONE
  265. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  266. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  267. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_RESET
  268. #define BUTTON1_RELAY 1
  269. // Relays
  270. #define RELAY1_PIN 12
  271. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  272. // LEDs
  273. #define LED1_PIN 13
  274. #define LED1_PIN_INVERSE 1
  275. #elif defined(ITEAD_SONOFF_POW)
  276. // Info
  277. #define MANUFACTURER "ITEAD"
  278. #define DEVICE "SONOFF_POW"
  279. // Buttons
  280. #define BUTTON1_PIN 0
  281. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  282. #define BUTTON1_RELAY 1
  283. // Relays
  284. #define RELAY1_PIN 12
  285. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  286. // LEDs
  287. #define LED1_PIN 15
  288. #define LED1_PIN_INVERSE 0
  289. // HLW8012
  290. #ifndef HLW8012_SUPPORT
  291. #define HLW8012_SUPPORT 1
  292. #endif
  293. #define HLW8012_SEL_PIN 5
  294. #define HLW8012_CF1_PIN 13
  295. #define HLW8012_CF_PIN 14
  296. #elif defined(ITEAD_SONOFF_DUAL)
  297. // Info
  298. #define MANUFACTURER "ITEAD"
  299. #define DEVICE "SONOFF_DUAL"
  300. #define SERIAL_BAUDRATE 19230
  301. #define RELAY_PROVIDER RELAY_PROVIDER_DUAL
  302. #define DUMMY_RELAY_COUNT 2
  303. #define DEBUG_SERIAL_SUPPORT 0
  304. #define TERMINAL_SUPPORT 0
  305. // Buttons
  306. #define BUTTON3_RELAY 1
  307. // LEDs
  308. #define LED1_PIN 13
  309. #define LED1_PIN_INVERSE 1
  310. #elif defined(ITEAD_SONOFF_DUAL_R2)
  311. #define MANUFACTURER "ITEAD"
  312. #define DEVICE "SONOFF_DUAL_R2"
  313. // Buttons
  314. #define BUTTON1_PIN 0 // Button 0 on header
  315. #define BUTTON2_PIN 9 // Button 1 on header
  316. #define BUTTON3_PIN 10 // Physical button
  317. #define BUTTON1_RELAY 1
  318. #define BUTTON2_RELAY 2
  319. #define BUTTON3_RELAY 1
  320. #define BUTTON1_MODE BUTTON_SWITCH | BUTTON_SET_PULLUP | BUTTON_DEFAULT_HIGH
  321. #define BUTTON2_MODE BUTTON_SWITCH | BUTTON_SET_PULLUP | BUTTON_DEFAULT_HIGH
  322. #define BUTTON3_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  323. // Relays
  324. #define RELAY1_PIN 12
  325. #define RELAY2_PIN 5
  326. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  327. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  328. // LEDs
  329. #define LED1_PIN 13
  330. #define LED1_PIN_INVERSE 1
  331. #elif defined(ITEAD_SONOFF_4CH)
  332. // Info
  333. #define MANUFACTURER "ITEAD"
  334. #define DEVICE "SONOFF_4CH"
  335. // Buttons
  336. #define BUTTON1_PIN 0
  337. #define BUTTON2_PIN 9
  338. #define BUTTON3_PIN 10
  339. #define BUTTON4_PIN 14
  340. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  341. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  342. #define BUTTON3_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  343. #define BUTTON4_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  344. #define BUTTON1_RELAY 1
  345. #define BUTTON2_RELAY 2
  346. #define BUTTON3_RELAY 3
  347. #define BUTTON4_RELAY 4
  348. // Relays
  349. #define RELAY1_PIN 12
  350. #define RELAY2_PIN 5
  351. #define RELAY3_PIN 4
  352. #define RELAY4_PIN 15
  353. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  354. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  355. #define RELAY3_TYPE RELAY_TYPE_NORMAL
  356. #define RELAY4_TYPE RELAY_TYPE_NORMAL
  357. // LEDs
  358. #define LED1_PIN 13
  359. #define LED1_PIN_INVERSE 1
  360. #elif defined(ITEAD_SONOFF_4CH_PRO)
  361. // Info
  362. #define MANUFACTURER "ITEAD"
  363. #define DEVICE "SONOFF_4CH_PRO"
  364. // Buttons
  365. #define BUTTON1_PIN 0
  366. #define BUTTON2_PIN 9
  367. #define BUTTON3_PIN 10
  368. #define BUTTON4_PIN 14
  369. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  370. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  371. #define BUTTON3_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  372. #define BUTTON4_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  373. #define BUTTON1_RELAY 1
  374. #define BUTTON2_RELAY 2
  375. #define BUTTON3_RELAY 3
  376. #define BUTTON4_RELAY 4
  377. // Sonoff 4CH Pro uses a secondary STM32 microcontroller to handle
  378. // buttons and relays, but it also forwards button presses to the ESP8285.
  379. // This allows ESPurna to handle button presses -almost- the same way
  380. // as with other devices except:
  381. // * Double click seems to break/disable the button on the STM32 side
  382. // * With S6 switch to 1 (self-locking and inching modes) everything's OK
  383. // * With S6 switch to 0 (interlock mode) if there is a relay ON
  384. // and you click on another relay button, the STM32 sends a "press"
  385. // event for the button of the first relay (to turn it OFF) but it
  386. // does not send a "release" event. It's like it's holding the
  387. // button down since you can see it is still LOW.
  388. // Whatever reason the result is that it may actually perform a
  389. // long click or long-long click.
  390. // The configuration below make the button toggle the relay on press events
  391. // and disables any possibly harmful combination with S6 set to 0.
  392. // If you are sure you will only use S6 to 1 you can comment the
  393. // BUTTON1_LNGCLICK and BUTTON1_LNGLNGCLICK options below to recover the
  394. // reset mode and factory reset functionalities, or link other actions like
  395. // AP mode in the commented line below.
  396. #define BUTTON1_PRESS BUTTON_MODE_TOGGLE
  397. #define BUTTON1_CLICK BUTTON_MODE_NONE
  398. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  399. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  400. //#define BUTTON1_LNGCLICK BUTTON_MODE_AP
  401. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_NONE
  402. #define BUTTON2_PRESS BUTTON_MODE_TOGGLE
  403. #define BUTTON2_CLICK BUTTON_MODE_NONE
  404. #define BUTTON3_PRESS BUTTON_MODE_TOGGLE
  405. #define BUTTON3_CLICK BUTTON_MODE_NONE
  406. #define BUTTON4_PRESS BUTTON_MODE_TOGGLE
  407. #define BUTTON4_CLICK BUTTON_MODE_NONE
  408. // Relays
  409. #define RELAY1_PIN 12
  410. #define RELAY2_PIN 5
  411. #define RELAY3_PIN 4
  412. #define RELAY4_PIN 15
  413. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  414. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  415. #define RELAY3_TYPE RELAY_TYPE_NORMAL
  416. #define RELAY4_TYPE RELAY_TYPE_NORMAL
  417. // LEDs
  418. #define LED1_PIN 13
  419. #define LED1_PIN_INVERSE 1
  420. #elif defined(ITEAD_1CH_INCHING)
  421. // The inching functionality is managed by a misterious IC in the board.
  422. // You cannot control the inching button and functionality from the ESP8266
  423. // Besides, enabling the inching functionality using the hardware button
  424. // will result in the relay switching on and off continuously.
  425. // Fortunately the unkown IC keeps memory of the hardware inching status
  426. // so you can just disable it and forget. The inching LED must be lit.
  427. // You can still use the pulse options from the web interface
  428. // without problem.
  429. // Info
  430. #define MANUFACTURER "ITEAD"
  431. #define DEVICE "1CH_INCHING"
  432. // Buttons
  433. #define BUTTON1_PIN 0
  434. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  435. #define BUTTON1_RELAY 1
  436. // Relays
  437. #define RELAY1_PIN 12
  438. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  439. // LEDs
  440. #define LED1_PIN 13
  441. #define LED1_PIN_INVERSE 1
  442. #elif defined(ITEAD_MOTOR)
  443. // Info
  444. #define MANUFACTURER "ITEAD"
  445. #define DEVICE "MOTOR"
  446. // Buttons
  447. #define BUTTON1_PIN 0
  448. #define BUTTON1_RELAY 1
  449. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  450. // Relays
  451. #define RELAY1_PIN 12
  452. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  453. // LEDs
  454. #define LED1_PIN 13
  455. #define LED1_PIN_INVERSE 1
  456. #elif defined(ITEAD_BNSZ01)
  457. // Info
  458. #define MANUFACTURER "ITEAD"
  459. #define DEVICE "BNSZ01"
  460. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  461. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  462. #define DUMMY_RELAY_COUNT 1
  463. // LEDs
  464. #define LED1_PIN 13
  465. #define LED1_PIN_INVERSE 1
  466. // Light
  467. #define LIGHT_CHANNELS 1
  468. #define LIGHT_CH1_PIN 12
  469. #define LIGHT_CH1_INVERSE 0
  470. #elif defined(ITEAD_SONOFF_RFBRIDGE)
  471. // Info
  472. #define MANUFACTURER "ITEAD"
  473. #define DEVICE "SONOFF_RFBRIDGE"
  474. #define SERIAL_BAUDRATE 19200
  475. #define RELAY_PROVIDER RELAY_PROVIDER_RFBRIDGE
  476. #ifndef DUMMY_RELAY_COUNT
  477. #define DUMMY_RELAY_COUNT 8
  478. #endif
  479. // Remove UART noise on serial line
  480. #define TERMINAL_SUPPORT 0
  481. #define DEBUG_SERIAL_SUPPORT 0
  482. // Buttons
  483. #define BUTTON1_PIN 0
  484. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  485. // LEDs
  486. #define LED1_PIN 13
  487. #define LED1_PIN_INVERSE 1
  488. #elif defined(ITEAD_SONOFF_B1)
  489. // Info
  490. #define MANUFACTURER "ITEAD"
  491. #define DEVICE "SONOFF_B1"
  492. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  493. #define LIGHT_PROVIDER LIGHT_PROVIDER_MY92XX
  494. #define DUMMY_RELAY_COUNT 1
  495. // Light
  496. #define LIGHT_CHANNELS 5
  497. #define MY92XX_MODEL MY92XX_MODEL_MY9231
  498. #define MY92XX_CHIPS 2
  499. #define MY92XX_DI_PIN 12
  500. #define MY92XX_DCKI_PIN 14
  501. #define MY92XX_COMMAND MY92XX_COMMAND_DEFAULT
  502. #define MY92XX_MAPPING 4, 3, 5, 0, 1
  503. #elif defined(ITEAD_SONOFF_LED)
  504. // Info
  505. #define MANUFACTURER "ITEAD"
  506. #define DEVICE "SONOFF_LED"
  507. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  508. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  509. #define DUMMY_RELAY_COUNT 1
  510. // LEDs
  511. #define LED1_PIN 13
  512. #define LED1_PIN_INVERSE 1
  513. // Light
  514. #define LIGHT_CHANNELS 2
  515. #define LIGHT_CH1_PIN 12 // Cold white
  516. #define LIGHT_CH2_PIN 14 // Warm white
  517. #define LIGHT_CH1_INVERSE 0
  518. #define LIGHT_CH2_INVERSE 0
  519. #elif defined(ITEAD_SONOFF_T1_1CH)
  520. // Info
  521. #define MANUFACTURER "ITEAD"
  522. #define DEVICE "SONOFF_T1_1CH"
  523. // Buttons
  524. #define BUTTON1_PIN 0
  525. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  526. #define BUTTON1_PRESS BUTTON_MODE_TOGGLE
  527. #define BUTTON1_CLICK BUTTON_MODE_NONE
  528. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  529. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  530. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_RESET
  531. #define BUTTON1_RELAY 1
  532. // Relays
  533. #define RELAY1_PIN 12
  534. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  535. // LEDs
  536. #define LED1_PIN 13
  537. #define LED1_PIN_INVERSE 1
  538. #elif defined(ITEAD_SONOFF_T1_2CH)
  539. // Info
  540. #define MANUFACTURER "ITEAD"
  541. #define DEVICE "SONOFF_T1_2CH"
  542. // Buttons
  543. #define BUTTON1_PIN 0
  544. #define BUTTON2_PIN 9
  545. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  546. #define BUTTON1_PRESS BUTTON_MODE_TOGGLE
  547. #define BUTTON1_CLICK BUTTON_MODE_NONE
  548. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  549. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  550. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_RESET
  551. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  552. #define BUTTON2_PRESS BUTTON_MODE_TOGGLE
  553. #define BUTTON2_CLICK BUTTON_MODE_NONE
  554. #define BUTTON2_DBLCLICK BUTTON_MODE_NONE
  555. #define BUTTON2_LNGCLICK BUTTON_MODE_NONE
  556. #define BUTTON2_LNGLNGCLICK BUTTON_MODE_RESET
  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 1
  567. #elif defined(ITEAD_SONOFF_T1_3CH)
  568. // Info
  569. #define MANUFACTURER "ITEAD"
  570. #define DEVICE "SONOFF_T1_3CH"
  571. // Buttons
  572. #define BUTTON1_PIN 0
  573. #define BUTTON2_PIN 9
  574. #define BUTTON3_PIN 10
  575. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  576. #define BUTTON1_PRESS BUTTON_MODE_TOGGLE
  577. #define BUTTON1_CLICK BUTTON_MODE_NONE
  578. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  579. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  580. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_RESET
  581. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  582. #define BUTTON2_PRESS BUTTON_MODE_TOGGLE
  583. #define BUTTON2_CLICK BUTTON_MODE_NONE
  584. #define BUTTON2_DBLCLICK BUTTON_MODE_NONE
  585. #define BUTTON2_LNGCLICK BUTTON_MODE_NONE
  586. #define BUTTON2_LNGLNGCLICK BUTTON_MODE_RESET
  587. #define BUTTON3_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  588. #define BUTTON3_PRESS BUTTON_MODE_TOGGLE
  589. #define BUTTON3_CLICK BUTTON_MODE_NONE
  590. #define BUTTON3_DBLCLICK BUTTON_MODE_NONE
  591. #define BUTTON3_LNGCLICK BUTTON_MODE_NONE
  592. #define BUTTON3_LNGLNGCLICK BUTTON_MODE_RESET
  593. #define BUTTON1_RELAY 1
  594. #define BUTTON2_RELAY 2
  595. #define BUTTON3_RELAY 3
  596. // Relays
  597. #define RELAY1_PIN 12
  598. #define RELAY2_PIN 5
  599. #define RELAY3_PIN 4
  600. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  601. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  602. #define RELAY3_TYPE RELAY_TYPE_NORMAL
  603. // LEDs
  604. #define LED1_PIN 13
  605. #define LED1_PIN_INVERSE 1
  606. // -----------------------------------------------------------------------------
  607. // YJZK
  608. // -----------------------------------------------------------------------------
  609. #elif defined(YJZK_SWITCH_2CH)
  610. // Info
  611. #define MANUFACTURER "YJZK"
  612. #define DEVICE "SWITCH_2CH"
  613. // Buttons
  614. #define BUTTON1_PIN 0
  615. #define BUTTON2_PIN 9
  616. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  617. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  618. #define BUTTON1_RELAY 1
  619. #define BUTTON2_RELAY 2
  620. // Relays
  621. #define RELAY1_PIN 12
  622. #define RELAY2_PIN 5
  623. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  624. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  625. // LEDs
  626. #define LED1_PIN 13
  627. #define LED1_PIN_INVERSE 0
  628. // -----------------------------------------------------------------------------
  629. // Electrodragon boards
  630. // -----------------------------------------------------------------------------
  631. #elif defined(ELECTRODRAGON_WIFI_IOT)
  632. // Info
  633. #define MANUFACTURER "ELECTRODRAGON"
  634. #define DEVICE "WIFI_IOT"
  635. // Buttons
  636. #define BUTTON1_PIN 0
  637. #define BUTTON2_PIN 2
  638. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  639. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  640. #define BUTTON1_RELAY 1
  641. #define BUTTON2_RELAY 2
  642. // Relays
  643. #define RELAY1_PIN 12
  644. #define RELAY2_PIN 13
  645. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  646. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  647. // LEDs
  648. #define LED1_PIN 16
  649. #define LED1_PIN_INVERSE 0
  650. // -----------------------------------------------------------------------------
  651. // WorkChoice ecoPlug
  652. // -----------------------------------------------------------------------------
  653. #elif defined(WORKCHOICE_ECOPLUG)
  654. // Info
  655. #define MANUFACTURER "WORKCHOICE"
  656. #define DEVICE "ECOPLUG"
  657. // Buttons
  658. #define BUTTON1_PIN 13
  659. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  660. #define BUTTON1_RELAY 1
  661. // Relays
  662. #define RELAY1_PIN 15
  663. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  664. // LEDs
  665. #define LED1_PIN 2
  666. #define LED1_PIN_INVERSE 0
  667. // -----------------------------------------------------------------------------
  668. // AI Thinker
  669. // -----------------------------------------------------------------------------
  670. #elif defined(AITHINKER_AI_LIGHT)
  671. // Info
  672. #define MANUFACTURER "AITHINKER"
  673. #define DEVICE "AI_LIGHT"
  674. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  675. #define LIGHT_PROVIDER LIGHT_PROVIDER_MY92XX
  676. #define DUMMY_RELAY_COUNT 1
  677. // Light
  678. #define LIGHT_CHANNELS 4
  679. #define MY92XX_MODEL MY92XX_MODEL_MY9291
  680. #define MY92XX_CHIPS 1
  681. #define MY92XX_DI_PIN 13
  682. #define MY92XX_DCKI_PIN 15
  683. #define MY92XX_COMMAND MY92XX_COMMAND_DEFAULT
  684. #define MY92XX_MAPPING 0, 1, 2, 3
  685. // -----------------------------------------------------------------------------
  686. // LED Controller
  687. // -----------------------------------------------------------------------------
  688. #elif defined(MAGICHOME_LED_CONTROLLER)
  689. // Info
  690. #define MANUFACTURER "MAGICHOME"
  691. #define DEVICE "LED_CONTROLLER"
  692. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  693. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  694. #define DUMMY_RELAY_COUNT 1
  695. // LEDs
  696. #define LED1_PIN 2
  697. #define LED1_PIN_INVERSE 1
  698. // Light
  699. #define LIGHT_CHANNELS 4
  700. #define LIGHT_CH1_PIN 14 // RED
  701. #define LIGHT_CH2_PIN 5 // GREEN
  702. #define LIGHT_CH3_PIN 12 // BLUE
  703. #define LIGHT_CH4_PIN 13 // WHITE
  704. #define LIGHT_CH1_INVERSE 0
  705. #define LIGHT_CH2_INVERSE 0
  706. #define LIGHT_CH3_INVERSE 0
  707. #define LIGHT_CH4_INVERSE 0
  708. // IR
  709. #define IR_SUPPORT 1
  710. #define IR_PIN 4
  711. #define IR_BUTTON_SET 1
  712. #elif defined(MAGICHOME_LED_CONTROLLER_20)
  713. // Info
  714. #define MANUFACTURER "MAGICHOME"
  715. #define DEVICE "LED_CONTROLLER_20"
  716. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  717. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  718. #define DUMMY_RELAY_COUNT 1
  719. // LEDs
  720. #define LED1_PIN 2
  721. #define LED1_PIN_INVERSE 1
  722. // Light
  723. #define LIGHT_CHANNELS 4
  724. #define LIGHT_CH1_PIN 5 // RED
  725. #define LIGHT_CH2_PIN 12 // GREEN
  726. #define LIGHT_CH3_PIN 13 // BLUE
  727. #define LIGHT_CH4_PIN 15 // WHITE
  728. #define LIGHT_CH1_INVERSE 0
  729. #define LIGHT_CH2_INVERSE 0
  730. #define LIGHT_CH3_INVERSE 0
  731. #define LIGHT_CH4_INVERSE 0
  732. // IR
  733. #define IR_SUPPORT 1
  734. #define IR_PIN 4
  735. #define IR_BUTTON_SET 1
  736. // -----------------------------------------------------------------------------
  737. // HUACANXING H801 & H802
  738. // -----------------------------------------------------------------------------
  739. #elif defined(HUACANXING_H801)
  740. // Info
  741. #define MANUFACTURER "HUACANXING"
  742. #define DEVICE "H801"
  743. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  744. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  745. #define DUMMY_RELAY_COUNT 1
  746. #define DEBUG_PORT Serial1
  747. #define SERIAL_RX_ENABLED 1
  748. // LEDs
  749. #define LED1_PIN 5
  750. #define LED1_PIN_INVERSE 1
  751. // Light
  752. #define LIGHT_CHANNELS 5
  753. #define LIGHT_CH1_PIN 15 // RED
  754. #define LIGHT_CH2_PIN 13 // GREEN
  755. #define LIGHT_CH3_PIN 12 // BLUE
  756. #define LIGHT_CH4_PIN 14 // WHITE1
  757. #define LIGHT_CH5_PIN 4 // WHITE2
  758. #define LIGHT_CH1_INVERSE 0
  759. #define LIGHT_CH2_INVERSE 0
  760. #define LIGHT_CH3_INVERSE 0
  761. #define LIGHT_CH4_INVERSE 0
  762. #define LIGHT_CH5_INVERSE 0
  763. #elif defined(HUACANXING_H802)
  764. // Info
  765. #define MANUFACTURER "HUACANXING"
  766. #define DEVICE "H802"
  767. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  768. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  769. #define DUMMY_RELAY_COUNT 1
  770. #define DEBUG_PORT Serial1
  771. #define SERIAL_RX_ENABLED 1
  772. // Light
  773. #define LIGHT_CHANNELS 4
  774. #define LIGHT_CH1_PIN 12 // RED
  775. #define LIGHT_CH2_PIN 14 // GREEN
  776. #define LIGHT_CH3_PIN 13 // BLUE
  777. #define LIGHT_CH4_PIN 15 // WHITE
  778. #define LIGHT_CH1_INVERSE 0
  779. #define LIGHT_CH2_INVERSE 0
  780. #define LIGHT_CH3_INVERSE 0
  781. #define LIGHT_CH4_INVERSE 0
  782. // -----------------------------------------------------------------------------
  783. // Jan Goedeke Wifi Relay
  784. // https://github.com/JanGoe/esp8266-wifi-relay
  785. // -----------------------------------------------------------------------------
  786. #elif defined(JANGOE_WIFI_RELAY_NC)
  787. // Info
  788. #define MANUFACTURER "JANGOE"
  789. #define DEVICE "WIFI_RELAY_NC"
  790. // Buttons
  791. #define BUTTON1_PIN 12
  792. #define BUTTON2_PIN 13
  793. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  794. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  795. #define BUTTON1_RELAY 1
  796. #define BUTTON2_RELAY 2
  797. // Relays
  798. #define RELAY1_PIN 2
  799. #define RELAY2_PIN 14
  800. #define RELAY1_TYPE RELAY_TYPE_INVERSE
  801. #define RELAY2_TYPE RELAY_TYPE_INVERSE
  802. #elif defined(JANGOE_WIFI_RELAY_NO)
  803. // Info
  804. #define MANUFACTURER "JANGOE"
  805. #define DEVICE "WIFI_RELAY_NO"
  806. // Buttons
  807. #define BUTTON1_PIN 12
  808. #define BUTTON2_PIN 13
  809. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  810. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  811. #define BUTTON1_RELAY 1
  812. #define BUTTON2_RELAY 2
  813. // Relays
  814. #define RELAY1_PIN 2
  815. #define RELAY2_PIN 14
  816. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  817. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  818. // -----------------------------------------------------------------------------
  819. // Jorge García Wifi+Relays Board Kit
  820. // https://www.tindie.com/products/jorgegarciadev/wifi--relays-board-kit
  821. // https://github.com/jorgegarciadev/wifikit
  822. // -----------------------------------------------------------------------------
  823. #elif defined(JORGEGARCIA_WIFI_RELAYS)
  824. // Info
  825. #define MANUFACTURER "JORGEGARCIA"
  826. #define DEVICE "WIFI_RELAYS"
  827. // Relays
  828. #define RELAY1_PIN 0
  829. #define RELAY2_PIN 2
  830. #define RELAY1_TYPE RELAY_TYPE_INVERSE
  831. #define RELAY2_TYPE RELAY_TYPE_INVERSE
  832. // -----------------------------------------------------------------------------
  833. // WiFi MQTT Relay / Thermostat
  834. // -----------------------------------------------------------------------------
  835. #elif defined(OPENENERGYMONITOR_MQTT_RELAY)
  836. // Info
  837. #define MANUFACTURER "OPENENERGYMONITOR"
  838. #define DEVICE "MQTT_RELAY"
  839. // Buttons
  840. #define BUTTON1_PIN 0
  841. #define BUTTON1_RELAY 1
  842. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  843. // Relays
  844. #define RELAY1_PIN 12
  845. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  846. // LEDs
  847. #define LED1_PIN 16
  848. #define LED1_PIN_INVERSE 0
  849. // -----------------------------------------------------------------------------
  850. // WiOn 50055 Indoor Wi-Fi Wall Outlet & Tap
  851. // 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
  852. // 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
  853. // -----------------------------------------------------------------------------
  854. #elif defined(WION_50055)
  855. // Currently untested, does not support energy monitoring
  856. // Info
  857. #define MANUFACTURER "WION"
  858. #define DEVICE "50055"
  859. // Buttons
  860. #define BUTTON1_PIN 13
  861. #define BUTTON1_RELAY 1
  862. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  863. // Relays
  864. #define RELAY1_PIN 15
  865. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  866. // LEDs
  867. #define LED1_PIN 2
  868. #define LED1_PIN_INVERSE 0
  869. // -----------------------------------------------------------------------------
  870. // EX-Store Wifi Relay v3.1
  871. // https://ex-store.de/ESP8266-WiFi-Relay-V31
  872. // -----------------------------------------------------------------------------
  873. #elif defined(EXS_WIFI_RELAY_V31)
  874. // Untested
  875. // Info
  876. #define MANUFACTURER "EXS"
  877. #define DEVICE "WIFI_RELAY_V31"
  878. // Buttons
  879. #define BUTTON1_PIN 0
  880. #define BUTTON1_RELAY 1
  881. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  882. // Relays
  883. #define RELAY1_PIN 13
  884. #define RELAY1_TYPE RELAY_TYPE_LATCHED
  885. #define RELAY1_RESET_PIN 12
  886. // -----------------------------------------------------------------------------
  887. // V9261F
  888. // -----------------------------------------------------------------------------
  889. #elif defined(GENERIC_V9261F)
  890. // Info
  891. #define MANUFACTURER "GENERIC"
  892. #define DEVICE "V9261F"
  893. #define ALEXA_SUPPORT 0
  894. // V9261F
  895. #define V9261F_SUPPORT 1
  896. #define V9261F_PIN 2
  897. #define V9261F_PIN_INVERSE 1
  898. // -----------------------------------------------------------------------------
  899. // ECH1560
  900. // -----------------------------------------------------------------------------
  901. #elif defined(GENERIC_ECH1560)
  902. // Info
  903. #define MANUFACTURER "GENERIC"
  904. #define DEVICE "ECH1560"
  905. #define ALEXA_SUPPORT 0
  906. // ECH1560
  907. #define ECH1560_SUPPORT 1
  908. #define ECH1560_CLK_PIN 4
  909. #define ECH1560_MISO_PIN 5
  910. #define ECH1560_INVERTED 0
  911. // -----------------------------------------------------------------------------
  912. // ESPLive
  913. // https://github.com/ManCaveMade/ESP-Live
  914. // -----------------------------------------------------------------------------
  915. #elif defined(MANCAVEMADE_ESPLIVE)
  916. // Info
  917. #define MANUFACTURER "MANCAVEMADE"
  918. #define DEVICE "ESPLIVE"
  919. // Buttons
  920. #define BUTTON1_PIN 4
  921. #define BUTTON2_PIN 5
  922. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  923. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  924. #define BUTTON1_RELAY 1
  925. #define BUTTON2_RELAY 2
  926. // Relays
  927. #define RELAY1_PIN 12
  928. #define RELAY2_PIN 13
  929. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  930. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  931. // DB18B20
  932. #ifndef DALLAS_SUPPORT
  933. #define DALLAS_SUPPORT 1
  934. #endif
  935. #define DALLAS_PIN 2
  936. #define DALLAS_UPDATE_INTERVAL 5000
  937. #define TEMPERATURE_MIN_CHANGE 1.0
  938. // -----------------------------------------------------------------------------
  939. // QuinLED
  940. // http://blog.quindorian.org/2017/02/esp8266-led-lighting-quinled-v2-6-pcb.html
  941. // -----------------------------------------------------------------------------
  942. #elif defined(INTERMITTECH_QUINLED)
  943. // Info
  944. #define MANUFACTURER "INTERMITTECH"
  945. #define DEVICE "QUINLED"
  946. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  947. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  948. #define DUMMY_RELAY_COUNT 1
  949. // LEDs
  950. #define LED1_PIN 5
  951. #define LED1_PIN_INVERSE 1
  952. // Light
  953. #define LIGHT_CHANNELS 2
  954. #define LIGHT_CH1_PIN 0
  955. #define LIGHT_CH2_PIN 2
  956. #define LIGHT_CH1_INVERSE 0
  957. #define LIGHT_CH2_INVERSE 0
  958. // -----------------------------------------------------------------------------
  959. // Arilux AL-LC06
  960. // -----------------------------------------------------------------------------
  961. #elif defined(ARILUX_AL_LC01)
  962. // Info
  963. #define MANUFACTURER "ARILUX"
  964. #define DEVICE "AL_LC01"
  965. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  966. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  967. #define DUMMY_RELAY_COUNT 1
  968. // Light
  969. #define LIGHT_CHANNELS 4
  970. #define LIGHT_CH1_PIN 5 // RED
  971. #define LIGHT_CH2_PIN 12 // GREEN
  972. #define LIGHT_CH3_PIN 13 // BLUE
  973. #define LIGHT_CH4_PIN 14 // WHITE1
  974. #define LIGHT_CH1_INVERSE 0
  975. #define LIGHT_CH2_INVERSE 0
  976. #define LIGHT_CH3_INVERSE 0
  977. #define LIGHT_CH4_INVERSE 0
  978. #elif defined(ARILUX_AL_LC02)
  979. // Info
  980. #define MANUFACTURER "ARILUX"
  981. #define DEVICE "AL_LC02"
  982. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  983. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  984. #define DUMMY_RELAY_COUNT 1
  985. // Light
  986. #define LIGHT_CHANNELS 4
  987. #define LIGHT_CH1_PIN 12 // RED
  988. #define LIGHT_CH2_PIN 5 // GREEN
  989. #define LIGHT_CH3_PIN 13 // BLUE
  990. #define LIGHT_CH4_PIN 15 // WHITE1
  991. #define LIGHT_CH1_INVERSE 0
  992. #define LIGHT_CH2_INVERSE 0
  993. #define LIGHT_CH3_INVERSE 0
  994. #define LIGHT_CH4_INVERSE 0
  995. #elif defined(ARILUX_AL_LC06)
  996. // Info
  997. #define MANUFACTURER "ARILUX"
  998. #define DEVICE "AL_LC06"
  999. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  1000. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  1001. #define DUMMY_RELAY_COUNT 1
  1002. // Light
  1003. #define LIGHT_CHANNELS 5
  1004. #define LIGHT_CH1_PIN 14 // RED
  1005. #define LIGHT_CH2_PIN 12 // GREEN
  1006. #define LIGHT_CH3_PIN 13 // BLUE
  1007. #define LIGHT_CH4_PIN 15 // WHITE1
  1008. #define LIGHT_CH5_PIN 5 // WHITE2
  1009. #define LIGHT_CH1_INVERSE 0
  1010. #define LIGHT_CH2_INVERSE 0
  1011. #define LIGHT_CH3_INVERSE 0
  1012. #define LIGHT_CH4_INVERSE 0
  1013. #define LIGHT_CH5_INVERSE 0
  1014. #elif defined(ARILUX_AL_LC11)
  1015. // Info
  1016. #define MANUFACTURER "ARILUX"
  1017. #define DEVICE "AL_LC11"
  1018. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  1019. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  1020. #define DUMMY_RELAY_COUNT 1
  1021. // Light
  1022. #define LIGHT_CHANNELS 5
  1023. #define LIGHT_CH1_PIN 5 // RED
  1024. #define LIGHT_CH2_PIN 4 // GREEN
  1025. #define LIGHT_CH3_PIN 14 // BLUE
  1026. #define LIGHT_CH4_PIN 13 // WHITE1
  1027. #define LIGHT_CH5_PIN 12 // WHITE1
  1028. #define LIGHT_CH1_INVERSE 0
  1029. #define LIGHT_CH2_INVERSE 0
  1030. #define LIGHT_CH3_INVERSE 0
  1031. #define LIGHT_CH4_INVERSE 0
  1032. #define LIGHT_CH5_INVERSE 0
  1033. #elif defined(ARILUX_E27)
  1034. // Info
  1035. #define MANUFACTURER "ARILUX"
  1036. #define DEVICE "E27"
  1037. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  1038. #define LIGHT_PROVIDER LIGHT_PROVIDER_MY92XX
  1039. #define DUMMY_RELAY_COUNT 1
  1040. // Light
  1041. #define LIGHT_CHANNELS 4
  1042. #define MY92XX_MODEL MY92XX_MODEL_MY9291
  1043. #define MY92XX_CHIPS 1
  1044. #define MY92XX_DI_PIN 13
  1045. #define MY92XX_DCKI_PIN 15
  1046. #define MY92XX_COMMAND MY92XX_COMMAND_DEFAULT
  1047. #define MY92XX_MAPPING 0, 1, 2, 3
  1048. // -----------------------------------------------------------------------------
  1049. // XENON SM-PW701U
  1050. // -----------------------------------------------------------------------------
  1051. #elif defined(XENON_SM_PW702U)
  1052. // Info
  1053. #define MANUFACTURER "XENON"
  1054. #define DEVICE "SM_PW702U"
  1055. // Buttons
  1056. #define BUTTON1_PIN 13
  1057. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1058. #define BUTTON1_RELAY 1
  1059. // Relays
  1060. #define RELAY1_PIN 12
  1061. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1062. // LEDs
  1063. #define LED1_PIN 4
  1064. #define LED1_PIN_INVERSE 1
  1065. // -----------------------------------------------------------------------------
  1066. // AUTHOMETION LYT8266
  1067. // https://authometion.com/shop/en/home/13-lyt8266.html
  1068. // -----------------------------------------------------------------------------
  1069. #elif defined(AUTHOMETION_LYT8266)
  1070. // Info
  1071. #define MANUFACTURER "AUTHOMETION"
  1072. #define DEVICE "LYT8266"
  1073. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  1074. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  1075. #define DUMMY_RELAY_COUNT 1
  1076. // Light
  1077. #define LIGHT_CHANNELS 4
  1078. #define LIGHT_CH1_PIN 13 // RED
  1079. #define LIGHT_CH2_PIN 12 // GREEN
  1080. #define LIGHT_CH3_PIN 14 // BLUE
  1081. #define LIGHT_CH4_PIN 2 // WHITE
  1082. #define LIGHT_CH1_INVERSE 0
  1083. #define LIGHT_CH2_INVERSE 0
  1084. #define LIGHT_CH3_INVERSE 0
  1085. #define LIGHT_CH4_INVERSE 0
  1086. #define LIGHT_ENABLE_PIN 15
  1087. #elif defined(GIZWITS_WITTY_CLOUD)
  1088. // Info
  1089. #define MANUFACTURER "GIZWITS"
  1090. #define DEVICE "WITTY_CLOUD"
  1091. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  1092. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  1093. #define DUMMY_RELAY_COUNT 1
  1094. // Buttons
  1095. #define BUTTON1_PIN 4
  1096. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1097. #define BUTTON1_PRESS BUTTON_MODE_TOGGLE
  1098. #define BUTTON1_CLICK BUTTON_MODE_NONE
  1099. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  1100. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  1101. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_RESET
  1102. #define ANALOG_SUPPORT 1
  1103. // LEDs
  1104. #define LED1_PIN 2 // BLUE build-in
  1105. #define LED1_PIN_INVERSE 1
  1106. // Light
  1107. #define LIGHT_CHANNELS 3
  1108. #define LIGHT_CH1_PIN 15 // RED
  1109. #define LIGHT_CH2_PIN 12 // GREEN
  1110. #define LIGHT_CH3_PIN 13 // BLUE
  1111. #define LIGHT_CH1_INVERSE 0
  1112. #define LIGHT_CH2_INVERSE 0
  1113. #define LIGHT_CH3_INVERSE 0
  1114. // -----------------------------------------------------------------------------
  1115. // KMC 70011
  1116. // https://www.amazon.com/KMC-Monitoring-Required-Control-Compatible/dp/B07313TH7B
  1117. // -----------------------------------------------------------------------------
  1118. #elif defined(KMC_70011)
  1119. // Info
  1120. #define MANUFACTURER "KMC"
  1121. #define DEVICE "70011"
  1122. // Buttons
  1123. #define BUTTON1_PIN 0
  1124. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1125. #define BUTTON1_RELAY 1
  1126. // Relays
  1127. #define RELAY1_PIN 14
  1128. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1129. // LEDs
  1130. #define LED1_PIN 13
  1131. #define LED1_PIN_INVERSE 0
  1132. // HLW8012
  1133. #ifndef HLW8012_SUPPORT
  1134. #define HLW8012_SUPPORT 1
  1135. #endif
  1136. #define HLW8012_SEL_PIN 12
  1137. #define HLW8012_CF1_PIN 5
  1138. #define HLW8012_CF_PIN 4
  1139. #define HLW8012_VOLTAGE_R_UP ( 2 * 1000000 ) // Upstream voltage resistor
  1140. // -----------------------------------------------------------------------------
  1141. // Euromate (?) Wifi Stecker Shuko
  1142. // https://www.obi.de/hausfunksteuerung/wifi-stecker-schuko/p/2291706
  1143. // Thanks to @Geitde
  1144. // -----------------------------------------------------------------------------
  1145. #elif defined(EUROMATE_WIFI_STECKER_SCHUKO)
  1146. // Info
  1147. #define MANUFACTURER "EUROMATE"
  1148. #define DEVICE "WIFI_STECKER_SCHUKO"
  1149. // Buttons
  1150. #define BUTTON1_PIN 14
  1151. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_SET_PULLUP | BUTTON_DEFAULT_HIGH
  1152. #define BUTTON1_RELAY 1
  1153. // The relay in the device is not a bistable (latched) relay.
  1154. // The device is reported to have a flip-flop circuit to drive the relay
  1155. // So @Geitde hack is still the only possible
  1156. // Hack: drive GPIO12 low and use GPIO5 as normal relay pin:
  1157. #define RELAY1_PIN 5
  1158. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1159. #define LED2_PIN 12 /* DUMMY: exploit default off state for GPIO12=low */
  1160. #define LED2_PIN_INVERSE 0
  1161. // LEDs
  1162. #define LED1_PIN 4
  1163. #define LED1_PIN_INVERSE 0
  1164. // -----------------------------------------------------------------------------
  1165. // Generic 8CH
  1166. // -----------------------------------------------------------------------------
  1167. #elif defined(GENERIC_8CH)
  1168. // Info
  1169. #define MANUFACTURER "GENERIC"
  1170. #define DEVICE "8CH"
  1171. // Relays
  1172. #define RELAY1_PIN 0
  1173. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1174. #define RELAY2_PIN 2
  1175. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  1176. #define RELAY3_PIN 4
  1177. #define RELAY3_TYPE RELAY_TYPE_NORMAL
  1178. #define RELAY4_PIN 5
  1179. #define RELAY4_TYPE RELAY_TYPE_NORMAL
  1180. #define RELAY5_PIN 12
  1181. #define RELAY5_TYPE RELAY_TYPE_NORMAL
  1182. #define RELAY6_PIN 13
  1183. #define RELAY6_TYPE RELAY_TYPE_NORMAL
  1184. #define RELAY7_PIN 14
  1185. #define RELAY7_TYPE RELAY_TYPE_NORMAL
  1186. #define RELAY8_PIN 15
  1187. #define RELAY8_TYPE RELAY_TYPE_NORMAL
  1188. // -----------------------------------------------------------------------------
  1189. // STM RELAY
  1190. // -----------------------------------------------------------------------------
  1191. #elif defined(STM_RELAY)
  1192. // Info
  1193. #define MANUFACTURER "STM_RELAY"
  1194. #define DEVICE "2CH"
  1195. // Relays
  1196. #define DUMMY_RELAY_COUNT 2
  1197. #define RELAY_PROVIDER RELAY_PROVIDER_STM
  1198. // Remove UART noise on serial line
  1199. #define TERMINAL_SUPPORT 0
  1200. #define DEBUG_SERIAL_SUPPORT 0
  1201. // -----------------------------------------------------------------------------
  1202. // Tonbux Powerstrip02
  1203. // -----------------------------------------------------------------------------
  1204. #elif defined(TONBUX_POWERSTRIP02)
  1205. // Info
  1206. #define MANUFACTURER "TONBUX"
  1207. #define DEVICE "POWERSTRIP02"
  1208. // Buttons
  1209. #define BUTTON1_PIN 5
  1210. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1211. #define BUTTON1_RELAY 0
  1212. // Relays
  1213. #define RELAY1_PIN 4
  1214. #define RELAY1_TYPE RELAY_TYPE_INVERSE
  1215. #define RELAY2_PIN 13
  1216. #define RELAY2_TYPE RELAY_TYPE_INVERSE
  1217. #define RELAY3_PIN 12
  1218. #define RELAY3_TYPE RELAY_TYPE_INVERSE
  1219. #define RELAY4_PIN 14
  1220. #define RELAY4_TYPE RELAY_TYPE_INVERSE
  1221. // Not a relay. USB ports on/off
  1222. #define RELAY5_PIN 16
  1223. #define RELAY5_TYPE RELAY_TYPE_NORMAL
  1224. // LEDs
  1225. #define LED1_PIN 0 // 1 blue led
  1226. #define LED1_PIN_INVERSE 1
  1227. #define LED2_PIN 3 // 3 red leds
  1228. #define LED2_PIN_INVERSE 1
  1229. // -----------------------------------------------------------------------------
  1230. // Lingan SWA1
  1231. // -----------------------------------------------------------------------------
  1232. #elif defined(LINGAN_SWA1)
  1233. // Info
  1234. #define MANUFACTURER "LINGAN"
  1235. #define DEVICE "SWA1"
  1236. // Buttons
  1237. #define BUTTON1_PIN 13
  1238. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1239. #define BUTTON1_RELAY 1
  1240. // Relays
  1241. #define RELAY1_PIN 5
  1242. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1243. // LEDs
  1244. #define LED1_PIN 4
  1245. #define LED1_PIN_INVERSE 1
  1246. // -----------------------------------------------------------------------------
  1247. // HEYGO HY02
  1248. // -----------------------------------------------------------------------------
  1249. #elif defined(HEYGO_HY02)
  1250. // Info
  1251. #define MANUFACTURER "HEYGO"
  1252. #define DEVICE "HY02"
  1253. // Buttons
  1254. #define BUTTON1_PIN 13
  1255. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1256. #define BUTTON1_RELAY 1
  1257. // Relays
  1258. #define RELAY1_PIN 12
  1259. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1260. // LEDs
  1261. #define LED1_PIN 0
  1262. #define LED1_PIN_INVERSE 0
  1263. #define LED2_PIN 15
  1264. #define LED2_PIN_INVERSE 0
  1265. // HLW8012
  1266. #ifndef HLW8012_SUPPORT
  1267. #define HLW8012_SUPPORT 1
  1268. #endif
  1269. #define HLW8012_SEL_PIN 3
  1270. #define HLW8012_CF1_PIN 14
  1271. #define HLW8012_CF_PIN 5
  1272. #define HLW8012_VOLTAGE_R_UP ( 2 * 1200000 ) // Upstream voltage resistor
  1273. // -----------------------------------------------------------------------------
  1274. // Maxcio W-US002S
  1275. // -----------------------------------------------------------------------------
  1276. #elif defined(MAXCIO_WUS002S)
  1277. // Info
  1278. #define MANUFACTURER "MAXCIO"
  1279. #define DEVICE "WUS002S"
  1280. // Buttons
  1281. #define BUTTON1_PIN 2
  1282. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1283. #define BUTTON1_RELAY 1
  1284. // Relays
  1285. #define RELAY1_PIN 13
  1286. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1287. // LEDs
  1288. #define LED1_PIN 3
  1289. #define LED1_PIN_INVERSE 0
  1290. // HLW8012
  1291. #ifndef HLW8012_SUPPORT
  1292. #define HLW8012_SUPPORT 1
  1293. #endif
  1294. #define HLW8012_SEL_PIN 12
  1295. #define HLW8012_CF1_PIN 5
  1296. #define HLW8012_CF_PIN 4
  1297. #define HLW8012_CURRENT_R 0.002 // Current resistor
  1298. #define HLW8012_VOLTAGE_R_UP ( 2 * 1000000 ) // Upstream voltage resistor
  1299. // -----------------------------------------------------------------------------
  1300. // YiDian XS-SSA05
  1301. // -----------------------------------------------------------------------------
  1302. #elif defined(YIDIAN_XSSSA05)
  1303. // Info
  1304. #define MANUFACTURER "YIDIAN"
  1305. #define DEVICE "XSSSA05"
  1306. // Buttons
  1307. #define BUTTON1_PIN 13
  1308. #define BUTTON1_MODE BUTTON_PUSHBUTTON
  1309. #define BUTTON1_RELAY 1
  1310. // Relays
  1311. #define RELAY1_PIN 12
  1312. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1313. // LEDs
  1314. #define LED1_PIN 4
  1315. #define LED1_PIN_INVERSE 0
  1316. // -----------------------------------------------------------------------------
  1317. // TEST boards (do not use!!)
  1318. // -----------------------------------------------------------------------------
  1319. #elif defined(TRAVIS01)
  1320. // Info
  1321. #define MANUFACTURER "TravisCI"
  1322. #define DEVICE "Virtual board 01"
  1323. // Some buttons - pin 0
  1324. #define BUTTON1_PIN 0
  1325. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1326. #define BUTTON1_RELAY 1
  1327. // Some relays - pin 1
  1328. #define RELAY1_PIN 1
  1329. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1330. // Some LEDs - pin 2
  1331. #define LED1_PIN 2
  1332. #define LED1_PIN_INVERSE 1
  1333. // A bit of I2C - pins 3,4
  1334. #define I2C_SDA_PIN 3
  1335. #define I2C_SCL_PIN 4
  1336. // And, as they say in "From Dusk till Dawn":
  1337. // This is a sensor blow out!
  1338. // Alright, we got white sensor, black sensor, spanish sensor, yellow sensor. We got hot sensor, cold sensor.
  1339. // We got wet sensor. We got smelly sensor. We got hairy sensor, bloody sensor. We got snapping sensor.
  1340. // We got silk sensor, velvet sensor, naugahyde sensor. We even got horse sensor, dog sensor, chicken sensor.
  1341. // C'mon, you want sensor, come on in sensor lovers!
  1342. // If we don’t got it, you don't want it!
  1343. #define BH1750_SUPPORT 1
  1344. #define BMX280_SUPPORT 1
  1345. #define SHT3X_I2C_SUPPORT 1
  1346. #define EMON_ADC121_SUPPORT 1
  1347. #define EMON_ADS1X15_SUPPORT 1
  1348. #define SHT3X_I2C_SUPPORT 1
  1349. #define SI7021_SUPPORT 1
  1350. // A bit of lights - pin 5
  1351. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  1352. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  1353. #define DUMMY_RELAY_COUNT 1
  1354. #define LIGHT_CHANNELS 1
  1355. #define LIGHT_CH1_PIN 5
  1356. #define LIGHT_CH1_INVERSE 0
  1357. // A bit of HLW8012 - pins 6,7,8
  1358. #ifndef HLW8012_SUPPORT
  1359. #define HLW8012_SUPPORT 1
  1360. #endif
  1361. #define HLW8012_SEL_PIN 6
  1362. #define HLW8012_CF1_PIN 7
  1363. #define HLW8012_CF_PIN 8
  1364. // A bit of Dallas - pin 9
  1365. #ifndef DALLAS_SUPPORT
  1366. #define DALLAS_SUPPORT 1
  1367. #endif
  1368. #define DALLAS_PIN 9
  1369. // A bit of ECH1560 - pins 10,11, 12
  1370. #ifndef ECH1560_SUPPORT
  1371. #define ECH1560_SUPPORT 1
  1372. #endif
  1373. #define ECH1560_CLK_PIN 10
  1374. #define ECH1560_MISO_PIN 11
  1375. #define ECH1560_INVERTED 12
  1376. #elif defined(TRAVIS02)
  1377. // Relay provider dual
  1378. #define MANUFACTURER "TravisCI"
  1379. #define DEVICE "Virtual board 02"
  1380. // A bit of DHT - pin 1
  1381. #ifndef DHT_SUPPORT
  1382. #define DHT_SUPPORT 1
  1383. #endif
  1384. #define DHT_PIN 1
  1385. // Relay type dual - pins 2,3
  1386. #define RELAY_PROVIDER RELAY_PROVIDER_DUAL
  1387. #define RELAY1_PIN 2
  1388. #define RELAY2_PIN 3
  1389. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1390. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  1391. // IR - pin 4
  1392. #define IR_SUPPORT 1
  1393. #define IR_PIN 4
  1394. #define IR_BUTTON_SET 1
  1395. #elif defined(TRAVIS03)
  1396. // Relay provider light/my92XX
  1397. #define MANUFACTURER "TravisCI"
  1398. #define DEVICE "Virtual board 03"
  1399. // MY9231 Light - pins 1,2
  1400. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  1401. #define LIGHT_PROVIDER LIGHT_PROVIDER_MY92XX
  1402. #define DUMMY_RELAY_COUNT 1
  1403. #define LIGHT_CHANNELS 5
  1404. #define MY92XX_MODEL MY92XX_MODEL_MY9231
  1405. #define MY92XX_CHIPS 2
  1406. #define MY92XX_DI_PIN 1
  1407. #define MY92XX_DCKI_PIN 2
  1408. #define MY92XX_COMMAND MY92XX_COMMAND_DEFAULT
  1409. #define MY92XX_MAPPING 4, 3, 5, 0, 1
  1410. #endif
  1411. // -----------------------------------------------------------------------------
  1412. // Check definitions
  1413. // -----------------------------------------------------------------------------
  1414. #if not defined(MANUFACTURER) || not defined(DEVICE)
  1415. #error "UNSUPPORTED HARDWARE!!"
  1416. #endif