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.

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