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.

2527 lines
79 KiB

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
  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 general.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. #include "devices/002_nodemcu_lolin.json.h"
  58. #elif defined(WEMOS_D1_MINI_RELAYSHIELD)
  59. #include "devices/003_wemos_d1_mini_relayshield.json.h"
  60. // -----------------------------------------------------------------------------
  61. // ESPurna
  62. // -----------------------------------------------------------------------------
  63. #elif defined(TINKERMAN_ESPURNA_H06)
  64. #include "devices/023_tinkerman_espurna_h06.json.h"
  65. // HLW8012
  66. #ifndef HLW8012_SUPPORT
  67. #define HLW8012_SUPPORT 1
  68. #endif
  69. #define HLW8012_SEL_PIN 2
  70. #define HLW8012_CF1_PIN 13
  71. #define HLW8012_CF_PIN 14
  72. #elif defined(TINKERMAN_ESPURNA_H08)
  73. // Info
  74. #define MANUFACTURER "TINKERMAN"
  75. #define DEVICE "ESPURNA_H08"
  76. // Buttons
  77. #define BUTTON1_PIN 4
  78. #define BUTTON1_RELAY 1
  79. // Normal pushbutton
  80. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  81. // Relays
  82. #define RELAY1_PIN 12
  83. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  84. // LEDs
  85. #define LED1_PIN 2
  86. #define LED1_PIN_INVERSE 0
  87. // HLW8012
  88. #ifndef HLW8012_SUPPORT
  89. #define HLW8012_SUPPORT 1
  90. #endif
  91. #define HLW8012_SEL_PIN 5
  92. #define HLW8012_CF1_PIN 13
  93. #define HLW8012_CF_PIN 14
  94. #elif defined(TINKERMAN_ESPURNA_SWITCH)
  95. // Info
  96. #define MANUFACTURER "TINKERMAN"
  97. #define DEVICE "ESPURNA_SWITCH"
  98. // Buttons
  99. #define BUTTON1_PIN 4
  100. #define BUTTON1_RELAY 1
  101. // Touch button
  102. #define BUTTON1_MODE BUTTON_PUSHBUTTON
  103. #define BUTTON1_PRESS BUTTON_MODE_TOGGLE
  104. #define BUTTON1_CLICK BUTTON_MODE_NONE
  105. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  106. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  107. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_NONE
  108. // LEDs
  109. #define LED1_PIN 2
  110. #define LED1_PIN_INVERSE 0
  111. // Relays
  112. #define RELAY1_PIN 12
  113. #define RELAY1_TYPE RELAY_TYPE_INVERSE
  114. // Check http://tinkerman.cat/rfm69-wifi-gateway/
  115. #elif defined(TINKERMAN_RFM69GW)
  116. // Info
  117. #define MANUFACTURER "TINKERMAN"
  118. #define DEVICE "RFM69GW"
  119. // Buttons
  120. #define BUTTON1_PIN 0
  121. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  122. // RFM69GW
  123. #define RFM69_SUPPORT 1
  124. // Disable non-core modules
  125. #define ALEXA_SUPPORT 0
  126. #define DOMOTICZ_SUPPORT 0
  127. #define HOMEASSISTANT_SUPPORT 0
  128. #define I2C_SUPPORT 0
  129. #define SCHEDULER_SUPPORT 0
  130. #define SENSOR_SUPPORT 0
  131. #define THINGSPEAK_SUPPORT 0
  132. // -----------------------------------------------------------------------------
  133. // Itead Studio boards
  134. // -----------------------------------------------------------------------------
  135. #elif defined(ITEAD_SONOFF_BASIC)
  136. // Info
  137. #define MANUFACTURER "ITEAD"
  138. #define DEVICE "SONOFF_BASIC"
  139. // Buttons
  140. #define BUTTON1_PIN 0
  141. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  142. #define BUTTON1_RELAY 1
  143. #define BUTTON2_PIN 14
  144. #define BUTTON2_MODE BUTTON_SWITCH | BUTTON_SET_PULLUP | BUTTON_DEFAULT_HIGH
  145. #define BUTTON2_RELAY 1
  146. // Relays
  147. #define RELAY1_PIN 12
  148. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  149. // LEDs
  150. #define LED1_PIN 13
  151. #define LED1_PIN_INVERSE 1
  152. #elif defined(ITEAD_SONOFF_RF)
  153. // Info
  154. #define MANUFACTURER "ITEAD"
  155. #define DEVICE "SONOFF_RF"
  156. // Buttons
  157. #define BUTTON1_PIN 0
  158. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  159. #define BUTTON1_RELAY 1
  160. #define BUTTON2_PIN 14
  161. #define BUTTON2_MODE BUTTON_SWITCH | BUTTON_SET_PULLUP | BUTTON_DEFAULT_HIGH
  162. #define BUTTON2_RELAY 1
  163. // Relays
  164. #define RELAY1_PIN 12
  165. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  166. // LEDs
  167. #define LED1_PIN 13
  168. #define LED1_PIN_INVERSE 1
  169. #elif defined(ITEAD_SONOFF_TH)
  170. // Info
  171. #define MANUFACTURER "ITEAD"
  172. #define DEVICE "SONOFF_TH"
  173. // Buttons
  174. #define BUTTON1_PIN 0
  175. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  176. #define BUTTON1_RELAY 1
  177. // Relays
  178. #define RELAY1_PIN 12
  179. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  180. // LEDs
  181. #define LED1_PIN 13
  182. #define LED1_PIN_INVERSE 1
  183. // Jack is connected to GPIO14 (and with a small hack to GPIO4)
  184. #ifndef DALLAS_SUPPORT
  185. #define DALLAS_SUPPORT 1
  186. #endif
  187. #define DALLAS_PIN 14
  188. #ifndef DHT_SUPPORT
  189. #define DHT_SUPPORT 1
  190. #endif
  191. #define DHT_PIN 14
  192. //#define I2C_SDA_PIN 4
  193. //#define I2C_SCL_PIN 14
  194. #elif defined(ITEAD_SONOFF_SV)
  195. // Info
  196. #define MANUFACTURER "ITEAD"
  197. #define DEVICE "SONOFF_SV"
  198. // Buttons
  199. #define BUTTON1_PIN 0
  200. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  201. #define BUTTON1_RELAY 1
  202. // Relays
  203. #define RELAY1_PIN 12
  204. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  205. // LEDs
  206. #define LED1_PIN 13
  207. #define LED1_PIN_INVERSE 1
  208. #elif defined(ITEAD_SLAMPHER)
  209. // Info
  210. #define MANUFACTURER "ITEAD"
  211. #define DEVICE "SLAMPHER"
  212. // Buttons
  213. #define BUTTON1_PIN 0
  214. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  215. #define BUTTON1_RELAY 1
  216. // Relays
  217. #define RELAY1_PIN 12
  218. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  219. // LEDs
  220. #define LED1_PIN 13
  221. #define LED1_PIN_INVERSE 1
  222. #elif defined(ITEAD_S20)
  223. // Info
  224. #define MANUFACTURER "ITEAD"
  225. #define DEVICE "S20"
  226. // Buttons
  227. #define BUTTON1_PIN 0
  228. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  229. #define BUTTON1_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_TOUCH)
  237. // Info
  238. #define MANUFACTURER "ITEAD"
  239. #define DEVICE "SONOFF_TOUCH"
  240. // Buttons
  241. #define BUTTON1_PIN 0
  242. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  243. #define BUTTON1_PRESS BUTTON_MODE_TOGGLE
  244. #define BUTTON1_CLICK BUTTON_MODE_NONE
  245. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  246. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  247. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_RESET
  248. #define BUTTON1_RELAY 1
  249. // Relays
  250. #define RELAY1_PIN 12
  251. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  252. // LEDs
  253. #define LED1_PIN 13
  254. #define LED1_PIN_INVERSE 1
  255. #elif defined(ITEAD_SONOFF_POW)
  256. // Info
  257. #define MANUFACTURER "ITEAD"
  258. #define DEVICE "SONOFF_POW"
  259. // Buttons
  260. #define BUTTON1_PIN 0
  261. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  262. #define BUTTON1_RELAY 1
  263. // Relays
  264. #define RELAY1_PIN 12
  265. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  266. // LEDs
  267. #define LED1_PIN 15
  268. #define LED1_PIN_INVERSE 0
  269. // HLW8012
  270. #ifndef HLW8012_SUPPORT
  271. #define HLW8012_SUPPORT 1
  272. #endif
  273. #define HLW8012_SEL_PIN 5
  274. #define HLW8012_CF1_PIN 13
  275. #define HLW8012_CF_PIN 14
  276. #elif defined(ITEAD_SONOFF_POW_R2)
  277. // Info
  278. #define MANUFACTURER "ITEAD"
  279. #define DEVICE "SONOFF_POW_R2"
  280. // Buttons
  281. #define BUTTON1_PIN 0
  282. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  283. #define BUTTON1_RELAY 1
  284. // Relays
  285. #define RELAY1_PIN 12
  286. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  287. // LEDs
  288. #define LED1_PIN 13
  289. #define LED1_PIN_INVERSE 1
  290. // Disable UART noise
  291. #define DEBUG_SERIAL_SUPPORT 0
  292. // CSE7766
  293. #ifndef CSE7766_SUPPORT
  294. #define CSE7766_SUPPORT 1
  295. #endif
  296. #define CSE7766_PIN 1
  297. #elif defined(ITEAD_SONOFF_DUAL)
  298. // Info
  299. #define MANUFACTURER "ITEAD"
  300. #define DEVICE "SONOFF_DUAL"
  301. #define SERIAL_BAUDRATE 19230
  302. #define RELAY_PROVIDER RELAY_PROVIDER_DUAL
  303. #define DUMMY_RELAY_COUNT 2
  304. #define DEBUG_SERIAL_SUPPORT 0
  305. // Buttons
  306. #define BUTTON3_RELAY 1
  307. // LEDs
  308. #define LED1_PIN 13
  309. #define LED1_PIN_INVERSE 1
  310. #elif defined(ITEAD_SONOFF_DUAL_R2)
  311. #define MANUFACTURER "ITEAD"
  312. #define DEVICE "SONOFF_DUAL_R2"
  313. // Buttons
  314. #define BUTTON1_PIN 0 // Button 0 on header
  315. #define BUTTON2_PIN 9 // Button 1 on header
  316. #define BUTTON3_PIN 10 // Physical button
  317. #define BUTTON1_RELAY 1
  318. #define BUTTON2_RELAY 2
  319. #define BUTTON3_RELAY 1
  320. #define BUTTON1_MODE BUTTON_SWITCH | BUTTON_SET_PULLUP | BUTTON_DEFAULT_HIGH
  321. #define BUTTON2_MODE BUTTON_SWITCH | BUTTON_SET_PULLUP | BUTTON_DEFAULT_HIGH
  322. #define BUTTON3_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  323. // Relays
  324. #define RELAY1_PIN 12
  325. #define RELAY2_PIN 5
  326. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  327. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  328. // LEDs
  329. #define LED1_PIN 13
  330. #define LED1_PIN_INVERSE 1
  331. #elif defined(ITEAD_SONOFF_4CH)
  332. // Info
  333. #define MANUFACTURER "ITEAD"
  334. #define DEVICE "SONOFF_4CH"
  335. // Buttons
  336. #define BUTTON1_PIN 0
  337. #define BUTTON2_PIN 9
  338. #define BUTTON3_PIN 10
  339. #define BUTTON4_PIN 14
  340. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  341. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  342. #define BUTTON3_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  343. #define BUTTON4_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  344. #define BUTTON1_RELAY 1
  345. #define BUTTON2_RELAY 2
  346. #define BUTTON3_RELAY 3
  347. #define BUTTON4_RELAY 4
  348. // Relays
  349. #define RELAY1_PIN 12
  350. #define RELAY2_PIN 5
  351. #define RELAY3_PIN 4
  352. #define RELAY4_PIN 15
  353. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  354. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  355. #define RELAY3_TYPE RELAY_TYPE_NORMAL
  356. #define RELAY4_TYPE RELAY_TYPE_NORMAL
  357. // LEDs
  358. #define LED1_PIN 13
  359. #define LED1_PIN_INVERSE 1
  360. #elif defined(ITEAD_SONOFF_4CH_PRO)
  361. // Info
  362. #define MANUFACTURER "ITEAD"
  363. #define DEVICE "SONOFF_4CH_PRO"
  364. // Buttons
  365. #define BUTTON1_PIN 0
  366. #define BUTTON2_PIN 9
  367. #define BUTTON3_PIN 10
  368. #define BUTTON4_PIN 14
  369. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  370. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  371. #define BUTTON3_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  372. #define BUTTON4_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  373. #define BUTTON1_RELAY 1
  374. #define BUTTON2_RELAY 2
  375. #define BUTTON3_RELAY 3
  376. #define BUTTON4_RELAY 4
  377. // Sonoff 4CH Pro uses a secondary STM32 microcontroller to handle
  378. // buttons and relays, but it also forwards button presses to the ESP8285.
  379. // This allows ESPurna to handle button presses -almost- the same way
  380. // as with other devices except:
  381. // * Double click seems to break/disable the button on the STM32 side
  382. // * With S6 switch to 1 (self-locking and inching modes) everything's OK
  383. // * With S6 switch to 0 (interlock mode) if there is a relay ON
  384. // and you click on another relay button, the STM32 sends a "press"
  385. // event for the button of the first relay (to turn it OFF) but it
  386. // does not send a "release" event. It's like it's holding the
  387. // button down since you can see it is still LOW.
  388. // Whatever reason the result is that it may actually perform a
  389. // long click or long-long click.
  390. // The configuration below make the button toggle the relay on press events
  391. // and disables any possibly harmful combination with S6 set to 0.
  392. // If you are sure you will only use S6 to 1 you can comment the
  393. // BUTTON1_LNGCLICK and BUTTON1_LNGLNGCLICK options below to recover the
  394. // reset mode and factory reset functionalities, or link other actions like
  395. // AP mode in the commented line below.
  396. #define BUTTON1_PRESS BUTTON_MODE_TOGGLE
  397. #define BUTTON1_CLICK BUTTON_MODE_NONE
  398. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  399. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  400. //#define BUTTON1_LNGCLICK BUTTON_MODE_AP
  401. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_NONE
  402. #define BUTTON2_PRESS BUTTON_MODE_TOGGLE
  403. #define BUTTON2_CLICK BUTTON_MODE_NONE
  404. #define BUTTON3_PRESS BUTTON_MODE_TOGGLE
  405. #define BUTTON3_CLICK BUTTON_MODE_NONE
  406. #define BUTTON4_PRESS BUTTON_MODE_TOGGLE
  407. #define BUTTON4_CLICK BUTTON_MODE_NONE
  408. // Relays
  409. #define RELAY1_PIN 12
  410. #define RELAY2_PIN 5
  411. #define RELAY3_PIN 4
  412. #define RELAY4_PIN 15
  413. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  414. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  415. #define RELAY3_TYPE RELAY_TYPE_NORMAL
  416. #define RELAY4_TYPE RELAY_TYPE_NORMAL
  417. // LEDs
  418. #define LED1_PIN 13
  419. #define LED1_PIN_INVERSE 1
  420. #elif defined(ITEAD_1CH_INCHING)
  421. // The inching functionality is managed by a misterious IC in the board.
  422. // You cannot control the inching button and functionality from the ESP8266
  423. // Besides, enabling the inching functionality using the hardware button
  424. // will result in the relay switching on and off continuously.
  425. // Fortunately the unkown IC keeps memory of the hardware inching status
  426. // so you can just disable it and forget. The inching LED must be lit.
  427. // You can still use the pulse options from the web interface
  428. // without problem.
  429. // Info
  430. #define MANUFACTURER "ITEAD"
  431. #define DEVICE "1CH_INCHING"
  432. // Buttons
  433. #define BUTTON1_PIN 0
  434. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  435. #define BUTTON1_RELAY 1
  436. // Relays
  437. #define RELAY1_PIN 12
  438. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  439. // LEDs
  440. #define LED1_PIN 13
  441. #define LED1_PIN_INVERSE 1
  442. #elif defined(ITEAD_MOTOR)
  443. // Info
  444. #define MANUFACTURER "ITEAD"
  445. #define DEVICE "MOTOR"
  446. // Buttons
  447. #define BUTTON1_PIN 0
  448. #define BUTTON1_RELAY 1
  449. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  450. // Relays
  451. #define RELAY1_PIN 12
  452. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  453. // LEDs
  454. #define LED1_PIN 13
  455. #define LED1_PIN_INVERSE 1
  456. #elif defined(ITEAD_BNSZ01)
  457. // Info
  458. #define MANUFACTURER "ITEAD"
  459. #define DEVICE "BNSZ01"
  460. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  461. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  462. #define DUMMY_RELAY_COUNT 1
  463. // LEDs
  464. #define LED1_PIN 13
  465. #define LED1_PIN_INVERSE 1
  466. // Light
  467. #define LIGHT_CHANNELS 1
  468. #define LIGHT_CH1_PIN 12
  469. #define LIGHT_CH1_INVERSE 0
  470. #elif defined(ITEAD_SONOFF_RFBRIDGE)
  471. // Info
  472. #define MANUFACTURER "ITEAD"
  473. #define DEVICE "SONOFF_RFBRIDGE"
  474. #define RELAY_PROVIDER RELAY_PROVIDER_RFBRIDGE
  475. // Number of virtual switches
  476. #ifndef DUMMY_RELAY_COUNT
  477. #define DUMMY_RELAY_COUNT 8
  478. #endif
  479. // Buttons
  480. #define BUTTON1_PIN 0
  481. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  482. // LEDs
  483. #define LED1_PIN 13
  484. #define LED1_PIN_INVERSE 1
  485. // RFB Direct hack thanks to @wildwiz
  486. // https://github.com/xoseperez/espurna/wiki/Hardware-Itead-Sonoff-RF-Bridge---Direct-Hack
  487. #ifndef RFB_DIRECT
  488. #define RFB_DIRECT 0
  489. #endif
  490. #ifndef RFB_RX_PIN
  491. #define RFB_RX_PIN 4 // GPIO for RX when RFB_DIRECT
  492. #endif
  493. #ifndef RFB_TX_PIN
  494. #define RFB_TX_PIN 5 // GPIO for TX when RFB_DIRECT
  495. #endif
  496. // When using un-modified harware, ESPurna communicates with the secondary
  497. // MCU EFM8BB1 via UART at 19200 bps so we need to change the speed of
  498. // the port and remove UART noise on serial line
  499. #if not RFB_DIRECT
  500. #define SERIAL_BAUDRATE 19200
  501. #define DEBUG_SERIAL_SUPPORT 0
  502. #endif
  503. #elif defined(ITEAD_SONOFF_B1)
  504. // Info
  505. #define MANUFACTURER "ITEAD"
  506. #define DEVICE "SONOFF_B1"
  507. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  508. #define LIGHT_PROVIDER LIGHT_PROVIDER_MY92XX
  509. #define DUMMY_RELAY_COUNT 1
  510. // Light
  511. #define LIGHT_CHANNELS 5
  512. #define MY92XX_MODEL MY92XX_MODEL_MY9231
  513. #define MY92XX_CHIPS 2
  514. #define MY92XX_DI_PIN 12
  515. #define MY92XX_DCKI_PIN 14
  516. #define MY92XX_COMMAND MY92XX_COMMAND_DEFAULT
  517. #define MY92XX_MAPPING 4, 3, 5, 0, 1
  518. #define LIGHT_WHITE_FACTOR (0.1) // White LEDs are way more bright in the B1
  519. #elif defined(ITEAD_SONOFF_LED)
  520. // Info
  521. #define MANUFACTURER "ITEAD"
  522. #define DEVICE "SONOFF_LED"
  523. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  524. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  525. #define DUMMY_RELAY_COUNT 1
  526. // LEDs
  527. #define LED1_PIN 13
  528. #define LED1_PIN_INVERSE 1
  529. // Light
  530. #define LIGHT_CHANNELS 2
  531. #define LIGHT_CH1_PIN 12 // Cold white
  532. #define LIGHT_CH2_PIN 14 // Warm white
  533. #define LIGHT_CH1_INVERSE 0
  534. #define LIGHT_CH2_INVERSE 0
  535. #elif defined(ITEAD_SONOFF_T1_1CH)
  536. // Info
  537. #define MANUFACTURER "ITEAD"
  538. #define DEVICE "SONOFF_T1_1CH"
  539. // Buttons
  540. #define BUTTON1_PIN 0
  541. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  542. #define BUTTON1_PRESS BUTTON_MODE_TOGGLE
  543. #define BUTTON1_CLICK BUTTON_MODE_NONE
  544. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  545. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  546. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_RESET
  547. #define BUTTON1_RELAY 1
  548. // Relays
  549. #define RELAY1_PIN 12
  550. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  551. // LEDs
  552. #define LED1_PIN 13
  553. #define LED1_PIN_INVERSE 1
  554. #elif defined(ITEAD_SONOFF_T1_2CH)
  555. // Info
  556. #define MANUFACTURER "ITEAD"
  557. #define DEVICE "SONOFF_T1_2CH"
  558. // Buttons
  559. #define BUTTON1_PIN 0
  560. #define BUTTON2_PIN 9
  561. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  562. #define BUTTON1_PRESS BUTTON_MODE_TOGGLE
  563. #define BUTTON1_CLICK BUTTON_MODE_NONE
  564. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  565. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  566. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_RESET
  567. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  568. #define BUTTON2_PRESS BUTTON_MODE_TOGGLE
  569. #define BUTTON2_CLICK BUTTON_MODE_NONE
  570. #define BUTTON2_DBLCLICK BUTTON_MODE_NONE
  571. #define BUTTON2_LNGCLICK BUTTON_MODE_NONE
  572. #define BUTTON2_LNGLNGCLICK BUTTON_MODE_RESET
  573. #define BUTTON1_RELAY 1
  574. #define BUTTON2_RELAY 2
  575. // Relays
  576. #define RELAY1_PIN 12
  577. #define RELAY2_PIN 5
  578. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  579. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  580. // LEDs
  581. #define LED1_PIN 13
  582. #define LED1_PIN_INVERSE 1
  583. #elif defined(ITEAD_SONOFF_T1_3CH)
  584. // Info
  585. #define MANUFACTURER "ITEAD"
  586. #define DEVICE "SONOFF_T1_3CH"
  587. // Buttons
  588. #define BUTTON1_PIN 0
  589. #define BUTTON2_PIN 9
  590. #define BUTTON3_PIN 10
  591. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  592. #define BUTTON1_PRESS BUTTON_MODE_TOGGLE
  593. #define BUTTON1_CLICK BUTTON_MODE_NONE
  594. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  595. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  596. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_RESET
  597. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  598. #define BUTTON2_PRESS BUTTON_MODE_TOGGLE
  599. #define BUTTON2_CLICK BUTTON_MODE_NONE
  600. #define BUTTON2_DBLCLICK BUTTON_MODE_NONE
  601. #define BUTTON2_LNGCLICK BUTTON_MODE_NONE
  602. #define BUTTON2_LNGLNGCLICK BUTTON_MODE_RESET
  603. #define BUTTON3_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  604. #define BUTTON3_PRESS BUTTON_MODE_TOGGLE
  605. #define BUTTON3_CLICK BUTTON_MODE_NONE
  606. #define BUTTON3_DBLCLICK BUTTON_MODE_NONE
  607. #define BUTTON3_LNGCLICK BUTTON_MODE_NONE
  608. #define BUTTON3_LNGLNGCLICK BUTTON_MODE_RESET
  609. #define BUTTON1_RELAY 1
  610. #define BUTTON2_RELAY 2
  611. #define BUTTON3_RELAY 3
  612. // Relays
  613. #define RELAY1_PIN 12
  614. #define RELAY2_PIN 5
  615. #define RELAY3_PIN 4
  616. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  617. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  618. #define RELAY3_TYPE RELAY_TYPE_NORMAL
  619. // LEDs
  620. #define LED1_PIN 13
  621. #define LED1_PIN_INVERSE 1
  622. #elif defined(ITEAD_SONOFF_S31)
  623. // Info
  624. #define MANUFACTURER "ITEAD"
  625. #define DEVICE "SONOFF_S31"
  626. // Buttons
  627. #define BUTTON1_PIN 0
  628. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  629. #define BUTTON1_RELAY 1
  630. // Relays
  631. #define RELAY1_PIN 12
  632. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  633. // LEDs
  634. #define LED1_PIN 13
  635. #define LED1_PIN_INVERSE 1
  636. // Disable UART noise
  637. #define DEBUG_SERIAL_SUPPORT 0
  638. // CSE7766
  639. #define CSE7766_SUPPORT 1
  640. #define CSE7766_PIN 1
  641. // -----------------------------------------------------------------------------
  642. // YJZK
  643. // -----------------------------------------------------------------------------
  644. #elif defined(YJZK_SWITCH_2CH)
  645. // Info
  646. #define MANUFACTURER "YJZK"
  647. #define DEVICE "SWITCH_2CH"
  648. // Buttons
  649. #define BUTTON1_PIN 0
  650. #define BUTTON2_PIN 9
  651. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  652. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  653. #define BUTTON1_RELAY 1
  654. #define BUTTON2_RELAY 2
  655. // Relays
  656. #define RELAY1_PIN 12
  657. #define RELAY2_PIN 5
  658. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  659. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  660. // LEDs
  661. #define LED1_PIN 13
  662. #define LED1_PIN_INVERSE 0
  663. // -----------------------------------------------------------------------------
  664. // Electrodragon boards
  665. // -----------------------------------------------------------------------------
  666. #elif defined(ELECTRODRAGON_WIFI_IOT)
  667. // Info
  668. #define MANUFACTURER "ELECTRODRAGON"
  669. #define DEVICE "WIFI_IOT"
  670. // Buttons
  671. #define BUTTON1_PIN 0
  672. #define BUTTON2_PIN 2
  673. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  674. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  675. #define BUTTON1_RELAY 1
  676. #define BUTTON2_RELAY 2
  677. // Relays
  678. #define RELAY1_PIN 12
  679. #define RELAY2_PIN 13
  680. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  681. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  682. // LEDs
  683. #define LED1_PIN 16
  684. #define LED1_PIN_INVERSE 0
  685. // -----------------------------------------------------------------------------
  686. // WorkChoice ecoPlug
  687. // -----------------------------------------------------------------------------
  688. #elif defined(WORKCHOICE_ECOPLUG)
  689. // Info
  690. #define MANUFACTURER "WORKCHOICE"
  691. #define DEVICE "ECOPLUG"
  692. // Buttons
  693. #define BUTTON1_PIN 13
  694. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  695. #define BUTTON1_RELAY 1
  696. // Relays
  697. #define RELAY1_PIN 15
  698. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  699. // LEDs
  700. #define LED1_PIN 2
  701. #define LED1_PIN_INVERSE 0
  702. // -----------------------------------------------------------------------------
  703. // AI Thinker
  704. // -----------------------------------------------------------------------------
  705. #elif defined(AITHINKER_AI_LIGHT)
  706. // Info
  707. #define MANUFACTURER "AITHINKER"
  708. #define DEVICE "AI_LIGHT"
  709. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  710. #define LIGHT_PROVIDER LIGHT_PROVIDER_MY92XX
  711. #define DUMMY_RELAY_COUNT 1
  712. // Light
  713. #define LIGHT_CHANNELS 4
  714. #define MY92XX_MODEL MY92XX_MODEL_MY9291
  715. #define MY92XX_CHIPS 1
  716. #define MY92XX_DI_PIN 13
  717. #define MY92XX_DCKI_PIN 15
  718. #define MY92XX_COMMAND MY92XX_COMMAND_DEFAULT
  719. #define MY92XX_MAPPING 0, 1, 2, 3
  720. // -----------------------------------------------------------------------------
  721. // LED Controller
  722. // -----------------------------------------------------------------------------
  723. #elif defined(MAGICHOME_LED_CONTROLLER)
  724. // Info
  725. #define MANUFACTURER "MAGICHOME"
  726. #define DEVICE "LED_CONTROLLER"
  727. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  728. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  729. #define DUMMY_RELAY_COUNT 1
  730. // LEDs
  731. #define LED1_PIN 2
  732. #define LED1_PIN_INVERSE 1
  733. // Light
  734. #define LIGHT_CHANNELS 4
  735. #define LIGHT_CH1_PIN 14 // RED
  736. #define LIGHT_CH2_PIN 5 // GREEN
  737. #define LIGHT_CH3_PIN 12 // BLUE
  738. #define LIGHT_CH4_PIN 13 // WHITE
  739. #define LIGHT_CH1_INVERSE 0
  740. #define LIGHT_CH2_INVERSE 0
  741. #define LIGHT_CH3_INVERSE 0
  742. #define LIGHT_CH4_INVERSE 0
  743. // IR
  744. #define IR_SUPPORT 1
  745. #define IR_PIN 4
  746. #define IR_BUTTON_SET 1
  747. #elif defined(MAGICHOME_LED_CONTROLLER_20)
  748. // Info
  749. #define MANUFACTURER "MAGICHOME"
  750. #define DEVICE "LED_CONTROLLER_20"
  751. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  752. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  753. #define DUMMY_RELAY_COUNT 1
  754. // LEDs
  755. #define LED1_PIN 2
  756. #define LED1_PIN_INVERSE 1
  757. // Light
  758. #define LIGHT_CHANNELS 4
  759. #define LIGHT_CH1_PIN 5 // RED
  760. #define LIGHT_CH2_PIN 12 // GREEN
  761. #define LIGHT_CH3_PIN 13 // BLUE
  762. #define LIGHT_CH4_PIN 15 // WHITE
  763. #define LIGHT_CH1_INVERSE 0
  764. #define LIGHT_CH2_INVERSE 0
  765. #define LIGHT_CH3_INVERSE 0
  766. #define LIGHT_CH4_INVERSE 0
  767. // IR
  768. #define IR_SUPPORT 1
  769. #define IR_PIN 4
  770. #define IR_BUTTON_SET 1
  771. // -----------------------------------------------------------------------------
  772. // HUACANXING H801 & H802
  773. // -----------------------------------------------------------------------------
  774. #elif defined(HUACANXING_H801)
  775. // Info
  776. #define MANUFACTURER "HUACANXING"
  777. #define DEVICE "H801"
  778. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  779. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  780. #define DUMMY_RELAY_COUNT 1
  781. #define DEBUG_PORT Serial1
  782. #define SERIAL_RX_ENABLED 1
  783. // LEDs
  784. #define LED1_PIN 5
  785. #define LED1_PIN_INVERSE 1
  786. // Light
  787. #define LIGHT_CHANNELS 5
  788. #define LIGHT_CH1_PIN 15 // RED
  789. #define LIGHT_CH2_PIN 13 // GREEN
  790. #define LIGHT_CH3_PIN 12 // BLUE
  791. #define LIGHT_CH4_PIN 14 // WHITE1
  792. #define LIGHT_CH5_PIN 4 // WHITE2
  793. #define LIGHT_CH1_INVERSE 0
  794. #define LIGHT_CH2_INVERSE 0
  795. #define LIGHT_CH3_INVERSE 0
  796. #define LIGHT_CH4_INVERSE 0
  797. #define LIGHT_CH5_INVERSE 0
  798. #elif defined(HUACANXING_H802)
  799. // Info
  800. #define MANUFACTURER "HUACANXING"
  801. #define DEVICE "H802"
  802. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  803. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  804. #define DUMMY_RELAY_COUNT 1
  805. #define DEBUG_PORT Serial1
  806. #define SERIAL_RX_ENABLED 1
  807. // Light
  808. #define LIGHT_CHANNELS 4
  809. #define LIGHT_CH1_PIN 12 // RED
  810. #define LIGHT_CH2_PIN 14 // GREEN
  811. #define LIGHT_CH3_PIN 13 // BLUE
  812. #define LIGHT_CH4_PIN 15 // WHITE
  813. #define LIGHT_CH1_INVERSE 0
  814. #define LIGHT_CH2_INVERSE 0
  815. #define LIGHT_CH3_INVERSE 0
  816. #define LIGHT_CH4_INVERSE 0
  817. // -----------------------------------------------------------------------------
  818. // Jan Goedeke Wifi Relay
  819. // https://github.com/JanGoe/esp8266-wifi-relay
  820. // -----------------------------------------------------------------------------
  821. #elif defined(JANGOE_WIFI_RELAY_NC)
  822. // Info
  823. #define MANUFACTURER "JANGOE"
  824. #define DEVICE "WIFI_RELAY_NC"
  825. // Buttons
  826. #define BUTTON1_PIN 12
  827. #define BUTTON2_PIN 13
  828. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  829. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  830. #define BUTTON1_RELAY 1
  831. #define BUTTON2_RELAY 2
  832. // Relays
  833. #define RELAY1_PIN 2
  834. #define RELAY2_PIN 14
  835. #define RELAY1_TYPE RELAY_TYPE_INVERSE
  836. #define RELAY2_TYPE RELAY_TYPE_INVERSE
  837. #elif defined(JANGOE_WIFI_RELAY_NO)
  838. // Info
  839. #define MANUFACTURER "JANGOE"
  840. #define DEVICE "WIFI_RELAY_NO"
  841. // Buttons
  842. #define BUTTON1_PIN 12
  843. #define BUTTON2_PIN 13
  844. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  845. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  846. #define BUTTON1_RELAY 1
  847. #define BUTTON2_RELAY 2
  848. // Relays
  849. #define RELAY1_PIN 2
  850. #define RELAY2_PIN 14
  851. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  852. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  853. // -----------------------------------------------------------------------------
  854. // Jorge García Wifi+Relays Board Kit
  855. // https://www.tindie.com/products/jorgegarciadev/wifi--relays-board-kit
  856. // https://github.com/jorgegarciadev/wifikit
  857. // -----------------------------------------------------------------------------
  858. #elif defined(JORGEGARCIA_WIFI_RELAYS)
  859. // Info
  860. #define MANUFACTURER "JORGEGARCIA"
  861. #define DEVICE "WIFI_RELAYS"
  862. // Relays
  863. #define RELAY1_PIN 0
  864. #define RELAY2_PIN 2
  865. #define RELAY1_TYPE RELAY_TYPE_INVERSE
  866. #define RELAY2_TYPE RELAY_TYPE_INVERSE
  867. // -----------------------------------------------------------------------------
  868. // WiFi MQTT Relay / Thermostat
  869. // -----------------------------------------------------------------------------
  870. #elif defined(OPENENERGYMONITOR_MQTT_RELAY)
  871. // Info
  872. #define MANUFACTURER "OPENENERGYMONITOR"
  873. #define DEVICE "MQTT_RELAY"
  874. // Buttons
  875. #define BUTTON1_PIN 0
  876. #define BUTTON1_RELAY 1
  877. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  878. // Relays
  879. #define RELAY1_PIN 12
  880. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  881. // LEDs
  882. #define LED1_PIN 16
  883. #define LED1_PIN_INVERSE 0
  884. // -----------------------------------------------------------------------------
  885. // WiOn 50055 Indoor Wi-Fi Wall Outlet & Tap
  886. // 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
  887. // 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
  888. // -----------------------------------------------------------------------------
  889. #elif defined(WION_50055)
  890. // Currently untested, does not support energy monitoring
  891. // Info
  892. #define MANUFACTURER "WION"
  893. #define DEVICE "50055"
  894. // Buttons
  895. #define BUTTON1_PIN 13
  896. #define BUTTON1_RELAY 1
  897. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  898. // Relays
  899. #define RELAY1_PIN 15
  900. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  901. // LEDs
  902. #define LED1_PIN 2
  903. #define LED1_PIN_INVERSE 0
  904. // -----------------------------------------------------------------------------
  905. // EX-Store Wifi Relay v3.1
  906. // https://ex-store.de/ESP8266-WiFi-Relay-V31
  907. // -----------------------------------------------------------------------------
  908. #elif defined(EXS_WIFI_RELAY_V31)
  909. // Untested
  910. // Info
  911. #define MANUFACTURER "EXS"
  912. #define DEVICE "WIFI_RELAY_V31"
  913. // Buttons
  914. #define BUTTON1_PIN 0
  915. #define BUTTON1_RELAY 1
  916. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  917. // Relays
  918. #define RELAY1_PIN 13
  919. #define RELAY1_TYPE RELAY_TYPE_LATCHED
  920. #define RELAY1_RESET_PIN 12
  921. // -----------------------------------------------------------------------------
  922. // V9261F
  923. // -----------------------------------------------------------------------------
  924. #elif defined(GENERIC_V9261F)
  925. // Info
  926. #define MANUFACTURER "GENERIC"
  927. #define DEVICE "V9261F"
  928. #define ALEXA_SUPPORT 0
  929. // V9261F
  930. #define V9261F_SUPPORT 1
  931. #define V9261F_PIN 2
  932. #define V9261F_PIN_INVERSE 1
  933. // -----------------------------------------------------------------------------
  934. // ECH1560
  935. // -----------------------------------------------------------------------------
  936. #elif defined(GENERIC_ECH1560)
  937. // Info
  938. #define MANUFACTURER "GENERIC"
  939. #define DEVICE "ECH1560"
  940. #define ALEXA_SUPPORT 0
  941. // ECH1560
  942. #define ECH1560_SUPPORT 1
  943. #define ECH1560_CLK_PIN 4
  944. #define ECH1560_MISO_PIN 5
  945. #define ECH1560_INVERTED 0
  946. // -----------------------------------------------------------------------------
  947. // ESPLive
  948. // https://github.com/ManCaveMade/ESP-Live
  949. // -----------------------------------------------------------------------------
  950. #elif defined(MANCAVEMADE_ESPLIVE)
  951. // Info
  952. #define MANUFACTURER "MANCAVEMADE"
  953. #define DEVICE "ESPLIVE"
  954. // Buttons
  955. #define BUTTON1_PIN 4
  956. #define BUTTON2_PIN 5
  957. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  958. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  959. #define BUTTON1_RELAY 1
  960. #define BUTTON2_RELAY 2
  961. // Relays
  962. #define RELAY1_PIN 12
  963. #define RELAY2_PIN 13
  964. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  965. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  966. // DS18B20
  967. #ifndef DALLAS_SUPPORT
  968. #define DALLAS_SUPPORT 1
  969. #endif
  970. #define DALLAS_PIN 2
  971. #define DALLAS_UPDATE_INTERVAL 5000
  972. #define TEMPERATURE_MIN_CHANGE 1.0
  973. // -----------------------------------------------------------------------------
  974. // QuinLED
  975. // http://blog.quindorian.org/2017/02/esp8266-led-lighting-quinled-v2-6-pcb.html
  976. // -----------------------------------------------------------------------------
  977. #elif defined(INTERMITTECH_QUINLED)
  978. // Info
  979. #define MANUFACTURER "INTERMITTECH"
  980. #define DEVICE "QUINLED"
  981. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  982. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  983. #define DUMMY_RELAY_COUNT 1
  984. // LEDs
  985. #define LED1_PIN 5
  986. #define LED1_PIN_INVERSE 1
  987. // Light
  988. #define LIGHT_CHANNELS 2
  989. #define LIGHT_CH1_PIN 0
  990. #define LIGHT_CH2_PIN 2
  991. #define LIGHT_CH1_INVERSE 0
  992. #define LIGHT_CH2_INVERSE 0
  993. // -----------------------------------------------------------------------------
  994. // Arilux AL-LC06
  995. // -----------------------------------------------------------------------------
  996. #elif defined(ARILUX_AL_LC01)
  997. // Info
  998. #define MANUFACTURER "ARILUX"
  999. #define DEVICE "AL_LC01"
  1000. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  1001. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  1002. #define DUMMY_RELAY_COUNT 1
  1003. // Light
  1004. #define LIGHT_CHANNELS 3
  1005. #define LIGHT_CH1_PIN 5 // RED
  1006. #define LIGHT_CH2_PIN 12 // GREEN
  1007. #define LIGHT_CH3_PIN 13 // BLUE
  1008. #define LIGHT_CH1_INVERSE 0
  1009. #define LIGHT_CH2_INVERSE 0
  1010. #define LIGHT_CH3_INVERSE 0
  1011. #elif defined(ARILUX_AL_LC02)
  1012. // Info
  1013. #define MANUFACTURER "ARILUX"
  1014. #define DEVICE "AL_LC02"
  1015. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  1016. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  1017. #define DUMMY_RELAY_COUNT 1
  1018. // Light
  1019. #define LIGHT_CHANNELS 4
  1020. #define LIGHT_CH1_PIN 12 // RED
  1021. #define LIGHT_CH2_PIN 5 // GREEN
  1022. #define LIGHT_CH3_PIN 13 // BLUE
  1023. #define LIGHT_CH4_PIN 15 // WHITE1
  1024. #define LIGHT_CH1_INVERSE 0
  1025. #define LIGHT_CH2_INVERSE 0
  1026. #define LIGHT_CH3_INVERSE 0
  1027. #define LIGHT_CH4_INVERSE 0
  1028. #elif defined(ARILUX_AL_LC06)
  1029. // Info
  1030. #define MANUFACTURER "ARILUX"
  1031. #define DEVICE "AL_LC06"
  1032. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  1033. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  1034. #define DUMMY_RELAY_COUNT 1
  1035. // Light
  1036. #define LIGHT_CHANNELS 5
  1037. #define LIGHT_CH1_PIN 14 // RED
  1038. #define LIGHT_CH2_PIN 12 // GREEN
  1039. #define LIGHT_CH3_PIN 13 // BLUE
  1040. #define LIGHT_CH4_PIN 15 // WHITE1
  1041. #define LIGHT_CH5_PIN 5 // WHITE2
  1042. #define LIGHT_CH1_INVERSE 0
  1043. #define LIGHT_CH2_INVERSE 0
  1044. #define LIGHT_CH3_INVERSE 0
  1045. #define LIGHT_CH4_INVERSE 0
  1046. #define LIGHT_CH5_INVERSE 0
  1047. #elif defined(ARILUX_AL_LC11)
  1048. // Info
  1049. #define MANUFACTURER "ARILUX"
  1050. #define DEVICE "AL_LC11"
  1051. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  1052. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  1053. #define DUMMY_RELAY_COUNT 1
  1054. // Light
  1055. #define LIGHT_CHANNELS 5
  1056. #define LIGHT_CH1_PIN 5 // RED
  1057. #define LIGHT_CH2_PIN 4 // GREEN
  1058. #define LIGHT_CH3_PIN 14 // BLUE
  1059. #define LIGHT_CH4_PIN 13 // WHITE1
  1060. #define LIGHT_CH5_PIN 12 // WHITE1
  1061. #define LIGHT_CH1_INVERSE 0
  1062. #define LIGHT_CH2_INVERSE 0
  1063. #define LIGHT_CH3_INVERSE 0
  1064. #define LIGHT_CH4_INVERSE 0
  1065. #define LIGHT_CH5_INVERSE 0
  1066. #elif defined(ARILUX_E27)
  1067. // Info
  1068. #define MANUFACTURER "ARILUX"
  1069. #define DEVICE "E27"
  1070. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  1071. #define LIGHT_PROVIDER LIGHT_PROVIDER_MY92XX
  1072. #define DUMMY_RELAY_COUNT 1
  1073. // Light
  1074. #define LIGHT_CHANNELS 4
  1075. #define MY92XX_MODEL MY92XX_MODEL_MY9291
  1076. #define MY92XX_CHIPS 1
  1077. #define MY92XX_DI_PIN 13
  1078. #define MY92XX_DCKI_PIN 15
  1079. #define MY92XX_COMMAND MY92XX_COMMAND_DEFAULT
  1080. #define MY92XX_MAPPING 0, 1, 2, 3
  1081. // -----------------------------------------------------------------------------
  1082. // XENON SM-PW701U
  1083. // -----------------------------------------------------------------------------
  1084. #elif defined(XENON_SM_PW702U)
  1085. // Info
  1086. #define MANUFACTURER "XENON"
  1087. #define DEVICE "SM_PW702U"
  1088. // Buttons
  1089. #define BUTTON1_PIN 13
  1090. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1091. #define BUTTON1_RELAY 1
  1092. // Relays
  1093. #define RELAY1_PIN 12
  1094. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1095. // LEDs
  1096. #define LED1_PIN 4
  1097. #define LED1_PIN_INVERSE 1
  1098. // -----------------------------------------------------------------------------
  1099. // AUTHOMETION LYT8266
  1100. // https://authometion.com/shop/en/home/13-lyt8266.html
  1101. // -----------------------------------------------------------------------------
  1102. #elif defined(AUTHOMETION_LYT8266)
  1103. // Info
  1104. #define MANUFACTURER "AUTHOMETION"
  1105. #define DEVICE "LYT8266"
  1106. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  1107. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  1108. #define DUMMY_RELAY_COUNT 1
  1109. // Light
  1110. #define LIGHT_CHANNELS 4
  1111. #define LIGHT_CH1_PIN 13 // RED
  1112. #define LIGHT_CH2_PIN 12 // GREEN
  1113. #define LIGHT_CH3_PIN 14 // BLUE
  1114. #define LIGHT_CH4_PIN 2 // WHITE
  1115. #define LIGHT_CH1_INVERSE 0
  1116. #define LIGHT_CH2_INVERSE 0
  1117. #define LIGHT_CH3_INVERSE 0
  1118. #define LIGHT_CH4_INVERSE 0
  1119. #define LIGHT_ENABLE_PIN 15
  1120. #elif defined(GIZWITS_WITTY_CLOUD)
  1121. // Info
  1122. #define MANUFACTURER "GIZWITS"
  1123. #define DEVICE "WITTY_CLOUD"
  1124. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  1125. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  1126. #define DUMMY_RELAY_COUNT 1
  1127. // Buttons
  1128. #define BUTTON1_PIN 4
  1129. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1130. #define BUTTON1_PRESS BUTTON_MODE_TOGGLE
  1131. #define BUTTON1_CLICK BUTTON_MODE_NONE
  1132. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  1133. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  1134. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_RESET
  1135. #define ANALOG_SUPPORT 1
  1136. // LEDs
  1137. #define LED1_PIN 2 // BLUE build-in
  1138. #define LED1_PIN_INVERSE 1
  1139. // Light
  1140. #define LIGHT_CHANNELS 3
  1141. #define LIGHT_CH1_PIN 15 // RED
  1142. #define LIGHT_CH2_PIN 12 // GREEN
  1143. #define LIGHT_CH3_PIN 13 // BLUE
  1144. #define LIGHT_CH1_INVERSE 0
  1145. #define LIGHT_CH2_INVERSE 0
  1146. #define LIGHT_CH3_INVERSE 0
  1147. // -----------------------------------------------------------------------------
  1148. // KMC 70011
  1149. // https://www.amazon.com/KMC-Monitoring-Required-Control-Compatible/dp/B07313TH7B
  1150. // -----------------------------------------------------------------------------
  1151. #elif defined(KMC_70011)
  1152. // Info
  1153. #define MANUFACTURER "KMC"
  1154. #define DEVICE "70011"
  1155. // Buttons
  1156. #define BUTTON1_PIN 0
  1157. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1158. #define BUTTON1_RELAY 1
  1159. // Relays
  1160. #define RELAY1_PIN 14
  1161. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1162. // LEDs
  1163. #define LED1_PIN 13
  1164. #define LED1_PIN_INVERSE 0
  1165. // HLW8012
  1166. #ifndef HLW8012_SUPPORT
  1167. #define HLW8012_SUPPORT 1
  1168. #endif
  1169. #define HLW8012_SEL_PIN 12
  1170. #define HLW8012_CF1_PIN 5
  1171. #define HLW8012_CF_PIN 4
  1172. #define HLW8012_VOLTAGE_R_UP ( 2 * 1000000 ) // Upstream voltage resistor
  1173. // -----------------------------------------------------------------------------
  1174. // Euromate (?) Wifi Stecker Shuko
  1175. // https://www.obi.de/hausfunksteuerung/wifi-stecker-schuko/p/2291706
  1176. // Thanks to @Geitde
  1177. // -----------------------------------------------------------------------------
  1178. #elif defined(EUROMATE_WIFI_STECKER_SCHUKO)
  1179. // Info
  1180. #define MANUFACTURER "EUROMATE"
  1181. #define DEVICE "WIFI_STECKER_SCHUKO"
  1182. // Buttons
  1183. #define BUTTON1_PIN 14
  1184. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_SET_PULLUP | BUTTON_DEFAULT_HIGH
  1185. #define BUTTON1_RELAY 1
  1186. // The relay in the device is not a bistable (latched) relay.
  1187. // The device is reported to have a flip-flop circuit to drive the relay
  1188. // So @Geitde hack is still the only possible
  1189. // Hack: drive GPIO12 low and use GPIO5 as normal relay pin:
  1190. #define RELAY1_PIN 5
  1191. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1192. #define LED2_PIN 12 /* DUMMY: exploit default off state for GPIO12=low */
  1193. #define LED2_PIN_INVERSE 0
  1194. // LEDs
  1195. #define LED1_PIN 4
  1196. #define LED1_PIN_INVERSE 0
  1197. // -----------------------------------------------------------------------------
  1198. // Generic 8CH
  1199. // -----------------------------------------------------------------------------
  1200. #elif defined(GENERIC_8CH)
  1201. // Info
  1202. #define MANUFACTURER "GENERIC"
  1203. #define DEVICE "8CH"
  1204. // Relays
  1205. #define RELAY1_PIN 0
  1206. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1207. #define RELAY2_PIN 2
  1208. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  1209. #define RELAY3_PIN 4
  1210. #define RELAY3_TYPE RELAY_TYPE_NORMAL
  1211. #define RELAY4_PIN 5
  1212. #define RELAY4_TYPE RELAY_TYPE_NORMAL
  1213. #define RELAY5_PIN 12
  1214. #define RELAY5_TYPE RELAY_TYPE_NORMAL
  1215. #define RELAY6_PIN 13
  1216. #define RELAY6_TYPE RELAY_TYPE_NORMAL
  1217. #define RELAY7_PIN 14
  1218. #define RELAY7_TYPE RELAY_TYPE_NORMAL
  1219. #define RELAY8_PIN 15
  1220. #define RELAY8_TYPE RELAY_TYPE_NORMAL
  1221. // -----------------------------------------------------------------------------
  1222. // STM RELAY
  1223. // -----------------------------------------------------------------------------
  1224. #elif defined(STM_RELAY)
  1225. // Info
  1226. #define MANUFACTURER "STM_RELAY"
  1227. #define DEVICE "2CH"
  1228. // Relays
  1229. #define DUMMY_RELAY_COUNT 2
  1230. #define RELAY_PROVIDER RELAY_PROVIDER_STM
  1231. // Remove UART noise on serial line
  1232. #define DEBUG_SERIAL_SUPPORT 0
  1233. // -----------------------------------------------------------------------------
  1234. // Tonbux Powerstrip02
  1235. // -----------------------------------------------------------------------------
  1236. #elif defined(TONBUX_POWERSTRIP02)
  1237. // Info
  1238. #define MANUFACTURER "TONBUX"
  1239. #define DEVICE "POWERSTRIP02"
  1240. // Buttons
  1241. #define BUTTON1_PIN 5
  1242. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1243. #define BUTTON1_RELAY 0
  1244. // Relays
  1245. #define RELAY1_PIN 4
  1246. #define RELAY1_TYPE RELAY_TYPE_INVERSE
  1247. #define RELAY2_PIN 13
  1248. #define RELAY2_TYPE RELAY_TYPE_INVERSE
  1249. #define RELAY3_PIN 12
  1250. #define RELAY3_TYPE RELAY_TYPE_INVERSE
  1251. #define RELAY4_PIN 14
  1252. #define RELAY4_TYPE RELAY_TYPE_INVERSE
  1253. // Not a relay. USB ports on/off
  1254. #define RELAY5_PIN 16
  1255. #define RELAY5_TYPE RELAY_TYPE_NORMAL
  1256. // LEDs
  1257. #define LED1_PIN 0 // 1 blue led
  1258. #define LED1_PIN_INVERSE 1
  1259. #define LED2_PIN 3 // 3 red leds
  1260. #define LED2_PIN_INVERSE 1
  1261. // -----------------------------------------------------------------------------
  1262. // Lingan SWA1
  1263. // -----------------------------------------------------------------------------
  1264. #elif defined(LINGAN_SWA1)
  1265. // Info
  1266. #define MANUFACTURER "LINGAN"
  1267. #define DEVICE "SWA1"
  1268. // Buttons
  1269. #define BUTTON1_PIN 13
  1270. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_SET_PULLUP | BUTTON_DEFAULT_HIGH
  1271. #define BUTTON1_RELAY 1
  1272. // Relays
  1273. #define RELAY1_PIN 5
  1274. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1275. // LEDs
  1276. #define LED1_PIN 4
  1277. #define LED1_PIN_INVERSE 1
  1278. // -----------------------------------------------------------------------------
  1279. // HEYGO HY02
  1280. // -----------------------------------------------------------------------------
  1281. #elif defined(HEYGO_HY02)
  1282. // Info
  1283. #define MANUFACTURER "HEYGO"
  1284. #define DEVICE "HY02"
  1285. // Buttons
  1286. #define BUTTON1_PIN 13
  1287. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1288. #define BUTTON1_RELAY 1
  1289. // Relays
  1290. #define RELAY1_PIN 12
  1291. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1292. // LEDs
  1293. #define LED1_PIN 4
  1294. #define LED1_PIN_INVERSE 0
  1295. // -----------------------------------------------------------------------------
  1296. // Maxcio W-US002S
  1297. // -----------------------------------------------------------------------------
  1298. #elif defined(MAXCIO_WUS002S)
  1299. // Info
  1300. #define MANUFACTURER "MAXCIO"
  1301. #define DEVICE "WUS002S"
  1302. // Buttons
  1303. #define BUTTON1_PIN 2
  1304. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1305. #define BUTTON1_RELAY 1
  1306. // Relays
  1307. #define RELAY1_PIN 13
  1308. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1309. // LEDs
  1310. #define LED1_PIN 3
  1311. #define LED1_PIN_INVERSE 0
  1312. // HLW8012
  1313. #ifndef HLW8012_SUPPORT
  1314. #define HLW8012_SUPPORT 1
  1315. #endif
  1316. #define HLW8012_SEL_PIN 12
  1317. #define HLW8012_CF1_PIN 5
  1318. #define HLW8012_CF_PIN 4
  1319. #define HLW8012_CURRENT_R 0.002 // Current resistor
  1320. #define HLW8012_VOLTAGE_R_UP ( 2 * 1000000 ) // Upstream voltage resistor
  1321. // -----------------------------------------------------------------------------
  1322. // YiDian XS-SSA05
  1323. // -----------------------------------------------------------------------------
  1324. #elif defined(YIDIAN_XSSSA05)
  1325. // Info
  1326. #define MANUFACTURER "YIDIAN"
  1327. #define DEVICE "XSSSA05"
  1328. // Buttons
  1329. #define BUTTON1_PIN 13
  1330. #define BUTTON1_MODE BUTTON_PUSHBUTTON
  1331. #define BUTTON1_RELAY 1
  1332. // Relays
  1333. #define RELAY1_PIN 12
  1334. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1335. // LEDs
  1336. #define LED1_PIN 4
  1337. #define LED1_PIN_INVERSE 0
  1338. // HLW8012
  1339. #ifndef HLW8012_SUPPORT
  1340. #define HLW8012_SUPPORT 1
  1341. #endif
  1342. #define HLW8012_SEL_PIN 3
  1343. #define HLW8012_CF1_PIN 14
  1344. #define HLW8012_CF_PIN 5
  1345. #define HLW8012_CURRENT_R 0.001 // Current resistor
  1346. #define HLW8012_VOLTAGE_R_UP ( 2 * 1200000 ) // Upstream voltage resistor
  1347. // -----------------------------------------------------------------------------
  1348. // TONBUX XS-SSA06
  1349. // -----------------------------------------------------------------------------
  1350. #elif defined(TONBUX_XSSSA06)
  1351. // Info
  1352. #define MANUFACTURER "TONBUX"
  1353. #define DEVICE "XSSSA06"
  1354. // Buttons
  1355. #define BUTTON1_PIN 13
  1356. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1357. #define BUTTON1_RELAY 1
  1358. // Relays
  1359. #define RELAY1_PIN 15
  1360. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1361. // LEDs
  1362. #define LED1_PIN 0 // R - 8 rgb led ring
  1363. #define LED1_PIN_INVERSE 0
  1364. #define LED2_PIN 5 // G
  1365. #define LED2_PIN_INVERSE 0
  1366. #define LED3_PIN 2 // B
  1367. #define LED3_PIN_INVERSE 0
  1368. // -----------------------------------------------------------------------------
  1369. // GREEN ESP8266 RELAY MODULE
  1370. // https://www.aliexpress.com/wholesale?catId=0&initiative_id=SB_20180323113846&SearchText=Green+ESP8266
  1371. // -----------------------------------------------------------------------------
  1372. #elif defined(GREEN_ESP8266RELAY)
  1373. // Info
  1374. #define MANUFACTURER "GREEN"
  1375. #define DEVICE "ESP8266RELAY"
  1376. // Buttons
  1377. // Not a button but input via Optocoupler
  1378. #define BUTTON1_PIN 5
  1379. #define BUTTON1_MODE BUTTON_PUSHBUTTON
  1380. #define BUTTON1_RELAY 1
  1381. // Relays
  1382. #define RELAY1_PIN 4
  1383. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1384. // LEDs
  1385. #define LED1_PIN 2
  1386. #define LED1_PIN_INVERSE 1
  1387. // -----------------------------------------------------------------------------
  1388. // Henrique Gravina ESPIKE
  1389. // https://github.com/Henriquegravina/Espike
  1390. // -----------------------------------------------------------------------------
  1391. #elif defined(IKE_ESPIKE)
  1392. #define MANUFACTURER "IKE"
  1393. #define DEVICE "ESPIKE"
  1394. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_NONE
  1395. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  1396. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  1397. #define BUTTON1_PIN 13
  1398. #define BUTTON1_RELAY 1
  1399. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1400. #define BUTTON2_PIN 12
  1401. #define BUTTON2_RELAY 2
  1402. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1403. #define BUTTON3_PIN 14
  1404. #define BUTTON3_RELAY 3
  1405. #define BUTTON3_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1406. #define RELAY1_PIN 4
  1407. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1408. #define RELAY2_PIN 5
  1409. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  1410. #define RELAY3_PIN 16
  1411. #define RELAY3_TYPE RELAY_TYPE_NORMAL
  1412. #define LED1_PIN 2
  1413. #define LED1_PIN_INVERSE 1
  1414. // -----------------------------------------------------------------------------
  1415. // SWIFITCH
  1416. // https://github.com/ArnieX/swifitch
  1417. // -----------------------------------------------------------------------------
  1418. #elif defined(ARNIEX_SWIFITCH)
  1419. // Info
  1420. #define MANUFACTURER "ARNIEX"
  1421. #define DEVICE "SWIFITCH"
  1422. // Buttons
  1423. #define BUTTON1_PIN 4 // D2
  1424. #define BUTTON1_MODE BUTTON_SWITCH | BUTTON_SET_PULLUP | BUTTON_DEFAULT_HIGH
  1425. #define BUTTON1_RELAY 1
  1426. #define BUTTON1_PRESS BUTTON_MODE_NONE
  1427. #define BUTTON1_CLICK BUTTON_MODE_TOGGLE
  1428. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  1429. #define BUTTON1_LNGCLICK BUTTON_MODE_NONE
  1430. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_NONE
  1431. // Relays
  1432. #define RELAY1_PIN 5 // D1
  1433. #define RELAY1_TYPE RELAY_TYPE_INVERSE
  1434. // LEDs
  1435. #define LED1_PIN 12 // D6
  1436. #define LED1_PIN_INVERSE 1
  1437. // -----------------------------------------------------------------------------
  1438. // ESP-01S RELAY v4.0
  1439. // https://www.aliexpress.com/wholesale?catId=0&initiative_id=SB_20180404024035&SearchText=esp-01s+relay
  1440. // -----------------------------------------------------------------------------
  1441. #elif defined(GENERIC_ESP01S_RELAY_V40)
  1442. // Info
  1443. #define MANUFACTURER "GENERIC"
  1444. #define DEVICE "ESP01S_RELAY_40"
  1445. // Relays
  1446. #define RELAY1_PIN 0
  1447. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1448. // LEDs
  1449. #define LED1_PIN 2
  1450. #define LED1_PIN_INVERSE 0
  1451. // -----------------------------------------------------------------------------
  1452. // ESP-01S RGB LED v1.0 (some sold with ws2818)
  1453. // https://www.aliexpress.com/wholesale?catId=0&initiative_id=SB_20180404023816&SearchText=esp-01s+led+controller
  1454. // -----------------------------------------------------------------------------
  1455. #elif defined(GENERIC_ESP01S_RGBLED_V10)
  1456. // Info
  1457. #define MANUFACTURER "GENERIC"
  1458. #define DEVICE "ESP01S_RGBLED_10"
  1459. // This board is sold as RGB LED module BUT it has on board 3 pin ph2.0 connector (VCC, GPIO2, GND)
  1460. // so, if you wish, you may connect LED, BUTTON, RELAY, SENSOR etc.
  1461. // Buttons
  1462. //#define BUTTON1_PIN 2
  1463. // Relays
  1464. //#define RELAY1_PIN 2
  1465. // LEDs
  1466. #define LED1_PIN 2
  1467. #define LED1_PIN_INVERSE 0
  1468. // -----------------------------------------------------------------------------
  1469. // ESP-01S DHT11 v1.0
  1470. // https://www.aliexpress.com/wholesale?catId=0&initiative_id=SB_20180410105907&SearchText=esp-01s+dht11
  1471. // -----------------------------------------------------------------------------
  1472. #elif defined(GENERIC_ESP01S_DHT11_V10)
  1473. // Info
  1474. #define MANUFACTURER "GENERIC"
  1475. #define DEVICE "ESP01S_DHT11_10"
  1476. // DHT11
  1477. #ifndef DHT_SUPPORT
  1478. #define DHT_SUPPORT 1
  1479. #endif
  1480. #define DHT_PIN 2
  1481. #define DHT_TYPE DHT_CHIP_DHT11
  1482. // -----------------------------------------------------------------------------
  1483. // ESP-01S DS18B20 v1.0
  1484. // https://www.aliexpress.com/wholesale?catId=0&initiative_id=SB_20180410105933&SearchText=esp-01s+ds18b20
  1485. // -----------------------------------------------------------------------------
  1486. #elif defined(GENERIC_ESP01S_DS18B20_V10)
  1487. // Info
  1488. #define MANUFACTURER "GENERIC"
  1489. #define DEVICE "ESP01S_DS18B20_10"
  1490. // DB18B20
  1491. #ifndef DALLAS_SUPPORT
  1492. #define DALLAS_SUPPORT 1
  1493. #endif
  1494. #define DALLAS_PIN 2
  1495. // -----------------------------------------------------------------------------
  1496. // ESP-DIN relay board V1
  1497. // https://github.com/pilotak/esp_din
  1498. // -----------------------------------------------------------------------------
  1499. #elif defined(PILOTAK_ESP_DIN_V1)
  1500. // Info
  1501. #define MANUFACTURER "PILOTAK"
  1502. #define DEVICE "ESP_DIN_V1"
  1503. // Buttons
  1504. #define BUTTON1_PIN 0
  1505. #define BUTTON1_RELAY 1
  1506. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1507. // Relays
  1508. #define RELAY1_PIN 4
  1509. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1510. #define RELAY2_PIN 5
  1511. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  1512. // LEDs
  1513. #define LED1_PIN 15
  1514. #define LED1_PIN_INVERSE 0
  1515. #define I2C_SDA_PIN 12
  1516. #define I2C_SCL_PIN 13
  1517. #ifndef DALLAS_SUPPORT
  1518. #define DALLAS_SUPPORT 1
  1519. #endif
  1520. #define DALLAS_PIN 2
  1521. #ifndef RF_SUPPORT
  1522. #define RF_SUPPORT 1
  1523. #endif
  1524. #define RF_PIN 14
  1525. #ifndef DIGITAL_SUPPORT
  1526. #define DIGITAL_SUPPORT 1
  1527. #endif
  1528. #define DIGITAL_PIN 16
  1529. #define DIGITAL_PIN_MODE INPUT
  1530. // -----------------------------------------------------------------------------
  1531. // Heltec Touch Relay
  1532. // https://www.aliexpress.com/wholesale?catId=0&initiative_id=SB_20180408043114&SearchText=esp8266+touch+relay
  1533. // -----------------------------------------------------------------------------
  1534. #elif defined(HELTEC_TOUCHRELAY)
  1535. // Info
  1536. #define MANUFACTURER "HELTEC"
  1537. #define DEVICE "TOUCH_RELAY"
  1538. // Buttons
  1539. #define BUTTON1_PIN 14
  1540. #define BUTTON1_RELAY 1
  1541. #define BUTTON1_MODE BUTTON_PUSHBUTTON
  1542. // Relays
  1543. #define RELAY1_PIN 12
  1544. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1545. // -----------------------------------------------------------------------------
  1546. // Zhilde ZLD-EU44-W
  1547. // http://www.zhilde.com/product/60705150109-805652505/EU_WiFi_Surge_Protector_Extension_Socket_4_Outlets_works_with_Amazon_Echo_Smart_Power_Strip.html
  1548. // -----------------------------------------------------------------------------
  1549. #elif defined(ZHILDE_EU44_W)
  1550. // Info
  1551. #define MANUFACTURER "ZHILDE"
  1552. #define DEVICE "EU44_W"
  1553. // Based on the reporter, this product uses GPIO1 and 3 for the button
  1554. // and onboard LED, so hardware serial should be disabled...
  1555. #define DEBUG_SERIAL_SUPPORT 0
  1556. // Buttons
  1557. #define BUTTON1_PIN 3
  1558. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1559. // Relays
  1560. #define RELAY1_PIN 5
  1561. #define RELAY2_PIN 4
  1562. #define RELAY3_PIN 12
  1563. #define RELAY4_PIN 13
  1564. #define RELAY5_PIN 14
  1565. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1566. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  1567. #define RELAY3_TYPE RELAY_TYPE_NORMAL
  1568. #define RELAY4_TYPE RELAY_TYPE_NORMAL
  1569. #define RELAY5_TYPE RELAY_TYPE_NORMAL
  1570. // LEDs
  1571. #define LED1_PIN 1
  1572. #define LED1_PIN_INVERSE 1
  1573. // -----------------------------------------------------------------------------
  1574. // Allnet 4duino ESP8266-UP-Relais
  1575. // http://www.allnet.de/de/allnet-brand/produkte/neuheiten/p/allnet-4duino-iot-wlan-relais-unterputz-esp8266-up-relais/
  1576. // https://shop.allnet.de/fileadmin/transfer/products/148814.pdf
  1577. // -----------------------------------------------------------------------------
  1578. #elif defined(ALLNET_4DUINO_IOT_WLAN_RELAIS)
  1579. // Info
  1580. #define MANUFACTURER "ALLNET"
  1581. #define DEVICE "4DUINO_IOT_WLAN_RELAIS"
  1582. // Relays
  1583. #define RELAY1_PIN 14
  1584. #define RELAY1_RESET_PIN 12
  1585. #define RELAY1_TYPE RELAY_TYPE_LATCHED
  1586. // LEDs
  1587. #define LED1_PIN 0
  1588. #define LED1_PIN_INVERSE 1
  1589. // Buttons
  1590. //#define BUTTON1_PIN 0
  1591. //#define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1592. // Using pins labelled as SDA & SCL as buttons
  1593. #define BUTTON2_PIN 4
  1594. #define BUTTON2_MODE BUTTON_PUSHBUTTON
  1595. #define BUTTON2_PRESS BUTTON_MODE_TOGGLE
  1596. #define BUTTON2_CLICK BUTTON_MODE_NONE
  1597. #define BUTTON2_DBLCLICK BUTTON_MODE_NONE
  1598. #define BUTTON2_LNGCLICK BUTTON_MODE_NONE
  1599. #define BUTTON2_LNGLNGCLICK BUTTON_MODE_NONE
  1600. #define BUTTON3_PIN 5
  1601. #define BUTTON3_MODE BUTTON_PUSHBUTTON
  1602. // Using pins labelled as SDA & SCL for I2C
  1603. //#define I2C_SDA_PIN 4
  1604. //#define I2C_SCL_PIN 5
  1605. // -----------------------------------------------------------------------------
  1606. // Luani HVIO
  1607. // https://luani.de/projekte/esp8266-hvio/
  1608. // https://luani.de/blog/esp8266-230v-io-modul/
  1609. // -----------------------------------------------------------------------------
  1610. #elif defined(LUANI_HVIO)
  1611. // Info
  1612. #define MANUFACTURER "LUANI"
  1613. #define DEVICE "HVIO"
  1614. // Buttons
  1615. #define BUTTON1_PIN 12
  1616. #define BUTTON1_RELAY 1
  1617. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1618. #define BUTTON1_DBLCLICK BUTTON_MODE_NONE
  1619. #define BUTTON2_PIN 13
  1620. #define BUTTON2_RELAY 2
  1621. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1622. // Relays
  1623. #define RELAY1_PIN 4
  1624. #define RELAY2_PIN 5
  1625. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1626. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  1627. // LEDs
  1628. #define LED1_PIN 15
  1629. #define LED1_PIN_INVERSE 0
  1630. // -----------------------------------------------------------------------------
  1631. // Tonbux 50-100M Smart Mosquito Killer USB
  1632. // https://www.aliexpress.com/item/Original-Tonbux-50-100M-Smart-Mosquito-Killer-USB-Plug-No-Noise-Repellent-App-Smart-Module/32859330820.html
  1633. // -----------------------------------------------------------------------------
  1634. #elif defined(TONBUX_MOSQUITO_KILLER)
  1635. // Info
  1636. #define MANUFACTURER "TONBUX"
  1637. #define DEVICE "MOSQUITO_KILLER"
  1638. // Buttons
  1639. #define BUTTON1_PIN 2
  1640. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1641. #define BUTTON1_RELAY 1
  1642. // Relays
  1643. #define RELAY1_PIN 5 // not a relay, fan
  1644. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1645. // LEDs
  1646. #define LED1_PIN 15 // blue led
  1647. #define LED1_PIN_INVERSE 1
  1648. #define LED1_MODE LED_MODE_WIFI
  1649. #define LED2_PIN 14 // red led
  1650. #define LED2_PIN_INVERSE 1
  1651. #define LED2_MODE LED_MODE_RELAY
  1652. #define LED3_PIN 12 // UV leds (1-2-3-4-5-6-7-8)
  1653. #define LED3_PIN_INVERSE 0
  1654. #define LED3_RELAY 1
  1655. #define LED4_PIN 16 // UV leds (9-10-11)
  1656. #define LED4_PIN_INVERSE 0
  1657. #define LED4_RELAY 1
  1658. // -----------------------------------------------------------------------------
  1659. // NEO Coolcam NAS-WR01W Wifi Smart Power Plug
  1660. // https://es.aliexpress.com/item/-/32854589733.html?spm=a219c.12010608.0.0.6d084e68xX0y5N
  1661. // https://www.fasttech.com/product/9649426-neo-coolcam-nas-wr01w-wifi-smart-power-plug-eu
  1662. // -----------------------------------------------------------------------------
  1663. #elif defined(NEO_COOLCAM_NAS_WR01W)
  1664. // Info
  1665. #define MANUFACTURER "NEO_COOLCAM"
  1666. #define DEVICE "NAS_WR01W"
  1667. // Buttons
  1668. #define BUTTON1_PIN 13
  1669. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1670. #define BUTTON1_RELAY 1
  1671. // Relays
  1672. #define RELAY1_PIN 12
  1673. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1674. // LEDs
  1675. #define LED1_PIN 4
  1676. #define LED1_PIN_INVERSE 1
  1677. // ------------------------------------------------------------------------------
  1678. // Estink Wifi Power Strip
  1679. // https://www.amazon.de/Steckdosenleiste-Ladeger%C3%A4t-Sprachsteuerung-SmartphonesTablets-Android/dp/B0796W5FZY
  1680. // Fornorm Wi-Fi USB Extension Socket (ZLD-34EU)
  1681. // https://www.aliexpress.com/item/Fornorm-WiFi-Extension-Socket-with-Surge-Protector-Smart-Power-Strip-3-Outlets-and-4-USB-Charging/32849743948.html
  1682. // -----------------------------------------------------------------------------
  1683. #elif defined(ESTINK_WIFI_POWER_STRIP)
  1684. // Info
  1685. #define MANUFACTURER "ESTINK"
  1686. #define DEVICE "WIFI_POWER_STRIP"
  1687. // Disable UART noise since this board uses GPIO3
  1688. #define DEBUG_SERIAL_SUPPORT 0
  1689. // Buttons
  1690. #define BUTTON1_PIN 16
  1691. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1692. #define BUTTON1_RELAY 4
  1693. // Relays
  1694. #define RELAY1_PIN 14 // USB power
  1695. #define RELAY2_PIN 13 // power plug 1
  1696. #define RELAY3_PIN 4 // power plug 2
  1697. #define RELAY4_PIN 15 // power plug 3
  1698. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1699. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  1700. #define RELAY3_TYPE RELAY_TYPE_NORMAL
  1701. #define RELAY4_TYPE RELAY_TYPE_NORMAL
  1702. // LEDs
  1703. #define LED1_PIN 0 // power led
  1704. #define LED2_PIN 12 // power plug 1
  1705. #define LED3_PIN 3 // power plug 2
  1706. #define LED4_PIN 5 // power plug 3
  1707. #define LED1_PIN_INVERSE 1
  1708. #define LED2_PIN_INVERSE 1
  1709. #define LED3_PIN_INVERSE 1
  1710. #define LED4_PIN_INVERSE 1
  1711. #define LED1_MODE LED_MODE_FINDME
  1712. #define LED2_MODE LED_MODE_FOLLOW
  1713. #define LED3_MODE LED_MODE_FOLLOW
  1714. #define LED4_MODE LED_MODE_FOLLOW
  1715. #define LED2_RELAY 2
  1716. #define LED3_RELAY 3
  1717. #define LED4_RELAY 4
  1718. // -----------------------------------------------------------------------------
  1719. // Bruno Horta's OnOfre
  1720. // https://www.bhonofre.pt/
  1721. // https://github.com/brunohorta82/BH_OnOfre/
  1722. // -----------------------------------------------------------------------------
  1723. #elif defined(BH_ONOFRE)
  1724. // Info
  1725. #define MANUFACTURER "BH"
  1726. #define DEVICE "ONOFRE"
  1727. // Buttons
  1728. #define BUTTON1_PIN 12
  1729. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH | BUTTON_SET_PULLUP
  1730. #define BUTTON1_RELAY 1
  1731. #define BUTTON2_PIN 13
  1732. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH | BUTTON_SET_PULLUP
  1733. #define BUTTON2_RELAY 2
  1734. // Relays
  1735. #define RELAY1_PIN 4
  1736. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1737. #define RELAY2_PIN 5
  1738. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  1739. // -----------------------------------------------------------------------------
  1740. // Several boards under different names uing a power chip labelled BL0937 or HJL-01
  1741. // * Blitzwolf (https://www.amazon.es/Inteligente-Temporización-Dispositivos-Cualquier-BlitzWolf/dp/B07BMQP142)
  1742. // * HomeCube (https://www.amazon.de/Steckdose-Homecube-intelligente-Verbrauchsanzeige-funktioniert/dp/B076Q2LKHG)
  1743. // * Coosa (https://www.amazon.com/COOSA-Monitoring-Function-Campatible-Assiatant/dp/B0788W9TDR)
  1744. // * Goosund (http://www.gosund.com/?m=content&c=index&a=show&catid=6&id=5)
  1745. // * Ablue (https://www.amazon.de/Intelligente-Steckdose-Ablue-Funktioniert-Assistant/dp/B076DRFRZC)
  1746. // -----------------------------------------------------------------------------
  1747. #elif defined(BLITZWOLF_BWSHP2)
  1748. // Info
  1749. #define MANUFACTURER "BLITZWOLF"
  1750. #define DEVICE "BWSHP2"
  1751. // Buttons
  1752. #define BUTTON1_PIN 13
  1753. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1754. #define BUTTON1_RELAY 1
  1755. // Relays
  1756. #define RELAY1_PIN 15
  1757. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1758. // LEDs
  1759. #define LED1_PIN 2
  1760. #define LED1_PIN_INVERSE 1
  1761. #define LED2_PIN 0
  1762. #define LED2_PIN_INVERSE 1
  1763. #define LED2_MODE LED_MODE_FINDME
  1764. #define LED2_RELAY 1
  1765. // HJL01 / BL0937
  1766. #ifndef HLW8012_SUPPORT
  1767. #define HLW8012_SUPPORT 1
  1768. #endif
  1769. #define HLW8012_SEL_PIN 12
  1770. #define HLW8012_CF1_PIN 14
  1771. #define HLW8012_CF_PIN 5
  1772. #define HLW8012_SEL_CURRENT LOW
  1773. #define HLW8012_CURRENT_RATIO 25740
  1774. #define HLW8012_VOLTAGE_RATIO 313400
  1775. #define HLW8012_POWER_RATIO 3414290
  1776. #define HLW8012_INTERRUPT_ON FALLING
  1777. // -----------------------------------------------------------------------------
  1778. // VANZAVANZU Smart Outlet Socket (based on BL0937 or HJL-01)
  1779. // https://www.amazon.com/Smart-Plug-Wifi-Mini-VANZAVANZU/dp/B078PHD6S5
  1780. // -----------------------------------------------------------------------------
  1781. #elif defined(VANZAVANZU_SMART_WIFI_PLUG_MINI)
  1782. // Info
  1783. #define MANUFACTURER "VANZAVANZU"
  1784. #define DEVICE "SMART_WIFI_PLUG_MINI"
  1785. // Buttons
  1786. #define BUTTON1_PIN 13
  1787. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1788. #define BUTTON1_RELAY 1
  1789. // Relays
  1790. #define RELAY1_PIN 15
  1791. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1792. // LEDs
  1793. #define LED1_PIN 2
  1794. #define LED1_PIN_INVERSE 1
  1795. #define LED2_PIN 0
  1796. #define LED2_PIN_INVERSE 1
  1797. #define LED2_MODE LED_MODE_FINDME
  1798. #define LED2_RELAY 1
  1799. // Disable UART noise
  1800. #define DEBUG_SERIAL_SUPPORT 0
  1801. // HJL01 / BL0937
  1802. #ifndef HLW8012_SUPPORT
  1803. #define HLW8012_SUPPORT 1
  1804. #endif
  1805. #define HLW8012_SEL_PIN 3
  1806. #define HLW8012_CF1_PIN 14
  1807. #define HLW8012_CF_PIN 5
  1808. #define HLW8012_SEL_CURRENT LOW
  1809. #define HLW8012_CURRENT_RATIO 25740
  1810. #define HLW8012_VOLTAGE_RATIO 313400
  1811. #define HLW8012_POWER_RATIO 3414290
  1812. #define HLW8012_INTERRUPT_ON FALLING
  1813. // -----------------------------------------------------------------------------
  1814. // Generic board with Geiger Counter
  1815. // -----------------------------------------------------------------------------
  1816. #elif defined(GENERIC_GEIGER_COUNTER)
  1817. // Info
  1818. #define MANUFACTURER "GENERIC"
  1819. #define DEVICE "GEIGER_COUNTER"
  1820. // Enable Geiger Counter
  1821. #define GEIGER_SUPPORT 1
  1822. // Disable uneeded modules
  1823. #define ALEXA_SUPPORT 0
  1824. #define SCHEDULER_SUPPORT 0
  1825. // -----------------------------------------------------------------------------
  1826. // TEST boards (do not use!!)
  1827. // -----------------------------------------------------------------------------
  1828. #elif defined(TRAVIS01)
  1829. // Info
  1830. #define MANUFACTURER "TravisCI"
  1831. #define DEVICE "Virtual board 01"
  1832. // Some buttons - pin 0
  1833. #define BUTTON1_PIN 0
  1834. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  1835. #define BUTTON1_RELAY 1
  1836. // Some relays - pin 1
  1837. #define RELAY1_PIN 1
  1838. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1839. // Some LEDs - pin 2
  1840. #define LED1_PIN 2
  1841. #define LED1_PIN_INVERSE 1
  1842. // A bit of I2C - pins 3,4
  1843. #define I2C_SDA_PIN 3
  1844. #define I2C_SCL_PIN 4
  1845. // And, as they say in "From Dusk till Dawn":
  1846. // This is a sensor blow out!
  1847. // Alright, we got white sensor, black sensor, spanish sensor, yellow sensor. We got hot sensor, cold sensor.
  1848. // We got wet sensor. We got smelly sensor. We got hairy sensor, bloody sensor. We got snapping sensor.
  1849. // We got silk sensor, velvet sensor, naugahyde sensor. We even got horse sensor, dog sensor, chicken sensor.
  1850. // C'mon, you want sensor, come on in sensor lovers!
  1851. // If we don’t got it, you don't want it!
  1852. #define AM2320_SUPPORT 1
  1853. #define BH1750_SUPPORT 1
  1854. #define BMX280_SUPPORT 1
  1855. #define SHT3X_I2C_SUPPORT 1
  1856. #define EMON_ADC121_SUPPORT 1
  1857. #define EMON_ADS1X15_SUPPORT 1
  1858. #define SHT3X_I2C_SUPPORT 1
  1859. #define SI7021_SUPPORT 1
  1860. #define PMSX003_SUPPORT 1
  1861. #define SENSEAIR_SUPPORT 1
  1862. // A bit of lights - pin 5
  1863. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  1864. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  1865. #define DUMMY_RELAY_COUNT 1
  1866. #define LIGHT_CHANNELS 1
  1867. #define LIGHT_CH1_PIN 5
  1868. #define LIGHT_CH1_INVERSE 0
  1869. // A bit of HLW8012 - pins 6,7,8
  1870. #ifndef HLW8012_SUPPORT
  1871. #define HLW8012_SUPPORT 1
  1872. #endif
  1873. #define HLW8012_SEL_PIN 6
  1874. #define HLW8012_CF1_PIN 7
  1875. #define HLW8012_CF_PIN 8
  1876. // A bit of Dallas - pin 9
  1877. #ifndef DALLAS_SUPPORT
  1878. #define DALLAS_SUPPORT 1
  1879. #endif
  1880. #define DALLAS_PIN 9
  1881. // A bit of ECH1560 - pins 10,11, 12
  1882. #ifndef ECH1560_SUPPORT
  1883. #define ECH1560_SUPPORT 1
  1884. #endif
  1885. #define ECH1560_CLK_PIN 10
  1886. #define ECH1560_MISO_PIN 11
  1887. #define ECH1560_INVERTED 12
  1888. #elif defined(TRAVIS02)
  1889. // Relay provider dual
  1890. #define MANUFACTURER "TravisCI"
  1891. #define DEVICE "Virtual board 02"
  1892. // A bit of CSE7766 - pin 1
  1893. #ifndef CSE7766_SUPPORT
  1894. #define CSE7766_SUPPORT 1
  1895. #endif
  1896. #define CSE7766_PIN 1
  1897. // Relay type dual - pins 2,3
  1898. #define RELAY_PROVIDER RELAY_PROVIDER_DUAL
  1899. #define RELAY1_PIN 2
  1900. #define RELAY2_PIN 3
  1901. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  1902. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  1903. // IR - pin 4
  1904. #define IR_SUPPORT 1
  1905. #define IR_PIN 4
  1906. #define IR_BUTTON_SET 1
  1907. // A bit of DHT - pin 5
  1908. #ifndef DHT_SUPPORT
  1909. #define DHT_SUPPORT 1
  1910. #endif
  1911. #define DHT_PIN 5
  1912. // A bit of TMP3X (analog)
  1913. #define TMP3X_SUPPORT 1
  1914. // A bit of EVENTS - pin 10
  1915. #define EVENTS_SUPPORT 1
  1916. #define EVENTS_PIN 6
  1917. // HC-RS04
  1918. #define HCSR04_SUPPORT 1
  1919. #define HCSR04_TRIGGER 7
  1920. #define HCSR04_ECHO 8
  1921. // MHZ19
  1922. #define MHZ19_SUPPORT 1
  1923. #define MHZ19_RX_PIN 9
  1924. #define MHZ19_TX_PIN 10
  1925. // PZEM004T
  1926. #define PZEM004T_SUPPORT 1
  1927. #define PZEM004T_RX_PIN 11
  1928. #define PZEM004T_TX_PIN 12
  1929. // V9261F
  1930. #define V9261F_SUPPORT 1
  1931. #define V9261F_PIN 13
  1932. // GUVAS12SD
  1933. #define GUVAS12SD_SUPPORT 1
  1934. #define GUVAS12SD_PIN 14
  1935. // Test non-default modules
  1936. #define MDNS_CLIENT_SUPPORT 1
  1937. #define NOFUSS_SUPPORT 1
  1938. #define UART_MQTT_SUPPORT 1
  1939. #define INFLUXDB_SUPPORT 1
  1940. #define IR_SUPPORT 1
  1941. #elif defined(TRAVIS03)
  1942. // Relay provider light/my92XX
  1943. #define MANUFACTURER "TravisCI"
  1944. #define DEVICE "Virtual board 03"
  1945. // MY9231 Light - pins 1,2
  1946. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  1947. #define LIGHT_PROVIDER LIGHT_PROVIDER_MY92XX
  1948. #define DUMMY_RELAY_COUNT 1
  1949. #define LIGHT_CHANNELS 5
  1950. #define MY92XX_MODEL MY92XX_MODEL_MY9231
  1951. #define MY92XX_CHIPS 2
  1952. #define MY92XX_DI_PIN 1
  1953. #define MY92XX_DCKI_PIN 2
  1954. #define MY92XX_COMMAND MY92XX_COMMAND_DEFAULT
  1955. #define MY92XX_MAPPING 4, 3, 5, 0, 1
  1956. // A bit of Analog EMON (analog)
  1957. #ifndef EMON_ANALOG_SUPPORT
  1958. #define EMON_ANALOG_SUPPORT 1
  1959. #endif
  1960. // Test non-default modules
  1961. #define LLMNR_SUPPORT 1
  1962. #define NETBIOS_SUPPORT 1
  1963. #define SSDP_SUPPORT 1
  1964. #endif
  1965. // -----------------------------------------------------------------------------
  1966. // Check definitions
  1967. // -----------------------------------------------------------------------------
  1968. //#if not defined(MANUFACTURER) || not defined(DEVICE)
  1969. // #error "UNSUPPORTED HARDWARE!!"
  1970. //#endif