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.

1266 lines
36 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 TRACK_RELAY_STATUS 0
  370. // Buttons
  371. #define BUTTON1_PIN 0
  372. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  373. // LEDs
  374. #define LED1_PIN 13
  375. #define LED1_PIN_INVERSE 1
  376. #elif defined(ITEAD_SONOFF_B1)
  377. // Info
  378. #define MANUFACTURER "ITEAD"
  379. #define DEVICE "SONOFF_B1"
  380. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  381. #define LIGHT_PROVIDER LIGHT_PROVIDER_MY9192
  382. #define DUMMY_RELAY_COUNT 1
  383. #define MY9291_DI_PIN 12
  384. #define MY9291_DCKI_PIN 14
  385. #define MY9291_COMMAND MY9291_COMMAND_DEFAULT
  386. #define MY9291_CHANNELS 5
  387. #elif defined(ITEAD_SONOFF_LED)
  388. // Info
  389. #define MANUFACTURER "ITEAD"
  390. #define DEVICE "SONOFF_LED"
  391. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  392. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  393. #define DUMMY_RELAY_COUNT 1
  394. // LEDs
  395. #define LED1_PIN 13
  396. #define LED1_PIN_INVERSE 1
  397. // Channels
  398. #define LIGHT_CHANNELS 2
  399. #define LIGHT_CH1_PIN 12 // Cold white
  400. #define LIGHT_CH2_PIN 14 // Warm white
  401. #define LIGHT_CH1_INVERSE 0
  402. #define LIGHT_CH2_INVERSE 0
  403. #elif defined(ITEAD_SONOFF_T1_1CH)
  404. // Info
  405. #define MANUFACTURER "ITEAD"
  406. #define DEVICE "SONOFF_T1_1CH"
  407. // Buttons
  408. #define BUTTON1_PIN 9
  409. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  410. #define BUTTON1_RELAY 1
  411. // Relays
  412. #define RELAY1_PIN 5
  413. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  414. // LEDs
  415. #define LED1_PIN 13
  416. #define LED1_PIN_INVERSE 1
  417. #elif defined(ITEAD_SONOFF_T1_2CH)
  418. // Info
  419. #define MANUFACTURER "ITEAD"
  420. #define DEVICE "SONOFF_T1_2CH"
  421. // Buttons
  422. #define BUTTON1_PIN 0
  423. #define BUTTON2_PIN 10
  424. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  425. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  426. #define BUTTON1_RELAY 1
  427. #define BUTTON2_RELAY 2
  428. // Relays
  429. #define RELAY1_PIN 12
  430. #define RELAY2_PIN 4
  431. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  432. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  433. // LEDs
  434. #define LED1_PIN 13
  435. #define LED1_PIN_INVERSE 1
  436. #elif defined(ITEAD_SONOFF_T1_3CH)
  437. // Info
  438. #define MANUFACTURER "ITEAD"
  439. #define DEVICE "SONOFF_T1_3CH"
  440. // Buttons
  441. #define BUTTON1_PIN 0
  442. #define BUTTON2_PIN 9
  443. #define BUTTON3_PIN 10
  444. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  445. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  446. #define BUTTON3_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  447. #define BUTTON1_RELAY 1
  448. #define BUTTON2_RELAY 2
  449. #define BUTTON3_RELAY 3
  450. // Relays
  451. #define RELAY1_PIN 12
  452. #define RELAY2_PIN 5
  453. #define RELAY3_PIN 4
  454. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  455. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  456. #define RELAY3_TYPE RELAY_TYPE_NORMAL
  457. // LEDs
  458. #define LED1_PIN 13
  459. #define LED1_PIN_INVERSE 1
  460. // -----------------------------------------------------------------------------
  461. // Electrodragon boards
  462. // -----------------------------------------------------------------------------
  463. #elif defined(ELECTRODRAGON_WIFI_IOT)
  464. // Info
  465. #define MANUFACTURER "ELECTRODRAGON"
  466. #define DEVICE "WIFI_IOT"
  467. // Buttons
  468. #define BUTTON1_PIN 0
  469. #define BUTTON2_PIN 2
  470. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  471. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  472. #define BUTTON1_RELAY 1
  473. #define BUTTON2_RELAY 2
  474. // Relays
  475. #define RELAY1_PIN 12
  476. #define RELAY2_PIN 13
  477. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  478. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  479. // LEDs
  480. #define LED1_PIN 16
  481. #define LED1_PIN_INVERSE 0
  482. // -----------------------------------------------------------------------------
  483. // WorkChoice ecoPlug
  484. // -----------------------------------------------------------------------------
  485. #elif defined(WORKCHOICE_ECOPLUG)
  486. // Info
  487. #define MANUFACTURER "WORKCHOICE"
  488. #define DEVICE "ECOPLUG"
  489. // Buttons
  490. #define BUTTON1_PIN 13
  491. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  492. #define BUTTON1_RELAY 1
  493. // Relays
  494. #define RELAY1_PIN 15
  495. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  496. // LEDs
  497. #define LED1_PIN 2
  498. #define LED1_PIN_INVERSE 0
  499. // -----------------------------------------------------------------------------
  500. // AI Thinker
  501. // -----------------------------------------------------------------------------
  502. #elif defined(AITHINKER_AI_LIGHT)
  503. // Info
  504. #define MANUFACTURER "AITHINKER"
  505. #define DEVICE "AI_LIGHT"
  506. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  507. #define LIGHT_PROVIDER LIGHT_PROVIDER_MY9192
  508. #define DUMMY_RELAY_COUNT 1
  509. #define MY9291_DI_PIN 13
  510. #define MY9291_DCKI_PIN 15
  511. #define MY9291_COMMAND MY9291_COMMAND_DEFAULT
  512. #define MY9291_CHANNELS 4
  513. // -----------------------------------------------------------------------------
  514. // LED Controller
  515. // -----------------------------------------------------------------------------
  516. #elif defined(MAGICHOME_LED_CONTROLLER)
  517. // Info
  518. #define MANUFACTURER "MAGICHOME"
  519. #define DEVICE "LED_CONTROLLER"
  520. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  521. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  522. #define DUMMY_RELAY_COUNT 1
  523. // LEDs
  524. #define LED1_PIN 2
  525. #define LED1_PIN_INVERSE 1
  526. // Channels
  527. #define LIGHT_CHANNELS 4
  528. #define LIGHT_CH1_PIN 14 // RED
  529. #define LIGHT_CH2_PIN 5 // GREEN
  530. #define LIGHT_CH3_PIN 12 // BLUE
  531. #define LIGHT_CH4_PIN 13 // WHITE
  532. #define LIGHT_CH1_INVERSE 0
  533. #define LIGHT_CH2_INVERSE 0
  534. #define LIGHT_CH3_INVERSE 0
  535. #define LIGHT_CH4_INVERSE 0
  536. // IR
  537. #define IR_SUPPORT 1
  538. #define IR_PIN 4
  539. #define IR_BUTTON_SET 1
  540. #elif defined(MAGICHOME_LED_CONTROLLER_20)
  541. // Info
  542. #define MANUFACTURER "MAGICHOME"
  543. #define DEVICE "LED_CONTROLLER_20"
  544. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  545. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  546. #define DUMMY_RELAY_COUNT 1
  547. //#define LIGHT_PROVIDER_EXPERIMENTAL_RGB_ONLY_HSV_IR
  548. // LEDs
  549. #define LED1_PIN 2
  550. #define LED1_PIN_INVERSE 1
  551. // Channels
  552. #define LIGHT_CHANNELS 4
  553. #define LIGHT_CH1_PIN 5 // RED
  554. #define LIGHT_CH2_PIN 12 // GREEN
  555. #define LIGHT_CH3_PIN 13 // BLUE
  556. #define LIGHT_CH4_PIN 15 // WHITE
  557. #define LIGHT_CH1_INVERSE 0
  558. #define LIGHT_CH2_INVERSE 0
  559. #define LIGHT_CH3_INVERSE 0
  560. #define LIGHT_CH4_INVERSE 0
  561. // IR
  562. #define IR_SUPPORT 1
  563. #define IR_PIN 4
  564. #define IR_BUTTON_SET 1
  565. // -----------------------------------------------------------------------------
  566. // HUACANXING H801 & H802
  567. // -----------------------------------------------------------------------------
  568. #elif defined(HUACANXING_H801)
  569. // Info
  570. #define MANUFACTURER "HUACANXING"
  571. #define DEVICE "H801"
  572. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  573. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  574. #define DUMMY_RELAY_COUNT 1
  575. // LEDs
  576. #define LED1_PIN 5
  577. #define LED1_PIN_INVERSE 1
  578. // Channels
  579. #define LIGHT_CHANNELS 5
  580. #define LIGHT_CH1_PIN 15 // RED
  581. #define LIGHT_CH2_PIN 13 // GREEN
  582. #define LIGHT_CH3_PIN 12 // BLUE
  583. #define LIGHT_CH4_PIN 14 // WHITE1
  584. #define LIGHT_CH5_PIN 4 // WHITE2
  585. #define LIGHT_CH1_INVERSE 0
  586. #define LIGHT_CH2_INVERSE 0
  587. #define LIGHT_CH3_INVERSE 0
  588. #define LIGHT_CH4_INVERSE 0
  589. #define LIGHT_CH5_INVERSE 0
  590. #elif defined(HUACANXING_H802)
  591. // Info
  592. #define MANUFACTURER "HUACANXING"
  593. #define DEVICE "H802"
  594. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  595. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  596. #define DUMMY_RELAY_COUNT 1
  597. // Channels
  598. #define LIGHT_CHANNELS 4
  599. #define LIGHT_CH1_PIN 12 // RED
  600. #define LIGHT_CH2_PIN 14 // GREEN
  601. #define LIGHT_CH3_PIN 13 // BLUE
  602. #define LIGHT_CH4_PIN 15 // WHITE
  603. #define LIGHT_CH1_INVERSE 0
  604. #define LIGHT_CH2_INVERSE 0
  605. #define LIGHT_CH3_INVERSE 0
  606. #define LIGHT_CH4_INVERSE 0
  607. // -----------------------------------------------------------------------------
  608. // Jan Goedeke Wifi Relay
  609. // https://github.com/JanGoe/esp8266-wifi-relay
  610. // -----------------------------------------------------------------------------
  611. #elif defined(JANGOE_WIFI_RELAY_NC)
  612. // Info
  613. #define MANUFACTURER "JANGOE"
  614. #define DEVICE "WIFI_RELAY_NC"
  615. // Buttons
  616. #define BUTTON1_PIN 12
  617. #define BUTTON2_PIN 13
  618. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  619. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  620. #define BUTTON1_RELAY 1
  621. #define BUTTON2_RELAY 2
  622. // Relays
  623. #define RELAY1_PIN 2
  624. #define RELAY2_PIN 14
  625. #define RELAY1_TYPE RELAY_TYPE_INVERSE
  626. #define RELAY2_TYPE RELAY_TYPE_INVERSE
  627. #elif defined(JANGOE_WIFI_RELAY_NO)
  628. // Info
  629. #define MANUFACTURER "JANGOE"
  630. #define DEVICE "WIFI_RELAY_NO"
  631. // Buttons
  632. #define BUTTON1_PIN 12
  633. #define BUTTON2_PIN 13
  634. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  635. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  636. #define BUTTON1_RELAY 1
  637. #define BUTTON2_RELAY 2
  638. // Relays
  639. #define RELAY1_PIN 2
  640. #define RELAY2_PIN 14
  641. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  642. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  643. // -----------------------------------------------------------------------------
  644. // Jorge García Wifi+Relays Board Kit
  645. // https://www.tindie.com/products/jorgegarciadev/wifi--relays-board-kit
  646. // https://github.com/jorgegarciadev/wifikit
  647. // -----------------------------------------------------------------------------
  648. #elif defined(JORGEGARCIA_WIFI_RELAYS)
  649. // Info
  650. #define MANUFACTURER "JORGEGARCIA"
  651. #define DEVICE "WIFI_RELAYS"
  652. // Relays
  653. #define RELAY1_PIN 0
  654. #define RELAY2_PIN 2
  655. #define RELAY1_TYPE RELAY_TYPE_INVERSE
  656. #define RELAY2_TYPE RELAY_TYPE_INVERSE
  657. // -----------------------------------------------------------------------------
  658. // WiFi MQTT Relay / Thermostat
  659. // -----------------------------------------------------------------------------
  660. #elif defined(OPENENERGYMONITOR_MQTT_RELAY)
  661. // Info
  662. #define MANUFACTURER "OPENENERGYMONITOR"
  663. #define DEVICE "MQTT_RELAY"
  664. // Buttons
  665. #define BUTTON1_PIN 0
  666. #define BUTTON1_RELAY 1
  667. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  668. // Relays
  669. #define RELAY1_PIN 12
  670. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  671. // LEDs
  672. #define LED1_PIN 16
  673. #define LED1_PIN_INVERSE 0
  674. // -----------------------------------------------------------------------------
  675. // WiOn 50055 Indoor Wi-Fi Wall Outlet & Tap
  676. // 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
  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-50055-Indoor-Wi-Fi-Wall-Tap-Monitor-Energy-Usage-Wireless-Smart-Switch-%2F263020837777
  678. // -----------------------------------------------------------------------------
  679. #elif defined(WION_50055)
  680. // Currently untested, does not support energy monitoring
  681. // Info
  682. #define MANUFACTURER "WION"
  683. #define DEVICE "50055"
  684. // Buttons
  685. #define BUTTON1_PIN 13
  686. #define BUTTON1_RELAY 1
  687. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  688. // Relays
  689. #define RELAY1_PIN 15
  690. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  691. // LEDs
  692. #define LED1_PIN 2
  693. #define LED1_PIN_INVERSE 0
  694. // -----------------------------------------------------------------------------
  695. // EX-Store Wifi Relay v3.1
  696. // https://ex-store.de/ESP8266-WiFi-Relay-V31
  697. // -----------------------------------------------------------------------------
  698. #elif defined(EXS_WIFI_RELAY_V31)
  699. // Untested
  700. // Info
  701. #define MANUFACTURER "EXS"
  702. #define DEVICE "WIFI_RELAY_V31"
  703. // Buttons
  704. #define BUTTON1_PIN 0
  705. #define BUTTON1_RELAY 1
  706. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  707. // Relays
  708. #define RELAY1_PIN 13
  709. #define RELAY1_TYPE RELAY_TYPE_LATCHED
  710. #define RELAY1_RESET_PIN 12
  711. // -----------------------------------------------------------------------------
  712. // V9261F
  713. // -----------------------------------------------------------------------------
  714. #elif defined(GENERIC_V9261F)
  715. // Info
  716. #define MANUFACTURER "GENERIC"
  717. #define DEVICE "V9261F"
  718. // V9261F
  719. #define POWER_PROVIDER POWER_PROVIDER_V9261F
  720. #define V9261F_PIN 2
  721. #define V9261F_PIN_INVERSE 1
  722. // -----------------------------------------------------------------------------
  723. // ECH1560
  724. // -----------------------------------------------------------------------------
  725. #elif defined(GENERIC_ECH1560)
  726. // Info
  727. #define MANUFACTURER "GENERIC"
  728. #define DEVICE "ECH1560"
  729. // ECH1560
  730. #define POWER_PROVIDER POWER_PROVIDER_ECH1560
  731. #define ECH1560_CLK_PIN 4
  732. #define ECH1560_MISO_PIN 5
  733. #define ECH1560_INVERTED 0
  734. // -----------------------------------------------------------------------------
  735. // ESPLive
  736. // https://github.com/ManCaveMade/ESP-Live
  737. // -----------------------------------------------------------------------------
  738. #elif defined(MANCAVEMADE_ESPLIVE)
  739. // Info
  740. #define MANUFACTURER "MANCAVEMADE"
  741. #define DEVICE "ESPLIVE"
  742. // Buttons
  743. #define BUTTON1_PIN 4
  744. #define BUTTON2_PIN 5
  745. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  746. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  747. #define BUTTON1_RELAY 1
  748. #define BUTTON2_RELAY 2
  749. // Relays
  750. #define RELAY1_PIN 12
  751. #define RELAY2_PIN 13
  752. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  753. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  754. // DB18B20
  755. #define DS18B20_SUPPORT 1
  756. #define DS18B20_PIN 2
  757. #define DS18B20_UPDATE_INTERVAL 5000
  758. #define DS18B20_UPDATE_ON_CHANGE 1.0
  759. // -----------------------------------------------------------------------------
  760. // QuinLED
  761. // http://blog.quindorian.org/2017/02/esp8266-led-lighting-quinled-v2-6-pcb.html
  762. // -----------------------------------------------------------------------------
  763. #elif defined(INTERMITTECH_QUINLED)
  764. // Info
  765. #define MANUFACTURER "INTERMITTECH"
  766. #define DEVICE "QUINLED"
  767. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  768. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  769. #define DUMMY_RELAY_COUNT 1
  770. // LEDs
  771. #define LED1_PIN 5
  772. #define LED1_PIN_INVERSE 1
  773. // Channels
  774. #define LIGHT_CHANNELS 2
  775. #define LIGHT_CH1_PIN 0
  776. #define LIGHT_CH2_PIN 2
  777. #define LIGHT_CH1_INVERSE 0
  778. #define LIGHT_CH2_INVERSE 0
  779. // -----------------------------------------------------------------------------
  780. // Arilux AL-LC06
  781. // -----------------------------------------------------------------------------
  782. #elif defined(ARILUX_AL_LC06)
  783. // Info
  784. #define MANUFACTURER "ARILUX"
  785. #define DEVICE "AL-LC06"
  786. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  787. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  788. #define DUMMY_RELAY_COUNT 1
  789. // Channels
  790. #define LIGHT_CHANNELS 5
  791. #define LIGHT_CH1_PIN 12 // RED
  792. #define LIGHT_CH2_PIN 14 // GREEN
  793. #define LIGHT_CH3_PIN 13 // BLUE
  794. #define LIGHT_CH4_PIN 15 // WHITE1
  795. #define LIGHT_CH5_PIN 5 // WHITE2
  796. #define LIGHT_CH1_INVERSE 0
  797. #define LIGHT_CH2_INVERSE 0
  798. #define LIGHT_CH3_INVERSE 0
  799. #define LIGHT_CH4_INVERSE 0
  800. #define LIGHT_CH5_INVERSE 0
  801. // -----------------------------------------------------------------------------
  802. // XENON SM-PW701U
  803. // -----------------------------------------------------------------------------
  804. #elif defined(XENON_SM_PW702U)
  805. // Info
  806. #define MANUFACTURER "XENON"
  807. #define DEVICE "SM_PW702U"
  808. // Buttons
  809. #define BUTTON1_PIN 13
  810. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
  811. #define BUTTON1_RELAY 1
  812. // Relays
  813. #define RELAY1_PIN 12
  814. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  815. // LEDs
  816. #define LED1_PIN 4
  817. #define LED1_PIN_INVERSE 1
  818. // -----------------------------------------------------------------------------
  819. // AUTHOMETION LYT8266
  820. // https://authometion.com/shop/en/home/13-lyt8266.html
  821. // -----------------------------------------------------------------------------
  822. #elif defined(AUTHOMETION_LYT8266)
  823. // Info
  824. #define MANUFACTURER "AUTHOMETION"
  825. #define DEVICE "LYT8266"
  826. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  827. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  828. #define DUMMY_RELAY_COUNT 1
  829. // Channels
  830. #define LIGHT_CHANNELS 4
  831. #define LIGHT_CH1_PIN 13 // RED
  832. #define LIGHT_CH2_PIN 12 // GREEN
  833. #define LIGHT_CH3_PIN 14 // BLUE
  834. #define LIGHT_CH4_PIN 2 // WHITE
  835. #define LIGHT_CH1_INVERSE 0
  836. #define LIGHT_CH2_INVERSE 0
  837. #define LIGHT_CH3_INVERSE 0
  838. #define LIGHT_CH4_INVERSE 0
  839. #define LIGHT_ENABLE_PIN 15
  840. // -----------------------------------------------------------------------------
  841. // Unknown hardware
  842. // -----------------------------------------------------------------------------
  843. #else
  844. #error "UNSUPPORTED HARDWARE!"
  845. #endif
  846. // -----------------------------------------------------------------------------
  847. // Default values
  848. // -----------------------------------------------------------------------------
  849. #ifndef BUTTON1_PRESS
  850. #define BUTTON1_PRESS BUTTON_MODE_NONE
  851. #endif
  852. #ifndef BUTTON2_PRESS
  853. #define BUTTON2_PRESS BUTTON_MODE_NONE
  854. #endif
  855. #ifndef BUTTON3_PRESS
  856. #define BUTTON3_PRESS BUTTON_MODE_NONE
  857. #endif
  858. #ifndef BUTTON4_PRESS
  859. #define BUTTON4_PRESS BUTTON_MODE_NONE
  860. #endif
  861. #ifndef BUTTON1_CLICK
  862. #define BUTTON1_CLICK BUTTON_MODE_TOGGLE
  863. #endif
  864. #ifndef BUTTON2_CLICK
  865. #define BUTTON2_CLICK BUTTON_MODE_TOGGLE
  866. #endif
  867. #ifndef BUTTON3_CLICK
  868. #define BUTTON3_CLICK BUTTON_MODE_TOGGLE
  869. #endif
  870. #ifndef BUTTON4_CLICK
  871. #define BUTTON4_CLICK BUTTON_MODE_TOGGLE
  872. #endif
  873. #ifndef BUTTON1_DBLCLICK
  874. #define BUTTON1_DBLCLICK BUTTON_MODE_AP
  875. #endif
  876. #ifndef BUTTON2_DBLCLICK
  877. #define BUTTON2_DBLCLICK BUTTON_MODE_NONE
  878. #endif
  879. #ifndef BUTTON3_DBLCLICK
  880. #define BUTTON3_DBLCLICK BUTTON_MODE_NONE
  881. #endif
  882. #ifndef BUTTON4_DBLCLICK
  883. #define BUTTON4_DBLCLICK BUTTON_MODE_NONE
  884. #endif
  885. #ifndef BUTTON1_LNGCLICK
  886. #define BUTTON1_LNGCLICK BUTTON_MODE_RESET
  887. #endif
  888. #ifndef BUTTON2_LNGCLICK
  889. #define BUTTON2_LNGCLICK BUTTON_MODE_NONE
  890. #endif
  891. #ifndef BUTTON3_LNGCLICK
  892. #define BUTTON3_LNGCLICK BUTTON_MODE_NONE
  893. #endif
  894. #ifndef BUTTON4_LNGCLICK
  895. #define BUTTON4_LNGCLICK BUTTON_MODE_NONE
  896. #endif
  897. #ifndef BUTTON1_LNGLNGCLICK
  898. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_FACTORY
  899. #endif
  900. #ifndef BUTTON2_LNGLNGCLICK
  901. #define BUTTON2_LNGLNGCLICK BUTTON_MODE_NONE
  902. #endif
  903. #ifndef BUTTON3_LNGLNGCLICK
  904. #define BUTTON3_LNGLNGCLICK BUTTON_MODE_NONE
  905. #endif
  906. #ifndef BUTTON4_LNGLNGCLICK
  907. #define BUTTON4_LNGLNGCLICK BUTTON_MODE_NONE
  908. #endif
  909. #ifndef BUTTON1_RELAY
  910. #define BUTTON1_RELAY 0
  911. #endif
  912. #ifndef BUTTON2_RELAY
  913. #define BUTTON2_RELAY 0
  914. #endif
  915. #ifndef BUTTON3_RELAY
  916. #define BUTTON3_RELAY 0
  917. #endif
  918. #ifndef BUTTON4_RELAY
  919. #define BUTTON4_RELAY 0
  920. #endif
  921. #ifndef RELAY1_RESET_PIN
  922. #define RELAY1_RESET_PIN 0
  923. #endif
  924. #ifndef RELAY2_RESET_PIN
  925. #define RELAY2_RESET_PIN 0
  926. #endif
  927. #ifndef RELAY3_RESET_PIN
  928. #define RELAY3_RESET_PIN 0
  929. #endif
  930. #ifndef RELAY4_RESET_PIN
  931. #define RELAY4_RESET_PIN 0
  932. #endif
  933. #ifndef RELAY1_DELAY_ON
  934. #define RELAY1_DELAY_ON 0
  935. #endif
  936. #ifndef RELAY2_DELAY_ON
  937. #define RELAY2_DELAY_ON 0
  938. #endif
  939. #ifndef RELAY3_DELAY_ON
  940. #define RELAY3_DELAY_ON 0
  941. #endif
  942. #ifndef RELAY4_DELAY_ON
  943. #define RELAY4_DELAY_ON 0
  944. #endif
  945. #ifndef RELAY1_DELAY_OFF
  946. #define RELAY1_DELAY_OFF 0
  947. #endif
  948. #ifndef RELAY2_DELAY_OFF
  949. #define RELAY2_DELAY_OFF 0
  950. #endif
  951. #ifndef RELAY3_DELAY_OFF
  952. #define RELAY3_DELAY_OFF 0
  953. #endif
  954. #ifndef RELAY4_DELAY_OFF
  955. #define RELAY4_DELAY_OFF 0
  956. #endif
  957. #ifndef RELAY1_LED
  958. #define RELAY1_LED 0
  959. #endif
  960. #ifndef RELAY2_LED
  961. #define RELAY2_LED 0
  962. #endif
  963. #ifndef RELAY3_LED
  964. #define RELAY3_LED 0
  965. #endif
  966. #ifndef RELAY4_LED
  967. #define RELAY4_LED 0
  968. #endif
  969. // Needed for ESP8285 boards under Windows using PlatformIO (?)
  970. #ifndef BUTTON_PUSHBUTTON
  971. #define BUTTON_PUSHBUTTON 0
  972. #define BUTTON_SWITCH 1
  973. #define BUTTON_DEFAULT_HIGH 2
  974. #define BUTTON_SET_PULLUP 4
  975. #endif
  976. // Does the board track the relay status?
  977. #ifndef TRACK_RELAY_STATUS
  978. #define TRACK_RELAY_STATUS 1
  979. #endif
  980. // Serial baudrate
  981. #ifndef SERIAL_BAUDRATE
  982. #define SERIAL_BAUDRATE 115200
  983. #endif
  984. // Relay providers
  985. #ifndef RELAY_PROVIDER
  986. #define RELAY_PROVIDER RELAY_PROVIDER_RELAY
  987. #endif
  988. // Light provider
  989. #ifndef LIGHT_PROVIDER
  990. #define LIGHT_PROVIDER LIGHT_PROVIDER_NONE
  991. #endif