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.

1283 lines
37 KiB

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