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.

710 lines
21 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_XIAOMI_SMART_DESK_LAMP,
  101. DEVICE_ALLTERCO_SHELLY2,
  102. DEVICE_PHYX_ESP12_RGB,
  103. DEVICE_IWOOLE_LED_TABLE_LAMP,
  104. DEVICE_EXS_WIFI_RELAY_V50,
  105. DEVICE_BESTEK_MRJ1011,
  106. DEVICE_LAST
  107. };
  108. // -----------------------------------------------------------------------------
  109. // Board => Image type
  110. // -----------------------------------------------------------------------------
  111. #if \
  112. defined(ALLNET_4DUINO_IOT_WLAN_RELAIS) || \
  113. defined(ALLTERCO_SHELLY1) || \
  114. defined(ARNIEX_SWIFITCH) || \
  115. defined(BH_ONOFRE) || \
  116. defined(BESTEK_MRJ1011) || \
  117. defined(ELECTRODRAGON_WIFI_IOT) || \
  118. defined(ESTINK_WIFI_POWER_STRIP) || \
  119. defined(EUROMATE_WIFI_STECKER_SCHUKO) || \
  120. defined(EXS_WIFI_RELAY_V31) || \
  121. defined(EXS_WIFI_RELAY_V50) || \
  122. defined(GENERIC_8CH) || \
  123. defined(GENERIC_ESP01S_RELAY_V40) || \
  124. defined(GENERIC_ESP01S_RGBLED_V10) || \
  125. defined(GREEN_ESP8266RELAY) || \
  126. defined(HELTEC_TOUCHRELAY) || \
  127. defined(HEYGO_HY02) || \
  128. defined(IKE_ESPIKE) || \
  129. defined(ITEAD_1CH_INCHING) || \
  130. defined(ITEAD_MOTOR) || \
  131. defined(ITEAD_S20) || \
  132. defined(ITEAD_SLAMPHER) || \
  133. defined(ITEAD_SONOFF_4CH) || \
  134. defined(ITEAD_SONOFF_4CH_PRO) || \
  135. defined(ITEAD_SONOFF_BASIC) || \
  136. defined(ITEAD_SONOFF_DUAL_R2) || \
  137. defined(ITEAD_SONOFF_IFAN02) || \
  138. defined(ITEAD_SONOFF_RF) || \
  139. defined(ITEAD_SONOFF_SV) || \
  140. defined(ITEAD_SONOFF_T1_1CH) || \
  141. defined(ITEAD_SONOFF_T1_2CH) || \
  142. defined(ITEAD_SONOFF_T1_3CH) || \
  143. defined(ITEAD_SONOFF_TOUCH) || \
  144. defined(JANGOE_WIFI_RELAY_NC) || \
  145. defined(JANGOE_WIFI_RELAY_NO) || \
  146. defined(JORGEGARCIA_WIFI_RELAYS) || \
  147. defined(LINGAN_SWA1) || \
  148. defined(LUANI_HVIO) || \
  149. defined(NEO_COOLCAM_NAS_WR01W) || \
  150. defined(NODEMCU_LOLIN) || \
  151. defined(OPENENERGYMONITOR_MQTT_RELAY) || \
  152. defined(TINKERMAN_ESPURNA_SWITCH) || \
  153. defined(TONBUX_MOSQUITO_KILLER) || \
  154. defined(TONBUX_POWERSTRIP02) || \
  155. defined(TONBUX_XSSSA06) || \
  156. defined(WEMOS_D1_MINI_RELAYSHIELD) || \
  157. defined(WION_50055) || \
  158. defined(WORKCHOICE_ECOPLUG) || \
  159. defined(XENON_SM_PW702U) || \
  160. defined(YJZK_SWITCH_1CH) || \
  161. defined(YJZK_SWITCH_2CH) || \
  162. defined(YJZK_SWITCH_3CH) || \
  163. defined(ZHILDE_EU44_W)
  164. #undef ESPURNA_IMAGE
  165. #define ESPURNA_IMAGE ESPURNA_BASIC
  166. // -----------------------------------------------------------------------------
  167. #elif \
  168. defined(BLITZWOLF_BWSHP2) || \
  169. defined(HOMECUBE_16A) || \
  170. defined(ITEAD_SONOFF_POW) || \
  171. defined(KMC_70011) || \
  172. defined(MAXCIO_WUS002S) || \
  173. defined(TINKERMAN_ESPURNA_H06) || \
  174. defined(TINKERMAN_ESPURNA_H08) || \
  175. defined(VANZAVANZU_SMART_WIFI_PLUG_MINI) || \
  176. defined(YIDIAN_XSSSA05)
  177. #undef ESPURNA_IMAGE
  178. #define ESPURNA_IMAGE ESPURNA_HLW8012
  179. // -----------------------------------------------------------------------------
  180. #elif \
  181. defined(ITEAD_SONOFF_POW_R2) || \
  182. defined(ITEAD_SONOFF_S31)
  183. #undef ESPURNA_IMAGE
  184. #define ESPURNA_IMAGE ESPURNA_CSE77XX
  185. // -----------------------------------------------------------------------------
  186. #elif defined(GENERIC_V9261F)
  187. #undef ESPURNA_IMAGE
  188. #define ESPURNA_IMAGE ESPURNA_V9261F
  189. // -----------------------------------------------------------------------------
  190. #elif defined(GENERIC_ECH1560)
  191. #undef ESPURNA_IMAGE
  192. #define ESPURNA_IMAGE ESPURNA_ECH1560
  193. // -----------------------------------------------------------------------------
  194. #elif \
  195. defined(ARILUX_AL_LC01) || \
  196. defined(ARILUX_AL_LC02) || \
  197. defined(ARILUX_AL_LC06) || \
  198. defined(ARILUX_AL_LC11) || \
  199. defined(AUTHOMETION_LYT8266) || \
  200. defined(GENERIC_AG_L4) || \
  201. defined(HUACANXING_H801) || \
  202. defined(HUACANXING_H802) || \
  203. defined(INTERMITTECH_QUINLED) || \
  204. defined(ITEAD_BNSZ01) || \
  205. defined(ITEAD_SONOFF_LED) || \
  206. defined(IWOOLE_LED_TABLE_LAMP)
  207. #undef ESPURNA_IMAGE
  208. #define ESPURNA_IMAGE ESPURNA_DIMMER
  209. // -----------------------------------------------------------------------------
  210. #elif \
  211. defined(AITHINKER_AI_LIGHT) || \
  212. defined(ARILUX_E27) || \
  213. defined(ITEAD_SONOFF_B1) || \
  214. defined(LOHAS_9W)
  215. #undef ESPURNA_IMAGE
  216. #define ESPURNA_IMAGE ESPURNA_MY92XX
  217. // -----------------------------------------------------------------------------
  218. #elif \
  219. defined(GENERIC_ESP01S_DHT11_V10) || \
  220. defined(GENERIC_ESP01S_DS18B20_V10) || \
  221. defined(ITEAD_SONOFF_TH) || \
  222. defined(MANCAVEMADE_ESPLIVE)
  223. #undef ESPURNA_IMAGE
  224. #define ESPURNA_IMAGE ESPURNA_SENSOR
  225. // -----------------------------------------------------------------------------
  226. #elif defined(TINKERMAN_RFM69GW)
  227. #undef ESPURNA_IMAGE
  228. #define ESPURNA_IMAGE ESPURNA_RFM69
  229. // -----------------------------------------------------------------------------
  230. #elif defined(ITEAD_SONOFF_DUAL)
  231. #undef ESPURNA_IMAGE
  232. #define ESPURNA_IMAGE ESPURNA_SONOFF_DUAL
  233. // -----------------------------------------------------------------------------
  234. #elif defined(STM_RELAY)
  235. #undef ESPURNA_IMAGE
  236. #define ESPURNA_IMAGE ESPURNA_STM
  237. // -----------------------------------------------------------------------------
  238. #elif defined(GENERIC_GEIGER_COUNTER)
  239. #undef ESPURNA_IMAGE
  240. #define ESPURNA_IMAGE ESPURNA_GEIGER
  241. // -----------------------------------------------------------------------------
  242. // PENDING
  243. // -----------------------------------------------------------------------------
  244. #elif defined(ITEAD_SONOFF_RFBRIDGE)
  245. #undef ESPURNA_IMAGE
  246. #define ESPURNA_IMAGE ESPURNA_SONOFF_RFBRIDGE
  247. // Info
  248. #define RELAY_PROVIDER RELAY_PROVIDER_RFBRIDGE
  249. // RFB Direct hack thanks to @wildwiz
  250. // https://github.com/xoseperez/espurna/wiki/Hardware-Itead-Sonoff-RF-Bridge---Direct-Hack
  251. #ifndef RFB_DIRECT
  252. #define RFB_DIRECT 0
  253. #endif
  254. #ifndef RFB_RX_PIN
  255. #define RFB_RX_PIN 4 // GPIO for RX when RFB_DIRECT
  256. #endif
  257. #ifndef RFB_TX_PIN
  258. #define RFB_TX_PIN 5 // GPIO for TX when RFB_DIRECT
  259. #endif
  260. // When using un-modified harware, ESPurna communicates with the secondary
  261. // MCU EFM8BB1 via UART at 19200 bps so we need to change the speed of
  262. // the port and remove UART noise on serial line
  263. #if not RFB_DIRECT
  264. #define SERIAL_BAUDRATE 19200
  265. #define DEBUG_SERIAL_SUPPORT 0
  266. #endif
  267. // -----------------------------------------------------------------------------
  268. #elif defined(PILOTAK_ESP_DIN_V1)
  269. #undef ESPURNA_IMAGE
  270. #define ESPURNA_IMAGE ESPURNA_SENSOR
  271. #ifndef RF_SUPPORT
  272. #define RF_SUPPORT 1 // Does this need the RFBRIDGE image?
  273. #endif
  274. #define RF_PIN 14
  275. // -----------------------------------------------------------------------------
  276. #elif defined(MAGICHOME_LED_CONTROLLER)
  277. #undef ESPURNA_IMAGE
  278. #define ESPURNA_IMAGE ESPURNA_DIMMER
  279. // IR
  280. #define IR_SUPPORT 1
  281. #define IR_RECEIVER_PIN 4
  282. #define IR_BUTTON_SET 1
  283. #elif defined(MAGICHOME_LED_CONTROLLER_20)
  284. #undef ESPURNA_IMAGE
  285. #define ESPURNA_IMAGE ESPURNA_DIMMER
  286. // IR
  287. #define IR_SUPPORT 1
  288. #define IR_RECEIVER_PIN 4
  289. #define IR_BUTTON_SET 1
  290. #elif defined(GIZWITS_WITTY_CLOUD)
  291. #undef ESPURNA_IMAGE
  292. #define ESPURNA_IMAGE ESPURNA_DIMMER
  293. #define ANALOG_SUPPORT 1 // TODO: specific or generic?
  294. // -----------------------------------------------------------------------------
  295. // TEST devices (do not use!!)
  296. // -----------------------------------------------------------------------------
  297. #elif defined(TRAVIS01)
  298. #undef ESPURNA_IMAGE
  299. #define ESPURNA_IMAGE ESPURNA_BASIC
  300. // A bit of I2C - pins 3,4
  301. #define I2C_SDA_PIN 3
  302. #define I2C_SCL_PIN 4
  303. // And, as they say in "From Dusk till Dawn":
  304. // This is a sensor blow out!
  305. // Alright, we got white sensor, black sensor, spanish sensor, yellow sensor. We got hot sensor, cold sensor.
  306. // We got wet sensor. We got smelly sensor. We got hairy sensor, bloody sensor. We got snapping sensor.
  307. // We got silk sensor, velvet sensor, naugahyde sensor. We even got horse sensor, dog sensor, chicken sensor.
  308. // C'mon, you want sensor, come on in sensor lovers!
  309. // If we don’t got it, you don't want it!
  310. #define AM2320_SUPPORT 1
  311. #define BH1750_SUPPORT 1
  312. #define BMX280_SUPPORT 1
  313. #define SHT3X_I2C_SUPPORT 1
  314. #define EMON_ADC121_SUPPORT 1
  315. #define EMON_ADS1X15_SUPPORT 1
  316. #define SHT3X_I2C_SUPPORT 1
  317. #define SI7021_SUPPORT 1
  318. #define PMSX003_SUPPORT 1
  319. #define SENSEAIR_SUPPORT 1
  320. // A bit of lights - pin 5
  321. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  322. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  323. #define DUMMY_RELAY_COUNT 1
  324. #define LIGHT_CHANNELS 1
  325. #define LIGHT_CH1_PIN 5
  326. #define LIGHT_CH1_INVERSE 0
  327. // A bit of HLW8012 - pins 6,7,8
  328. #ifndef HLW8012_SUPPORT
  329. #define HLW8012_SUPPORT 1
  330. #endif
  331. #define HLW8012_SEL_PIN 6
  332. #define HLW8012_CF1_PIN 7
  333. #define HLW8012_CF_PIN 8
  334. // A bit of Dallas - pin 9
  335. #ifndef DALLAS_SUPPORT
  336. #define DALLAS_SUPPORT 1
  337. #endif
  338. #define DALLAS_PIN 9
  339. // A bit of ECH1560 - pins 10,11, 12
  340. #ifndef ECH1560_SUPPORT
  341. #define ECH1560_SUPPORT 1
  342. #endif
  343. #define ECH1560_CLK_PIN 10
  344. #define ECH1560_MISO_PIN 11
  345. #define ECH1560_INVERTED 12
  346. #elif defined(TRAVIS02)
  347. #undef ESPURNA_IMAGE
  348. #define ESPURNA_IMAGE ESPURNA_BASIC
  349. // A bit of CSE7766 - pin 1
  350. #ifndef CSE7766_SUPPORT
  351. #define CSE7766_SUPPORT 1
  352. #endif
  353. #define CSE7766_PIN 1
  354. // Relay type dual - pins 2,3
  355. #define RELAY_PROVIDER RELAY_PROVIDER_DUAL
  356. #define RELAY1_PIN 2
  357. #define RELAY2_PIN 3
  358. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  359. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  360. // IR - pin 4
  361. #define IR_SUPPORT 1
  362. #define IR_RECEIVER_PIN 4
  363. #define IR_BUTTON_SET 1
  364. // A bit of DHT - pin 5
  365. #ifndef DHT_SUPPORT
  366. #define DHT_SUPPORT 1
  367. #endif
  368. #define DHT_PIN 5
  369. // A bit of TMP3X (analog)
  370. #define TMP3X_SUPPORT 1
  371. // A bit of EVENTS - pin 10
  372. #define EVENTS_SUPPORT 1
  373. #define EVENTS_PIN 6
  374. // Sonar
  375. #define SONAR_SUPPORT 1
  376. #define SONAR_TRIGGER 7
  377. #define SONAR_ECHO 8
  378. // MHZ19
  379. #define MHZ19_SUPPORT 1
  380. #define MHZ19_RX_PIN 9
  381. #define MHZ19_TX_PIN 10
  382. // PZEM004T
  383. #define PZEM004T_SUPPORT 1
  384. #define PZEM004T_RX_PIN 11
  385. #define PZEM004T_TX_PIN 12
  386. // V9261F
  387. #define V9261F_SUPPORT 1
  388. #define V9261F_PIN 13
  389. // GUVAS12SD
  390. #define GUVAS12SD_SUPPORT 1
  391. #define GUVAS12SD_PIN 14
  392. // Test non-default modules
  393. #define MDNS_CLIENT_SUPPORT 1
  394. #define NOFUSS_SUPPORT 1
  395. #define UART_MQTT_SUPPORT 1
  396. #define INFLUXDB_SUPPORT 1
  397. #define IR_SUPPORT 1
  398. #elif defined(TRAVIS03)
  399. #undef ESPURNA_IMAGE
  400. #define ESPURNA_IMAGE ESPURNA_BASIC
  401. // MY9231 Light - pins 1,2
  402. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  403. #define LIGHT_PROVIDER LIGHT_PROVIDER_MY92XX
  404. #define DUMMY_RELAY_COUNT 1
  405. #define LIGHT_CHANNELS 5
  406. #define MY92XX_MODEL MY92XX_MODEL_MY9231
  407. #define MY92XX_CHIPS 2
  408. #define MY92XX_DI_PIN 1
  409. #define MY92XX_DCKI_PIN 2
  410. #define MY92XX_COMMAND MY92XX_COMMAND_DEFAULT
  411. #define MY92XX_MAPPING 4, 3, 5, 0, 1
  412. // A bit of Analog EMON (analog)
  413. #ifndef EMON_ANALOG_SUPPORT
  414. #define EMON_ANALOG_SUPPORT 1
  415. #endif
  416. // Test non-default modules
  417. #define LLMNR_SUPPORT 1
  418. #define NETBIOS_SUPPORT 1
  419. #define SSDP_SUPPORT 1
  420. // Encoder support
  421. #ifndef ENCODER_SUPPORT
  422. #define ENCODER_SUPPORT 1
  423. #endif
  424. #endif
  425. // -----------------------------------------------------------------------------
  426. // ESPurna Core
  427. // This is a special device targeted to generate a light-weight binary image
  428. // meant to be able to do two-step-updates:
  429. // https://github.com/xoseperez/espurna/wiki/TwoStepUpdates
  430. // -----------------------------------------------------------------------------
  431. #ifndef ESPURNA_IMAGE
  432. #define ESPURNA_IMAGE ESPURNA_CORE
  433. #endif
  434. // -----------------------------------------------------------------------------
  435. // Image definitions
  436. // -----------------------------------------------------------------------------
  437. #if ESPURNA_IMAGE == ESPURNA_CORE
  438. #define ESPURNA_IMAGE_NAME "CORE"
  439. // Disable non-core modules
  440. #define ALEXA_SUPPORT 0
  441. #define API_SUPPORT 0
  442. #define BROKER_SUPPORT 0
  443. #define BUTTON_SUPPORT 0
  444. #define DOMOTICZ_SUPPORT 0
  445. #define HOMEASSISTANT_SUPPORT 0
  446. #define I2C_SUPPORT 0
  447. #define MDNS_SERVER_SUPPORT 0
  448. #define MQTT_SUPPORT 0
  449. #define NTP_SUPPORT 0
  450. #define SCHEDULER_SUPPORT 0
  451. #define SENSOR_SUPPORT 0
  452. #define THINGSPEAK_SUPPORT 0
  453. #define WEB_SUPPORT 0
  454. // Extra light-weight image
  455. //#define DEBUG_SERIAL_SUPPORT 0
  456. //#define DEBUG_TELNET_SUPPORT 0
  457. //#define DEBUG_WEB_SUPPORT 0
  458. //#define LED_SUPPORT 0
  459. //#define TELNET_SUPPORT 0
  460. //#define TERMINAL_SUPPORT 0
  461. #elif ESPURNA_IMAGE == ESPURNA_BASIC
  462. #define ESPURNA_IMAGE_NAME "BASIC"
  463. #elif ESPURNA_IMAGE == ESPURNA_DIMMER
  464. #define ESPURNA_IMAGE_NAME "DIMMER"
  465. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  466. #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
  467. #ifndef ENCODER_SUPPORT
  468. #define ENCODER_SUPPORT 1
  469. #endif
  470. #elif ESPURNA_IMAGE == ESPURNA_MY92XX
  471. #define ESPURNA_IMAGE_NAME "MY92XX"
  472. #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
  473. #define LIGHT_PROVIDER LIGHT_PROVIDER_MY92XX
  474. #define MY92XX_COMMAND MY92XX_COMMAND_DEFAULT
  475. #ifndef ENCODER_SUPPORT
  476. #define ENCODER_SUPPORT 1
  477. #endif
  478. #elif ESPURNA_IMAGE == ESPURNA_EMON
  479. #define ESPURNA_IMAGE_NAME "EMON"
  480. #ifndef EMON_ANALOG_SUPPORT
  481. #define EMON_ANALOG_SUPPORT 1
  482. #endif
  483. #ifndef EMON_ADC121_SUPPORT
  484. #define EMON_ADC121_SUPPORT 1
  485. #endif
  486. #ifndef EMON_ADS1X15_SUPPORT
  487. #define EMON_ADS1X15_SUPPORT 1
  488. #endif
  489. #elif ESPURNA_IMAGE == ESPURNA_HLW8012
  490. #define ESPURNA_IMAGE_NAME "HLW8012"
  491. #ifndef HLW8012_SUPPORT
  492. #define HLW8012_SUPPORT 1
  493. #endif
  494. #elif ESPURNA_IMAGE == ESPURNA_CSE77XX
  495. #define ESPURNA_IMAGE_NAME "CSE77XX"
  496. #ifndef CSE7766_SUPPORT
  497. #define CSE7766_SUPPORT 1
  498. #endif
  499. #elif ESPURNA_IMAGE == ESPURNA_V9261F
  500. #define ESPURNA_IMAGE_NAME "V9261F"
  501. #ifndef V9261F_SUPPORT
  502. #define V9261F_SUPPORT 1
  503. #endif
  504. #ifndef ALEXA_SUPPORT
  505. #define ALEXA_SUPPORT 0
  506. #endif
  507. #elif ESPURNA_IMAGE == ESPURNA_ECH1560
  508. #define ESPURNA_IMAGE_NAME "ECH1560"
  509. #ifndef ECH1560_SUPPORT
  510. #define ECH1560_SUPPORT 1
  511. #endif
  512. #ifndef ALEXA_SUPPORT
  513. #define ALEXA_SUPPORT 0
  514. #endif
  515. #elif ESPURNA_IMAGE == ESPURNA_SENSOR
  516. #define ESPURNA_IMAGE_NAME "SENSOR"
  517. #ifndef ANALOG_SUPPORT
  518. #define ANALOG_SUPPORT 1
  519. #endif
  520. #ifndef DALLAS_SUPPORT
  521. #define DALLAS_SUPPORT 1
  522. #endif
  523. #ifndef DHT_SUPPORT
  524. #define DHT_SUPPORT 1
  525. #endif
  526. #ifndef DIGITAL_SUPPORT
  527. #define DIGITAL_SUPPORT 1
  528. #endif
  529. #elif ESPURNA_IMAGE == ESPURNA_SONOFF_DUAL
  530. #define ESPURNA_IMAGE_NAME "SONOFF_DUAL"
  531. #define RELAY_PROVIDER RELAY_PROVIDER_DUAL
  532. #elif ESPURNA_IMAGE == ESPURNA_SONOFF_RFBRIDGE
  533. #define ESPURNA_IMAGE_NAME "SONOFF_RFBRIDGE"
  534. #elif ESPURNA_IMAGE == ESPURNA_RFM69
  535. #define ESPURNA_IMAGE_NAME "RFM69"
  536. // RFM69GW
  537. #define RFM69_SUPPORT 1
  538. // Disable non-core modules
  539. #define ALEXA_SUPPORT 0
  540. #define DOMOTICZ_SUPPORT 0
  541. #define HOMEASSISTANT_SUPPORT 0
  542. #define I2C_SUPPORT 0
  543. #define SCHEDULER_SUPPORT 0
  544. #define SENSOR_SUPPORT 0
  545. #define THINGSPEAK_SUPPORT 0
  546. #elif ESPURNA_IMAGE == ESPURNA_STM
  547. #define ESPURNA_IMAGE_NAME "STM"
  548. #define RELAY_PROVIDER RELAY_PROVIDER_STM
  549. #elif ESPURNA_IMAGE == ESPURNA_GEIGER
  550. #define ESPURNA_IMAGE_NAME "GEIGER"
  551. // Enable Geiger Counter
  552. #define GEIGER_SUPPORT 1
  553. // Disable uneeded modules
  554. #define ALEXA_SUPPORT 0
  555. #define SCHEDULER_SUPPORT 0
  556. #endif