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.

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