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.

692 lines
22 KiB

6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
7 years ago
7 years ago
6 years ago
  1. // =============================================================================
  2. // SENSORS - General data
  3. // =============================================================================
  4. #define SENSOR_DEBUG 0 // Debug sensors
  5. #define SENSOR_READ_INTERVAL 6 // Read data from sensors every 6 seconds
  6. #define SENSOR_READ_MIN_INTERVAL 6 // Minimum read interval
  7. #define SENSOR_READ_MAX_INTERVAL 3600 // Maximum read interval
  8. #define SENSOR_INIT_INTERVAL 10000 // Try to re-init non-ready sensors every 10s
  9. #define SENSOR_REPORT_EVERY 10 // Report every this many readings
  10. #define SENSOR_REPORT_MIN_EVERY 1 // Minimum every value
  11. #define SENSOR_REPORT_MAX_EVERY 12 // Maximum
  12. #define SENSOR_USE_INDEX 0 // Use the index in topic (i.e. temperature/0)
  13. // even if just one sensor (0 for backwards compatibility)
  14. #ifndef SENSOR_POWER_CHECK_STATUS
  15. #define SENSOR_POWER_CHECK_STATUS 1 // If set to 1 the reported power/current/energy will be 0 if the relay[0] is OFF
  16. #endif
  17. #ifndef SENSOR_TEMPERATURE_CORRECTION
  18. #define SENSOR_TEMPERATURE_CORRECTION 0.0 // Offset correction
  19. #endif
  20. #ifndef TEMPERATURE_MIN_CHANGE
  21. #define TEMPERATURE_MIN_CHANGE 0.0 // Minimum temperature change to report
  22. #endif
  23. #ifndef SENSOR_HUMIDITY_CORRECTION
  24. #define SENSOR_HUMIDITY_CORRECTION 0.0 // Offset correction
  25. #endif
  26. #ifndef HUMIDITY_MIN_CHANGE
  27. #define HUMIDITY_MIN_CHANGE 0 // Minimum humidity change to report
  28. #endif
  29. #define SENSOR_PUBLISH_ADDRESSES 0 // Publish sensor addresses
  30. #define SENSOR_ADDRESS_TOPIC "address" // Topic to publish sensor addresses
  31. #ifndef SENSOR_TEMPERATURE_UNITS
  32. #define SENSOR_TEMPERATURE_UNITS TMP_CELSIUS // Temperature units (TMP_CELSIUS | TMP_FAHRENHEIT)
  33. #endif
  34. #ifndef SENSOR_ENERGY_UNITS
  35. #define SENSOR_ENERGY_UNITS ENERGY_JOULES // Energy units (ENERGY_JOULES | ENERGY_KWH)
  36. #endif
  37. #ifndef SENSOR_POWER_UNITS
  38. #define SENSOR_POWER_UNITS POWER_WATTS // Power units (POWER_WATTS | POWER_KILOWATTS)
  39. #endif
  40. // =============================================================================
  41. // Specific data for each sensor
  42. // =============================================================================
  43. //------------------------------------------------------------------------------
  44. // AM2320 Humidity & Temperature sensor over I2C
  45. // Enable support by passing AM2320_SUPPORT=1 build flag
  46. //------------------------------------------------------------------------------
  47. #ifndef AM2320_SUPPORT
  48. #define AM2320_SUPPORT 0
  49. #endif
  50. #ifndef AM2320_ADDRESS
  51. #define AM2320_ADDRESS 0x00 // 0x00 means auto
  52. #endif
  53. //------------------------------------------------------------------------------
  54. // Analog sensor
  55. // Enable support by passing ANALOG_SUPPORT=1 build flag
  56. //--------------------------------------------------------------------------------
  57. #ifndef ANALOG_SUPPORT
  58. #define ANALOG_SUPPORT 0
  59. #endif
  60. //------------------------------------------------------------------------------
  61. // BH1750
  62. // Enable support by passing BH1750_SUPPORT=1 build flag
  63. // http://www.elechouse.com/elechouse/images/product/Digital%20light%20Sensor/bh1750fvi-e.pdf
  64. //------------------------------------------------------------------------------
  65. #ifndef BH1750_SUPPORT
  66. #define BH1750_SUPPORT 0
  67. #endif
  68. #ifndef BH1750_ADDRESS
  69. #define BH1750_ADDRESS 0x00 // 0x00 means auto
  70. #endif
  71. #define BH1750_MODE BH1750_CONTINUOUS_HIGH_RES_MODE
  72. //------------------------------------------------------------------------------
  73. // BME280/BMP280
  74. // Enable support by passing BMX280_SUPPORT=1 build flag
  75. //------------------------------------------------------------------------------
  76. #ifndef BMX280_SUPPORT
  77. #define BMX280_SUPPORT 0
  78. #endif
  79. #ifndef BMX280_ADDRESS
  80. #define BMX280_ADDRESS 0x00 // 0x00 means auto
  81. #endif
  82. #define BMX280_MODE 1 // 0 for sleep mode, 1 or 2 for forced mode, 3 for normal mode
  83. #define BMX280_STANDBY 0 // 0 for 0.5ms, 1 for 62.5ms, 2 for 125ms
  84. // 3 for 250ms, 4 for 500ms, 5 for 1000ms
  85. // 6 for 10ms, 7 for 20ms
  86. #define BMX280_FILTER 0 // 0 for OFF, 1 for 2 values, 2 for 4 values, 3 for 8 values and 4 for 16 values
  87. #define BMX280_TEMPERATURE 1 // Oversampling for temperature (set to 0 to disable magnitude)
  88. #define BMX280_HUMIDITY 1 // Oversampling for humidity (set to 0 to disable magnitude, only for BME280)
  89. #define BMX280_PRESSURE 1 // Oversampling for pressure (set to 0 to disable magnitude)
  90. //------------------------------------------------------------------------------
  91. // Dallas OneWire temperature sensors
  92. // Enable support by passing DALLAS_SUPPORT=1 build flag
  93. //------------------------------------------------------------------------------
  94. #ifndef DALLAS_SUPPORT
  95. #define DALLAS_SUPPORT 0
  96. #endif
  97. #ifndef DALLAS_PIN
  98. #define DALLAS_PIN 14
  99. #endif
  100. #define DALLAS_RESOLUTION 9 // Not used atm
  101. #define DALLAS_READ_INTERVAL 2000 // Force sensor read & cache every 2 seconds
  102. //------------------------------------------------------------------------------
  103. // DHTXX temperature/humidity sensor
  104. // Enable support by passing DHT_SUPPORT=1 build flag
  105. //------------------------------------------------------------------------------
  106. #ifndef DHT_SUPPORT
  107. #define DHT_SUPPORT 0
  108. #endif
  109. #ifndef DHT_PIN
  110. #define DHT_PIN 14
  111. #endif
  112. #ifndef DHT_TYPE
  113. #define DHT_TYPE DHT_CHIP_DHT22
  114. #endif
  115. //------------------------------------------------------------------------------
  116. // CSE7766 based power sensor
  117. // Enable support by passing CSE7766_SUPPORT=1 build flag
  118. //------------------------------------------------------------------------------
  119. #ifndef CSE7766_SUPPORT
  120. #define CSE7766_SUPPORT 0
  121. #endif
  122. #ifndef CSE7766_PIN
  123. #define CSE7766_PIN 1 // TX pin from the CSE7766
  124. #endif
  125. #ifndef CSE7766_PIN_INVERSE
  126. #define CSE7766_PIN_INVERSE 0 // Signal is inverted
  127. #endif
  128. #define CSE7766_SYNC_INTERVAL 300 // Safe time between transmissions (ms)
  129. #define CSE7766_BAUDRATE 4800 // UART baudrate
  130. #define CSE7766_V1R 1.0 // 1mR current resistor
  131. #define CSE7766_V2R 1.0 // 1M voltage resistor
  132. //------------------------------------------------------------------------------
  133. // Digital sensor
  134. // Enable support by passing DIGITAL_SUPPORT=1 build flag
  135. //------------------------------------------------------------------------------
  136. #ifndef DIGITAL_SUPPORT
  137. #define DIGITAL_SUPPORT 0
  138. #endif
  139. #ifndef DIGITAL_PIN
  140. #define DIGITAL_PIN 2
  141. #endif
  142. #ifndef DIGITAL_PIN_MODE
  143. #define DIGITAL_PIN_MODE INPUT_PULLUP
  144. #endif
  145. #ifndef DIGITAL_DEFAULT_STATE
  146. #define DIGITAL_DEFAULT_STATE 1
  147. #endif
  148. //------------------------------------------------------------------------------
  149. // ECH1560 based power sensor
  150. // Enable support by passing ECH1560_SUPPORT=1 build flag
  151. //------------------------------------------------------------------------------
  152. #ifndef ECH1560_SUPPORT
  153. #define ECH1560_SUPPORT 0
  154. #endif
  155. #ifndef ECH1560_CLK_PIN
  156. #define ECH1560_CLK_PIN 4 // CLK pin for the ECH1560
  157. #endif
  158. #ifndef ECH1560_MISO_PIN
  159. #define ECH1560_MISO_PIN 5 // MISO pin for the ECH1560
  160. #endif
  161. #ifndef ECH1560_INVERTED
  162. #define ECH1560_INVERTED 0 // Signal is inverted
  163. #endif
  164. //------------------------------------------------------------------------------
  165. // Energy Monitor general settings
  166. //------------------------------------------------------------------------------
  167. #define EMON_MAX_SAMPLES 1000 // Max number of samples to get
  168. #define EMON_MAX_TIME 250 // Max time in ms to sample
  169. #define EMON_FILTER_SPEED 512 // Mobile average filter speed
  170. #define EMON_MAINS_VOLTAGE 230 // Mains voltage
  171. #define EMON_REFERENCE_VOLTAGE 3.3 // Reference voltage of the ADC
  172. #define EMON_CURRENT_RATIO 30 // Current ratio in the clamp (30V/1A)
  173. #define EMON_REPORT_CURRENT 0 // Report current
  174. #define EMON_REPORT_POWER 1 // Report power
  175. #define EMON_REPORT_ENERGY 1 // Report energy
  176. //------------------------------------------------------------------------------
  177. // Energy Monitor based on ADC121
  178. // Enable support by passing EMON_ADC121_SUPPORT=1 build flag
  179. //------------------------------------------------------------------------------
  180. #ifndef EMON_ADC121_SUPPORT
  181. #define EMON_ADC121_SUPPORT 0 // Do not build support by default
  182. #endif
  183. #define EMON_ADC121_I2C_ADDRESS 0x00 // 0x00 means auto
  184. //------------------------------------------------------------------------------
  185. // Energy Monitor based on ADS1X15
  186. // Enable support by passing EMON_ADS1X15_SUPPORT=1 build flag
  187. //------------------------------------------------------------------------------
  188. #ifndef EMON_ADS1X15_SUPPORT
  189. #define EMON_ADS1X15_SUPPORT 0 // Do not build support by default
  190. #endif
  191. #define EMON_ADS1X15_I2C_ADDRESS 0x00 // 0x00 means auto
  192. #define EMON_ADS1X15_TYPE ADS1X15_CHIP_ADS1115
  193. #define EMON_ADS1X15_GAIN ADS1X15_REG_CONFIG_PGA_4_096V
  194. #define EMON_ADS1X15_MASK 0x0F // A0=1 A1=2 A2=4 A3=8
  195. //------------------------------------------------------------------------------
  196. // Energy Monitor based on interval analog GPIO
  197. // Enable support by passing EMON_ANALOG_SUPPORT=1 build flag
  198. //------------------------------------------------------------------------------
  199. #ifndef EMON_ANALOG_SUPPORT
  200. #define EMON_ANALOG_SUPPORT 0 // Do not build support by default
  201. #endif
  202. //------------------------------------------------------------------------------
  203. // Counter sensor
  204. // Enable support by passing EVENTS_SUPPORT=1 build flag
  205. //------------------------------------------------------------------------------
  206. #ifndef EVENTS_SUPPORT
  207. #define EVENTS_SUPPORT 0 // Do not build with counter support by default
  208. #endif
  209. #ifndef EVENTS_PIN
  210. #define EVENTS_PIN 2 // GPIO to monitor
  211. #endif
  212. #ifndef EVENTS_PIN_MODE
  213. #define EVENTS_PIN_MODE INPUT // INPUT, INPUT_PULLUP
  214. #endif
  215. #ifndef EVENTS_INTERRUPT_MODE
  216. #define EVENTS_INTERRUPT_MODE RISING // RISING, FALLING, BOTH
  217. #endif
  218. #define EVENTS_DEBOUNCE 50 // Do not register events within less than 10 millis
  219. //------------------------------------------------------------------------------
  220. // GUVAS12SD UV Sensor (analog)
  221. // Enable support by passing GUVAS12SD_SUPPORT=1 build flag
  222. //------------------------------------------------------------------------------
  223. #ifndef GUVAS12SD_SUPPORT
  224. #define GUVAS12SD_SUPPORT 0
  225. #endif
  226. #ifndef GUVAS12SD_PIN
  227. #define GUVAS12SD_PIN 14
  228. #endif
  229. //------------------------------------------------------------------------------
  230. // HC-SR04
  231. // Enable support by passing HCSR04_SUPPORT=1 build flag
  232. //------------------------------------------------------------------------------
  233. #ifndef HCSR04_SUPPORT
  234. #define HCSR04_SUPPORT 0
  235. #endif
  236. #ifndef HCSR04_TRIGGER
  237. #define HCSR04_TRIGGER 12 // GPIO for the trigger pin (output)
  238. #endif
  239. #ifndef HCSR04_ECHO
  240. #define HCSR04_ECHO 14 // GPIO for the echo pin (input)
  241. #endif
  242. //------------------------------------------------------------------------------
  243. // HLW8012 Energy monitor IC
  244. // Enable support by passing HLW8012_SUPPORT=1 build flag
  245. //------------------------------------------------------------------------------
  246. #ifndef HLW8012_SUPPORT
  247. #define HLW8012_SUPPORT 0
  248. #endif
  249. #ifndef HLW8012_SEL_PIN
  250. #define HLW8012_SEL_PIN 5
  251. #endif
  252. #ifndef HLW8012_CF1_PIN
  253. #define HLW8012_CF1_PIN 13
  254. #endif
  255. #ifndef HLW8012_CF_PIN
  256. #define HLW8012_CF_PIN 14
  257. #endif
  258. #ifndef HLW8012_SEL_CURRENT
  259. #define HLW8012_SEL_CURRENT HIGH // SEL pin to HIGH to measure current
  260. #endif
  261. #ifndef HLW8012_CURRENT_R
  262. #define HLW8012_CURRENT_R 0.001 // Current resistor
  263. #endif
  264. #ifndef HLW8012_VOLTAGE_R_UP
  265. #define HLW8012_VOLTAGE_R_UP ( 5 * 470000 ) // Upstream voltage resistor
  266. #endif
  267. #ifndef HLW8012_VOLTAGE_R_DOWN
  268. #define HLW8012_VOLTAGE_R_DOWN ( 1000 ) // Downstream voltage resistor
  269. #endif
  270. #define HLW8012_USE_INTERRUPTS 1 // Use interrupts to trap HLW8012 signals
  271. //------------------------------------------------------------------------------
  272. // MHZ19 CO2 sensor
  273. // Enable support by passing MHZ19_SUPPORT=1 build flag
  274. //------------------------------------------------------------------------------
  275. #ifndef MHZ19_SUPPORT
  276. #define MHZ19_SUPPORT 0
  277. #endif
  278. #ifndef MHZ19_RX_PIN
  279. #define MHZ19_RX_PIN 13
  280. #endif
  281. #ifndef MHZ19_TX_PIN
  282. #define MHZ19_TX_PIN 15
  283. #endif
  284. //------------------------------------------------------------------------------
  285. // SenseAir CO2 sensor
  286. // Enable support by passing SENSEAIR_SUPPORT=1 build flag
  287. //------------------------------------------------------------------------------
  288. #ifndef SENSEAIR_SUPPORT
  289. #define SENSEAIR_SUPPORT 0
  290. #endif
  291. #ifndef SENSEAIR_RX_PIN
  292. #define SENSEAIR_RX_PIN 0
  293. #endif
  294. #ifndef SENSEAIR_TX_PIN
  295. #define SENSEAIR_TX_PIN 2
  296. #endif
  297. //------------------------------------------------------------------------------
  298. // Particle Monitor based on Plantower PMS
  299. // Enable support by passing PMSX003_SUPPORT=1 build flag
  300. //------------------------------------------------------------------------------
  301. #ifndef PMSX003_SUPPORT
  302. #define PMSX003_SUPPORT 0
  303. #endif
  304. #ifndef PMS_TYPE
  305. #define PMS_TYPE PMS_TYPE_X003
  306. #endif
  307. // You can enable smart sleep (read 6-times then sleep on 24-reading-cycles) to extend PMS sensor's life.
  308. // Otherwise the default lifetime of PMS sensor is about 8000-hours/1-years.
  309. // The PMS's fan will stop working on sleeping cycle, and will wake up on reading cycle.
  310. #ifndef PMS_SMART_SLEEP
  311. #define PMS_SMART_SLEEP 0
  312. #endif
  313. #ifndef PMS_RX_PIN
  314. #define PMS_RX_PIN 13
  315. #endif
  316. #ifndef PMS_TX_PIN
  317. #define PMS_TX_PIN 15
  318. #endif
  319. //------------------------------------------------------------------------------
  320. // PZEM004T based power monitor
  321. // Enable support by passing PZEM004T_SUPPORT=1 build flag
  322. //------------------------------------------------------------------------------
  323. #ifndef PZEM004T_SUPPORT
  324. #define PZEM004T_SUPPORT 0
  325. #endif
  326. #ifndef PZEM004T_USE_SOFT
  327. #define PZEM004T_USE_SOFT 1 // Use software serial
  328. #endif
  329. #ifndef PZEM004T_RX_PIN
  330. #define PZEM004T_RX_PIN 13 // Software serial RX GPIO (if PZEM004T_USE_SOFT == 1)
  331. #endif
  332. #ifndef PZEM004T_TX_PIN
  333. #define PZEM004T_TX_PIN 15 // Software serial TX GPIO (if PZEM004T_USE_SOFT == 1)
  334. #endif
  335. #ifndef PZEM004T_HW_PORT
  336. #define PZEM004T_HW_PORT Serial1 // Hardware serial port (if PZEM004T_USE_SOFT == 0)
  337. #endif
  338. //------------------------------------------------------------------------------
  339. // SHT3X I2C (Wemos) temperature & humidity sensor
  340. // Enable support by passing SHT3X_SUPPORT=1 build flag
  341. //------------------------------------------------------------------------------
  342. #ifndef SHT3X_I2C_SUPPORT
  343. #define SHT3X_I2C_SUPPORT 0
  344. #endif
  345. #ifndef SHT3X_I2C_ADDRESS
  346. #define SHT3X_I2C_ADDRESS 0x00 // 0x00 means auto
  347. #endif
  348. //------------------------------------------------------------------------------
  349. // SI7021 temperature & humidity sensor
  350. // Enable support by passing SI7021_SUPPORT=1 build flag
  351. //------------------------------------------------------------------------------
  352. #ifndef SI7021_SUPPORT
  353. #define SI7021_SUPPORT 0
  354. #endif
  355. #ifndef SI7021_ADDRESS
  356. #define SI7021_ADDRESS 0x00 // 0x00 means auto
  357. #endif
  358. //------------------------------------------------------------------------------
  359. // TMP3X analog temperature sensor
  360. // Enable support by passing TMP3X_SUPPORT=1 build flag
  361. //------------------------------------------------------------------------------
  362. #ifndef TMP3X_SUPPORT
  363. #define TMP3X_SUPPORT 0
  364. #endif
  365. #ifndef TMP3X_TYPE
  366. #define TMP3X_TYPE TMP3X_TMP35
  367. #endif
  368. //------------------------------------------------------------------------------
  369. // V9261F based power sensor
  370. // Enable support by passing SI7021_SUPPORT=1 build flag
  371. //------------------------------------------------------------------------------
  372. #ifndef V9261F_SUPPORT
  373. #define V9261F_SUPPORT 0
  374. #endif
  375. #ifndef V9261F_PIN
  376. #define V9261F_PIN 2 // TX pin from the V9261F
  377. #endif
  378. #ifndef V9261F_PIN_INVERSE
  379. #define V9261F_PIN_INVERSE 1 // Signal is inverted
  380. #endif
  381. #define V9261F_SYNC_INTERVAL 600 // Sync signal length (ms)
  382. #define V9261F_BAUDRATE 4800 // UART baudrate
  383. // Default ratios
  384. #define V9261F_CURRENT_FACTOR 79371434.0
  385. #define V9261F_VOLTAGE_FACTOR 4160651.0
  386. #define V9261F_POWER_FACTOR 153699.0
  387. #define V9261F_RPOWER_FACTOR V9261F_CURRENT_FACTOR
  388. // =============================================================================
  389. // Sensor helpers configuration - can't move to dependencies.h
  390. // =============================================================================
  391. #ifndef SENSOR_SUPPORT
  392. #define SENSOR_SUPPORT ( \
  393. AM2320_SUPPORT || \
  394. ANALOG_SUPPORT || \
  395. BH1750_SUPPORT || \
  396. BMX280_SUPPORT || \
  397. CSE7766_SUPPORT || \
  398. DALLAS_SUPPORT || \
  399. DHT_SUPPORT || \
  400. DIGITAL_SUPPORT || \
  401. ECH1560_SUPPORT || \
  402. EMON_ADC121_SUPPORT || \
  403. EMON_ADS1X15_SUPPORT || \
  404. EMON_ANALOG_SUPPORT || \
  405. EVENTS_SUPPORT || \
  406. GUVAS12SD_SUPPORT || \
  407. HCSR04_SUPPORT || \
  408. HLW8012_SUPPORT || \
  409. MHZ19_SUPPORT || \
  410. SENSEAIR_SUPPORT || \
  411. PMSX003_SUPPORT || \
  412. PZEM004T_SUPPORT || \
  413. SHT3X_I2C_SUPPORT || \
  414. SI7021_SUPPORT || \
  415. TMP3X_SUPPORT || \
  416. V9261F_SUPPORT \
  417. )
  418. #endif
  419. // -----------------------------------------------------------------------------
  420. // ADC
  421. // -----------------------------------------------------------------------------
  422. // Default ADC mode is to monitor internal power supply
  423. #ifndef ADC_MODE_VALUE
  424. #define ADC_MODE_VALUE ADC_VCC
  425. #endif
  426. // -----------------------------------------------------------------------------
  427. // I2C
  428. // -----------------------------------------------------------------------------
  429. #ifndef I2C_SUPPORT
  430. #define I2C_SUPPORT 0 // I2C enabled (1.98Kb)
  431. #endif
  432. #define I2C_USE_BRZO 0 // Use brzo_i2c library or standard Wire
  433. #ifndef I2C_SDA_PIN
  434. #define I2C_SDA_PIN SDA // SDA GPIO (Sonoff => 4)
  435. #endif
  436. #ifndef I2C_SCL_PIN
  437. #define I2C_SCL_PIN SCL // SCL GPIO (Sonoff => 14)
  438. #endif
  439. #define I2C_CLOCK_STRETCH_TIME 200 // BRZO clock stretch time
  440. #define I2C_SCL_FREQUENCY 1000 // BRZO SCL frequency
  441. #define I2C_CLEAR_BUS 0 // Clear I2C bus on boot
  442. #define I2C_PERFORM_SCAN 1 // Perform a bus scan on boot
  443. //--------------------------------------------------------------------------------
  444. // Class loading
  445. //--------------------------------------------------------------------------------
  446. #if SENSOR_SUPPORT
  447. #if SENSOR_DEBUG
  448. #include "../config/debug.h"
  449. #endif
  450. #include "../sensors/BaseSensor.h"
  451. #if AM2320_SUPPORT
  452. #include "../sensors/AM2320Sensor.h"
  453. #endif
  454. #if ANALOG_SUPPORT
  455. #include "../sensors/AnalogSensor.h"
  456. #endif
  457. #if BH1750_SUPPORT
  458. #include "../sensors/BH1750Sensor.h"
  459. #endif
  460. #if BMX280_SUPPORT
  461. #include "../sensors/BMX280Sensor.h"
  462. #endif
  463. #if CSE7766_SUPPORT
  464. #include <SoftwareSerial.h>
  465. #include "../sensors/CSE7766Sensor.h"
  466. #endif
  467. #if DALLAS_SUPPORT
  468. #include <OneWire.h>
  469. #include "../sensors/DallasSensor.h"
  470. #endif
  471. #if DHT_SUPPORT
  472. #include "../sensors/DHTSensor.h"
  473. #endif
  474. #if DIGITAL_SUPPORT
  475. #include "../sensors/DigitalSensor.h"
  476. #endif
  477. #if ECH1560_SUPPORT
  478. #include "../sensors/ECH1560Sensor.h"
  479. #endif
  480. #if EMON_ADC121_SUPPORT
  481. #include "../sensors/EmonADC121Sensor.h"
  482. #endif
  483. #if EMON_ADS1X15_SUPPORT
  484. #include "../sensors/EmonADS1X15Sensor.h"
  485. #endif
  486. #if EMON_ANALOG_SUPPORT
  487. #include "../sensors/EmonAnalogSensor.h"
  488. #endif
  489. #if EVENTS_SUPPORT
  490. #include "../sensors/EventSensor.h"
  491. #endif
  492. #if GUVAS12SD_SUPPORT
  493. #include "../sensors/GUVAS12SDSensor.h"
  494. #endif
  495. #if HCSR04_SUPPORT
  496. #include "../sensors/HCSR04Sensor.h"
  497. #endif
  498. #if HLW8012_SUPPORT
  499. #include <HLW8012.h>
  500. #include "../sensors/HLW8012Sensor.h"
  501. #endif
  502. #if MHZ19_SUPPORT
  503. #include <SoftwareSerial.h>
  504. #include "../sensors/MHZ19Sensor.h"
  505. #endif
  506. #if SENSEAIR_SUPPORT
  507. #include <SoftwareSerial.h>
  508. #include "../sensors/SenseAirSensor.h"
  509. #endif
  510. #if PMSX003_SUPPORT
  511. #include <SoftwareSerial.h>
  512. #include "../sensors/PMSX003Sensor.h"
  513. #endif
  514. #if PZEM004T_SUPPORT
  515. #include <SoftwareSerial.h>
  516. #include "../sensors/PZEM004TSensor.h"
  517. #endif
  518. #if SI7021_SUPPORT
  519. #include "../sensors/SI7021Sensor.h"
  520. #endif
  521. #if SHT3X_I2C_SUPPORT
  522. #include "../sensors/SHT3XI2CSensor.h"
  523. #endif
  524. #if TMP3X_SUPPORT
  525. #include "../sensors/TMP3XSensor.h"
  526. #endif
  527. #if V9261F_SUPPORT
  528. #include <SoftwareSerial.h>
  529. #include "../sensors/V9261FSensor.h"
  530. #endif
  531. #endif // SENSOR_SUPPORT