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 boards have to be added just before the BOARD_LAST line,
  5. // then add configuration in the hardware.ino
  6. enum boards {
  7. BOARD_UNKNOWN,
  8. BOARD_CUSTOM,
  9. BOARD_NODEMCU_LOLIN,
  10. BOARD_WEMOS_D1_MINI_RELAYSHIELD,
  11. BOARD_ITEAD_SONOFF_BASIC,
  12. BOARD_ITEAD_SONOFF_TH,
  13. BOARD_ITEAD_SONOFF_SV,
  14. BOARD_ITEAD_SONOFF_TOUCH,
  15. BOARD_ITEAD_SONOFF_POW,
  16. BOARD_ITEAD_SONOFF_DUAL,
  17. BOARD_ITEAD_1CH_INCHING,
  18. BOARD_ITEAD_SONOFF_4CH,
  19. BOARD_ITEAD_SLAMPHER,
  20. BOARD_ITEAD_S20,
  21. BOARD_ELECTRODRAGON_WIFI_IOT,
  22. BOARD_WORKCHOICE_ECOPLUG,
  23. BOARD_JANGOE_WIFI_RELAY_NC,
  24. BOARD_JANGOE_WIFI_RELAY_NO,
  25. BOARD_OPENENERGYMONITOR_MQTT_RELAY,
  26. BOARD_JORGEGARCIA_WIFI_RELAYS,
  27. BOARD_AITHINKER_AI_LIGHT,
  28. BOARD_MAGICHOME_LED_CONTROLLER,
  29. BOARD_ITEAD_MOTOR,
  30. BOARD_TINKERMAN_ESPURNA_H06,
  31. BOARD_HUACANXING_H801,
  32. BOARD_ITEAD_BNSZ01,
  33. BOARD_ITEAD_SONOFF_RFBRIDGE,
  34. BOARD_ITEAD_SONOFF_4CH_PRO,
  35. BOARD_ITEAD_SONOFF_B1,
  36. BOARD_ITEAD_SONOFF_LED,
  37. BOARD_ITEAD_SONOFF_T1_1CH,
  38. BOARD_ITEAD_SONOFF_T1_2CH,
  39. BOARD_ITEAD_SONOFF_T1_3CH,
  40. BOARD_ITEAD_SONOFF_RF,
  41. BOARD_WION_50055,
  42. BOARD_EXS_WIFI_RELAY_V31,
  43. BOARD_HUACANXING_H802,
  44. BOARD_GENERIC_V9261F,
  45. BOARD_GENERIC_ECH1560,
  46. BOARD_TINKERMAN_ESPURNA_H08,
  47. BOARD_MANCAVEMADE_ESPLIVE,
  48. BOARD_INTERMITTECH_QUINLED,
  49. BOARD_MAGICHOME_LED_CONTROLLER_20,
  50. BOARD_ARILUX_AL_LC06,
  51. BOARD_XENON_SM_PW702U,
  52. BOARD_AUTHOMETION_LYT8266,
  53. BOARD_ARILUX_E27,
  54. BOARD_YJZK_SWITCH_2CH,
  55. BOARD_ITEAD_SONOFF_DUAL_R2,
  56. BOARD_GENERIC_8CH,
  57. BOARD_ARILUX_AL_LC01,
  58. BOARD_ARILUX_AL_LC11,
  59. BOARD_ARILUX_AL_LC02,
  60. BOARD_KMC_70011,
  61. BOARD_GIZWITS_WITTY_CLOUD,
  62. BOARD_EUROMATE_WIFI_STECKER_SCHUKO,
  63. BOARD_TONBUX_POWERSTRIP02,
  64. BOARD_LINGAN_SWA1,
  65. BOARD_HEYGO_HY02,
  66. BOARD_MAXCIO_WUS002S,
  67. BOARD_YIDIAN_XSSSA05,
  68. BOARD_TONBUX_XSSSA06,
  69. BOARD_GREEN_ESP8266RELAY,
  70. BOARD_IKE_ESPIKE,
  71. BOARD_ARNIEX_SWIFITCH,
  72. BOARD_GENERIC_ESP01S_RELAY_V40,
  73. BOARD_GENERIC_ESP01S_RGBLED_V10,
  74. BOARD_HELTEC_TOUCHRELAY,
  75. BOARD_GENERIC_ESP01S_DHT11_V10,
  76. BOARD_GENERIC_ESP01S_DS18B20_V10,
  77. BOARD_ZHILDE_EU44_W,
  78. BOARD_ITEAD_SONOFF_POW_R2,
  79. BOARD_LUANI_HVIO,
  80. BOARD_ALLNET_4DUINO_IOT_WLAN_RELAIS,
  81. BOARD_TONBUX_MOSQUITO_KILLER,
  82. BOARD_NEO_COOLCAM_NAS_WR01W,
  83. BOARD_PILOTAK_ESP_DIN_V1,
  84. BOARD_ESTINK_WIFI_POWER_STRIP,
  85. BOARD_BH_ONOFRE,
  86. BOARD_BLITZWOLF_BWSHP2,
  87. BOARD_TINKERMAN_ESPURNA_SWITCH,
  88. BOARD_ITEAD_SONOFF_S31,
  89. BOARD_STM_RELAY,
  90. BOARD_VANZAVANZU_SMART_WIFI_PLUG_MINI,
  91. BOARD_GENERIC_GEIGER_COUNTER,
  92. BOARD_TINKERMAN_RFM69GW,
  93. BOARD_ITEAD_SONOFF_IFAN02,
  94. BOARD_GENERIC_AG_L4,
  95. BOARD_HOMECUBE_16A,
  96. BOARD_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 boards (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