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.

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