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.

4075 lines
129 KiB

7 years ago
7 years ago
6 years ago
6 years ago
7 years ago
7 years ago
7 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
  1. // -----------------------------------------------------------------------------
  2. // Configuration HELP
  3. // -----------------------------------------------------------------------------
  4. //
  5. // MANUFACTURER: Name of the manufacturer of the board ("string")
  6. // DEVICE: Name of the device ("string")
  7. // BUTTON#_PIN: GPIO for the n-th button (1-based, up to 4 buttons)
  8. // BUTTON#_RELAY: Relay number that will be bind to the n-th button (1-based)
  9. // BUTTON#_MODE: A mask of options (BUTTON_PUSHBUTTON and BUTTON_SWITCH cannot be together)
  10. // - BUTTON_PUSHBUTTON: button event is fired when released
  11. // - BUTTON_SWITCH: button event is fired when pressed or released
  12. // - BUTTON_DEFAULT_HIGH: there is a pull up in place
  13. // - BUTTON_SET_PULLUP: set pullup by software
  14. // RELAY#_PIN: GPIO for the n-th relay (1-based, up to 8 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 8 LEDs)
  17. // LED#_PIN_INVERSE: LED has inversed logic (lit when pulled down)
  18. // LED#_MODE: Check types.h for LED_MODE_%
  19. // LED#_RELAY: Linked relay (1-based)
  20. //
  21. // Besides, other hardware specific information should be stated here
  22. // -----------------------------------------------------------------------------
  23. // Custom hardware
  24. // -----------------------------------------------------------------------------
  25. #if defined(MANUFACTURER) and defined(DEVICE)
  26. // user has defined custom hardware, no need to check anything else
  27. // -----------------------------------------------------------------------------
  28. // ESPurna Core
  29. // -----------------------------------------------------------------------------
  30. #elif defined(ESPURNA_CORE)
  31. // This is a special device targeted to generate a light-weight binary image
  32. // meant to be able to do two-step-updates:
  33. // https://github.com/xoseperez/espurna/wiki/TwoStepUpdates
  34. // Info
  35. #define MANUFACTURER "ESPRESSIF"
  36. #define DEVICE "ESPURNA_CORE"
  37. // Disable non-core modules
  38. #define ALEXA_SUPPORT 0
  39. #define API_SUPPORT 0
  40. #define BROKER_SUPPORT 0
  41. #define DOMOTICZ_SUPPORT 0
  42. #define DEBUG_SERIAL_SUPPORT 0
  43. #define DEBUG_TELNET_SUPPORT 0
  44. #define DEBUG_WEB_SUPPORT 0
  45. #define HOMEASSISTANT_SUPPORT 0
  46. #define I2C_SUPPORT 0
  47. #define MQTT_SUPPORT 0
  48. #define NTP_SUPPORT 0
  49. #define RPN_RULES_SUPPORT 0
  50. #define SCHEDULER_SUPPORT 0
  51. #define SENSOR_SUPPORT 0
  52. #define THINGSPEAK_SUPPORT 0
  53. #define WEB_SUPPORT 0
  54. // Extra light-weight image
  55. //#define BUTTON_SUPPORT 0
  56. //#define LED_SUPPORT 0
  57. //#define MDNS_SERVER_SUPPORT 0
  58. //#define TELNET_SUPPORT 0
  59. //#define TERMINAL_SUPPORT 0
  60. // -----------------------------------------------------------------------------
  61. // Development boards
  62. // -----------------------------------------------------------------------------
  63. #elif defined(NODEMCU_LOLIN)
  64. // Info
  65. #define MANUFACTURER "NODEMCU"
  66. #define DEVICE "LOLIN"
  67. // Buttons
  68. #define BUTTON1_PIN 0
  69. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  70. #define BUTTON1_RELAY 1
  71. // Hidden button will enter AP mode if dblclick and reset the device when long-long-clicked
  72. #define RELAY1_PIN 12
  73. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  74. // Light
  75. #define LED1_PIN 2
  76. #define LED1_PIN_INVERSE 1
  77. #elif defined(NODEMCU_BASIC)
  78. // Info
  79. // Generic NodeMCU Board without any buttons or relays connected.
  80. #define MANUFACTURER "NODEMCU"
  81. #define DEVICE "BASIC"
  82. #elif defined(WEMOS_D1_MINI)
  83. // Info
  84. #define MANUFACTURER "WEMOS"
  85. #define DEVICE "D1_MINI"
  86. // Buttons
  87. // No buttons on the D1 MINI alone, but defining it without adding a button doen't create problems
  88. #define BUTTON1_PIN 0 // Connect a pushbutton between D3 and GND,
  89. // it's the same as using a Wemos one button shield
  90. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  91. #define BUTTON1_RELAY 1
  92. // LEDs
  93. #define LED1_PIN 2
  94. #define LED1_PIN_INVERSE 1
  95. #define I2C_SDA_PIN 4 // D2
  96. #define I2C_SCL_PIN 5 // D1
  97. #elif defined(WEMOS_D1_MINI_RELAYSHIELD)
  98. // Info
  99. #define MANUFACTURER "WEMOS"
  100. #define DEVICE "D1_MINI_RELAYSHIELD"
  101. // Buttons
  102. // No buttons on the D1 MINI alone, but defining it without adding a button doen't create problems
  103. #define BUTTON1_PIN 0 // Connect a pushbutton between D3 and GND,
  104. // it's the same as using a Wemos one button shield
  105. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  106. #define BUTTON1_RELAY 1
  107. // Relays
  108. #define RELAY1_PIN 5
  109. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  110. // LED
  111. #define LED1_PIN 2
  112. #define LED1_PIN_INVERSE 1
  113. // When Wemos relay shield is connected GPIO5 (D1) is used for relay,
  114. // so I2C must be remapped to other pins
  115. #define I2C_SDA_PIN 12 // D6
  116. #define I2C_SCL_PIN 14 // D5
  117. #elif defined(WEMOS_D1_TARPUNA_SHIELD)
  118. // Info
  119. #define MANUFACTURER "WEMOS"
  120. #define DEVICE "D1_TARPUNA_SHIELD"
  121. // Relays
  122. #define RELAY1_PIN 5
  123. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  124. #define DHT_SUPPORT 1
  125. #define DHT_PIN 12
  126. // -----------------------------------------------------------------------------
  127. // ESPurna
  128. // -----------------------------------------------------------------------------
  129. #elif defined(TINKERMAN_ESPURNA_H06)
  130. // Info
  131. #define MANUFACTURER "TINKERMAN"
  132. #define DEVICE "ESPURNA_H06"
  133. // Buttons
  134. #define BUTTON1_PIN 4
  135. #define BUTTON1_RELAY 1
  136. // Normal pushbutton
  137. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  138. // Relays
  139. #define RELAY1_PIN 12
  140. #define RELAY1_TYPE RELAY_TYPE_INVERSE
  141. // LEDs
  142. #define LED1_PIN 2
  143. #define LED1_PIN_INVERSE 1
  144. // HLW8012
  145. #ifndef HLW8012_SUPPORT
  146. #define HLW8012_SUPPORT 1
  147. #endif
  148. #define HLW8012_SEL_PIN 2
  149. #define HLW8012_CF1_PIN 13
  150. #define HLW8012_CF_PIN 14
  151. #elif defined(TINKERMAN_ESPURNA_H08)
  152. // Info
  153. #define MANUFACTURER "TINKERMAN"
  154. #define DEVICE "ESPURNA_H08"
  155. // Buttons
  156. #define BUTTON1_PIN 4
  157. #define BUTTON1_RELAY 1
  158. // Normal pushbutton
  159. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  160. // Relays
  161. #define RELAY1_PIN 12
  162. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  163. // LEDs
  164. #define LED1_PIN 2
  165. #define LED1_PIN_INVERSE 0
  166. // HLW8012
  167. #ifndef HLW8012_SUPPORT
  168. #define HLW8012_SUPPORT 1
  169. #endif
  170. #define HLW8012_SEL_PIN 5
  171. #define HLW8012_CF1_PIN 13
  172. #define HLW8012_CF_PIN 14
  173. #elif defined(TINKERMAN_ESPURNA_SWITCH)
  174. // Info
  175. #define MANUFACTURER "TINKERMAN"
  176. #define DEVICE "ESPURNA_SWITCH"
  177. // Buttons
  178. #define BUTTON1_PIN 4
  179. #define BUTTON1_RELAY 1
  180. // Touch button
  181. #define BUTTON1_MODE BUTTON_PUSHBUTTON
  182. #define BUTTON1_PRESS BUTTON_MODE_TOGGLE
  183. #define BUTTON1_CLICK BUTTON_MODE_NONE
  184. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  185. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  186. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_NONE
  187. // LEDs
  188. #define LED1_PIN 2
  189. #define LED1_PIN_INVERSE 0
  190. // Relays
  191. #define RELAY1_PIN 12
  192. #define RELAY1_TYPE RELAY_TYPE_INVERSE
  193. // Check http://tinkerman.cat/rfm69-wifi-gateway/
  194. #elif defined(TINKERMAN_RFM69GW)
  195. // Info
  196. #define MANUFACTURER "TINKERMAN"
  197. #define DEVICE "RFM69GW"
  198. // Buttons
  199. #define BUTTON1_PIN 0
  200. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  201. // RFM69GW
  202. #define RFM69_SUPPORT 1
  203. // Disable non-core modules
  204. #define ALEXA_SUPPORT 0
  205. #define DOMOTICZ_SUPPORT 0
  206. #define HOMEASSISTANT_SUPPORT 0
  207. #define I2C_SUPPORT 0
  208. #define SCHEDULER_SUPPORT 0
  209. #define SENSOR_SUPPORT 0
  210. #define THINGSPEAK_SUPPORT 0
  211. // -----------------------------------------------------------------------------
  212. // Itead Studio boards
  213. // -----------------------------------------------------------------------------
  214. #elif defined(ITEAD_SONOFF_BASIC)
  215. // Info
  216. #define MANUFACTURER "ITEAD"
  217. #define DEVICE "SONOFF_BASIC"
  218. // Buttons
  219. #define BUTTON1_PIN 0
  220. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  221. #define BUTTON1_RELAY 1
  222. #define BUTTON2_PIN 14
  223. #define BUTTON2_MODE BUTTON_SWITCH | BUTTON_SET_PULLUP | BUTTON_DEFAULT_HIGH
  224. #define BUTTON2_RELAY 1
  225. // Relays
  226. #define RELAY1_PIN 12
  227. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  228. // LEDs
  229. #define LED1_PIN 13
  230. #define LED1_PIN_INVERSE 1
  231. #elif defined(ITEAD_SONOFF_RF)
  232. // Info
  233. #define MANUFACTURER "ITEAD"
  234. #define DEVICE "SONOFF_RF"
  235. // Buttons
  236. #define BUTTON1_PIN 0
  237. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  238. #define BUTTON1_RELAY 1
  239. #define BUTTON2_PIN 14
  240. #define BUTTON2_MODE BUTTON_SWITCH | BUTTON_SET_PULLUP | BUTTON_DEFAULT_HIGH
  241. #define BUTTON2_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_TH)
  249. // Info
  250. #define MANUFACTURER "ITEAD"
  251. #define DEVICE "SONOFF_TH"
  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 13
  261. #define LED1_PIN_INVERSE 1
  262. // Jack is connected to GPIO14 (and with a small hack to GPIO4)
  263. #ifndef DALLAS_SUPPORT
  264. #define DALLAS_SUPPORT 1
  265. #endif
  266. #define DALLAS_PIN 14
  267. #ifndef DHT_SUPPORT
  268. #define DHT_SUPPORT 1
  269. #endif
  270. #define DHT_PIN 14
  271. //#define I2C_SDA_PIN 4
  272. //#define I2C_SCL_PIN 14
  273. #elif defined(ITEAD_SONOFF_SV)
  274. // Info
  275. #define MANUFACTURER "ITEAD"
  276. #define DEVICE "SONOFF_SV"
  277. // Buttons
  278. #define BUTTON1_PIN 0
  279. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  280. #define BUTTON1_RELAY 1
  281. // Relays
  282. #define RELAY1_PIN 12
  283. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  284. // LEDs
  285. #define LED1_PIN 13
  286. #define LED1_PIN_INVERSE 1
  287. #elif defined(ITEAD_SLAMPHER)
  288. // Info
  289. #define MANUFACTURER "ITEAD"
  290. #define DEVICE "SLAMPHER"
  291. // Buttons
  292. #define BUTTON1_PIN 0
  293. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  294. #define BUTTON1_RELAY 1
  295. // Relays
  296. #define RELAY1_PIN 12
  297. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  298. // LEDs
  299. #define LED1_PIN 13
  300. #define LED1_PIN_INVERSE 1
  301. #elif defined(ITEAD_S20)
  302. // Info
  303. #define MANUFACTURER "ITEAD"
  304. #define DEVICE "S20"
  305. // Buttons
  306. #define BUTTON1_PIN 0
  307. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  308. #define BUTTON1_RELAY 1
  309. // Relays
  310. #define RELAY1_PIN 12
  311. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  312. // LEDs
  313. #define LED1_PIN 13
  314. #define LED1_PIN_INVERSE 1
  315. #elif defined(ITEAD_SONOFF_TOUCH)
  316. // Info
  317. #define MANUFACTURER "ITEAD"
  318. #define DEVICE "SONOFF_TOUCH"
  319. // Buttons
  320. #define BUTTON1_PIN 0
  321. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  322. #define BUTTON1_PRESS BUTTON_MODE_TOGGLE
  323. #define BUTTON1_CLICK BUTTON_MODE_NONE
  324. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  325. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  326. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_RESET
  327. #define BUTTON1_RELAY 1
  328. // Relays
  329. #define RELAY1_PIN 12
  330. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  331. // LEDs
  332. #define LED1_PIN 13
  333. #define LED1_PIN_INVERSE 1
  334. #elif defined(ITEAD_SONOFF_POW)
  335. // Info
  336. #define MANUFACTURER "ITEAD"
  337. #define DEVICE "SONOFF_POW"
  338. // Buttons
  339. #define BUTTON1_PIN 0
  340. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  341. #define BUTTON1_RELAY 1
  342. // Relays
  343. #define RELAY1_PIN 12
  344. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  345. // LEDs
  346. #define LED1_PIN 15
  347. #define LED1_PIN_INVERSE 0
  348. // HLW8012
  349. #ifndef HLW8012_SUPPORT
  350. #define HLW8012_SUPPORT 1
  351. #endif
  352. #define HLW8012_SEL_PIN 5
  353. #define HLW8012_CF1_PIN 13
  354. #define HLW8012_CF_PIN 14
  355. #elif defined(ITEAD_SONOFF_POW_R2)
  356. // Info
  357. #define MANUFACTURER "ITEAD"
  358. #define DEVICE "SONOFF_POW_R2"
  359. // Buttons
  360. #define BUTTON1_PIN 0
  361. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  362. #define BUTTON1_RELAY 1
  363. // Relays
  364. #define RELAY1_PIN 12
  365. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  366. // LEDs
  367. #define LED1_PIN 13
  368. #define LED1_PIN_INVERSE 1
  369. // Disable UART noise
  370. #define DEBUG_SERIAL_SUPPORT 0
  371. // CSE7766
  372. #ifndef CSE7766_SUPPORT
  373. #define CSE7766_SUPPORT 1
  374. #endif
  375. #define CSE7766_PIN 1
  376. #elif defined(ITEAD_SONOFF_DUAL)
  377. // Info
  378. #define MANUFACTURER "ITEAD"
  379. #define DEVICE "SONOFF_DUAL"
  380. #define SERIAL_BAUDRATE 19230
  381. #define RELAY_PROVIDER RELAY_PROVIDER_DUAL
  382. #define DUMMY_RELAY_COUNT 2
  383. #define DEBUG_SERIAL_SUPPORT 0
  384. // Buttons
  385. #define BUTTON3_RELAY 1
  386. // LEDs
  387. #define LED1_PIN 13
  388. #define LED1_PIN_INVERSE 1
  389. #elif defined(ITEAD_SONOFF_DUAL_R2)
  390. #define MANUFACTURER "ITEAD"
  391. #define DEVICE "SONOFF_DUAL_R2"
  392. // Buttons
  393. #define BUTTON1_PIN 0 // Button 0 on header
  394. #define BUTTON2_PIN 9 // Button 1 on header
  395. #define BUTTON3_PIN 10 // Physical button
  396. #define BUTTON1_RELAY 1
  397. #define BUTTON2_RELAY 2
  398. #define BUTTON3_RELAY 1
  399. #define BUTTON1_MODE BUTTON_SWITCH | BUTTON_SET_PULLUP | BUTTON_DEFAULT_HIGH
  400. #define BUTTON2_MODE BUTTON_SWITCH | BUTTON_SET_PULLUP | BUTTON_DEFAULT_HIGH
  401. #define BUTTON3_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  402. // Relays
  403. #define RELAY1_PIN 12
  404. #define RELAY2_PIN 5
  405. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  406. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  407. // LEDs
  408. #define LED1_PIN 13
  409. #define LED1_PIN_INVERSE 1
  410. #elif defined(ITEAD_SONOFF_4CH)
  411. // Info
  412. #define MANUFACTURER "ITEAD"
  413. #define DEVICE "SONOFF_4CH"
  414. // Buttons
  415. #define BUTTON1_PIN 0
  416. #define BUTTON2_PIN 9
  417. #define BUTTON3_PIN 10
  418. #define BUTTON4_PIN 14
  419. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  420. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  421. #define BUTTON3_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  422. #define BUTTON4_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  423. #define BUTTON1_RELAY 1
  424. #define BUTTON2_RELAY 2
  425. #define BUTTON3_RELAY 3
  426. #define BUTTON4_RELAY 4
  427. // Relays
  428. #define RELAY1_PIN 12
  429. #define RELAY2_PIN 5
  430. #define RELAY3_PIN 4
  431. #define RELAY4_PIN 15
  432. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  433. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  434. #define RELAY3_TYPE RELAY_TYPE_NORMAL
  435. #define RELAY4_TYPE RELAY_TYPE_NORMAL
  436. // LEDs
  437. #define LED1_PIN 13
  438. #define LED1_PIN_INVERSE 1
  439. #elif defined(ITEAD_SONOFF_4CH_PRO)
  440. // Info
  441. #define MANUFACTURER "ITEAD"
  442. #define DEVICE "SONOFF_4CH_PRO"
  443. // Buttons
  444. #define BUTTON1_PIN 0
  445. #define BUTTON2_PIN 9
  446. #define BUTTON3_PIN 10
  447. #define BUTTON4_PIN 14
  448. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  449. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  450. #define BUTTON3_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  451. #define BUTTON4_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  452. #define BUTTON1_RELAY 1
  453. #define BUTTON2_RELAY 2
  454. #define BUTTON3_RELAY 3
  455. #define BUTTON4_RELAY 4
  456. // Sonoff 4CH Pro uses a secondary STM32 microcontroller to handle
  457. // buttons and relays, but it also forwards button presses to the ESP8285.
  458. // This allows ESPurna to handle button presses -almost- the same way
  459. // as with other devices except:
  460. // * Double click seems to break/disable the button on the STM32 side
  461. // * With S6 switch to 1 (self-locking and inching modes) everything's OK
  462. // * With S6 switch to 0 (interlock mode) if there is a relay ON
  463. // and you click on another relay button, the STM32 sends a "press"
  464. // event for the button of the first relay (to turn it OFF) but it
  465. // does not send a "release" event. It's like it's holding the
  466. // button down since you can see it is still LOW.
  467. // Whatever reason the result is that it may actually perform a
  468. // long click or long-long click.
  469. // The configuration below make the button toggle the relay on press events
  470. // and disables any possibly harmful combination with S6 set to 0.
  471. // If you are sure you will only use S6 to 1 you can comment the
  472. // BUTTON1_LNGCLICK and BUTTON1_LNGLNGCLICK options below to recover the
  473. // reset mode and factory reset functionalities, or link other actions like
  474. // AP mode in the commented line below.
  475. #define BUTTON1_PRESS BUTTON_MODE_TOGGLE
  476. #define BUTTON1_CLICK BUTTON_MODE_NONE
  477. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  478. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  479. //#define BUTTON1_LNGCLICK BUTTON_MODE_AP
  480. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_NONE
  481. #define BUTTON2_PRESS BUTTON_MODE_TOGGLE
  482. #define BUTTON2_CLICK BUTTON_MODE_NONE
  483. #define BUTTON3_PRESS BUTTON_MODE_TOGGLE
  484. #define BUTTON3_CLICK BUTTON_MODE_NONE
  485. #define BUTTON4_PRESS BUTTON_MODE_TOGGLE
  486. #define BUTTON4_CLICK BUTTON_MODE_NONE
  487. // Relays
  488. #define RELAY1_PIN 12
  489. #define RELAY2_PIN 5
  490. #define RELAY3_PIN 4
  491. #define RELAY4_PIN 15
  492. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  493. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  494. #define RELAY3_TYPE RELAY_TYPE_NORMAL
  495. #define RELAY4_TYPE RELAY_TYPE_NORMAL
  496. // LEDs
  497. #define LED1_PIN 13
  498. #define LED1_PIN_INVERSE 1
  499. #elif defined(ITEAD_1CH_INCHING)
  500. // The inching functionality is managed by a misterious IC in the board.
  501. // You cannot control the inching button and functionality from the ESP8266
  502. // Besides, enabling the inching functionality using the hardware button
  503. // will result in the relay switching on and off continuously.
  504. // Fortunately the unkown IC keeps memory of the hardware inching status
  505. // so you can just disable it and forget. The inching LED must be lit.
  506. // You can still use the pulse options from the web interface
  507. // without problem.
  508. // Info
  509. #define MANUFACTURER "ITEAD"
  510. #define DEVICE "1CH_INCHING"
  511. // Buttons
  512. #define BUTTON1_PIN 0
  513. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  514. #define BUTTON1_RELAY 1
  515. // Relays
  516. #define RELAY1_PIN 12
  517. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  518. // LEDs
  519. #define LED1_PIN 13
  520. #define LED1_PIN_INVERSE 1
  521. #elif defined(ITEAD_MOTOR)
  522. // Info
  523. #define MANUFACTURER "ITEAD"
  524. #define DEVICE "MOTOR"
  525. // Buttons
  526. #define BUTTON1_PIN 0
  527. #define BUTTON1_RELAY 1
  528. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  529. // Relays
  530. #define RELAY1_PIN 12
  531. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  532. // LEDs
  533. #define LED1_PIN 13
  534. #define LED1_PIN_INVERSE 1
  535. #elif defined(ITEAD_BNSZ01)
  536. // Info
  537. #define MANUFACTURER "ITEAD"
  538. #define DEVICE "BNSZ01"
  539. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  540. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  541. #define DUMMY_RELAY_COUNT 1
  542. // LEDs
  543. #define LED1_PIN 13
  544. #define LED1_PIN_INVERSE 1
  545. // Light
  546. #define LIGHT_CHANNELS 1
  547. #define LIGHT_CH1_PIN 12
  548. #define LIGHT_CH1_INVERSE 0
  549. #elif defined(ITEAD_SONOFF_RFBRIDGE)
  550. // Info
  551. #define MANUFACTURER "ITEAD"
  552. #define DEVICE "SONOFF_RFBRIDGE"
  553. #define RELAY_PROVIDER RELAY_PROVIDER_RFBRIDGE
  554. // Number of virtual switches
  555. #ifndef DUMMY_RELAY_COUNT
  556. #define DUMMY_RELAY_COUNT 8
  557. #endif
  558. // Buttons
  559. #define BUTTON1_PIN 0
  560. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  561. // LEDs
  562. #define LED1_PIN 13
  563. #define LED1_PIN_INVERSE 1
  564. #define RF_SUPPORT 1
  565. // Only used when RFB_DIRECT=1
  566. #define RFB_RX_PIN 4
  567. #define RFB_TX_PIN 5
  568. // When using un-modified harware, ESPurna communicates with the secondary
  569. // MCU EFM8BB1 via UART at 19200 bps so we need to change the speed of
  570. // the port and remove UART noise on serial line
  571. #if not RFB_DIRECT
  572. #define SERIAL_BAUDRATE 19200
  573. #define DEBUG_SERIAL_SUPPORT 0
  574. #endif
  575. #elif defined(ITEAD_SONOFF_B1)
  576. // Info
  577. #define MANUFACTURER "ITEAD"
  578. #define DEVICE "SONOFF_B1"
  579. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  580. #define LIGHT_PROVIDER LIGHT_PROVIDER_MY92XX
  581. #define DUMMY_RELAY_COUNT 1
  582. // Light
  583. #define LIGHT_CHANNELS 5
  584. #define MY92XX_MODEL MY92XX_MODEL_MY9231
  585. #define MY92XX_CHIPS 2
  586. #define MY92XX_DI_PIN 12
  587. #define MY92XX_DCKI_PIN 14
  588. #define MY92XX_COMMAND MY92XX_COMMAND_DEFAULT
  589. #define MY92XX_MAPPING 4, 3, 5, 0, 1
  590. #define LIGHT_WHITE_FACTOR (0.1) // White LEDs are way more bright in the B1
  591. #elif defined(ITEAD_SONOFF_LED)
  592. // Info
  593. #define MANUFACTURER "ITEAD"
  594. #define DEVICE "SONOFF_LED"
  595. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  596. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  597. #define DUMMY_RELAY_COUNT 1
  598. // LEDs
  599. #define LED1_PIN 13
  600. #define LED1_PIN_INVERSE 1
  601. // Light
  602. #define LIGHT_CHANNELS 2
  603. #define LIGHT_CH1_PIN 12 // Cold white
  604. #define LIGHT_CH2_PIN 14 // Warm white
  605. #define LIGHT_CH1_INVERSE 0
  606. #define LIGHT_CH2_INVERSE 0
  607. #elif defined(ITEAD_SONOFF_T1_1CH)
  608. // Info
  609. #define MANUFACTURER "ITEAD"
  610. #define DEVICE "SONOFF_T1_1CH"
  611. // Buttons
  612. #define BUTTON1_PIN 0
  613. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  614. #define BUTTON1_PRESS BUTTON_MODE_TOGGLE
  615. #define BUTTON1_CLICK BUTTON_MODE_NONE
  616. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  617. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  618. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_RESET
  619. #define BUTTON1_RELAY 1
  620. // Relays
  621. #define RELAY1_PIN 12
  622. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  623. // LEDs
  624. #define LED1_PIN 13
  625. #define LED1_PIN_INVERSE 1
  626. #elif defined(ITEAD_SONOFF_T1_2CH)
  627. // Info
  628. #define MANUFACTURER "ITEAD"
  629. #define DEVICE "SONOFF_T1_2CH"
  630. // Buttons
  631. #define BUTTON1_PIN 0
  632. #define BUTTON2_PIN 9
  633. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  634. #define BUTTON1_PRESS BUTTON_MODE_TOGGLE
  635. #define BUTTON1_CLICK BUTTON_MODE_NONE
  636. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  637. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  638. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_RESET
  639. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  640. #define BUTTON2_PRESS BUTTON_MODE_TOGGLE
  641. #define BUTTON2_CLICK BUTTON_MODE_NONE
  642. #define BUTTON2_DBLCLICK BUTTON_MODE_NONE
  643. #define BUTTON2_LNGCLICK BUTTON_MODE_NONE
  644. #define BUTTON2_LNGLNGCLICK BUTTON_MODE_RESET
  645. #define BUTTON1_RELAY 1
  646. #define BUTTON2_RELAY 2
  647. // Relays
  648. #define RELAY1_PIN 12
  649. #define RELAY2_PIN 5
  650. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  651. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  652. // LEDs
  653. #define LED1_PIN 13
  654. #define LED1_PIN_INVERSE 1
  655. #elif defined(ITEAD_SONOFF_T1_3CH)
  656. // Info
  657. #define MANUFACTURER "ITEAD"
  658. #define DEVICE "SONOFF_T1_3CH"
  659. // Buttons
  660. #define BUTTON1_PIN 0
  661. #define BUTTON2_PIN 9
  662. #define BUTTON3_PIN 10
  663. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  664. #define BUTTON1_PRESS BUTTON_MODE_TOGGLE
  665. #define BUTTON1_CLICK BUTTON_MODE_NONE
  666. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  667. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  668. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_RESET
  669. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  670. #define BUTTON2_PRESS BUTTON_MODE_TOGGLE
  671. #define BUTTON2_CLICK BUTTON_MODE_NONE
  672. #define BUTTON2_DBLCLICK BUTTON_MODE_NONE
  673. #define BUTTON2_LNGCLICK BUTTON_MODE_NONE
  674. #define BUTTON2_LNGLNGCLICK BUTTON_MODE_RESET
  675. #define BUTTON3_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  676. #define BUTTON3_PRESS BUTTON_MODE_TOGGLE
  677. #define BUTTON3_CLICK BUTTON_MODE_NONE
  678. #define BUTTON3_DBLCLICK BUTTON_MODE_NONE
  679. #define BUTTON3_LNGCLICK BUTTON_MODE_NONE
  680. #define BUTTON3_LNGLNGCLICK BUTTON_MODE_RESET
  681. #define BUTTON1_RELAY 1
  682. #define BUTTON2_RELAY 2
  683. #define BUTTON3_RELAY 3
  684. // Relays
  685. #define RELAY1_PIN 12
  686. #define RELAY2_PIN 5
  687. #define RELAY3_PIN 4
  688. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  689. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  690. #define RELAY3_TYPE RELAY_TYPE_NORMAL
  691. // LEDs
  692. #define LED1_PIN 13
  693. #define LED1_PIN_INVERSE 1
  694. #elif defined(ITEAD_SONOFF_S31)
  695. // Info
  696. #define MANUFACTURER "ITEAD"
  697. #define DEVICE "SONOFF_S31"
  698. // Buttons
  699. #define BUTTON1_PIN 0
  700. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  701. #define BUTTON1_RELAY 1
  702. // Relays
  703. #define RELAY1_PIN 12
  704. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  705. // LEDs
  706. #define LED1_PIN 13
  707. #define LED1_PIN_INVERSE 1
  708. // Disable UART noise
  709. #define DEBUG_SERIAL_SUPPORT 0
  710. // CSE7766
  711. #define CSE7766_SUPPORT 1
  712. #define CSE7766_PIN 1
  713. #elif defined(ITEAD_SONOFF_S31_LITE)
  714. // Info
  715. #define MANUFACTURER "ITEAD"
  716. #define DEVICE "SONOFF_S31_LITE"
  717. // Buttons
  718. #define BUTTON1_PIN 0
  719. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  720. #define BUTTON1_RELAY 1
  721. // Relays
  722. #define RELAY1_PIN 12
  723. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  724. // LEDs
  725. #define LED1_PIN 13
  726. #define LED1_PIN_INVERSE 1
  727. #elif defined(ITEAD_SONOFF_IFAN02)
  728. // Info
  729. #define MANUFACTURER "ITEAD"
  730. #define DEVICE "SONOFF_IFAN02"
  731. // These are virtual buttons triggered by the remote
  732. #define BUTTON1_PIN 0
  733. #define BUTTON2_PIN 9
  734. #define BUTTON3_PIN 10
  735. #define BUTTON4_PIN 14
  736. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  737. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  738. #define BUTTON3_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  739. #define BUTTON4_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  740. // Relays
  741. #define RELAY1_PIN 12
  742. #define RELAY2_PIN 5
  743. #define RELAY3_PIN 4
  744. #define RELAY4_PIN 15
  745. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  746. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  747. #define RELAY3_TYPE RELAY_TYPE_NORMAL
  748. #define RELAY4_TYPE RELAY_TYPE_NORMAL
  749. // LEDs
  750. #define LED1_PIN 13
  751. #define LED1_PIN_INVERSE 1
  752. // -----------------------------------------------------------------------------
  753. // ORVIBO
  754. // -----------------------------------------------------------------------------
  755. #elif defined(ORVIBO_B25)
  756. // Info
  757. #define MANUFACTURER "ORVIBO"
  758. #define DEVICE "B25"
  759. // Buttons
  760. #define BUTTON1_PIN 14
  761. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  762. #define BUTTON1_RELAY 1
  763. // Relays
  764. #define RELAY1_PIN 5
  765. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  766. // LEDs
  767. #define LED1_PIN 12 // 4 blue led
  768. #define LED1_PIN_INVERSE 1
  769. #define LED2_PIN 4 // 12 red led
  770. #define LED2_PIN_INVERSE 1
  771. // -----------------------------------------------------------------------------
  772. // YJZK
  773. // -----------------------------------------------------------------------------
  774. #elif defined(YJZK_SWITCH_1CH)
  775. // Info
  776. #define MANUFACTURER "YJZK"
  777. #define DEVICE "SWITCH_1CH"
  778. // Buttons
  779. #define BUTTON1_PIN 0
  780. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  781. #define BUTTON1_PRESS BUTTON_MODE_TOGGLE
  782. #define BUTTON1_CLICK BUTTON_MODE_NONE
  783. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  784. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  785. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_RESET
  786. #define BUTTON1_RELAY 1
  787. // Relays
  788. #define RELAY1_PIN 12
  789. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  790. // LEDs
  791. #define LED1_PIN 13
  792. #define LED1_PIN_INVERSE 0
  793. #elif defined(YJZK_SWITCH_2CH)
  794. // Info
  795. #define MANUFACTURER "YJZK"
  796. #define DEVICE "SWITCH_2CH"
  797. // Buttons
  798. #define BUTTON1_PIN 0
  799. #define BUTTON2_PIN 9
  800. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  801. #define BUTTON1_PRESS BUTTON_MODE_TOGGLE
  802. #define BUTTON1_CLICK BUTTON_MODE_NONE
  803. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  804. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  805. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_RESET
  806. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  807. #define BUTTON2_PRESS BUTTON_MODE_TOGGLE
  808. #define BUTTON2_CLICK BUTTON_MODE_NONE
  809. #define BUTTON2_DBLCLICK BUTTON_MODE_NONE
  810. #define BUTTON2_LNGCLICK BUTTON_MODE_NONE
  811. #define BUTTON2_LNGLNGCLICK BUTTON_MODE_RESET
  812. #define BUTTON1_RELAY 1
  813. #define BUTTON2_RELAY 2
  814. // Relays
  815. #define RELAY1_PIN 12
  816. #define RELAY2_PIN 5
  817. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  818. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  819. // LEDs
  820. #define LED1_PIN 13
  821. #define LED1_PIN_INVERSE 0
  822. // YJZK 3CH switch
  823. // Also Lixin Touch Wifi 3M
  824. #elif defined(YJZK_SWITCH_3CH)
  825. // Info
  826. #define MANUFACTURER "YJZK"
  827. #define DEVICE "SWITCH_3CH"
  828. // Buttons
  829. #define BUTTON1_PIN 0
  830. #define BUTTON2_PIN 9
  831. #define BUTTON3_PIN 10
  832. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  833. #define BUTTON1_PRESS BUTTON_MODE_TOGGLE
  834. #define BUTTON1_CLICK BUTTON_MODE_NONE
  835. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  836. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  837. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_RESET
  838. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  839. #define BUTTON2_PRESS BUTTON_MODE_TOGGLE
  840. #define BUTTON2_CLICK BUTTON_MODE_NONE
  841. #define BUTTON2_DBLCLICK BUTTON_MODE_NONE
  842. #define BUTTON2_LNGCLICK BUTTON_MODE_NONE
  843. #define BUTTON2_LNGLNGCLICK BUTTON_MODE_RESET
  844. #define BUTTON3_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  845. #define BUTTON3_PRESS BUTTON_MODE_TOGGLE
  846. #define BUTTON3_CLICK BUTTON_MODE_NONE
  847. #define BUTTON3_DBLCLICK BUTTON_MODE_NONE
  848. #define BUTTON3_LNGCLICK BUTTON_MODE_NONE
  849. #define BUTTON3_LNGLNGCLICK BUTTON_MODE_RESET
  850. #define BUTTON1_RELAY 1
  851. #define BUTTON2_RELAY 2
  852. #define BUTTON3_RELAY 3
  853. // Relays
  854. #define RELAY1_PIN 12
  855. #define RELAY2_PIN 5
  856. #define RELAY3_PIN 4
  857. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  858. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  859. #define RELAY3_TYPE RELAY_TYPE_NORMAL
  860. // LEDs
  861. #define LED1_PIN 13
  862. #define LED1_PIN_INVERSE 0
  863. // -----------------------------------------------------------------------------
  864. // Electrodragon boards
  865. // -----------------------------------------------------------------------------
  866. #elif defined(ELECTRODRAGON_WIFI_IOT)
  867. // Info
  868. #define MANUFACTURER "ELECTRODRAGON"
  869. #define DEVICE "WIFI_IOT"
  870. // Buttons
  871. #define BUTTON1_PIN 0
  872. #define BUTTON2_PIN 2
  873. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  874. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  875. #define BUTTON1_RELAY 1
  876. #define BUTTON2_RELAY 2
  877. // Relays
  878. #define RELAY1_PIN 12
  879. #define RELAY2_PIN 13
  880. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  881. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  882. // LEDs
  883. #define LED1_PIN 16
  884. #define LED1_PIN_INVERSE 0
  885. // -----------------------------------------------------------------------------
  886. // WorkChoice ecoPlug
  887. // -----------------------------------------------------------------------------
  888. #elif defined(WORKCHOICE_ECOPLUG)
  889. // Info
  890. #define MANUFACTURER "WORKCHOICE"
  891. #define DEVICE "ECOPLUG"
  892. // Buttons
  893. #define BUTTON1_PIN 13
  894. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  895. #define BUTTON1_RELAY 1
  896. // Relays
  897. #define RELAY1_PIN 15
  898. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  899. // LEDs
  900. #define LED1_PIN 2
  901. #define LED1_PIN_INVERSE 0
  902. // -----------------------------------------------------------------------------
  903. // AI Thinker
  904. // -----------------------------------------------------------------------------
  905. #elif defined(AITHINKER_AI_LIGHT)
  906. // Info
  907. #define MANUFACTURER "AITHINKER"
  908. #define DEVICE "AI_LIGHT"
  909. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  910. #define LIGHT_PROVIDER LIGHT_PROVIDER_MY92XX
  911. #define DUMMY_RELAY_COUNT 1
  912. // Light
  913. #define LIGHT_CHANNELS 4
  914. #define MY92XX_MODEL MY92XX_MODEL_MY9291
  915. #define MY92XX_CHIPS 1
  916. #define MY92XX_DI_PIN 13
  917. #define MY92XX_DCKI_PIN 15
  918. #define MY92XX_COMMAND MY92XX_COMMAND_DEFAULT
  919. #define MY92XX_MAPPING 0, 1, 2, 3
  920. // -----------------------------------------------------------------------------
  921. // Lyasi LED
  922. // -----------------------------------------------------------------------------
  923. #elif defined(LYASI_LIGHT)
  924. // Info
  925. #define MANUFACTURER "LYASI"
  926. #define DEVICE "RGB-LED"
  927. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  928. #define LIGHT_PROVIDER LIGHT_PROVIDER_MY92XX
  929. #define DUMMY_RELAY_COUNT 1
  930. // Light
  931. #define LIGHT_CHANNELS 4
  932. #define MY92XX_MODEL MY92XX_MODEL_MY9291
  933. #define MY92XX_CHIPS 1
  934. #define MY92XX_DI_PIN 4
  935. #define MY92XX_DCKI_PIN 5
  936. #define MY92XX_COMMAND MY92XX_COMMAND_DEFAULT
  937. #define MY92XX_MAPPING 0, 1, 2, 3
  938. // -----------------------------------------------------------------------------
  939. // LED Controller
  940. // -----------------------------------------------------------------------------
  941. #elif defined(MAGICHOME_LED_CONTROLLER)
  942. // Info
  943. #define MANUFACTURER "MAGICHOME"
  944. #define DEVICE "LED_CONTROLLER"
  945. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  946. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  947. #define DUMMY_RELAY_COUNT 1
  948. // LEDs
  949. #define LED1_PIN 2
  950. #define LED1_PIN_INVERSE 1
  951. // Light
  952. #define LIGHT_CHANNELS 4
  953. #define LIGHT_CH1_PIN 14 // RED
  954. #define LIGHT_CH2_PIN 5 // GREEN
  955. #define LIGHT_CH3_PIN 12 // BLUE
  956. #define LIGHT_CH4_PIN 13 // WHITE
  957. #define LIGHT_CH1_INVERSE 0
  958. #define LIGHT_CH2_INVERSE 0
  959. #define LIGHT_CH3_INVERSE 0
  960. #define LIGHT_CH4_INVERSE 0
  961. // IR
  962. #define IR_SUPPORT 1
  963. #define IR_RX_PIN 4
  964. #define IR_BUTTON_SET 1
  965. #elif defined(MAGICHOME_LED_CONTROLLER_20)
  966. // Info
  967. #define MANUFACTURER "MAGICHOME"
  968. #define DEVICE "LED_CONTROLLER_20"
  969. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  970. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  971. #define DUMMY_RELAY_COUNT 1
  972. // LEDs
  973. #define LED1_PIN 2
  974. #define LED1_PIN_INVERSE 1
  975. // Light
  976. #define LIGHT_CHANNELS 4
  977. #define LIGHT_CH1_PIN 5 // RED
  978. #define LIGHT_CH2_PIN 12 // GREEN
  979. #define LIGHT_CH3_PIN 13 // BLUE
  980. #define LIGHT_CH4_PIN 15 // WHITE
  981. #define LIGHT_CH1_INVERSE 0
  982. #define LIGHT_CH2_INVERSE 0
  983. #define LIGHT_CH3_INVERSE 0
  984. #define LIGHT_CH4_INVERSE 0
  985. // IR
  986. #define IR_SUPPORT 1
  987. #define IR_RX_PIN 4
  988. #define IR_BUTTON_SET 1
  989. #elif defined(MAGICHOME_ZJ_WFMN_A_11)
  990. // Info
  991. #define MANUFACTURER "MAGICHOME"
  992. #define DEVICE "ZJ_WFMN_A_11"
  993. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  994. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  995. #define DUMMY_RELAY_COUNT 1
  996. // LEDs
  997. #define LED1_PIN 2
  998. #define LED1_PIN_INVERSE 1
  999. #define LED2_PIN 15
  1000. #define LED2_PIN_INVERSE 1
  1001. // Light
  1002. #define LIGHT_CHANNELS 4
  1003. #define LIGHT_CH1_PIN 12 // RED
  1004. #define LIGHT_CH2_PIN 5 // GREEN
  1005. #define LIGHT_CH3_PIN 13 // BLUE
  1006. #define LIGHT_CH4_PIN 14 // WHITE
  1007. #define LIGHT_CH1_INVERSE 0
  1008. #define LIGHT_CH2_INVERSE 0
  1009. #define LIGHT_CH3_INVERSE 0
  1010. #define LIGHT_CH4_INVERSE 0
  1011. // IR
  1012. #define IR_SUPPORT 1
  1013. #define IR_RX_PIN 4
  1014. #define IR_BUTTON_SET 1
  1015. #elif defined(MAGICHOME_ZJ_WFMN_B_11)
  1016. // Info
  1017. #define MANUFACTURER "MAGICHOME"
  1018. #define DEVICE "ZJ_WFMN_B_11"
  1019. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  1020. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  1021. #define DUMMY_RELAY_COUNT 1
  1022. // LEDs
  1023. #define LED1_PIN 2
  1024. #define LED1_PIN_INVERSE 1
  1025. #define LED2_PIN 15
  1026. #define LED2_PIN_INVERSE 1
  1027. // Light
  1028. #define LIGHT_CHANNELS 4
  1029. #define LIGHT_CH1_PIN 14 // RED
  1030. #define LIGHT_CH2_PIN 5 // GREEN
  1031. #define LIGHT_CH3_PIN 12 // BLUE
  1032. #define LIGHT_CH4_PIN 13 // WHITE
  1033. #define LIGHT_CH1_INVERSE 0
  1034. #define LIGHT_CH2_INVERSE 0
  1035. #define LIGHT_CH3_INVERSE 0
  1036. #define LIGHT_CH4_INVERSE 0
  1037. // RF
  1038. #define RF_SUPPORT 1
  1039. #define RFB_DIRECT 1
  1040. #define RFB_RX_PIN 4
  1041. #elif defined(MAGICHOME_ZJ_ESPM_5CH_B_13)
  1042. // Info
  1043. #define MANUFACTURER "MAGICHOME"
  1044. #define DEVICE "ZJ_ESPM_5CH_B_13"
  1045. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  1046. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  1047. #define DUMMY_RELAY_COUNT 1
  1048. // Buttons
  1049. #define BUTTON1_PIN 0
  1050. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1051. #define BUTTON1_RELAY 1
  1052. // LEDs
  1053. #define LED1_PIN 2
  1054. #define LED1_PIN_INVERSE 1
  1055. // Light
  1056. #define LIGHT_CHANNELS 5
  1057. #define LIGHT_CH1_PIN 14 // RED
  1058. #define LIGHT_CH2_PIN 12 // GREEN
  1059. #define LIGHT_CH3_PIN 13 // BLUE
  1060. #define LIGHT_CH4_PIN 5 // COLD WHITE
  1061. #define LIGHT_CH5_PIN 15 // WARM WHITE
  1062. #define LIGHT_CH1_INVERSE 0
  1063. #define LIGHT_CH2_INVERSE 0
  1064. #define LIGHT_CH3_INVERSE 0
  1065. #define LIGHT_CH4_INVERSE 0
  1066. #define LIGHT_CH5_INVERSE 0
  1067. // -----------------------------------------------------------------------------
  1068. // HUACANXING H801 & H802
  1069. // -----------------------------------------------------------------------------
  1070. #elif defined(HUACANXING_H801)
  1071. // Info
  1072. #define MANUFACTURER "HUACANXING"
  1073. #define DEVICE "H801"
  1074. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  1075. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  1076. #define DUMMY_RELAY_COUNT 1
  1077. #define DEBUG_PORT Serial1
  1078. #define SERIAL_RX_ENABLED 1
  1079. // LEDs
  1080. #define LED1_PIN 5
  1081. #define LED1_PIN_INVERSE 1
  1082. // Light
  1083. #define LIGHT_CHANNELS 5
  1084. #define LIGHT_CH1_PIN 15 // RED
  1085. #define LIGHT_CH2_PIN 13 // GREEN
  1086. #define LIGHT_CH3_PIN 12 // BLUE
  1087. #define LIGHT_CH4_PIN 14 // WHITE1
  1088. #define LIGHT_CH5_PIN 4 // WHITE2
  1089. #define LIGHT_CH1_INVERSE 0
  1090. #define LIGHT_CH2_INVERSE 0
  1091. #define LIGHT_CH3_INVERSE 0
  1092. #define LIGHT_CH4_INVERSE 0
  1093. #define LIGHT_CH5_INVERSE 0
  1094. #elif defined(HUACANXING_H802)
  1095. // Info
  1096. #define MANUFACTURER "HUACANXING"
  1097. #define DEVICE "H802"
  1098. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  1099. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  1100. #define DUMMY_RELAY_COUNT 1
  1101. #define DEBUG_PORT Serial1
  1102. #define SERIAL_RX_ENABLED 1
  1103. // Light
  1104. #define LIGHT_CHANNELS 4
  1105. #define LIGHT_CH1_PIN 12 // RED
  1106. #define LIGHT_CH2_PIN 14 // GREEN
  1107. #define LIGHT_CH3_PIN 13 // BLUE
  1108. #define LIGHT_CH4_PIN 15 // WHITE
  1109. #define LIGHT_CH1_INVERSE 0
  1110. #define LIGHT_CH2_INVERSE 0
  1111. #define LIGHT_CH3_INVERSE 0
  1112. #define LIGHT_CH4_INVERSE 0
  1113. // -----------------------------------------------------------------------------
  1114. // Jan Goedeke Wifi Relay
  1115. // https://github.com/JanGoe/esp8266-wifi-relay
  1116. // -----------------------------------------------------------------------------
  1117. #elif defined(JANGOE_WIFI_RELAY_NC)
  1118. // Info
  1119. #define MANUFACTURER "JANGOE"
  1120. #define DEVICE "WIFI_RELAY_NC"
  1121. // Buttons
  1122. #define BUTTON1_PIN 12
  1123. #define BUTTON2_PIN 13
  1124. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1125. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1126. #define BUTTON1_RELAY 1
  1127. #define BUTTON2_RELAY 2
  1128. // Relays
  1129. #define RELAY1_PIN 2
  1130. #define RELAY2_PIN 14
  1131. #define RELAY1_TYPE RELAY_TYPE_INVERSE
  1132. #define RELAY2_TYPE RELAY_TYPE_INVERSE
  1133. #elif defined(JANGOE_WIFI_RELAY_NO)
  1134. // Info
  1135. #define MANUFACTURER "JANGOE"
  1136. #define DEVICE "WIFI_RELAY_NO"
  1137. // Buttons
  1138. #define BUTTON1_PIN 12
  1139. #define BUTTON2_PIN 13
  1140. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1141. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1142. #define BUTTON1_RELAY 1
  1143. #define BUTTON2_RELAY 2
  1144. // Relays
  1145. #define RELAY1_PIN 2
  1146. #define RELAY2_PIN 14
  1147. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1148. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  1149. // -----------------------------------------------------------------------------
  1150. // Jorge García Wifi+Relays Board Kit
  1151. // https://www.tindie.com/products/jorgegarciadev/wifi--relays-board-kit
  1152. // https://github.com/jorgegarciadev/wifikit
  1153. // -----------------------------------------------------------------------------
  1154. #elif defined(JORGEGARCIA_WIFI_RELAYS)
  1155. // Info
  1156. #define MANUFACTURER "JORGEGARCIA"
  1157. #define DEVICE "WIFI_RELAYS"
  1158. // Relays
  1159. #define RELAY1_PIN 0
  1160. #define RELAY2_PIN 2
  1161. #define RELAY1_TYPE RELAY_TYPE_INVERSE
  1162. #define RELAY2_TYPE RELAY_TYPE_INVERSE
  1163. // -----------------------------------------------------------------------------
  1164. // WiFi MQTT Relay / Thermostat
  1165. // -----------------------------------------------------------------------------
  1166. #elif defined(OPENENERGYMONITOR_MQTT_RELAY)
  1167. // Info
  1168. #define MANUFACTURER "OPENENERGYMONITOR"
  1169. #define DEVICE "MQTT_RELAY"
  1170. // Buttons
  1171. #define BUTTON1_PIN 0
  1172. #define BUTTON1_RELAY 1
  1173. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1174. // Relays
  1175. #define RELAY1_PIN 12
  1176. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1177. // LEDs
  1178. #define LED1_PIN 16
  1179. #define LED1_PIN_INVERSE 0
  1180. // -----------------------------------------------------------------------------
  1181. // WiOn 50055 Indoor Wi-Fi Wall Outlet & Tap
  1182. // 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
  1183. // 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
  1184. // -----------------------------------------------------------------------------
  1185. #elif defined(WION_50055)
  1186. // Currently untested, does not support energy monitoring
  1187. // Info
  1188. #define MANUFACTURER "WION"
  1189. #define DEVICE "50055"
  1190. // Buttons
  1191. #define BUTTON1_PIN 13
  1192. #define BUTTON1_RELAY 1
  1193. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1194. // Relays
  1195. #define RELAY1_PIN 15
  1196. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1197. // LEDs
  1198. #define LED1_PIN 2
  1199. #define LED1_PIN_INVERSE 0
  1200. // -----------------------------------------------------------------------------
  1201. // EX-Store Wifi Relay v3.1
  1202. // https://ex-store.de/ESP8266-WiFi-Relay-V31
  1203. // -----------------------------------------------------------------------------
  1204. #elif defined(EXS_WIFI_RELAY_V31)
  1205. // Untested
  1206. // Info
  1207. #define MANUFACTURER "EXS"
  1208. #define DEVICE "WIFI_RELAY_V31"
  1209. // Buttons
  1210. #define BUTTON1_PIN 0
  1211. #define BUTTON1_RELAY 1
  1212. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1213. // Relays
  1214. #define RELAY1_PIN 13
  1215. #define RELAY1_TYPE RELAY_TYPE_LATCHED
  1216. #define RELAY1_RESET_PIN 12
  1217. // -----------------------------------------------------------------------------
  1218. // EX-Store Wifi Relay v5.0
  1219. // -----------------------------------------------------------------------------
  1220. #elif defined(EXS_WIFI_RELAY_V50)
  1221. // Info
  1222. #define MANUFACTURER "EXS"
  1223. #define DEVICE "WIFI_RELAY_V50"
  1224. // Buttons
  1225. #define BUTTON1_PIN 5
  1226. #define BUTTON2_PIN 4
  1227. #define BUTTON1_RELAY 1
  1228. #define BUTTON2_RELAY 2
  1229. #define BUTTON1_MODE BUTTON_SWITCH | BUTTON_DEFAULT_HIGH | BUTTON_SET_PULLUP
  1230. #define BUTTON2_MODE BUTTON_SWITCH | BUTTON_DEFAULT_HIGH | BUTTON_SET_PULLUP
  1231. // Relays
  1232. #define RELAY1_PIN 14
  1233. #define RELAY1_TYPE RELAY_TYPE_LATCHED
  1234. #define RELAY1_RESET_PIN 16
  1235. #define RELAY2_PIN 13
  1236. #define RELAY2_TYPE RELAY_TYPE_LATCHED
  1237. #define RELAY2_RESET_PIN 12
  1238. // LEDs
  1239. #define LED1_PIN 15
  1240. #define LED1_PIN_INVERSE 0
  1241. // -----------------------------------------------------------------------------
  1242. // V9261F
  1243. // -----------------------------------------------------------------------------
  1244. #elif defined(GENERIC_V9261F)
  1245. // Info
  1246. #define MANUFACTURER "GENERIC"
  1247. #define DEVICE "V9261F"
  1248. #define ALEXA_SUPPORT 0
  1249. // V9261F
  1250. #define V9261F_SUPPORT 1
  1251. #define V9261F_PIN 2
  1252. #define V9261F_PIN_INVERSE 1
  1253. // -----------------------------------------------------------------------------
  1254. // ECH1560
  1255. // -----------------------------------------------------------------------------
  1256. #elif defined(GENERIC_ECH1560)
  1257. // Info
  1258. #define MANUFACTURER "GENERIC"
  1259. #define DEVICE "ECH1560"
  1260. #define ALEXA_SUPPORT 0
  1261. // ECH1560
  1262. #define ECH1560_SUPPORT 1
  1263. #define ECH1560_CLK_PIN 4
  1264. #define ECH1560_MISO_PIN 5
  1265. #define ECH1560_INVERTED 0
  1266. // -----------------------------------------------------------------------------
  1267. // ESPLive
  1268. // https://github.com/ManCaveMade/ESP-Live
  1269. // -----------------------------------------------------------------------------
  1270. #elif defined(MANCAVEMADE_ESPLIVE)
  1271. // Info
  1272. #define MANUFACTURER "MANCAVEMADE"
  1273. #define DEVICE "ESPLIVE"
  1274. // Buttons
  1275. #define BUTTON1_PIN 4
  1276. #define BUTTON2_PIN 5
  1277. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1278. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1279. #define BUTTON1_RELAY 1
  1280. #define BUTTON2_RELAY 2
  1281. // Relays
  1282. #define RELAY1_PIN 12
  1283. #define RELAY2_PIN 13
  1284. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1285. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  1286. // DS18B20
  1287. #ifndef DALLAS_SUPPORT
  1288. #define DALLAS_SUPPORT 1
  1289. #endif
  1290. #define DALLAS_PIN 2
  1291. #define DALLAS_UPDATE_INTERVAL 5000
  1292. #define TEMPERATURE_MIN_CHANGE 1.0
  1293. // -----------------------------------------------------------------------------
  1294. // QuinLED
  1295. // http://blog.quindorian.org/2017/02/esp8266-led-lighting-quinled-v2-6-pcb.html
  1296. // -----------------------------------------------------------------------------
  1297. #elif defined(INTERMITTECH_QUINLED)
  1298. // Info
  1299. #define MANUFACTURER "INTERMITTECH"
  1300. #define DEVICE "QUINLED"
  1301. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  1302. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  1303. #define DUMMY_RELAY_COUNT 1
  1304. // LEDs
  1305. #define LED1_PIN 5
  1306. #define LED1_PIN_INVERSE 1
  1307. // Light
  1308. #define LIGHT_CHANNELS 2
  1309. #define LIGHT_CH1_PIN 0
  1310. #define LIGHT_CH2_PIN 2
  1311. #define LIGHT_CH1_INVERSE 0
  1312. #define LIGHT_CH2_INVERSE 0
  1313. // -----------------------------------------------------------------------------
  1314. // Arilux AL-LC06
  1315. // -----------------------------------------------------------------------------
  1316. #elif defined(ARILUX_AL_LC01)
  1317. // Info
  1318. #define MANUFACTURER "ARILUX"
  1319. #define DEVICE "AL_LC01"
  1320. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  1321. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  1322. #define DUMMY_RELAY_COUNT 1
  1323. // Light
  1324. #define LIGHT_CHANNELS 3
  1325. #define LIGHT_CH1_PIN 5 // RED
  1326. #define LIGHT_CH2_PIN 12 // GREEN
  1327. #define LIGHT_CH3_PIN 13 // BLUE
  1328. #define LIGHT_CH1_INVERSE 0
  1329. #define LIGHT_CH2_INVERSE 0
  1330. #define LIGHT_CH3_INVERSE 0
  1331. #elif defined(ARILUX_AL_LC02)
  1332. // Info
  1333. #define MANUFACTURER "ARILUX"
  1334. #define DEVICE "AL_LC02"
  1335. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  1336. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  1337. #define DUMMY_RELAY_COUNT 1
  1338. // Light
  1339. #define LIGHT_CHANNELS 4
  1340. #define LIGHT_CH1_PIN 12 // RED
  1341. #define LIGHT_CH2_PIN 5 // GREEN
  1342. #define LIGHT_CH3_PIN 13 // BLUE
  1343. #define LIGHT_CH4_PIN 15 // WHITE1
  1344. #define LIGHT_CH1_INVERSE 0
  1345. #define LIGHT_CH2_INVERSE 0
  1346. #define LIGHT_CH3_INVERSE 0
  1347. #define LIGHT_CH4_INVERSE 0
  1348. #elif defined(ARILUX_AL_LC02_V14)
  1349. // Info
  1350. #define MANUFACTURER "ARILUX"
  1351. #define DEVICE "AL_LC02_V14"
  1352. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  1353. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  1354. #define DUMMY_RELAY_COUNT 1
  1355. // Light
  1356. #define LIGHT_CHANNELS 4
  1357. #define LIGHT_CH1_PIN 14 // RED
  1358. #define LIGHT_CH2_PIN 5 // GREEN
  1359. #define LIGHT_CH3_PIN 12 // BLUE
  1360. #define LIGHT_CH4_PIN 13 // WHITE1
  1361. #define LIGHT_CH1_INVERSE 0
  1362. #define LIGHT_CH2_INVERSE 0
  1363. #define LIGHT_CH3_INVERSE 0
  1364. #define LIGHT_CH4_INVERSE 0
  1365. #elif defined(ARILUX_AL_LC06)
  1366. // Info
  1367. #define MANUFACTURER "ARILUX"
  1368. #define DEVICE "AL_LC06"
  1369. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  1370. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  1371. #define DUMMY_RELAY_COUNT 1
  1372. // Buttons
  1373. #define BUTTON1_PIN 0
  1374. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1375. #define BUTTON1_RELAY 1
  1376. // Light
  1377. #define LIGHT_CHANNELS 5
  1378. #define LIGHT_CH1_PIN 14 // RED
  1379. #define LIGHT_CH2_PIN 12 // GREEN
  1380. #define LIGHT_CH3_PIN 13 // BLUE
  1381. #define LIGHT_CH4_PIN 15 // WHITE1
  1382. #define LIGHT_CH5_PIN 5 // WHITE2
  1383. #define LIGHT_CH1_INVERSE 0
  1384. #define LIGHT_CH2_INVERSE 0
  1385. #define LIGHT_CH3_INVERSE 0
  1386. #define LIGHT_CH4_INVERSE 0
  1387. #define LIGHT_CH5_INVERSE 0
  1388. #elif defined(ARILUX_AL_LC11)
  1389. // Info
  1390. #define MANUFACTURER "ARILUX"
  1391. #define DEVICE "AL_LC11"
  1392. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  1393. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  1394. #define DUMMY_RELAY_COUNT 1
  1395. // Light
  1396. #define LIGHT_CHANNELS 5
  1397. #define LIGHT_CH1_PIN 5 // RED
  1398. #define LIGHT_CH2_PIN 4 // GREEN
  1399. #define LIGHT_CH3_PIN 14 // BLUE
  1400. #define LIGHT_CH4_PIN 13 // WHITE1
  1401. #define LIGHT_CH5_PIN 12 // WHITE1
  1402. #define LIGHT_CH1_INVERSE 0
  1403. #define LIGHT_CH2_INVERSE 0
  1404. #define LIGHT_CH3_INVERSE 0
  1405. #define LIGHT_CH4_INVERSE 0
  1406. #define LIGHT_CH5_INVERSE 0
  1407. #elif defined(ARILUX_E27)
  1408. // Info
  1409. #define MANUFACTURER "ARILUX"
  1410. #define DEVICE "E27"
  1411. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  1412. #define LIGHT_PROVIDER LIGHT_PROVIDER_MY92XX
  1413. #define DUMMY_RELAY_COUNT 1
  1414. // Light
  1415. #define LIGHT_CHANNELS 4
  1416. #define MY92XX_MODEL MY92XX_MODEL_MY9291
  1417. #define MY92XX_CHIPS 1
  1418. #define MY92XX_DI_PIN 13
  1419. #define MY92XX_DCKI_PIN 15
  1420. #define MY92XX_COMMAND MY92XX_COMMAND_DEFAULT
  1421. #define MY92XX_MAPPING 0, 1, 2, 3
  1422. // -----------------------------------------------------------------------------
  1423. // XENON SM-PW701U
  1424. // -----------------------------------------------------------------------------
  1425. #elif defined(XENON_SM_PW702U)
  1426. // Info
  1427. #define MANUFACTURER "XENON"
  1428. #define DEVICE "SM_PW702U"
  1429. // Buttons
  1430. #define BUTTON1_PIN 13
  1431. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1432. #define BUTTON1_RELAY 1
  1433. // Relays
  1434. #define RELAY1_PIN 12
  1435. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1436. // LEDs
  1437. #define LED1_PIN 4
  1438. #define LED1_PIN_INVERSE 1
  1439. // -----------------------------------------------------------------------------
  1440. // ISELECTOR SM-PW702
  1441. // -----------------------------------------------------------------------------
  1442. #elif defined(ISELECTOR_SM_PW702)
  1443. // Info
  1444. #define MANUFACTURER "ISELECTOR"
  1445. #define DEVICE "SM_PW702"
  1446. // Buttons
  1447. #define BUTTON1_PIN 13
  1448. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1449. #define BUTTON1_RELAY 1
  1450. // Relays
  1451. #define RELAY1_PIN 12
  1452. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1453. // LEDs
  1454. #define LED1_PIN 4 //BLUE
  1455. #define LED1_PIN_INVERSE 0
  1456. #define LED2_PIN 5 //RED
  1457. #define LED2_PIN_INVERSE 1
  1458. // -----------------------------------------------------------------------------
  1459. // AUTHOMETION LYT8266
  1460. // https://authometion.com/shop/en/home/13-lyt8266.html
  1461. // -----------------------------------------------------------------------------
  1462. #elif defined(AUTHOMETION_LYT8266)
  1463. // Info
  1464. #define MANUFACTURER "AUTHOMETION"
  1465. #define DEVICE "LYT8266"
  1466. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  1467. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  1468. #define DUMMY_RELAY_COUNT 1
  1469. // Light
  1470. #define LIGHT_CHANNELS 4
  1471. #define LIGHT_CH1_PIN 13 // RED
  1472. #define LIGHT_CH2_PIN 12 // GREEN
  1473. #define LIGHT_CH3_PIN 14 // BLUE
  1474. #define LIGHT_CH4_PIN 2 // WHITE
  1475. #define LIGHT_CH1_INVERSE 0
  1476. #define LIGHT_CH2_INVERSE 0
  1477. #define LIGHT_CH3_INVERSE 0
  1478. #define LIGHT_CH4_INVERSE 0
  1479. #define LIGHT_ENABLE_PIN 15
  1480. #elif defined(GIZWITS_WITTY_CLOUD)
  1481. // Info
  1482. #define MANUFACTURER "GIZWITS"
  1483. #define DEVICE "WITTY_CLOUD"
  1484. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  1485. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  1486. #define DUMMY_RELAY_COUNT 1
  1487. // Buttons
  1488. #define BUTTON1_PIN 4
  1489. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1490. #define BUTTON1_PRESS BUTTON_MODE_TOGGLE
  1491. #define BUTTON1_CLICK BUTTON_MODE_NONE
  1492. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  1493. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  1494. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_RESET
  1495. #define ANALOG_SUPPORT 1
  1496. // LEDs
  1497. #define LED1_PIN 2 // BLUE build-in
  1498. #define LED1_PIN_INVERSE 1
  1499. // Light
  1500. #define LIGHT_CHANNELS 3
  1501. #define LIGHT_CH1_PIN 15 // RED
  1502. #define LIGHT_CH2_PIN 12 // GREEN
  1503. #define LIGHT_CH3_PIN 13 // BLUE
  1504. #define LIGHT_CH1_INVERSE 0
  1505. #define LIGHT_CH2_INVERSE 0
  1506. #define LIGHT_CH3_INVERSE 0
  1507. // -----------------------------------------------------------------------------
  1508. // KMC 70011
  1509. // https://www.amazon.com/KMC-Monitoring-Required-Control-Compatible/dp/B07313TH7B
  1510. // -----------------------------------------------------------------------------
  1511. #elif defined(KMC_70011)
  1512. // Info
  1513. #define MANUFACTURER "KMC"
  1514. #define DEVICE "70011"
  1515. // Buttons
  1516. #define BUTTON1_PIN 0
  1517. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1518. #define BUTTON1_RELAY 1
  1519. // Relays
  1520. #define RELAY1_PIN 14
  1521. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1522. // LEDs
  1523. #define LED1_PIN 13
  1524. #define LED1_PIN_INVERSE 1
  1525. // HLW8012
  1526. #ifndef HLW8012_SUPPORT
  1527. #define HLW8012_SUPPORT 1
  1528. #endif
  1529. #define HLW8012_SEL_PIN 12
  1530. #define HLW8012_CF1_PIN 5
  1531. #define HLW8012_CF_PIN 4
  1532. #define HLW8012_VOLTAGE_R_UP ( 2 * 1000000 ) // Upstream voltage resistor
  1533. // -----------------------------------------------------------------------------
  1534. // Euromate (?) Wifi Stecker Schuko
  1535. // https://www.obi.de/hausfunksteuerung/wifi-stecker-schuko/p/2291706
  1536. // Thanks to @Geitde
  1537. // -----------------------------------------------------------------------------
  1538. #elif defined(EUROMATE_WIFI_STECKER_SCHUKO)
  1539. // Info
  1540. #define MANUFACTURER "EUROMATE"
  1541. #define DEVICE "WIFI_STECKER_SCHUKO"
  1542. // Buttons
  1543. #define BUTTON1_PIN 14
  1544. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_SET_PULLUP | BUTTON_DEFAULT_HIGH
  1545. #define BUTTON1_RELAY 1
  1546. // The relay in the device is not a bistable (latched) relay.
  1547. // The device is reported to have a flip-flop circuit to drive the relay
  1548. // So @Geitde hack is still the only possible
  1549. // Hack: drive GPIO12 low and use GPIO5 as normal relay pin:
  1550. #define RELAY1_PIN 5
  1551. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1552. #define LED2_PIN 12 /* DUMMY: exploit default off state for GPIO12=low */
  1553. #define LED2_PIN_INVERSE 0
  1554. // LEDs
  1555. #define LED1_PIN 4
  1556. #define LED1_PIN_INVERSE 0
  1557. // -----------------------------------------------------------------------------
  1558. // Euromate (?) Wifi Stecker Schuko Version 2
  1559. // This configuration is for the second generation of devices sold by OBI.
  1560. // https://www.obi.de/hausfunksteuerung/wifi-stecker-schuko-weiss/p/4077806
  1561. // -----------------------------------------------------------------------------
  1562. #elif defined(EUROMATE_WIFI_STECKER_SCHUKO_V2)
  1563. // Info
  1564. #define MANUFACTURER "EUROMATE"
  1565. #define DEVICE "WIFI_STECKER_SCHUKO_V2"
  1566. // Buttons
  1567. #define BUTTON1_PIN 5
  1568. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_SET_PULLUP | BUTTON_DEFAULT_HIGH
  1569. #define BUTTON1_RELAY 1
  1570. // Relays
  1571. #define RELAY1_PIN 4
  1572. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1573. // Green
  1574. #define LED1_PIN 12
  1575. #define LED1_MODE LED_MODE_WIFI
  1576. #define LED1_PIN_INVERSE 0
  1577. // Red
  1578. #define LED2_PIN 13
  1579. #define LED2_MODE LED_MODE_RELAY
  1580. #define LED2_PIN_INVERSE 0
  1581. // -----------------------------------------------------------------------------
  1582. // Generic 8CH
  1583. // -----------------------------------------------------------------------------
  1584. #elif defined(GENERIC_8CH)
  1585. // Info
  1586. #define MANUFACTURER "GENERIC"
  1587. #define DEVICE "8CH"
  1588. // Relays
  1589. #define RELAY1_PIN 0
  1590. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1591. #define RELAY2_PIN 2
  1592. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  1593. #define RELAY3_PIN 4
  1594. #define RELAY3_TYPE RELAY_TYPE_NORMAL
  1595. #define RELAY4_PIN 5
  1596. #define RELAY4_TYPE RELAY_TYPE_NORMAL
  1597. #define RELAY5_PIN 12
  1598. #define RELAY5_TYPE RELAY_TYPE_NORMAL
  1599. #define RELAY6_PIN 13
  1600. #define RELAY6_TYPE RELAY_TYPE_NORMAL
  1601. #define RELAY7_PIN 14
  1602. #define RELAY7_TYPE RELAY_TYPE_NORMAL
  1603. #define RELAY8_PIN 15
  1604. #define RELAY8_TYPE RELAY_TYPE_NORMAL
  1605. // -----------------------------------------------------------------------------
  1606. // STM RELAY
  1607. // -----------------------------------------------------------------------------
  1608. #elif defined(STM_RELAY)
  1609. // Info
  1610. #define MANUFACTURER "STM_RELAY"
  1611. #define DEVICE "2CH"
  1612. // Relays
  1613. #define DUMMY_RELAY_COUNT 2
  1614. #define RELAY_PROVIDER RELAY_PROVIDER_STM
  1615. // Remove UART noise on serial line
  1616. #define DEBUG_SERIAL_SUPPORT 0
  1617. // -----------------------------------------------------------------------------
  1618. // Tonbux Powerstrip02
  1619. // -----------------------------------------------------------------------------
  1620. #elif defined(TONBUX_POWERSTRIP02)
  1621. // Info
  1622. #define MANUFACTURER "TONBUX"
  1623. #define DEVICE "POWERSTRIP02"
  1624. // Buttons
  1625. #define BUTTON1_PIN 5
  1626. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1627. #define BUTTON1_RELAY 0
  1628. // Relays
  1629. #define RELAY1_PIN 4
  1630. #define RELAY1_TYPE RELAY_TYPE_INVERSE
  1631. #define RELAY2_PIN 13
  1632. #define RELAY2_TYPE RELAY_TYPE_INVERSE
  1633. #define RELAY3_PIN 12
  1634. #define RELAY3_TYPE RELAY_TYPE_INVERSE
  1635. #define RELAY4_PIN 14
  1636. #define RELAY4_TYPE RELAY_TYPE_INVERSE
  1637. // Not a relay. USB ports on/off
  1638. #define RELAY5_PIN 16
  1639. #define RELAY5_TYPE RELAY_TYPE_NORMAL
  1640. // LEDs
  1641. #define LED1_PIN 0 // 1 blue led
  1642. #define LED1_PIN_INVERSE 1
  1643. #define LED2_PIN 3 // 3 red leds
  1644. #define LED2_PIN_INVERSE 1
  1645. // -----------------------------------------------------------------------------
  1646. // Lingan SWA1
  1647. // -----------------------------------------------------------------------------
  1648. #elif defined(LINGAN_SWA1)
  1649. // Info
  1650. #define MANUFACTURER "LINGAN"
  1651. #define DEVICE "SWA1"
  1652. // Buttons
  1653. #define BUTTON1_PIN 13
  1654. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_SET_PULLUP | BUTTON_DEFAULT_HIGH
  1655. #define BUTTON1_RELAY 1
  1656. // Relays
  1657. #define RELAY1_PIN 5
  1658. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1659. // LEDs
  1660. #define LED1_PIN 4
  1661. #define LED1_PIN_INVERSE 1
  1662. // -----------------------------------------------------------------------------
  1663. // HEYGO HY02
  1664. // -----------------------------------------------------------------------------
  1665. #elif defined(HEYGO_HY02)
  1666. // Info
  1667. #define MANUFACTURER "HEYGO"
  1668. #define DEVICE "HY02"
  1669. // Buttons
  1670. #define BUTTON1_PIN 13
  1671. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1672. #define BUTTON1_RELAY 1
  1673. // Relays
  1674. #define RELAY1_PIN 12
  1675. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1676. // LEDs
  1677. #define LED1_PIN 4
  1678. #define LED1_PIN_INVERSE 0
  1679. // -----------------------------------------------------------------------------
  1680. // Maxcio W-US002S
  1681. // -----------------------------------------------------------------------------
  1682. #elif defined(MAXCIO_WUS002S)
  1683. // Info
  1684. #define MANUFACTURER "MAXCIO"
  1685. #define DEVICE "WUS002S"
  1686. // Buttons
  1687. #define BUTTON1_PIN 2
  1688. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1689. #define BUTTON1_RELAY 1
  1690. // Relays
  1691. #define RELAY1_PIN 13
  1692. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1693. // LEDs
  1694. #define LED1_PIN 3
  1695. #define LED1_PIN_INVERSE 0
  1696. // HLW8012
  1697. #ifndef HLW8012_SUPPORT
  1698. #define HLW8012_SUPPORT 1
  1699. #endif
  1700. #define HLW8012_SEL_PIN 12
  1701. #define HLW8012_CF1_PIN 5
  1702. #define HLW8012_CF_PIN 4
  1703. #define HLW8012_CURRENT_R 0.002 // Current resistor
  1704. #define HLW8012_VOLTAGE_R_UP ( 2 * 1000000 ) // Upstream voltage resistor
  1705. // LED1 on RX pin
  1706. #define DEBUG_SERIAL_SUPPORT 1
  1707. // -----------------------------------------------------------------------------
  1708. // Maxcio W-DE004
  1709. // -----------------------------------------------------------------------------
  1710. #elif defined(MAXCIO_WDE004)
  1711. // Info
  1712. #define MANUFACTURER "MAXCIO"
  1713. #define DEVICE "WDE004"
  1714. // Buttons
  1715. #define BUTTON1_PIN 1
  1716. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1717. #define BUTTON1_RELAY 1
  1718. // Relays
  1719. #define RELAY1_PIN 14
  1720. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1721. // LEDs
  1722. #define LED1_PIN 13
  1723. #define LED1_PIN_INVERSE 1
  1724. // -----------------------------------------------------------------------------
  1725. // Oukitel P1 Smart Plug
  1726. // https://www.amazon.com/Docooler-OUKITEL-Control-Wireless-Adaptor/dp/B07J3BYFJX/ref=sr_1_fkmrnull_2?keywords=oukitel+p1+smart+switch&qid=1550424399&s=gateway&sr=8-2-fkmrnull
  1727. // -----------------------------------------------------------------------------
  1728. #elif defined(OUKITEL_P1)
  1729. // Info
  1730. #define MANUFACTURER "Oukitel"
  1731. #define DEVICE "P1"
  1732. // Buttons
  1733. #define BUTTON1_PIN 13
  1734. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1735. #define BUTTON1_RELAY 1
  1736. // Relays
  1737. // Right
  1738. #define RELAY1_PIN 12
  1739. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1740. // Left
  1741. #define RELAY2_PIN 15
  1742. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  1743. // LEDs
  1744. #define LED1_PIN 0 // blue
  1745. #define LED1_PIN_INVERSE 1
  1746. #define LED1_MODE LED_MODE_WIFI
  1747. // -----------------------------------------------------------------------------
  1748. // YiDian XS-SSA05
  1749. // -----------------------------------------------------------------------------
  1750. #elif defined(YIDIAN_XSSSA05)
  1751. // Info
  1752. #define MANUFACTURER "YIDIAN"
  1753. #define DEVICE "XSSSA05"
  1754. // Buttons
  1755. #define BUTTON1_PIN 13
  1756. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1757. #define BUTTON1_RELAY 1
  1758. // Relays
  1759. #define RELAY1_PIN 12
  1760. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1761. // LEDs
  1762. #define LED1_PIN 0 // red
  1763. #define LED1_PIN_INVERSE 1
  1764. #define LED1_MODE LED_MODE_WIFI
  1765. #define LED2_PIN 15 // blue
  1766. #define LED2_PIN_INVERSE 1
  1767. #define LED2_MODE LED_MODE_RELAY
  1768. // HLW8012
  1769. #ifndef HLW8012_SUPPORT
  1770. #define HLW8012_SUPPORT 1
  1771. #endif
  1772. #define HLW8012_SEL_PIN 3
  1773. #define HLW8012_CF1_PIN 14
  1774. #define HLW8012_CF_PIN 5
  1775. #define HLW8012_SEL_CURRENT LOW
  1776. #define HLW8012_CURRENT_RATIO 25740
  1777. #define HLW8012_VOLTAGE_RATIO 313400
  1778. #define HLW8012_POWER_RATIO 3414290
  1779. #define HLW8012_INTERRUPT_ON FALLING
  1780. // -----------------------------------------------------------------------------
  1781. // TONBUX XS-SSA01
  1782. // -----------------------------------------------------------------------------
  1783. #elif defined(TONBUX_XSSSA01)
  1784. // Info
  1785. #define MANUFACTURER "TONBUX"
  1786. #define DEVICE "XSSSA01"
  1787. // Buttons
  1788. #define BUTTON1_PIN 4
  1789. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1790. #define BUTTON1_RELAY 1
  1791. // Relays
  1792. #define RELAY1_PIN 14
  1793. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1794. // LEDs
  1795. #define LED1_PIN 13
  1796. #define LED1_PIN_INVERSE 0
  1797. // -----------------------------------------------------------------------------
  1798. // TONBUX XS-SSA06
  1799. // -----------------------------------------------------------------------------
  1800. #elif defined(TONBUX_XSSSA06)
  1801. // Info
  1802. #define MANUFACTURER "TONBUX"
  1803. #define DEVICE "XSSSA06"
  1804. // Buttons
  1805. #define BUTTON1_PIN 13
  1806. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1807. #define BUTTON1_RELAY 1
  1808. // Relays
  1809. #define RELAY1_PIN 15
  1810. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1811. // LEDs
  1812. #define LED1_PIN 0 // R - 8 rgb led ring
  1813. #define LED1_PIN_INVERSE 0
  1814. #define LED2_PIN 5 // G
  1815. #define LED2_PIN_INVERSE 0
  1816. #define LED3_PIN 2 // B
  1817. #define LED3_PIN_INVERSE 0
  1818. // -----------------------------------------------------------------------------
  1819. // GREEN ESP8266 RELAY MODULE
  1820. // https://www.aliexpress.com/wholesale?catId=0&initiative_id=SB_20180323113846&SearchText=Green+ESP8266
  1821. // -----------------------------------------------------------------------------
  1822. #elif defined(GREEN_ESP8266RELAY)
  1823. // Info
  1824. #define MANUFACTURER "GREEN"
  1825. #define DEVICE "ESP8266RELAY"
  1826. // Buttons
  1827. // Not a button but input via Optocoupler
  1828. #define BUTTON1_PIN 5
  1829. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_SET_PULLUP | BUTTON_DEFAULT_HIGH
  1830. #define BUTTON1_RELAY 1
  1831. // Relays
  1832. #define RELAY1_PIN 4
  1833. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1834. // LEDs
  1835. #define LED1_PIN 2
  1836. #define LED1_PIN_INVERSE 1
  1837. // -----------------------------------------------------------------------------
  1838. // Henrique Gravina ESPIKE
  1839. // https://github.com/Henriquegravina/Espike
  1840. // -----------------------------------------------------------------------------
  1841. #elif defined(IKE_ESPIKE)
  1842. #define MANUFACTURER "IKE"
  1843. #define DEVICE "ESPIKE"
  1844. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_NONE
  1845. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  1846. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  1847. #define BUTTON1_PIN 13
  1848. #define BUTTON1_RELAY 1
  1849. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1850. #define BUTTON2_PIN 12
  1851. #define BUTTON2_RELAY 2
  1852. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1853. #define BUTTON3_PIN 14
  1854. #define BUTTON3_RELAY 3
  1855. #define BUTTON3_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1856. #define RELAY1_PIN 4
  1857. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1858. #define RELAY2_PIN 5
  1859. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  1860. #define RELAY3_PIN 16
  1861. #define RELAY3_TYPE RELAY_TYPE_NORMAL
  1862. #define LED1_PIN 2
  1863. #define LED1_PIN_INVERSE 1
  1864. // -----------------------------------------------------------------------------
  1865. // SWIFITCH
  1866. // https://github.com/ArnieX/swifitch
  1867. // -----------------------------------------------------------------------------
  1868. #elif defined(ARNIEX_SWIFITCH)
  1869. // Info
  1870. #define MANUFACTURER "ARNIEX"
  1871. #define DEVICE "SWIFITCH"
  1872. // Buttons
  1873. #define BUTTON1_PIN 4 // D2
  1874. #define BUTTON1_MODE BUTTON_SWITCH | BUTTON_SET_PULLUP | BUTTON_DEFAULT_HIGH
  1875. #define BUTTON1_RELAY 1
  1876. #define BUTTON1_PRESS BUTTON_MODE_NONE
  1877. #define BUTTON1_CLICK BUTTON_MODE_TOGGLE
  1878. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  1879. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  1880. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_NONE
  1881. // Relays
  1882. #define RELAY1_PIN 5 // D1
  1883. #define RELAY1_TYPE RELAY_TYPE_INVERSE
  1884. // LEDs
  1885. #define LED1_PIN 12 // D6
  1886. #define LED1_PIN_INVERSE 1
  1887. // -----------------------------------------------------------------------------
  1888. // ESP-01S RELAY v4.0
  1889. // https://www.aliexpress.com/wholesale?catId=0&initiative_id=SB_20180404024035&SearchText=esp-01s+relay
  1890. // -----------------------------------------------------------------------------
  1891. #elif defined(GENERIC_ESP01S_RELAY_V40)
  1892. // Info
  1893. #define MANUFACTURER "GENERIC"
  1894. #define DEVICE "ESP01S_RELAY_40"
  1895. // Relays
  1896. #define RELAY1_PIN 0
  1897. #ifndef RELAY1_TYPE
  1898. #define RELAY1_TYPE RELAY_TYPE_NORMAL // See #1504 and #1554
  1899. #endif
  1900. // LEDs
  1901. #define LED1_PIN 2
  1902. #define LED1_PIN_INVERSE 0
  1903. // -----------------------------------------------------------------------------
  1904. // ESP-01S RGB LED v1.0 (some sold with ws2818)
  1905. // https://www.aliexpress.com/wholesale?catId=0&initiative_id=SB_20180404023816&SearchText=esp-01s+led+controller
  1906. // -----------------------------------------------------------------------------
  1907. #elif defined(GENERIC_ESP01S_RGBLED_V10)
  1908. // Info
  1909. #define MANUFACTURER "GENERIC"
  1910. #define DEVICE "ESP01S_RGBLED_10"
  1911. // This board is sold as RGB LED module BUT it has on board 3 pin ph2.0 connector (VCC, GPIO2, GND)
  1912. // so, if you wish, you may connect LED, BUTTON, RELAY, SENSOR etc.
  1913. // Buttons
  1914. //#define BUTTON1_PIN 2
  1915. // Relays
  1916. //#define RELAY1_PIN 2
  1917. // LEDs
  1918. #define LED1_PIN 2
  1919. #define LED1_PIN_INVERSE 0
  1920. // -----------------------------------------------------------------------------
  1921. // ESP-01S DHT11 v1.0
  1922. // https://www.aliexpress.com/wholesale?catId=0&initiative_id=SB_20180410105907&SearchText=esp-01s+dht11
  1923. // -----------------------------------------------------------------------------
  1924. #elif defined(GENERIC_ESP01S_DHT11_V10)
  1925. // Info
  1926. #define MANUFACTURER "GENERIC"
  1927. #define DEVICE "ESP01S_DHT11_10"
  1928. // DHT11
  1929. #ifndef DHT_SUPPORT
  1930. #define DHT_SUPPORT 1
  1931. #endif
  1932. #define DHT_PIN 2
  1933. #define DHT_TYPE DHT_CHIP_DHT11
  1934. // -----------------------------------------------------------------------------
  1935. // ESP-01S DS18B20 v1.0
  1936. // https://www.aliexpress.com/wholesale?catId=0&initiative_id=SB_20180410105933&SearchText=esp-01s+ds18b20
  1937. // -----------------------------------------------------------------------------
  1938. #elif defined(GENERIC_ESP01S_DS18B20_V10)
  1939. // Info
  1940. #define MANUFACTURER "GENERIC"
  1941. #define DEVICE "ESP01S_DS18B20_10"
  1942. // DB18B20
  1943. #ifndef DALLAS_SUPPORT
  1944. #define DALLAS_SUPPORT 1
  1945. #endif
  1946. #define DALLAS_PIN 2
  1947. // -----------------------------------------------------------------------------
  1948. // ESP-DIN relay board V1
  1949. // https://github.com/pilotak/esp_din
  1950. // -----------------------------------------------------------------------------
  1951. #elif defined(PILOTAK_ESP_DIN_V1)
  1952. // Info
  1953. #define MANUFACTURER "PILOTAK"
  1954. #define DEVICE "ESP_DIN_V1"
  1955. // Buttons
  1956. #define BUTTON1_PIN 0
  1957. #define BUTTON1_RELAY 1
  1958. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1959. // Relays
  1960. #define RELAY1_PIN 4
  1961. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1962. #define RELAY2_PIN 5
  1963. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  1964. // LEDs
  1965. #define LED1_PIN 15
  1966. #define LED1_PIN_INVERSE 0
  1967. #define I2C_SDA_PIN 12
  1968. #define I2C_SCL_PIN 13
  1969. #ifndef DALLAS_SUPPORT
  1970. #define DALLAS_SUPPORT 1
  1971. #endif
  1972. #define DALLAS_PIN 2
  1973. #define RF_SUPPORT 1
  1974. #define RFB_DIRECT 1
  1975. #define RFB_RX_PIN 14
  1976. #ifndef DIGITAL_SUPPORT
  1977. #define DIGITAL_SUPPORT 1
  1978. #endif
  1979. #define DIGITAL1_PIN 16
  1980. #define DIGITAL1_PIN_MODE INPUT
  1981. #define DIGITAL1_DEFAULT_STATE 0
  1982. // -----------------------------------------------------------------------------
  1983. // Heltec Touch Relay
  1984. // https://www.aliexpress.com/wholesale?catId=0&initiative_id=SB_20180408043114&SearchText=esp8266+touch+relay
  1985. // -----------------------------------------------------------------------------
  1986. #elif defined(HELTEC_TOUCHRELAY)
  1987. // Info
  1988. #define MANUFACTURER "HELTEC"
  1989. #define DEVICE "TOUCH_RELAY"
  1990. // Buttons
  1991. #define BUTTON1_PIN 14
  1992. #define BUTTON1_RELAY 1
  1993. #define BUTTON1_MODE BUTTON_PUSHBUTTON
  1994. // Relays
  1995. #define RELAY1_PIN 12
  1996. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1997. // -----------------------------------------------------------------------------
  1998. // Zhilde ZLD-EU44-W
  1999. // http://www.zhilde.com/product/60705150109-805652505/EU_WiFi_Surge_Protector_Extension_Socket_4_Outlets_works_with_Amazon_Echo_Smart_Power_Strip.html
  2000. // -----------------------------------------------------------------------------
  2001. #elif defined(ZHILDE_EU44_W)
  2002. // Info
  2003. #define MANUFACTURER "ZHILDE"
  2004. #define DEVICE "EU44_W"
  2005. // Based on the reporter, this product uses GPIO1 and 3 for the button
  2006. // and onboard LED, so hardware serial should be disabled...
  2007. #define DEBUG_SERIAL_SUPPORT 0
  2008. // Buttons
  2009. #define BUTTON1_PIN 3
  2010. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  2011. // Relays
  2012. #define RELAY1_PIN 5
  2013. #define RELAY2_PIN 4
  2014. #define RELAY3_PIN 12
  2015. #define RELAY4_PIN 13
  2016. #define RELAY5_PIN 14
  2017. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  2018. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  2019. #define RELAY3_TYPE RELAY_TYPE_NORMAL
  2020. #define RELAY4_TYPE RELAY_TYPE_NORMAL
  2021. #define RELAY5_TYPE RELAY_TYPE_NORMAL
  2022. // LEDs
  2023. #define LED1_PIN 1
  2024. #define LED1_PIN_INVERSE 1
  2025. // -----------------------------------------------------------------------------
  2026. // Allnet 4duino ESP8266-UP-Relais
  2027. // http://www.allnet.de/de/allnet-brand/produkte/neuheiten/p/allnet-4duino-iot-wlan-relais-unterputz-esp8266-up-relais/
  2028. // https://shop.allnet.de/fileadmin/transfer/products/148814.pdf
  2029. // -----------------------------------------------------------------------------
  2030. #elif defined(ALLNET_4DUINO_IOT_WLAN_RELAIS)
  2031. // Info
  2032. #define MANUFACTURER "ALLNET"
  2033. #define DEVICE "4DUINO_IOT_WLAN_RELAIS"
  2034. // Relays
  2035. #define RELAY1_PIN 14
  2036. #define RELAY1_RESET_PIN 12
  2037. #define RELAY1_TYPE RELAY_TYPE_LATCHED
  2038. // LEDs
  2039. #define LED1_PIN 0
  2040. #define LED1_PIN_INVERSE 1
  2041. // Buttons
  2042. //#define BUTTON1_PIN 0
  2043. //#define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  2044. // Using pins labelled as SDA & SCL as buttons
  2045. #define BUTTON2_PIN 4
  2046. #define BUTTON2_MODE BUTTON_PUSHBUTTON
  2047. #define BUTTON2_PRESS BUTTON_MODE_TOGGLE
  2048. #define BUTTON2_CLICK BUTTON_MODE_NONE
  2049. #define BUTTON2_DBLCLICK BUTTON_MODE_NONE
  2050. #define BUTTON2_LNGCLICK BUTTON_MODE_NONE
  2051. #define BUTTON2_LNGLNGCLICK BUTTON_MODE_NONE
  2052. #define BUTTON3_PIN 5
  2053. #define BUTTON3_MODE BUTTON_PUSHBUTTON
  2054. // Using pins labelled as SDA & SCL for I2C
  2055. //#define I2C_SDA_PIN 4
  2056. //#define I2C_SCL_PIN 5
  2057. // -----------------------------------------------------------------------------
  2058. // Luani HVIO
  2059. // https://luani.de/projekte/esp8266-hvio/
  2060. // https://luani.de/blog/esp8266-230v-io-modul/
  2061. // -----------------------------------------------------------------------------
  2062. #elif defined(LUANI_HVIO)
  2063. // Info
  2064. #define MANUFACTURER "LUANI"
  2065. #define DEVICE "HVIO"
  2066. // Buttons
  2067. #define BUTTON1_PIN 12
  2068. #define BUTTON1_RELAY 1
  2069. #define BUTTON1_MODE BUTTON_SWITCH | BUTTON_DEFAULT_HIGH //Hardware Pullup
  2070. #define BUTTON1_PRESS BUTTON_MODE_NONE
  2071. #define BUTTON1_CLICK BUTTON_MODE_TOGGLE
  2072. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  2073. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  2074. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_NONE
  2075. #define BUTTON2_PIN 13
  2076. #define BUTTON2_RELAY 2
  2077. #define BUTTON2_MODE BUTTON_SWITCH | BUTTON_DEFAULT_HIGH //Hardware Pullup
  2078. #define BUTTON2_CLICK BUTTON_MODE_TOGGLE
  2079. // Relays
  2080. #define RELAY1_PIN 4
  2081. #define RELAY2_PIN 5
  2082. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  2083. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  2084. // LEDs
  2085. #define LED1_PIN 15
  2086. #define LED1_PIN_INVERSE 0
  2087. // -----------------------------------------------------------------------------
  2088. // Tonbux 50-100M Smart Mosquito Killer USB
  2089. // https://www.aliexpress.com/item/Original-Tonbux-50-100M-Smart-Mosquito-Killer-USB-Plug-No-Noise-Repellent-App-Smart-Module/32859330820.html
  2090. // -----------------------------------------------------------------------------
  2091. #elif defined(TONBUX_MOSQUITO_KILLER)
  2092. // Info
  2093. #define MANUFACTURER "TONBUX"
  2094. #define DEVICE "MOSQUITO_KILLER"
  2095. // Buttons
  2096. #define BUTTON1_PIN 2
  2097. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  2098. #define BUTTON1_RELAY 1
  2099. // Relays
  2100. #define RELAY1_PIN 5 // not a relay, fan
  2101. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  2102. // LEDs
  2103. #define LED1_PIN 15 // blue led
  2104. #define LED1_PIN_INVERSE 1
  2105. #define LED1_MODE LED_MODE_WIFI
  2106. #define LED2_PIN 14 // red led
  2107. #define LED2_PIN_INVERSE 1
  2108. #define LED2_MODE LED_MODE_RELAY
  2109. #define LED3_PIN 12 // UV leds (1-2-3-4-5-6-7-8)
  2110. #define LED3_PIN_INVERSE 0
  2111. #define LED3_RELAY 1
  2112. #define LED4_PIN 16 // UV leds (9-10-11)
  2113. #define LED4_PIN_INVERSE 0
  2114. #define LED4_RELAY 1
  2115. // -----------------------------------------------------------------------------
  2116. // NEO Coolcam NAS-WR01W Wifi Smart Power Plug
  2117. // https://es.aliexpress.com/item/-/32854589733.html?spm=a219c.12010608.0.0.6d084e68xX0y5N
  2118. // https://www.fasttech.com/product/9649426-neo-coolcam-nas-wr01w-wifi-smart-power-plug-eu
  2119. // -----------------------------------------------------------------------------
  2120. #elif defined(NEO_COOLCAM_NAS_WR01W)
  2121. // Info
  2122. #define MANUFACTURER "NEO_COOLCAM"
  2123. #define DEVICE "NAS_WR01W"
  2124. // Buttons
  2125. #define BUTTON1_PIN 13
  2126. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  2127. #define BUTTON1_RELAY 1
  2128. // Relays
  2129. #define RELAY1_PIN 12
  2130. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  2131. // LEDs
  2132. #define LED1_PIN 4
  2133. #define LED1_PIN_INVERSE 1
  2134. // ------------------------------------------------------------------------------
  2135. // Fornorm Wi-Fi USB Extension Socket (ZLD-34EU)
  2136. // https://www.aliexpress.com/item/Fornorm-WiFi-Extension-Socket-with-Surge-Protector-Smart-Power-Strip-3-Outlets-and-4-USB-Charging/32849743948.html
  2137. // Also: Estink Wifi Power Strip
  2138. // -----------------------------------------------------------------------------
  2139. #elif defined(FORNORM_ZLD_34EU)
  2140. // Info
  2141. #define MANUFACTURER "FORNORM"
  2142. #define DEVICE "ZLD_34EU"
  2143. // Disable UART noise since this board uses GPIO3
  2144. #define DEBUG_SERIAL_SUPPORT 0
  2145. // Buttons
  2146. #define BUTTON1_PIN 16
  2147. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  2148. #define BUTTON1_RELAY 4
  2149. // Relays
  2150. #define RELAY1_PIN 14 // USB power
  2151. #define RELAY2_PIN 13 // power plug 1
  2152. #define RELAY3_PIN 4 // power plug 2
  2153. #define RELAY4_PIN 15 // power plug 3
  2154. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  2155. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  2156. #define RELAY3_TYPE RELAY_TYPE_NORMAL
  2157. #define RELAY4_TYPE RELAY_TYPE_NORMAL
  2158. // LEDs
  2159. #define LED1_PIN 0 // power led
  2160. #define LED2_PIN 12 // power plug 1
  2161. #define LED3_PIN 3 // power plug 2
  2162. #define LED4_PIN 5 // power plug 3
  2163. #define LED1_PIN_INVERSE 1
  2164. #define LED2_PIN_INVERSE 1
  2165. #define LED3_PIN_INVERSE 1
  2166. #define LED4_PIN_INVERSE 1
  2167. #define LED1_MODE LED_MODE_FINDME
  2168. #define LED2_MODE LED_MODE_FOLLOW
  2169. #define LED3_MODE LED_MODE_FOLLOW
  2170. #define LED4_MODE LED_MODE_FOLLOW
  2171. #define LED2_RELAY 2
  2172. #define LED3_RELAY 3
  2173. #define LED4_RELAY 4
  2174. // -----------------------------------------------------------------------------
  2175. // Bruno Horta's OnOfre
  2176. // https://www.bhonofre.pt/
  2177. // https://github.com/brunohorta82/BH_OnOfre/
  2178. // -----------------------------------------------------------------------------
  2179. #elif defined(BH_ONOFRE)
  2180. // Info
  2181. #define MANUFACTURER "BH"
  2182. #define DEVICE "ONOFRE"
  2183. // Buttons
  2184. #define BUTTON1_PIN 12
  2185. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH | BUTTON_SET_PULLUP
  2186. #define BUTTON1_RELAY 1
  2187. #define BUTTON2_PIN 13
  2188. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH | BUTTON_SET_PULLUP
  2189. #define BUTTON2_RELAY 2
  2190. // Relays
  2191. #define RELAY1_PIN 4
  2192. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  2193. #define RELAY2_PIN 5
  2194. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  2195. // -----------------------------------------------------------------------------
  2196. // BlitzWolf SHP2 and SHP6
  2197. // Also several boards under different names uing a power chip labelled BL0937 or HJL-01
  2198. // * Blitzwolf (https://www.amazon.es/Inteligente-Temporización-Dispositivos-Cualquier-BlitzWolf/dp/B07BMQP142)
  2199. // * HomeCube (https://www.amazon.de/Steckdose-Homecube-intelligente-Verbrauchsanzeige-funktioniert/dp/B076Q2LKHG)
  2200. // * Coosa (https://www.amazon.com/COOSA-Monitoring-Function-Campatible-Assiatant/dp/B0788W9TDR)
  2201. // * Gosund (http://www.gosund.com/?m=content&c=index&a=show&catid=6&id=5)
  2202. // * Ablue (https://www.amazon.de/Intelligente-Steckdose-Ablue-Funktioniert-Assistant/dp/B076DRFRZC)
  2203. // -----------------------------------------------------------------------------
  2204. #elif defined(BLITZWOLF_BWSHPX)
  2205. // Info
  2206. #define MANUFACTURER "BLITZWOLF"
  2207. #define DEVICE "BWSHPX"
  2208. // Buttons
  2209. #define BUTTON1_PIN 13
  2210. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  2211. #define BUTTON1_RELAY 1
  2212. // Relays
  2213. #define RELAY1_PIN 15
  2214. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  2215. // LEDs
  2216. #define LED1_PIN 2
  2217. #define LED1_PIN_INVERSE 1
  2218. #define LED2_PIN 0
  2219. #define LED2_PIN_INVERSE 1
  2220. #define LED2_MODE LED_MODE_FINDME
  2221. #define LED2_RELAY 1
  2222. // HJL01 / BL0937
  2223. #ifndef HLW8012_SUPPORT
  2224. #define HLW8012_SUPPORT 1
  2225. #endif
  2226. #define HLW8012_SEL_PIN 12
  2227. #define HLW8012_CF1_PIN 14
  2228. #define HLW8012_CF_PIN 5
  2229. #define HLW8012_SEL_CURRENT LOW
  2230. #define HLW8012_CURRENT_RATIO 25740
  2231. #define HLW8012_VOLTAGE_RATIO 313400
  2232. #define HLW8012_POWER_RATIO 3414290
  2233. #define HLW8012_INTERRUPT_ON FALLING
  2234. // -----------------------------------------------------------------------------
  2235. // Same as the above but new board version marked V2.3
  2236. // BlitzWolf SHP2 V2.3
  2237. // Gosund SP1 V2.3
  2238. // -----------------------------------------------------------------------------
  2239. #elif defined(BLITZWOLF_BWSHPX_V23)
  2240. // Info
  2241. #define MANUFACTURER "BLITZWOLF"
  2242. #define DEVICE "BWSHPX_V23"
  2243. // Buttons
  2244. #define BUTTON1_PIN 3
  2245. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  2246. #define BUTTON1_RELAY 1
  2247. // Relays
  2248. #define RELAY1_PIN 14
  2249. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  2250. // LEDs
  2251. #define LED1_PIN 1
  2252. #define LED1_PIN_INVERSE 1
  2253. #define LED2_PIN 13
  2254. #define LED2_PIN_INVERSE 1
  2255. #define LED2_MODE LED_MODE_FINDME
  2256. #define LED2_RELAY 1
  2257. // HJL01 / BL0937
  2258. #ifndef HLW8012_SUPPORT
  2259. #define HLW8012_SUPPORT 1
  2260. #endif
  2261. #define HLW8012_SEL_PIN 12
  2262. #define HLW8012_CF1_PIN 5
  2263. #define HLW8012_CF_PIN 4
  2264. #define HLW8012_SEL_CURRENT LOW
  2265. #define HLW8012_CURRENT_RATIO 25740
  2266. #define HLW8012_VOLTAGE_RATIO 313400
  2267. #define HLW8012_POWER_RATIO 3414290
  2268. #define HLW8012_INTERRUPT_ON FALLING
  2269. // BUTTON1 and LED1 are using Serial pins
  2270. #define DEBUG_SERIAL_SUPPORT 0
  2271. // -----------------------------------------------------------------------------
  2272. // Teckin SP22 v1.4 - v1.6
  2273. // -----------------------------------------------------------------------------
  2274. #elif defined(TECKIN_SP22_V14)
  2275. // Info
  2276. #define MANUFACTURER "TECKIN"
  2277. #define DEVICE "SP22_V14"
  2278. // Buttons
  2279. #define BUTTON1_PIN 1
  2280. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  2281. #define BUTTON1_RELAY 1
  2282. // Relays
  2283. #define RELAY1_PIN 14
  2284. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  2285. // LEDs
  2286. #define LED1_PIN 3
  2287. #define LED1_PIN_INVERSE 1
  2288. #define LED2_PIN 13
  2289. #define LED2_PIN_INVERSE 1
  2290. #define LED2_MODE LED_MODE_FINDME
  2291. #define LED2_RELAY 1
  2292. // HJL01 / BL0937
  2293. #ifndef HLW8012_SUPPORT
  2294. #define HLW8012_SUPPORT 1
  2295. #endif
  2296. #define HLW8012_SEL_PIN 12
  2297. #define HLW8012_CF1_PIN 5
  2298. #define HLW8012_CF_PIN 4
  2299. #define HLW8012_SEL_CURRENT LOW
  2300. #define HLW8012_CURRENT_RATIO 20730
  2301. #define HLW8012_VOLTAGE_RATIO 264935
  2302. #define HLW8012_POWER_RATIO 2533110
  2303. #define HLW8012_INTERRUPT_ON FALLING
  2304. // BUTTON1 and LED1 are using Serial pins
  2305. #define DEBUG_SERIAL_SUPPORT 0
  2306. // -----------------------------------------------------------------------------
  2307. // Several boards under different names uing a power chip labelled BL0937 or HJL-01
  2308. // Also model number KS-602S
  2309. // -----------------------------------------------------------------------------
  2310. #elif defined(GOSUND_WS1)
  2311. // Info
  2312. #define MANUFACTURER "GOSUND"
  2313. #define DEVICE "WS1"
  2314. // Buttons
  2315. #define BUTTON1_PIN 0
  2316. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  2317. #define BUTTON1_RELAY 1
  2318. // Relays
  2319. #define RELAY1_PIN 14
  2320. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  2321. // LEDs
  2322. #define LED1_PIN 1
  2323. #define LED1_PIN_INVERSE 1
  2324. // LED1 is using TX pin
  2325. #define DEBUG_SERIAL_SUPPORT 0
  2326. // ----------------------------------------------------------------------------------------
  2327. // Homecube 16A is similar but some pins differ and it also has RGB LEDs
  2328. // https://www.amazon.de/gp/product/B07D7RVF56/ref=oh_aui_detailpage_o00_s01?ie=UTF8&psc=1
  2329. // ----------------------------------------------------------------------------------------
  2330. #elif defined(HOMECUBE_16A)
  2331. // Info
  2332. #define MANUFACTURER "HOMECUBE"
  2333. #define DEVICE "16A"
  2334. // Buttons
  2335. #define BUTTON1_PIN 13
  2336. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  2337. #define BUTTON1_RELAY 1
  2338. // Relays
  2339. #define RELAY1_PIN 15
  2340. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  2341. // LEDs
  2342. //LED Pin 4 - ESP8266 onboard LED
  2343. //Red LED: 0
  2344. //Green LED: 12
  2345. //Blue LED: 2
  2346. // Blue
  2347. #define LED1_PIN 2
  2348. #define LED1_PIN_INVERSE 0
  2349. // Green
  2350. #define LED2_PIN 12
  2351. #define LED2_PIN_INVERSE 1
  2352. #define LED2_MODE LED_MODE_RELAY
  2353. // Red
  2354. #define LED3_PIN 0
  2355. #define LED3_PIN_INVERSE 0
  2356. #define LED3_MODE LED_MODE_OFF
  2357. // HJL01 / BL0937
  2358. #ifndef HLW8012_SUPPORT
  2359. #define HLW8012_SUPPORT 1
  2360. #endif
  2361. #define HLW8012_SEL_PIN 16
  2362. #define HLW8012_CF1_PIN 14
  2363. #define HLW8012_CF_PIN 5
  2364. #define HLW8012_SEL_CURRENT LOW
  2365. #define HLW8012_CURRENT_RATIO 25740
  2366. #define HLW8012_VOLTAGE_RATIO 313400
  2367. #define HLW8012_POWER_RATIO 3414290
  2368. #define HLW8012_INTERRUPT_ON FALLING
  2369. // -----------------------------------------------------------------------------
  2370. // VANZAVANZU Smart Outlet Socket (based on BL0937 or HJL-01)
  2371. // https://www.amazon.com/Smart-Plug-Wifi-Mini-VANZAVANZU/dp/B078PHD6S5
  2372. // -----------------------------------------------------------------------------
  2373. #elif defined(VANZAVANZU_SMART_WIFI_PLUG_MINI)
  2374. // Info
  2375. #define MANUFACTURER "VANZAVANZU"
  2376. #define DEVICE "SMART_WIFI_PLUG_MINI"
  2377. // Buttons
  2378. #define BUTTON1_PIN 13
  2379. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  2380. #define BUTTON1_RELAY 1
  2381. // Relays
  2382. #define RELAY1_PIN 15
  2383. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  2384. // LEDs
  2385. #define LED1_PIN 2
  2386. #define LED1_PIN_INVERSE 1
  2387. #define LED2_PIN 0
  2388. #define LED2_PIN_INVERSE 1
  2389. #define LED2_MODE LED_MODE_FINDME
  2390. #define LED2_RELAY 1
  2391. // Disable UART noise
  2392. #define DEBUG_SERIAL_SUPPORT 0
  2393. // HJL01 / BL0937
  2394. #ifndef HLW8012_SUPPORT
  2395. #define HLW8012_SUPPORT 1
  2396. #endif
  2397. #define HLW8012_SEL_PIN 3
  2398. #define HLW8012_CF1_PIN 14
  2399. #define HLW8012_CF_PIN 5
  2400. #define HLW8012_SEL_CURRENT LOW
  2401. #define HLW8012_CURRENT_RATIO 25740
  2402. #define HLW8012_VOLTAGE_RATIO 313400
  2403. #define HLW8012_POWER_RATIO 3414290
  2404. #define HLW8012_INTERRUPT_ON FALLING
  2405. // -----------------------------------------------------------------------------
  2406. #elif defined(GENERIC_AG_L4)
  2407. // Info
  2408. #define MANUFACTURER "GENERIC"
  2409. #define DEVICE "AG_L4"
  2410. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  2411. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  2412. #define DUMMY_RELAY_COUNT 1
  2413. // button 1: "power" button
  2414. #define BUTTON1_PIN 4
  2415. #define BUTTON1_RELAY 1
  2416. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_SET_PULLUP | BUTTON_DEFAULT_HIGH
  2417. #define BUTTON1_PRESS BUTTON_MODE_TOGGLE
  2418. #define BUTTON1_CLICK BUTTON_MODE_NONE
  2419. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  2420. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  2421. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_RESET
  2422. // button 2: "wifi" button
  2423. #define BUTTON2_PIN 2
  2424. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  2425. #define BUTTON2_PRESS BUTTON_MODE_TOGGLE
  2426. #define BUTTON2_CLICK BUTTON_MODE_NONE
  2427. #define BUTTON2_DBLCLICK BUTTON_MODE_NONE
  2428. #define BUTTON2_LNGCLICK BUTTON_MODE_NONE
  2429. #define BUTTON2_LNGLNGCLICK BUTTON_MODE_NONE
  2430. // LEDs
  2431. #define LED1_PIN 5 // red status led
  2432. #define LED1_PIN_INVERSE 0
  2433. #define LED2_PIN 16 // master light power
  2434. #define LED2_PIN_INVERSE 1
  2435. #define LED2_MODE LED_MODE_RELAY
  2436. // Light
  2437. #define LIGHT_CHANNELS 3
  2438. #define LIGHT_CH1_PIN 14 // RED
  2439. #define LIGHT_CH2_PIN 13 // GREEN
  2440. #define LIGHT_CH3_PIN 12 // BLUE
  2441. #define LIGHT_CH1_INVERSE 0
  2442. #define LIGHT_CH2_INVERSE 0
  2443. #define LIGHT_CH3_INVERSE 0
  2444. // -----------------------------------------------------------------------------
  2445. #elif defined(ALLTERCO_SHELLY1)
  2446. // Info
  2447. #define MANUFACTURER "ALLTERCO"
  2448. #define DEVICE "SHELLY1"
  2449. // Buttons
  2450. #define BUTTON1_PIN 5
  2451. #define BUTTON1_MODE BUTTON_SWITCH
  2452. #define BUTTON1_RELAY 1
  2453. // Relays
  2454. #define RELAY1_PIN 4
  2455. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  2456. #elif defined(ALLTERCO_SHELLY2)
  2457. // Info
  2458. #define MANUFACTURER "ALLTERCO"
  2459. #define DEVICE "SHELLY2"
  2460. // Buttons
  2461. #define BUTTON1_PIN 12
  2462. #define BUTTON2_PIN 14
  2463. #define BUTTON1_MODE BUTTON_SWITCH
  2464. #define BUTTON2_MODE BUTTON_SWITCH
  2465. #define BUTTON1_RELAY 1
  2466. #define BUTTON2_RELAY 2
  2467. // Relays
  2468. #define RELAY1_PIN 4
  2469. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  2470. #define RELAY2_PIN 5
  2471. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  2472. #elif defined(ALLTERCO_SHELLY1PM)
  2473. // Info
  2474. #define MANUFACTURER "ALLTERCO"
  2475. #define DEVICE "SHELLY1PM"
  2476. // Buttons
  2477. #define BUTTON1_PIN 4
  2478. #define BUTTON1_MODE BUTTON_SWITCH
  2479. #define BUTTON1_RELAY 1
  2480. #define BUTTON2_PIN 2
  2481. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  2482. #define BUTTON2_LNGCLICK BUTTON_MODE_RESET
  2483. #define BUTTON2_LNGLNGCLICK BUTTON_MODE_FACTORY
  2484. // Relays
  2485. #define RELAY1_PIN 15
  2486. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  2487. // Light
  2488. #define LED1_PIN 0
  2489. #define LED1_PIN_INVERSE 1
  2490. // HJL01 / BL0937
  2491. #define HLW8012_SUPPORT 1
  2492. #define HLW8012_SEL_PIN 12
  2493. #define HLW8012_CF1_PIN 13
  2494. #define HLW8012_CF_PIN 5
  2495. #define HLW8012_SEL_CURRENT LOW
  2496. #define HLW8012_CURRENT_RATIO 25740
  2497. #define HLW8012_VOLTAGE_RATIO 313400
  2498. #define HLW8012_POWER_RATIO 3414290
  2499. #define HLW8012_INTERRUPT_ON FALLING
  2500. //Temperature
  2501. #define NTC_SUPPORT 1
  2502. #define SENSOR_SUPPORT 1
  2503. #define NTC_BETA 3350
  2504. #define NTC_R_UP 10000
  2505. #define NTC_R_DOWN 0
  2506. #define NTC_R0 8000
  2507. #elif defined(ALLTERCO_SHELLY25)
  2508. // Info
  2509. #define MANUFACTURER "ALLTERCO"
  2510. #define DEVICE "SHELLY25"
  2511. // Buttons
  2512. #define BUTTON1_PIN 13
  2513. #define BUTTON1_MODE BUTTON_SWITCH
  2514. #define BUTTON1_RELAY 1
  2515. #define BUTTON2_PIN 5
  2516. #define BUTTON2_MODE BUTTON_SWITCH
  2517. #define BUTTON2_RELAY 2
  2518. #define BUTTON3_PIN 2
  2519. #define BUTTON3_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  2520. #define BUTTON3_LNGCLICK BUTTON_MODE_RESET
  2521. #define BUTTON3_LNGLNGCLICK BUTTON_MODE_FACTORY
  2522. // Relays
  2523. #define RELAY1_PIN 4
  2524. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  2525. #define RELAY2_PIN 15
  2526. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  2527. // Light
  2528. #define LED1_PIN 0
  2529. #define LED1_PIN_INVERSE 1
  2530. //Temperature
  2531. #define NTC_SUPPORT 1
  2532. #define SENSOR_SUPPORT 1
  2533. #define NTC_BETA 3350
  2534. #define NTC_R_UP 10000
  2535. #define NTC_R_DOWN 0
  2536. #define NTC_R0 8000
  2537. //Current
  2538. #define ADE7953_SUPPORT 1
  2539. #define I2C_SDA_PIN 12
  2540. #define I2C_SCL_PIN 14
  2541. // -----------------------------------------------------------------------------
  2542. #elif defined(LOHAS_9W)
  2543. // Info
  2544. #define MANUFACTURER "LOHAS"
  2545. #define DEVICE "E27_9W"
  2546. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  2547. #define LIGHT_PROVIDER LIGHT_PROVIDER_MY92XX
  2548. #define DUMMY_RELAY_COUNT 1
  2549. // Light
  2550. #define LIGHT_CHANNELS 5
  2551. #define MY92XX_MODEL MY92XX_MODEL_MY9231
  2552. #define MY92XX_CHIPS 2
  2553. #define MY92XX_DI_PIN 13
  2554. #define MY92XX_DCKI_PIN 15
  2555. #define MY92XX_COMMAND MY92XX_COMMAND_DEFAULT
  2556. #define MY92XX_MAPPING 0, 1, 2, 3, 4
  2557. #define LIGHT_WHITE_FACTOR (0.1) // White LEDs are way more bright in the B1
  2558. // -----------------------------------------------------------------------------
  2559. #elif defined(XIAOMI_SMART_DESK_LAMP)
  2560. // Info
  2561. #define MANUFACTURER "XIAOMI"
  2562. #define DEVICE "SMART_DESK_LAMP"
  2563. // Buttons
  2564. #define BUTTON1_PIN 2
  2565. #define BUTTON2_PIN 14
  2566. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH | BUTTON_SET_PULLUP
  2567. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH | BUTTON_SET_PULLUP
  2568. // This button doubles as switch here and as encoder mode switch below
  2569. // Clicking it (for less than 500ms) will turn the light on and off
  2570. // Double and Long clicks will not work as these are used to modify the encoder action
  2571. #define BUTTON1_RELAY 1
  2572. #define BUTTON_LNGCLICK_DELAY 500
  2573. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  2574. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  2575. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_NONE
  2576. // Hidden button will enter AP mode if dblclick and reset the device when long-long-clicked
  2577. #define BUTTON2_DBLCLICK BUTTON_MODE_AP
  2578. #define BUTTON2_LNGLNGCLICK BUTTON_MODE_RESET
  2579. // Light
  2580. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  2581. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  2582. #define DUMMY_RELAY_COUNT 1
  2583. #define LIGHT_STEP 8
  2584. #define LIGHT_CHANNELS 2
  2585. #define LIGHT_CH1_PIN 5 // warm white
  2586. #define LIGHT_CH1_INVERSE 0
  2587. #define LIGHT_CH2_PIN 4 // cold white
  2588. #define LIGHT_CH2_INVERSE 0
  2589. // Encoder
  2590. // If mode is ENCODER_MODE_RATIO, the value ratio between both channels is changed
  2591. // when the button is not pressed, and the overall brightness when pressed
  2592. // If mode is ENCODER_MODE_CHANNEL, the first channel value is changed
  2593. // when the button is not pressed, and the second channel when pressed
  2594. // If no ENCODERX_BUTTON_PIN defined it will only change the value of the first defined channel
  2595. #define ENCODER_SUPPORT 1
  2596. #define ENCODER1_PIN1 12
  2597. #define ENCODER1_PIN2 13
  2598. #define ENCODER1_BUTTON_PIN 2 // active low by default, with software pullup
  2599. #define ENCODER1_CHANNEL1 0 // please note this value is 0-based (LIGHT_CH1 above)
  2600. #define ENCODER1_CHANNEL2 1 // please note this value is 0-based (LIGHT_CH2 above)
  2601. #define ENCODER1_MODE ENCODER_MODE_RATIO
  2602. #elif defined(PHYX_ESP12_RGB)
  2603. // Info
  2604. #define MANUFACTURER "PHYX"
  2605. #define DEVICE "ESP12_RGB"
  2606. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  2607. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  2608. #define DUMMY_RELAY_COUNT 1
  2609. // Light
  2610. #define LIGHT_CHANNELS 3
  2611. #define LIGHT_CH1_PIN 4 // RED
  2612. #define LIGHT_CH2_PIN 14 // GREEN
  2613. #define LIGHT_CH3_PIN 12 // BLUE
  2614. #define LIGHT_CH1_INVERSE 0
  2615. #define LIGHT_CH2_INVERSE 0
  2616. #define LIGHT_CH3_INVERSE 0
  2617. // -----------------------------------------------------------------------------
  2618. // iWoole LED Table Lamp
  2619. // http://iwoole.com/newst-led-smart-night-light-7w-smart-table-light-rgbw-wifi-app-remote-control-110v-220v-us-eu-plug-smart-lamp-google-home-decore-p00022p1.html
  2620. // -----------------------------------------------------------------------------
  2621. #elif defined(IWOOLE_LED_TABLE_LAMP)
  2622. // Info
  2623. #define MANUFACTURER "IWOOLE"
  2624. #define DEVICE "LED_TABLE_LAMP"
  2625. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  2626. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  2627. #define DUMMY_RELAY_COUNT 1
  2628. // Light
  2629. #define LIGHT_CHANNELS 4
  2630. #define LIGHT_CH1_PIN 12 // RED
  2631. #define LIGHT_CH2_PIN 5 // GREEN
  2632. #define LIGHT_CH3_PIN 14 // BLUE
  2633. #define LIGHT_CH4_PIN 4 // WHITE
  2634. #define LIGHT_CH1_INVERSE 0
  2635. #define LIGHT_CH2_INVERSE 0
  2636. #define LIGHT_CH3_INVERSE 0
  2637. #define LIGHT_CH4_INVERSE 0
  2638. // -----------------------------------------------------------------------------
  2639. // Generic GU10
  2640. // https://www.ebay.com/itm/1-10PC-GU10-RGB-Smart-Bulb-Wireless-WiFi-App-Remote-Ctrl-Light-for-Alexa-Google/173724116351
  2641. // -----------------------------------------------------------------------------
  2642. #elif defined(GENERIC_GU10)
  2643. // Info
  2644. #define MANUFACTURER "GENERIC"
  2645. #define DEVICE "GU10"
  2646. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  2647. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  2648. #define DUMMY_RELAY_COUNT 1
  2649. // Light
  2650. #define LIGHT_CHANNELS 4
  2651. #define LIGHT_CH1_PIN 14 // RED
  2652. #define LIGHT_CH2_PIN 12 // GREEN
  2653. #define LIGHT_CH3_PIN 13 // BLUE
  2654. #define LIGHT_CH4_PIN 4 // WHITE
  2655. #define LIGHT_CH1_INVERSE 0
  2656. #define LIGHT_CH2_INVERSE 0
  2657. #define LIGHT_CH3_INVERSE 0
  2658. #define LIGHT_CH4_INVERSE 0
  2659. // -----------------------------------------------------------------------------
  2660. // Nexete A19
  2661. // https://www.ebay.com/itm/Wifi-Smart-LED-light-Bulb-9W-60W-A19-850LM-RGBW-Dimmable-for-Alexa-Google-Home/283514779201
  2662. // -----------------------------------------------------------------------------
  2663. #elif defined(NEXETE_A19)
  2664. // Info
  2665. #define MANUFACTURER "NEXETE"
  2666. #define DEVICE "A19"
  2667. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  2668. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  2669. #define DUMMY_RELAY_COUNT 1
  2670. // Light
  2671. #define LIGHT_CHANNELS 4
  2672. #define LIGHT_CH1_PIN 12 // RED
  2673. #define LIGHT_CH2_PIN 15 // GREEN
  2674. #define LIGHT_CH3_PIN 14 // BLUE
  2675. #define LIGHT_CH4_PIN 5 // WHITE
  2676. #define LIGHT_CH1_INVERSE 0
  2677. #define LIGHT_CH2_INVERSE 0
  2678. #define LIGHT_CH3_INVERSE 0
  2679. #define LIGHT_CH4_INVERSE 0
  2680. // -----------------------------------------------------------------------------
  2681. // Lombex Lux Nova 2 Tunable White
  2682. // https://www.amazon.com/Lombex-Compatible-Equivalent-Dimmable-2700K-6500K/dp/B07B8K72PR
  2683. // -----------------------------------------------------------------------------
  2684. #elif defined(LOMBEX_LUX_NOVA2_TUNABLE_WHITE)
  2685. // Info
  2686. #define MANUFACTURER "LOMBEX"
  2687. #define DEVICE "LUX_NOVA2_TUNABLE_WHITE"
  2688. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  2689. #define LIGHT_PROVIDER LIGHT_PROVIDER_MY92XX
  2690. #define DUMMY_RELAY_COUNT 1
  2691. // Light
  2692. #define LIGHT_CHANNELS 5
  2693. #define MY92XX_MODEL MY92XX_MODEL_MY9291
  2694. #define MY92XX_CHIPS 1
  2695. #define MY92XX_DI_PIN 4
  2696. #define MY92XX_DCKI_PIN 5
  2697. #define MY92XX_COMMAND MY92XX_COMMAND_DEFAULT
  2698. // No RGB on this bulb. Warm white on channel 0, cool white on channel 3
  2699. #define MY92XX_MAPPING 255, 255, 255, 3, 0
  2700. // -----------------------------------------------------------------------------
  2701. // Lombex Lux Nova 2 White and Color
  2702. // https://www.amazon.com/Lombex-Compatible-Equivalent-Dimmable-2700K-6500K/dp/B07B8K72PR
  2703. // -----------------------------------------------------------------------------
  2704. #elif defined(LOMBEX_LUX_NOVA2_WHITE_COLOR)
  2705. // Info
  2706. #define MANUFACTURER "LOMBEX"
  2707. #define DEVICE "LUX_NOVA2_WHITE_COLOR"
  2708. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  2709. #define LIGHT_PROVIDER LIGHT_PROVIDER_MY92XX
  2710. #define DUMMY_RELAY_COUNT 1
  2711. // Light
  2712. #define LIGHT_CHANNELS 4
  2713. #define MY92XX_MODEL MY92XX_MODEL_MY9291
  2714. #define MY92XX_CHIPS 1
  2715. #define MY92XX_DI_PIN 4
  2716. #define MY92XX_DCKI_PIN 5
  2717. #define MY92XX_COMMAND MY92XX_COMMAND_DEFAULT
  2718. // RGB on channels 0/1/2, either cool or warm white on channel 3
  2719. // The bulb *should* have cool leds, but could also have warm leds as a common defect
  2720. #define MY92XX_MAPPING 0, 1, 2, 3
  2721. // -----------------------------------------------------------------------------
  2722. // Bestek Smart Plug with 2 USB ports
  2723. // https://www.bestekcorp.com/bestek-smart-plug-works-with-amazon-alexa-google-assistant-and-ifttt-with-2-usb
  2724. // -----------------------------------------------------------------------------
  2725. #elif defined(BESTEK_MRJ1011)
  2726. // Info
  2727. #define MANUFACTURER "BESTEK"
  2728. #define DEVICE "MRJ1011"
  2729. // Buttons
  2730. #define BUTTON1_PIN 13
  2731. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_SET_PULLUP | BUTTON_DEFAULT_HIGH
  2732. #define BUTTON1_RELAY 1
  2733. // Relay
  2734. #define RELAY1_PIN 12
  2735. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  2736. // LED
  2737. #define LED1_PIN 4
  2738. #define LED1_PIN_INVERSE 1
  2739. // -----------------------------------------------------------------------------
  2740. // GBLIFE RGBW SOCKET
  2741. // -----------------------------------------------------------------------------
  2742. #elif defined(GBLIFE_RGBW_SOCKET)
  2743. // Info
  2744. #define MANUFACTURER "GBLIFE"
  2745. #define DEVICE "RGBW_SOCKET"
  2746. // Buttons
  2747. #define BUTTON1_PIN 13
  2748. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  2749. #define BUTTON1_RELAY 1
  2750. // Relays
  2751. #define RELAY1_PIN 15
  2752. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  2753. // Light RGBW
  2754. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  2755. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  2756. #define DUMMY_RELAY_COUNT 1
  2757. #define LIGHT_CHANNELS 4
  2758. #define LIGHT_CH1_PIN 5 // RED
  2759. #define LIGHT_CH2_PIN 14 // GREEN
  2760. #define LIGHT_CH3_PIN 12 // BLUE
  2761. #define LIGHT_CH4_PIN 4 // WHITE
  2762. #define LIGHT_CH1_INVERSE 0
  2763. #define LIGHT_CH2_INVERSE 0
  2764. #define LIGHT_CH3_INVERSE 0
  2765. #define LIGHT_CH4_INVERSE 0
  2766. // ----------------------------------------------------------------------------------------
  2767. // Smart life Mini Smart Socket is similar Homecube 16A but some GPIOs differ
  2768. // https://www.ebay.de/itm/Smart-Steckdose-WIFI-WLAN-Amazon-Alexa-Fernbedienung-Home-Socket-Zeitschaltuh-DE/123352026749?hash=item1cb85a8e7d:g:IasAAOSwk6dbj390
  2769. // Also labeled NETVIP
  2770. // https://www.amazon.es/Inteligente-NETVIP-Inal%C3%A1mbrico-Interruptor-Funciona/dp/B07KH8YWS5
  2771. // ----------------------------------------------------------------------------------------
  2772. #elif defined(SMARTLIFE_MINI_SMART_SOCKET)
  2773. // Info
  2774. #define MANUFACTURER "SMARTLIFE"
  2775. #define DEVICE "MINI_SMART_SOCKET"
  2776. // Buttons
  2777. #define BUTTON1_PIN 13
  2778. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  2779. #define BUTTON1_RELAY 1
  2780. // Relays
  2781. #define RELAY1_PIN 15
  2782. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  2783. // LEDs
  2784. //Red LED: 0
  2785. //Green LED: 4
  2786. //Blue LED: 2
  2787. // Light
  2788. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  2789. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  2790. #define DUMMY_RELAY_COUNT 1
  2791. #define LIGHT_CHANNELS 3
  2792. #define LIGHT_CH1_PIN 0 // RED
  2793. #define LIGHT_CH2_PIN 4 // GREEN
  2794. #define LIGHT_CH3_PIN 2 // BLUE
  2795. #define LIGHT_CH1_INVERSE 0
  2796. #define LIGHT_CH2_INVERSE 0
  2797. #define LIGHT_CH3_INVERSE 0
  2798. // HJL01 / BL0937
  2799. #ifndef HLW8012_SUPPORT
  2800. #define HLW8012_SUPPORT 1
  2801. #endif
  2802. #define HLW8012_SEL_PIN 12
  2803. #define HLW8012_CF1_PIN 14
  2804. #define HLW8012_CF_PIN 5
  2805. #define HLW8012_SEL_CURRENT LOW
  2806. #define HLW8012_CURRENT_RATIO 25740
  2807. #define HLW8012_VOLTAGE_RATIO 313400
  2808. #define HLW8012_POWER_RATIO 3414290
  2809. #define HLW8012_INTERRUPT_ON FALLING
  2810. // ----------------------------------------------------------------------------------------
  2811. // Hama WiFi Steckdose (00176533)
  2812. // https://at.hama.com/00176533/hama-wifi-steckdose-3500w-16a
  2813. // ----------------------------------------------------------------------------------------
  2814. #elif defined(HAMA_WIFI_STECKDOSE_00176533)
  2815. // Info
  2816. #define MANUFACTURER "HAMA"
  2817. #define DEVICE "WIFI_STECKDOSE_00176533"
  2818. // Buttons
  2819. #define BUTTON1_PIN 13
  2820. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_SET_PULLUP | BUTTON_DEFAULT_HIGH
  2821. #define BUTTON1_RELAY 1
  2822. // Relays
  2823. #define RELAY1_PIN 12
  2824. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  2825. // LEDs
  2826. #define LED1_PIN 4
  2827. #define LED1_PIN_INVERSE 1
  2828. // -----------------------------------------------------------------------------
  2829. // Oxaoxe NX-SP202
  2830. // Digoo NX-SP202 (not tested)
  2831. // Digoo DG-SP202 (not tested)
  2832. // https://github.com/xoseperez/espurna/issues/1502
  2833. // -----------------------------------------------------------------------------
  2834. #elif defined(DIGOO_NX_SP202)
  2835. // Info
  2836. #define MANUFACTURER "DIGOO"
  2837. #define DEVICE "NX_SP202"
  2838. // Buttons
  2839. #define BUTTON1_PIN 0
  2840. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  2841. #define BUTTON1_RELAY 1
  2842. #define BUTTON2_PIN 16
  2843. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_SET_PULLUP | BUTTON_DEFAULT_HIGH
  2844. #define BUTTON2_RELAY 2
  2845. // Relays
  2846. #define RELAY1_PIN 15
  2847. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  2848. #define RELAY2_PIN 14
  2849. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  2850. // LEDs
  2851. #define LED1_PIN 13
  2852. #define LED1_PIN_INVERSE 1
  2853. // HJL01 / BL0937
  2854. #ifndef HLW8012_SUPPORT
  2855. #define HLW8012_SUPPORT 1
  2856. #endif
  2857. #define HLW8012_SEL_PIN 12
  2858. #define HLW8012_CF1_PIN 5
  2859. #define HLW8012_CF_PIN 4
  2860. #define HLW8012_SEL_CURRENT LOW
  2861. #define HLW8012_CURRENT_RATIO 23296
  2862. #define HLW8012_VOLTAGE_RATIO 310085
  2863. #define HLW8012_POWER_RATIO 3368471
  2864. #define HLW8012_INTERRUPT_ON FALLING
  2865. // -----------------------------------------------------------------------------
  2866. // Foxel's LightFox dual
  2867. // https://github.com/foxel/esp-dual-rf-switch
  2868. // -----------------------------------------------------------------------------
  2869. #elif defined(FOXEL_LIGHTFOX_DUAL)
  2870. // Info
  2871. #define MANUFACTURER "FOXEL"
  2872. #define DEVICE "LIGHTFOX_DUAL"
  2873. #define SERIAL_BAUDRATE 19200
  2874. #define RELAY_PROVIDER RELAY_PROVIDER_DUAL
  2875. #define DUMMY_RELAY_COUNT 2
  2876. #define DEBUG_SERIAL_SUPPORT 0
  2877. // Buttons
  2878. #define BUTTON1_RELAY 1
  2879. #define BUTTON2_RELAY 2
  2880. #define BUTTON3_RELAY 2
  2881. #define BUTTON4_RELAY 1
  2882. // -----------------------------------------------------------------------------
  2883. // Teckin SP20
  2884. // -----------------------------------------------------------------------------
  2885. #elif defined(TECKIN_SP20)
  2886. // Info
  2887. #define MANUFACTURER "TECKIN"
  2888. #define DEVICE "SP20"
  2889. // Buttons
  2890. #define BUTTON1_PIN 13
  2891. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  2892. #define BUTTON1_RELAY 1
  2893. // Relays
  2894. #define RELAY1_PIN 4
  2895. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  2896. // LEDs
  2897. #define LED1_PIN 2
  2898. #define LED1_PIN_INVERSE 1
  2899. #define LED2_PIN 0
  2900. #define LED2_PIN_INVERSE 1
  2901. #define LED2_MODE LED_MODE_FINDME
  2902. #define LED2_RELAY 0
  2903. // HJL01 / BL0937
  2904. #ifndef HLW8012_SUPPORT
  2905. #define HLW8012_SUPPORT 1
  2906. #endif
  2907. #define HLW8012_SEL_PIN 12
  2908. #define HLW8012_CF1_PIN 14
  2909. #define HLW8012_CF_PIN 5
  2910. #define HLW8012_SEL_CURRENT LOW
  2911. #define HLW8012_CURRENT_RATIO 25740
  2912. #define HLW8012_VOLTAGE_RATIO 313400
  2913. #define HLW8012_POWER_RATIO 3414290
  2914. #define HLW8012_INTERRUPT_ON FALLING
  2915. // -----------------------------------------------------------------------------
  2916. // Charging Essentials / LITESUN LA-WF3
  2917. // -----------------------------------------------------------------------------
  2918. #elif defined(LITESUN_LA_WF3)
  2919. // Info
  2920. #define MANUFACTURER "LITESUN"
  2921. #define DEVICE "LA_WF3"
  2922. // Buttons
  2923. #define BUTTON1_PIN 13
  2924. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  2925. #define BUTTON1_RELAY 1
  2926. // Relays
  2927. #define RELAY1_PIN 12
  2928. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  2929. // LEDs
  2930. #define LED1_PIN 4 // 4 blue led
  2931. #define LED1_MODE LED_MODE_WIFI
  2932. #define LED1_PIN_INVERSE 1
  2933. #define LED2_PIN 5 // 5 red led
  2934. #define LED2_MODE LED_MODE_RELAY
  2935. #define LED2_PIN_INVERSE 1
  2936. // -----------------------------------------------------------------------------
  2937. // PSH
  2938. // -----------------------------------------------------------------------------
  2939. #elif defined(PSH_WIFI_PLUG)
  2940. // Info
  2941. #define MANUFACTURER "PSH"
  2942. #define DEVICE "WIFI_PLUG"
  2943. // Relays
  2944. #define RELAY1_PIN 2
  2945. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  2946. // LEDs
  2947. #define LED1_PIN 0
  2948. #define LED1_PIN_INVERSE 0
  2949. #elif defined(PSH_RGBW_CONTROLLER)
  2950. // Info
  2951. #define MANUFACTURER "PSH"
  2952. #define DEVICE "RGBW_CONTROLLER"
  2953. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  2954. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  2955. #define DUMMY_RELAY_COUNT 1
  2956. // LEDs
  2957. #define LED1_PIN 13
  2958. #define LED1_PIN_INVERSE 1
  2959. // Light
  2960. #define LIGHT_CHANNELS 4
  2961. #define LIGHT_CH1_PIN 5 // RED
  2962. #define LIGHT_CH2_PIN 4 // GREEN
  2963. #define LIGHT_CH3_PIN 12 // BLUE
  2964. #define LIGHT_CH4_PIN 14 // WHITE1
  2965. #define LIGHT_CH1_INVERSE 0
  2966. #define LIGHT_CH2_INVERSE 0
  2967. #define LIGHT_CH3_INVERSE 0
  2968. #define LIGHT_CH4_INVERSE 0
  2969. #elif defined(PSH_WIFI_SENSOR)
  2970. // Info
  2971. #define MANUFACTURER "PSH"
  2972. #define DEVICE "WIFI_SENSOR"
  2973. // DHT12 Sensor
  2974. #define DHT_SUPPORT 1
  2975. #define DHT_PIN 14
  2976. #define DHT_TYPE DHT_CHIP_DHT12
  2977. // LDR Sensor
  2978. #define LDR_SUPPORT 1
  2979. #define LDR_TYPE LDR_GL5528
  2980. #define LDR_ON_GROUND false
  2981. #define LDR_RESISTOR 10000
  2982. #elif defined(JINVOO_VALVE_SM_AW713)
  2983. // Reflashing from original Tuya firmware
  2984. // to thirdparty firmware like espurna by:
  2985. // https://github.com/ct-Open-Source/tuya-convert
  2986. // Info
  2987. #define MANUFACTURER "JINVOO"
  2988. #define DEVICE "VALVE_SM_AW713"
  2989. // Buttons
  2990. #define BUTTON1_PIN 13
  2991. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  2992. #define BUTTON1_RELAY 1
  2993. // Relays
  2994. #define RELAY1_PIN 12
  2995. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  2996. // LED
  2997. #define LED1_PIN 5 // 5 red led
  2998. #define LED1_PIN_INVERSE 0
  2999. #define LED1_RELAY 1
  3000. #define LED1_MODE LED_MODE_RELAY
  3001. #define LED2_PIN 4 // 4 blue led
  3002. #define LED2_PIN_INVERSE 0
  3003. #define LED2_RELAY 1
  3004. #define LED2_MODE LED_MODE_FINDME_WIFI
  3005. // -----------------------------------------------------------------------------
  3006. // Etekcity ESW01-USA
  3007. // https://www.amazon.com/Etekcity-Voltson-Outlet-Monitoring-Required/dp/B01M3MYIFS
  3008. // -----------------------------------------------------------------------------
  3009. #elif defined(ETEKCITY_ESW01_USA)
  3010. // Info
  3011. #define MANUFACTURER "ETEKCITY"
  3012. #define DEVICE "ESW01-USA"
  3013. // Buttons
  3014. #define BUTTON1_PIN 14
  3015. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  3016. #define BUTTON1_RELAY 1
  3017. // Relays
  3018. #define RELAY1_PIN 4
  3019. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  3020. // LEDs
  3021. // Blue
  3022. #define LED1_PIN 5
  3023. #define LED1_PIN_INVERSE 0
  3024. #define LED1_MODE LED_MODE_WIFI
  3025. // Yellow
  3026. #define LED2_PIN 16
  3027. #define LED2_PIN_INVERSE 0
  3028. #define LED2_MODE LED_MODE_FOLLOW
  3029. #define LED2_RELAY 1
  3030. // HLW8012
  3031. #ifndef HLW8012_SUPPORT
  3032. #define HLW8012_SUPPORT 1
  3033. #endif
  3034. #define HLW8012_SEL_PIN 15
  3035. #define HLW8012_CF1_PIN 12
  3036. #define HLW8012_CF_PIN 13
  3037. #define HLW8012_SEL_CURRENT HIGH // SEL pin to HIGH to measure current
  3038. #define HLW8012_CURRENT_R 0.001 // Current resistor
  3039. #define HLW8012_VOLTAGE_R_UP ( 4 * 470000 ) // Upstream voltage resistor
  3040. #define HLW8012_VOLTAGE_R_DOWN ( 1000 ) // Downstream voltage resistor
  3041. #define HLW8012_INTERRUPT_ON CHANGE
  3042. // -----------------------------------------------------------------------------
  3043. // TEST boards (do not use!!)
  3044. // -----------------------------------------------------------------------------
  3045. #elif defined(TRAVIS01)
  3046. // Info
  3047. #define MANUFACTURER "TravisCI"
  3048. #define DEVICE "Virtual board 01"
  3049. // Some buttons - pin 0
  3050. #define BUTTON1_PIN 0
  3051. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  3052. #define BUTTON1_RELAY 1
  3053. // Some relays - pin 1
  3054. #define RELAY1_PIN 1
  3055. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  3056. // Some LEDs - pin 2
  3057. #define LED1_PIN 2
  3058. #define LED1_PIN_INVERSE 1
  3059. // A bit of I2C - pins 3,4
  3060. #define I2C_SDA_PIN 3
  3061. #define I2C_SCL_PIN 4
  3062. // And, as they say in "From Dusk till Dawn":
  3063. // This is a sensor blow out!
  3064. // Alright, we got white sensor, black sensor, spanish sensor, yellow sensor. We got hot sensor, cold sensor.
  3065. // We got wet sensor. We got smelly sensor. We got hairy sensor, bloody sensor. We got snapping sensor.
  3066. // We got silk sensor, velvet sensor, naugahyde sensor. We even got horse sensor, dog sensor, chicken sensor.
  3067. // C'mon, you want sensor, come on in sensor lovers!
  3068. // If we don’t got it, you don't want it!
  3069. #define AM2320_SUPPORT 1
  3070. #define BH1750_SUPPORT 1
  3071. #define BMP180_SUPPORT 1
  3072. #define BMX280_SUPPORT 1
  3073. #define SHT3X_I2C_SUPPORT 1
  3074. #define EMON_ADC121_SUPPORT 1
  3075. #define EMON_ADS1X15_SUPPORT 1
  3076. #define SHT3X_I2C_SUPPORT 1
  3077. #define SI7021_SUPPORT 1
  3078. #define PMSX003_SUPPORT 1
  3079. #define SENSEAIR_SUPPORT 1
  3080. #define VL53L1X_SUPPORT 1
  3081. #define MAX6675_SUPPORT 1
  3082. // A bit of lights - pin 5
  3083. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  3084. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  3085. #define DUMMY_RELAY_COUNT 1
  3086. #define LIGHT_CHANNELS 1
  3087. #define LIGHT_CH1_PIN 5
  3088. #define LIGHT_CH1_INVERSE 0
  3089. #define ENCODER_SUPPORT 1
  3090. // A bit of HLW8012 - pins 6,7,8
  3091. #ifndef HLW8012_SUPPORT
  3092. #define HLW8012_SUPPORT 1
  3093. #endif
  3094. #define HLW8012_SEL_PIN 6
  3095. #define HLW8012_CF1_PIN 7
  3096. #define HLW8012_CF_PIN 8
  3097. // A bit of Dallas - pin 9
  3098. #ifndef DALLAS_SUPPORT
  3099. #define DALLAS_SUPPORT 1
  3100. #endif
  3101. #define DALLAS_PIN 9
  3102. // A bit of ECH1560 - pins 10,11, 12
  3103. #ifndef ECH1560_SUPPORT
  3104. #define ECH1560_SUPPORT 1
  3105. #endif
  3106. #define ECH1560_CLK_PIN 10
  3107. #define ECH1560_MISO_PIN 11
  3108. #define ECH1560_INVERTED 12
  3109. // MICS-2710 & MICS-5525 test
  3110. #define MICS2710_SUPPORT 1
  3111. #define MICS5525_SUPPORT 1
  3112. // MAX6675 14 11 10
  3113. #ifndef MAX6675_SUPPORT
  3114. #define MAX6675_SUPPORT 1
  3115. #endif
  3116. #define MAX6675_CS_PIN 14
  3117. #define MAX6675_SO_PIN 11
  3118. #define MAX6675_SCK_PIN 10
  3119. #elif defined(TRAVIS02)
  3120. // Relay provider dual
  3121. #define MANUFACTURER "TravisCI"
  3122. #define DEVICE "Virtual board 02"
  3123. // Some buttons - pin 0
  3124. #define BUTTON1_PIN 0
  3125. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  3126. #define BUTTON1_RELAY 1
  3127. // A bit of CSE7766 - pin 1
  3128. #ifndef CSE7766_SUPPORT
  3129. #define CSE7766_SUPPORT 1
  3130. #endif
  3131. #define CSE7766_PIN 1
  3132. // Relay type dual - pins 2,3
  3133. #define RELAY_PROVIDER RELAY_PROVIDER_DUAL
  3134. #define RELAY1_PIN 2
  3135. #define RELAY2_PIN 3
  3136. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  3137. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  3138. // IR - pin 4
  3139. #define IR_SUPPORT 1
  3140. #define IR_RX_PIN 4
  3141. #define IR_BUTTON_SET 1
  3142. // A bit of DHT - pin 5
  3143. #ifndef DHT_SUPPORT
  3144. #define DHT_SUPPORT 1
  3145. #endif
  3146. #define DHT_PIN 5
  3147. // A bit of TMP3X (analog)
  3148. #define TMP3X_SUPPORT 1
  3149. // A bit of EVENTS - pin 10
  3150. #define EVENTS_SUPPORT 1
  3151. #define EVENTS1_PIN 6
  3152. // Sonar
  3153. #define SONAR_SUPPORT 1
  3154. #define SONAR_TRIGGER 7
  3155. #define SONAR_ECHO 8
  3156. // MHZ19
  3157. #define MHZ19_SUPPORT 1
  3158. #define MHZ19_RX_PIN 9
  3159. #define MHZ19_TX_PIN 10
  3160. // PZEM004T
  3161. #define PZEM004T_SUPPORT 1
  3162. #define PZEM004T_RX_PIN 11
  3163. #define PZEM004T_TX_PIN 12
  3164. // V9261F
  3165. #define V9261F_SUPPORT 1
  3166. #define V9261F_PIN 13
  3167. // GUVAS12SD
  3168. #define GUVAS12SD_SUPPORT 1
  3169. #define GUVAS12SD_PIN 14
  3170. // Test non-default modules
  3171. #define MDNS_CLIENT_SUPPORT 1
  3172. #define NOFUSS_SUPPORT 1
  3173. #define UART_MQTT_SUPPORT 1
  3174. #define INFLUXDB_SUPPORT 1
  3175. #define IR_SUPPORT 1
  3176. #define RF_SUPPORT 1
  3177. #define OTA_MQTT_SUPPORT 1
  3178. #define RFB_DIRECT 1
  3179. #define RFB_RX_PIN 4
  3180. #elif defined(TRAVIS03)
  3181. // Relay provider light/my92XX
  3182. #define MANUFACTURER "TravisCI"
  3183. #define DEVICE "Virtual board 03"
  3184. // Some buttons - pin 0
  3185. #define BUTTON1_PIN 0
  3186. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  3187. #define BUTTON1_RELAY 1
  3188. // MY9231 Light - pins 1,2
  3189. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  3190. #define LIGHT_PROVIDER LIGHT_PROVIDER_MY92XX
  3191. #define DUMMY_RELAY_COUNT 1
  3192. #define LIGHT_CHANNELS 5
  3193. #define MY92XX_MODEL MY92XX_MODEL_MY9231
  3194. #define MY92XX_CHIPS 2
  3195. #define MY92XX_DI_PIN 1
  3196. #define MY92XX_DCKI_PIN 2
  3197. #define MY92XX_COMMAND MY92XX_COMMAND_DEFAULT
  3198. #define MY92XX_MAPPING 4, 3, 5, 0, 1
  3199. // A bit of analog,
  3200. // will not work on real life since they all share GPIO
  3201. // but it's OK to test build
  3202. #define EMON_ANALOG_SUPPORT 1
  3203. #define NTC_SUPPORT 1
  3204. #define LDR_SUPPORT 1
  3205. #define PULSEMETER_SUPPORT 1
  3206. // Test non-default modules
  3207. #define LLMNR_SUPPORT 1
  3208. #define NETBIOS_SUPPORT 1
  3209. #define SSDP_SUPPORT 1
  3210. #define RF_SUPPORT 1
  3211. #else
  3212. #error "UNSUPPORTED HARDWARE!!"
  3213. #endif