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.

688 lines
20 KiB

6 years ago
6 years ago
  1. // -----------------------------------------------------------------------------
  2. // Devices
  3. // -----------------------------------------------------------------------------
  4. // New devices have to be added just before the DEVICE_LAST line,
  5. // then add configuration in the hardware.ino
  6. enum devices {
  7. DEVICE_UNKNOWN,
  8. DEVICE_CUSTOM,
  9. DEVICE_NODEMCU_LOLIN,
  10. DEVICE_WEMOS_D1_MINI_RELAYSHIELD,
  11. DEVICE_ITEAD_SONOFF_BASIC,
  12. DEVICE_ITEAD_SONOFF_TH,
  13. DEVICE_ITEAD_SONOFF_SV,
  14. DEVICE_ITEAD_SONOFF_TOUCH,
  15. DEVICE_ITEAD_SONOFF_POW,
  16. DEVICE_ITEAD_SONOFF_DUAL,
  17. DEVICE_ITEAD_1CH_INCHING,
  18. DEVICE_ITEAD_SONOFF_4CH,
  19. DEVICE_ITEAD_SLAMPHER,
  20. DEVICE_ITEAD_S20,
  21. DEVICE_ELECTRODRAGON_WIFI_IOT,
  22. DEVICE_WORKCHOICE_ECOPLUG,
  23. DEVICE_JANGOE_WIFI_RELAY_NC,
  24. DEVICE_JANGOE_WIFI_RELAY_NO,
  25. DEVICE_OPENENERGYMONITOR_MQTT_RELAY,
  26. DEVICE_JORGEGARCIA_WIFI_RELAYS,
  27. DEVICE_AITHINKER_AI_LIGHT,
  28. DEVICE_MAGICHOME_LED_CONTROLLER,
  29. DEVICE_ITEAD_MOTOR,
  30. DEVICE_TINKERMAN_ESPURNA_H06,
  31. DEVICE_HUACANXING_H801,
  32. DEVICE_ITEAD_BNSZ01,
  33. DEVICE_ITEAD_SONOFF_RFBRIDGE,
  34. DEVICE_ITEAD_SONOFF_4CH_PRO,
  35. DEVICE_ITEAD_SONOFF_B1,
  36. DEVICE_ITEAD_SONOFF_LED,
  37. DEVICE_ITEAD_SONOFF_T1_1CH,
  38. DEVICE_ITEAD_SONOFF_T1_2CH,
  39. DEVICE_ITEAD_SONOFF_T1_3CH,
  40. DEVICE_ITEAD_SONOFF_RF,
  41. DEVICE_WION_50055,
  42. DEVICE_EXS_WIFI_RELAY_V31,
  43. DEVICE_HUACANXING_H802,
  44. DEVICE_GENERIC_V9261F,
  45. DEVICE_GENERIC_ECH1560,
  46. DEVICE_TINKERMAN_ESPURNA_H08,
  47. DEVICE_MANCAVEMADE_ESPLIVE,
  48. DEVICE_INTERMITTECH_QUINLED,
  49. DEVICE_MAGICHOME_LED_CONTROLLER_20,
  50. DEVICE_ARILUX_AL_LC06,
  51. DEVICE_XENON_SM_PW702U,
  52. DEVICE_AUTHOMETION_LYT8266,
  53. DEVICE_ARILUX_E27,
  54. DEVICE_YJZK_SWITCH_2CH,
  55. DEVICE_ITEAD_SONOFF_DUAL_R2,
  56. DEVICE_GENERIC_8CH,
  57. DEVICE_ARILUX_AL_LC01,
  58. DEVICE_ARILUX_AL_LC11,
  59. DEVICE_ARILUX_AL_LC02,
  60. DEVICE_KMC_70011,
  61. DEVICE_GIZWITS_WITTY_CLOUD,
  62. DEVICE_EUROMATE_WIFI_STECKER_SCHUKO,
  63. DEVICE_TONBUX_POWERSTRIP02,
  64. DEVICE_LINGAN_SWA1,
  65. DEVICE_HEYGO_HY02,
  66. DEVICE_MAXCIO_WUS002S,
  67. DEVICE_YIDIAN_XSSSA05,
  68. DEVICE_TONBUX_XSSSA06,
  69. DEVICE_GREEN_ESP8266RELAY,
  70. DEVICE_IKE_ESPIKE,
  71. DEVICE_ARNIEX_SWIFITCH,
  72. DEVICE_GENERIC_ESP01S_RELAY_V40,
  73. DEVICE_GENERIC_ESP01S_RGBLED_V10,
  74. DEVICE_HELTEC_TOUCHRELAY,
  75. DEVICE_GENERIC_ESP01S_DHT11_V10,
  76. DEVICE_GENERIC_ESP01S_DS18B20_V10,
  77. DEVICE_ZHILDE_EU44_W,
  78. DEVICE_ITEAD_SONOFF_POW_R2,
  79. DEVICE_LUANI_HVIO,
  80. DEVICE_ALLNET_4DUINO_IOT_WLAN_RELAIS,
  81. DEVICE_TONBUX_MOSQUITO_KILLER,
  82. DEVICE_NEO_COOLCAM_NAS_WR01W,
  83. DEVICE_PILOTAK_ESP_DIN_V1,
  84. DEVICE_ESTINK_WIFI_POWER_STRIP,
  85. DEVICE_BH_ONOFRE,
  86. DEVICE_BLITZWOLF_BWSHP2,
  87. DEVICE_TINKERMAN_ESPURNA_SWITCH,
  88. DEVICE_ITEAD_SONOFF_S31,
  89. DEVICE_STM_RELAY,
  90. DEVICE_VANZAVANZU_SMART_WIFI_PLUG_MINI,
  91. DEVICE_GENERIC_GEIGER_COUNTER,
  92. DEVICE_TINKERMAN_RFM69GW,
  93. DEVICE_ITEAD_SONOFF_IFAN02,
  94. DEVICE_GENERIC_AG_L4,
  95. DEVICE_HOMECUBE_16A,
  96. DEVICE_ALLTERCO_SHELLY1,
  97. DEVICE_LOHAS_9W,
  98. DEVICE_YJZK_SWITCH_1CH,
  99. DEVICE_YJZK_SWITCH_3CH,
  100. DEVICE_LAST
  101. };
  102. // -----------------------------------------------------------------------------
  103. // Board => Image type
  104. // -----------------------------------------------------------------------------
  105. #if \
  106. defined(ALLNET_4DUINO_IOT_WLAN_RELAIS) || \
  107. defined(ALLTERCO_SHELLY1) || \
  108. defined(ARNIEX_SWIFITCH) || \
  109. defined(BH_ONOFRE) || \
  110. defined(ELECTRODRAGON_WIFI_IOT) || \
  111. defined(ESTINK_WIFI_POWER_STRIP) || \
  112. defined(EUROMATE_WIFI_STECKER_SCHUKO) || \
  113. defined(EXS_WIFI_RELAY_V31) || \
  114. defined(GENERIC_8CH) || \
  115. defined(GENERIC_ESP01S_RELAY_V40) || \
  116. defined(GENERIC_ESP01S_RGBLED_V10) || \
  117. defined(GREEN_ESP8266RELAY) || \
  118. defined(HELTEC_TOUCHRELAY) || \
  119. defined(HEYGO_HY02) || \
  120. defined(IKE_ESPIKE) || \
  121. defined(ITEAD_1CH_INCHING) || \
  122. defined(ITEAD_MOTOR) || \
  123. defined(ITEAD_S20) || \
  124. defined(ITEAD_SLAMPHER) || \
  125. defined(ITEAD_SONOFF_4CH) || \
  126. defined(ITEAD_SONOFF_4CH_PRO) || \
  127. defined(ITEAD_SONOFF_BASIC) || \
  128. defined(ITEAD_SONOFF_DUAL_R2) || \
  129. defined(ITEAD_SONOFF_IFAN02) || \
  130. defined(ITEAD_SONOFF_RF) || \
  131. defined(ITEAD_SONOFF_SV) || \
  132. defined(ITEAD_SONOFF_T1_1CH) || \
  133. defined(ITEAD_SONOFF_T1_2CH) || \
  134. defined(ITEAD_SONOFF_T1_3CH) || \
  135. defined(ITEAD_SONOFF_TOUCH) || \
  136. defined(JANGOE_WIFI_RELAY_NC) || \
  137. defined(JANGOE_WIFI_RELAY_NO) || \
  138. defined(JORGEGARCIA_WIFI_RELAYS) || \
  139. defined(LINGAN_SWA1) || \
  140. defined(LUANI_HVIO) || \
  141. defined(NEO_COOLCAM_NAS_WR01W) || \
  142. defined(NODEMCU_LOLIN) || \
  143. defined(OPENENERGYMONITOR_MQTT_RELAY) || \
  144. defined(TINKERMAN_ESPURNA_SWITCH) || \
  145. defined(TONBUX_MOSQUITO_KILLER) || \
  146. defined(TONBUX_POWERSTRIP02) || \
  147. defined(TONBUX_XSSSA06) || \
  148. defined(WEMOS_D1_MINI_RELAYSHIELD) || \
  149. defined(WION_50055) || \
  150. defined(WORKCHOICE_ECOPLUG) || \
  151. defined(XENON_SM_PW702U) || \
  152. defined(YJZK_SWITCH_1CH) || \
  153. defined(YJZK_SWITCH_2CH) || \
  154. defined(YJZK_SWITCH_3CH) || \
  155. defined(ZHILDE_EU44_W)
  156. #undef ESPURNA_IMAGE
  157. #define ESPURNA_IMAGE ESPURNA_BASIC
  158. // -----------------------------------------------------------------------------
  159. #elif \
  160. defined(BLITZWOLF_BWSHP2) || \
  161. defined(HOMECUBE_16A) || \
  162. defined(ITEAD_SONOFF_POW) || \
  163. defined(KMC_70011) || \
  164. defined(MAXCIO_WUS002S) || \
  165. defined(TINKERMAN_ESPURNA_H06) || \
  166. defined(TINKERMAN_ESPURNA_H08) || \
  167. defined(VANZAVANZU_SMART_WIFI_PLUG_MINI) || \
  168. defined(YIDIAN_XSSSA05)
  169. #undef ESPURNA_IMAGE
  170. #define ESPURNA_IMAGE ESPURNA_HLW8012
  171. // -----------------------------------------------------------------------------
  172. #elif \
  173. defined(ITEAD_SONOFF_POW_R2) || \
  174. defined(ITEAD_SONOFF_S31)
  175. #undef ESPURNA_IMAGE
  176. #define ESPURNA_IMAGE ESPURNA_CSE77XX
  177. // -----------------------------------------------------------------------------
  178. #elif defined(GENERIC_V9261F)
  179. #undef ESPURNA_IMAGE
  180. #define ESPURNA_IMAGE ESPURNA_V9261F
  181. // -----------------------------------------------------------------------------
  182. #elif defined(GENERIC_ECH1560)
  183. #undef ESPURNA_IMAGE
  184. #define ESPURNA_IMAGE ESPURNA_ECH1560
  185. // -----------------------------------------------------------------------------
  186. #elif \
  187. defined(ARILUX_AL_LC01) || \
  188. defined(ARILUX_AL_LC02) || \
  189. defined(ARILUX_AL_LC06) || \
  190. defined(ARILUX_AL_LC11) || \
  191. defined(AUTHOMETION_LYT8266) || \
  192. defined(GENERIC_AG_L4) || \
  193. defined(HUACANXING_H801) || \
  194. defined(HUACANXING_H802) || \
  195. defined(INTERMITTECH_QUINLED) || \
  196. defined(ITEAD_BNSZ01) || \
  197. defined(ITEAD_SONOFF_LED)
  198. #undef ESPURNA_IMAGE
  199. #define ESPURNA_IMAGE ESPURNA_DIMMER
  200. // -----------------------------------------------------------------------------
  201. #elif \
  202. defined(AITHINKER_AI_LIGHT) || \
  203. defined(ARILUX_E27) || \
  204. defined(ITEAD_SONOFF_B1) || \
  205. defined(LOHAS_9W)
  206. #undef ESPURNA_IMAGE
  207. #define ESPURNA_IMAGE ESPURNA_MY92XX
  208. // -----------------------------------------------------------------------------
  209. #elif \
  210. defined(GENERIC_ESP01S_DHT11_V10) || \
  211. defined(GENERIC_ESP01S_DS18B20_V10) || \
  212. defined(ITEAD_SONOFF_TH) || \
  213. defined(MANCAVEMADE_ESPLIVE)
  214. #undef ESPURNA_IMAGE
  215. #define ESPURNA_IMAGE ESPURNA_SENSOR
  216. // -----------------------------------------------------------------------------
  217. #elif defined(TINKERMAN_RFM69GW)
  218. #undef ESPURNA_IMAGE
  219. #define ESPURNA_IMAGE ESPURNA_RFM69
  220. // -----------------------------------------------------------------------------
  221. #elif defined(ITEAD_SONOFF_DUAL)
  222. #undef ESPURNA_IMAGE
  223. #define ESPURNA_IMAGE ESPURNA_SONOFF_DUAL
  224. // -----------------------------------------------------------------------------
  225. #elif defined(STM_RELAY)
  226. #undef ESPURNA_IMAGE
  227. #define ESPURNA_IMAGE ESPURNA_STM
  228. // -----------------------------------------------------------------------------
  229. #elif defined(GENERIC_GEIGER_COUNTER)
  230. #undef ESPURNA_IMAGE
  231. #define ESPURNA_IMAGE ESPURNA_GEIGER
  232. // -----------------------------------------------------------------------------
  233. // PENDING
  234. // -----------------------------------------------------------------------------
  235. #elif defined(ITEAD_SONOFF_RFBRIDGE)
  236. #undef ESPURNA_IMAGE
  237. #define ESPURNA_IMAGE ESPURNA_SONOFF_RFBRIDGE
  238. // Info
  239. #define RELAY_PROVIDER RELAY_PROVIDER_RFBRIDGE
  240. // RFB Direct hack thanks to @wildwiz
  241. // https://github.com/xoseperez/espurna/wiki/Hardware-Itead-Sonoff-RF-Bridge---Direct-Hack
  242. #ifndef RFB_DIRECT
  243. #define RFB_DIRECT 0
  244. #endif
  245. #ifndef RFB_RX_PIN
  246. #define RFB_RX_PIN 4 // GPIO for RX when RFB_DIRECT
  247. #endif
  248. #ifndef RFB_TX_PIN
  249. #define RFB_TX_PIN 5 // GPIO for TX when RFB_DIRECT
  250. #endif
  251. // When using un-modified harware, ESPurna communicates with the secondary
  252. // MCU EFM8BB1 via UART at 19200 bps so we need to change the speed of
  253. // the port and remove UART noise on serial line
  254. #if not RFB_DIRECT
  255. #define SERIAL_BAUDRATE 19200
  256. #define DEBUG_SERIAL_SUPPORT 0
  257. #endif
  258. // -----------------------------------------------------------------------------
  259. #elif defined(PILOTAK_ESP_DIN_V1)
  260. #undef ESPURNA_IMAGE
  261. #define ESPURNA_IMAGE ESPURNA_SENSOR
  262. #ifndef RF_SUPPORT
  263. #define RF_SUPPORT 1 // Does this need the RFBRIDGE image?
  264. #endif
  265. #define RF_PIN 14
  266. // -----------------------------------------------------------------------------
  267. #elif defined(MAGICHOME_LED_CONTROLLER)
  268. #undef ESPURNA_IMAGE
  269. #define ESPURNA_IMAGE ESPURNA_DIMMER
  270. // IR
  271. #define IR_SUPPORT 1
  272. #define IR_RECEIVER_PIN 4
  273. #define IR_BUTTON_SET 1
  274. #elif defined(MAGICHOME_LED_CONTROLLER_20)
  275. #undef ESPURNA_IMAGE
  276. #define ESPURNA_IMAGE ESPURNA_DIMMER
  277. // IR
  278. #define IR_SUPPORT 1
  279. #define IR_RECEIVER_PIN 4
  280. #define IR_BUTTON_SET 1
  281. #elif defined(GIZWITS_WITTY_CLOUD)
  282. #undef ESPURNA_IMAGE
  283. #define ESPURNA_IMAGE ESPURNA_DIMMER
  284. #define ANALOG_SUPPORT 1 // TODO: specific or generic?
  285. // -----------------------------------------------------------------------------
  286. // TEST devices (do not use!!)
  287. // -----------------------------------------------------------------------------
  288. #elif defined(TRAVIS01)
  289. #undef ESPURNA_IMAGE
  290. #define ESPURNA_IMAGE ESPURNA_BASIC
  291. // A bit of I2C - pins 3,4
  292. #define I2C_SDA_PIN 3
  293. #define I2C_SCL_PIN 4
  294. // And, as they say in "From Dusk till Dawn":
  295. // This is a sensor blow out!
  296. // Alright, we got white sensor, black sensor, spanish sensor, yellow sensor. We got hot sensor, cold sensor.
  297. // We got wet sensor. We got smelly sensor. We got hairy sensor, bloody sensor. We got snapping sensor.
  298. // We got silk sensor, velvet sensor, naugahyde sensor. We even got horse sensor, dog sensor, chicken sensor.
  299. // C'mon, you want sensor, come on in sensor lovers!
  300. // If we don’t got it, you don't want it!
  301. #define AM2320_SUPPORT 1
  302. #define BH1750_SUPPORT 1
  303. #define BMX280_SUPPORT 1
  304. #define SHT3X_I2C_SUPPORT 1
  305. #define EMON_ADC121_SUPPORT 1
  306. #define EMON_ADS1X15_SUPPORT 1
  307. #define SHT3X_I2C_SUPPORT 1
  308. #define SI7021_SUPPORT 1
  309. #define PMSX003_SUPPORT 1
  310. #define SENSEAIR_SUPPORT 1
  311. // A bit of lights - pin 5
  312. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  313. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  314. #define DUMMY_RELAY_COUNT 1
  315. #define LIGHT_CHANNELS 1
  316. #define LIGHT_CH1_PIN 5
  317. #define LIGHT_CH1_INVERSE 0
  318. // A bit of HLW8012 - pins 6,7,8
  319. #ifndef HLW8012_SUPPORT
  320. #define HLW8012_SUPPORT 1
  321. #endif
  322. #define HLW8012_SEL_PIN 6
  323. #define HLW8012_CF1_PIN 7
  324. #define HLW8012_CF_PIN 8
  325. // A bit of Dallas - pin 9
  326. #ifndef DALLAS_SUPPORT
  327. #define DALLAS_SUPPORT 1
  328. #endif
  329. #define DALLAS_PIN 9
  330. // A bit of ECH1560 - pins 10,11, 12
  331. #ifndef ECH1560_SUPPORT
  332. #define ECH1560_SUPPORT 1
  333. #endif
  334. #define ECH1560_CLK_PIN 10
  335. #define ECH1560_MISO_PIN 11
  336. #define ECH1560_INVERTED 12
  337. #elif defined(TRAVIS02)
  338. #undef ESPURNA_IMAGE
  339. #define ESPURNA_IMAGE ESPURNA_BASIC
  340. // A bit of CSE7766 - pin 1
  341. #ifndef CSE7766_SUPPORT
  342. #define CSE7766_SUPPORT 1
  343. #endif
  344. #define CSE7766_PIN 1
  345. // Relay type dual - pins 2,3
  346. #define RELAY_PROVIDER RELAY_PROVIDER_DUAL
  347. #define RELAY1_PIN 2
  348. #define RELAY2_PIN 3
  349. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  350. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  351. // IR - pin 4
  352. #define IR_SUPPORT 1
  353. #define IR_RECEIVER_PIN 4
  354. #define IR_BUTTON_SET 1
  355. // A bit of DHT - pin 5
  356. #ifndef DHT_SUPPORT
  357. #define DHT_SUPPORT 1
  358. #endif
  359. #define DHT_PIN 5
  360. // A bit of TMP3X (analog)
  361. #define TMP3X_SUPPORT 1
  362. // A bit of EVENTS - pin 10
  363. #define EVENTS_SUPPORT 1
  364. #define EVENTS_PIN 6
  365. // Sonar
  366. #define SONAR_SUPPORT 1
  367. #define SONAR_TRIGGER 7
  368. #define SONAR_ECHO 8
  369. // MHZ19
  370. #define MHZ19_SUPPORT 1
  371. #define MHZ19_RX_PIN 9
  372. #define MHZ19_TX_PIN 10
  373. // PZEM004T
  374. #define PZEM004T_SUPPORT 1
  375. #define PZEM004T_RX_PIN 11
  376. #define PZEM004T_TX_PIN 12
  377. // V9261F
  378. #define V9261F_SUPPORT 1
  379. #define V9261F_PIN 13
  380. // GUVAS12SD
  381. #define GUVAS12SD_SUPPORT 1
  382. #define GUVAS12SD_PIN 14
  383. // Test non-default modules
  384. #define MDNS_CLIENT_SUPPORT 1
  385. #define NOFUSS_SUPPORT 1
  386. #define UART_MQTT_SUPPORT 1
  387. #define INFLUXDB_SUPPORT 1
  388. #define IR_SUPPORT 1
  389. #elif defined(TRAVIS03)
  390. #undef ESPURNA_IMAGE
  391. #define ESPURNA_IMAGE ESPURNA_BASIC
  392. // MY9231 Light - pins 1,2
  393. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  394. #define LIGHT_PROVIDER LIGHT_PROVIDER_MY92XX
  395. #define DUMMY_RELAY_COUNT 1
  396. #define LIGHT_CHANNELS 5
  397. #define MY92XX_MODEL MY92XX_MODEL_MY9231
  398. #define MY92XX_CHIPS 2
  399. #define MY92XX_DI_PIN 1
  400. #define MY92XX_DCKI_PIN 2
  401. #define MY92XX_COMMAND MY92XX_COMMAND_DEFAULT
  402. #define MY92XX_MAPPING 4, 3, 5, 0, 1
  403. // A bit of Analog EMON (analog)
  404. #ifndef EMON_ANALOG_SUPPORT
  405. #define EMON_ANALOG_SUPPORT 1
  406. #endif
  407. // Test non-default modules
  408. #define LLMNR_SUPPORT 1
  409. #define NETBIOS_SUPPORT 1
  410. #define SSDP_SUPPORT 1
  411. #endif
  412. // -----------------------------------------------------------------------------
  413. // ESPurna Core
  414. // This is a special device targeted to generate a light-weight binary image
  415. // meant to be able to do two-step-updates:
  416. // https://github.com/xoseperez/espurna/wiki/TwoStepUpdates
  417. // -----------------------------------------------------------------------------
  418. #ifndef ESPURNA_IMAGE
  419. #define ESPURNA_IMAGE ESPURNA_CORE
  420. #endif
  421. // -----------------------------------------------------------------------------
  422. // Image definitions
  423. // -----------------------------------------------------------------------------
  424. #if ESPURNA_IMAGE == ESPURNA_CORE
  425. #define ESPURNA_IMAGE_NAME "CORE"
  426. // Disable non-core modules
  427. #define ALEXA_SUPPORT 0
  428. #define API_SUPPORT 0
  429. #define BROKER_SUPPORT 0
  430. #define BUTTON_SUPPORT 0
  431. #define DOMOTICZ_SUPPORT 0
  432. #define HOMEASSISTANT_SUPPORT 0
  433. #define I2C_SUPPORT 0
  434. #define MDNS_SERVER_SUPPORT 0
  435. #define MQTT_SUPPORT 0
  436. #define NTP_SUPPORT 0
  437. #define SCHEDULER_SUPPORT 0
  438. #define SENSOR_SUPPORT 0
  439. #define THINGSPEAK_SUPPORT 0
  440. #define WEB_SUPPORT 0
  441. // Extra light-weight image
  442. //#define DEBUG_SERIAL_SUPPORT 0
  443. //#define DEBUG_TELNET_SUPPORT 0
  444. //#define DEBUG_WEB_SUPPORT 0
  445. //#define LED_SUPPORT 0
  446. //#define TELNET_SUPPORT 0
  447. //#define TERMINAL_SUPPORT 0
  448. #elif ESPURNA_IMAGE == ESPURNA_BASIC
  449. #define ESPURNA_IMAGE_NAME "BASIC"
  450. #elif ESPURNA_IMAGE == ESPURNA_DIMMER
  451. #define ESPURNA_IMAGE_NAME "DIMMER"
  452. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  453. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  454. #elif ESPURNA_IMAGE == ESPURNA_MY92XX
  455. #define ESPURNA_IMAGE_NAME "MY92XX"
  456. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  457. #define LIGHT_PROVIDER LIGHT_PROVIDER_MY92XX
  458. #define MY92XX_COMMAND MY92XX_COMMAND_DEFAULT
  459. #elif ESPURNA_IMAGE == ESPURNA_EMON
  460. #define ESPURNA_IMAGE_NAME "EMON"
  461. #ifndef EMON_ANALOG_SUPPORT
  462. #define EMON_ANALOG_SUPPORT 1
  463. #endif
  464. #ifndef EMON_ADC121_SUPPORT
  465. #define EMON_ADC121_SUPPORT 1
  466. #endif
  467. #ifndef EMON_ADS1X15_SUPPORT
  468. #define EMON_ADS1X15_SUPPORT 1
  469. #endif
  470. #elif ESPURNA_IMAGE == ESPURNA_HLW8012
  471. #define ESPURNA_IMAGE_NAME "HLW8012"
  472. #ifndef HLW8012_SUPPORT
  473. #define HLW8012_SUPPORT 1
  474. #endif
  475. #elif ESPURNA_IMAGE == ESPURNA_CSE77XX
  476. #define ESPURNA_IMAGE_NAME "CSE77XX"
  477. #ifndef CSE7766_SUPPORT
  478. #define CSE7766_SUPPORT 1
  479. #endif
  480. #elif ESPURNA_IMAGE == ESPURNA_V9261F
  481. #define ESPURNA_IMAGE_NAME "V9261F"
  482. #ifndef V9261F_SUPPORT
  483. #define V9261F_SUPPORT 1
  484. #endif
  485. #ifndef ALEXA_SUPPORT
  486. #define ALEXA_SUPPORT 0
  487. #endif
  488. #elif ESPURNA_IMAGE == ESPURNA_ECH1560
  489. #define ESPURNA_IMAGE_NAME "ECH1560"
  490. #ifndef ECH1560_SUPPORT
  491. #define ECH1560_SUPPORT 1
  492. #endif
  493. #ifndef ALEXA_SUPPORT
  494. #define ALEXA_SUPPORT 0
  495. #endif
  496. #elif ESPURNA_IMAGE == ESPURNA_SENSOR
  497. #define ESPURNA_IMAGE_NAME "SENSOR"
  498. #ifndef ANALOG_SUPPORT
  499. #define ANALOG_SUPPORT 1
  500. #endif
  501. #ifndef DALLAS_SUPPORT
  502. #define DALLAS_SUPPORT 1
  503. #endif
  504. #ifndef DHT_SUPPORT
  505. #define DHT_SUPPORT 1
  506. #endif
  507. #ifndef DIGITAL_SUPPORT
  508. #define DIGITAL_SUPPORT 1
  509. #endif
  510. #elif ESPURNA_IMAGE == ESPURNA_SONOFF_DUAL
  511. #define ESPURNA_IMAGE_NAME "SONOFF_DUAL"
  512. #define RELAY_PROVIDER RELAY_PROVIDER_DUAL
  513. #elif ESPURNA_IMAGE == ESPURNA_SONOFF_RFBRIDGE
  514. #define ESPURNA_IMAGE_NAME "SONOFF_RFBRIDGE"
  515. #elif ESPURNA_IMAGE == ESPURNA_RFM69
  516. #define ESPURNA_IMAGE_NAME "RFM69"
  517. // RFM69GW
  518. #define RFM69_SUPPORT 1
  519. // Disable non-core modules
  520. #define ALEXA_SUPPORT 0
  521. #define DOMOTICZ_SUPPORT 0
  522. #define HOMEASSISTANT_SUPPORT 0
  523. #define I2C_SUPPORT 0
  524. #define SCHEDULER_SUPPORT 0
  525. #define SENSOR_SUPPORT 0
  526. #define THINGSPEAK_SUPPORT 0
  527. #elif ESPURNA_IMAGE == ESPURNA_STM
  528. #define ESPURNA_IMAGE_NAME "STM"
  529. #define RELAY_PROVIDER RELAY_PROVIDER_STM
  530. #elif ESPURNA_IMAGE == ESPURNA_GEIGER
  531. #define ESPURNA_IMAGE_NAME "GEIGER"
  532. // Enable Geiger Counter
  533. #define GEIGER_SUPPORT 1
  534. // Disable uneeded modules
  535. #define ALEXA_SUPPORT 0
  536. #define SCHEDULER_SUPPORT 0
  537. #endif