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.

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