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.

605 lines
21 KiB

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 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_REPORT_EVERY 10 // Report every this many readings
  9. #define SENSOR_REPORT_MIN_EVERY 1 // Minimum every value
  10. #define SENSOR_REPORT_MAX_EVERY 12 // Maximum
  11. #define SENSOR_USE_INDEX 0 // Use the index in topic (i.e. temperature/0)
  12. // even if just one sensor (0 for backwards compatibility)
  13. #ifndef SENSOR_TEMPERATURE_UNITS
  14. #define SENSOR_TEMPERATURE_UNITS TMP_CELSIUS // Temperature units (TMP_CELSIUS | TMP_FAHRENHEIT)
  15. #endif
  16. #ifndef SENSOR_TEMPERATURE_CORRECTION
  17. #define SENSOR_TEMPERATURE_CORRECTION 0.0 // Offset correction
  18. #endif
  19. #ifndef TEMPERATURE_MIN_CHANGE
  20. #define TEMPERATURE_MIN_CHANGE 0.0 // Minimum temperature change to report
  21. #endif
  22. #ifndef HUMIDITY_MIN_CHANGE
  23. #define HUMIDITY_MIN_CHANGE 0 // Minimum humidity change to report
  24. #endif
  25. #define HUMIDITY_NORMAL 0
  26. #define HUMIDITY_COMFORTABLE 1
  27. #define HUMIDITY_DRY 2
  28. #define HUMIDITY_WET 3
  29. //--------------------------------------------------------------------------------
  30. // Sensor ID
  31. // These should remain over time, do not modify them, only add new ones at the end
  32. //--------------------------------------------------------------------------------
  33. #define SENSOR_DHTXX_ID 0x01
  34. #define SENSOR_DALLAS_ID 0x02
  35. #define SENSOR_EMON_ANALOG_ID 0x03
  36. #define SENSOR_EMON_ADC121_ID 0x04
  37. #define SENSOR_EMON_ADS1X15_ID 0x05
  38. #define SENSOR_HLW8012_ID 0x06
  39. #define SENSOR_V9261F_ID 0x07
  40. #define SENSOR_ECH1560_ID 0x08
  41. #define SENSOR_ANALOG_ID 0x09
  42. #define SENSOR_DIGITAL_ID 0x10
  43. #define SENSOR_EVENTS_ID 0x11
  44. #define SENSOR_PMSX003_ID 0x12
  45. #define SENSOR_BMX280_ID 0x13
  46. #define SENSOR_MHZ19_ID 0x14
  47. #define SENSOR_SI7021_ID 0x15
  48. #define SENSOR_SHT3X_I2C_ID 0x16
  49. //--------------------------------------------------------------------------------
  50. // Magnitudes
  51. //--------------------------------------------------------------------------------
  52. #define MAGNITUDE_NONE 0
  53. #define MAGNITUDE_TEMPERATURE 1
  54. #define MAGNITUDE_HUMIDITY 2
  55. #define MAGNITUDE_PRESSURE 3
  56. #define MAGNITUDE_CURRENT 4
  57. #define MAGNITUDE_VOLTAGE 5
  58. #define MAGNITUDE_POWER_ACTIVE 6
  59. #define MAGNITUDE_POWER_APPARENT 7
  60. #define MAGNITUDE_POWER_REACTIVE 8
  61. #define MAGNITUDE_POWER_FACTOR 9
  62. #define MAGNITUDE_ENERGY 10
  63. #define MAGNITUDE_ENERGY_DELTA 11
  64. #define MAGNITUDE_ANALOG 12
  65. #define MAGNITUDE_DIGITAL 13
  66. #define MAGNITUDE_EVENTS 14
  67. #define MAGNITUDE_PM1dot0 15
  68. #define MAGNITUDE_PM2dot5 16
  69. #define MAGNITUDE_PM10 17
  70. #define MAGNITUDE_CO2 18
  71. #define MAGNITUDE_MAX 19
  72. // =============================================================================
  73. // Specific data for each sensor
  74. // =============================================================================
  75. //------------------------------------------------------------------------------
  76. // Analog sensor
  77. // Enable support by passing ANALOG_SUPPORT=1 build flag
  78. //--------------------------------------------------------------------------------
  79. #ifndef ANALOG_SUPPORT
  80. #define ANALOG_SUPPORT 0
  81. #endif
  82. #if ANALOG_SUPPORT
  83. #undef ADC_VCC_ENABLED
  84. #define ADC_VCC_ENABLED 0
  85. #endif
  86. //------------------------------------------------------------------------------
  87. // BME280/BMP280
  88. // Enable support by passing BMX280_SUPPORT=1 build flag
  89. //------------------------------------------------------------------------------
  90. #ifndef BMX280_SUPPORT
  91. #define BMX280_SUPPORT 0
  92. #endif
  93. #ifndef BMX280_ADDRESS
  94. #define BMX280_ADDRESS 0x00 // 0x00 means auto
  95. #endif
  96. #define BMX280_MODE 1 // 1 for forced mode, 3 for normal mode
  97. #define BMX280_TEMPERATURE 1 // Oversampling for temperature (set to 0 to disable magnitude)
  98. #define BMX280_HUMIDITY 1 // Oversampling for humidity (set to 0 to disable magnitude, only for BME280)
  99. #define BMX280_PRESSURE 1 // Oversampling for pressure (set to 0 to disable magnitude)
  100. #if BMX280_SUPPORT
  101. #undef I2C_SUPPORT
  102. #define I2C_SUPPORT 1
  103. #endif
  104. //------------------------------------------------------------------------------
  105. // Dallas OneWire temperature sensors
  106. // Enable support by passing DALLAS_SUPPORT=1 build flag
  107. //------------------------------------------------------------------------------
  108. #ifndef DALLAS_SUPPORT
  109. #define DALLAS_SUPPORT 0
  110. #endif
  111. #ifndef DALLAS_PIN
  112. #define DALLAS_PIN 13
  113. #endif
  114. #define DALLAS_RESOLUTION 9 // Not used atm
  115. #define DALLAS_READ_INTERVAL 2000 // Force sensor read & cache every 2 seconds
  116. //------------------------------------------------------------------------------
  117. // DHTXX temperature/humidity sensor
  118. // Enable support by passing DHT_SUPPORT=1 build flag
  119. //------------------------------------------------------------------------------
  120. #ifndef DHT_SUPPORT
  121. #define DHT_SUPPORT 0
  122. #endif
  123. #ifndef DHT_PIN
  124. #define DHT_PIN 13
  125. #endif
  126. #ifndef DHT_TYPE
  127. #define DHT_TYPE DHT_CHIP_DHT22
  128. #endif
  129. //------------------------------------------------------------------------------
  130. // Digital sensor
  131. // Enable support by passing DIGITAL_SUPPORT=1 build flag
  132. //------------------------------------------------------------------------------
  133. #ifndef DIGITAL_SUPPORT
  134. #define DIGITAL_SUPPORT 0
  135. #endif
  136. #ifndef DIGITAL_PIN
  137. #define DIGITAL_PIN 2
  138. #endif
  139. #ifndef DIGITAL_PIN_MODE
  140. #define DIGITAL_PIN_MODE INPUT_PULLUP
  141. #endif
  142. #ifndef DIGITAL_DEFAULT_STATE
  143. #define DIGITAL_DEFAULT_STATE 1
  144. #endif
  145. //------------------------------------------------------------------------------
  146. // ECH1560 based power sensor
  147. // Enable support by passing ECH1560_SUPPORT=1 build flag
  148. //------------------------------------------------------------------------------
  149. #ifndef ECH1560_SUPPORT
  150. #define ECH1560_SUPPORT 0
  151. #endif
  152. #ifndef ECH1560_CLK_PIN
  153. #define ECH1560_CLK_PIN 4 // CLK pin for the ECH1560
  154. #endif
  155. #ifndef ECH1560_MISO_PIN
  156. #define ECH1560_MISO_PIN 5 // MISO pin for the ECH1560
  157. #endif
  158. #ifndef ECH1560_INVERTED
  159. #define ECH1560_INVERTED 0 // Signal is inverted
  160. #endif
  161. //------------------------------------------------------------------------------
  162. // Energy Monitor general settings
  163. //------------------------------------------------------------------------------
  164. #define EMON_MAX_SAMPLES 1000 // Max number of samples to get
  165. #define EMON_MAX_TIME 250 // Max time in ms to sample
  166. #define EMON_FILTER_SPEED 512 // Mobile average filter speed
  167. #define EMON_MAINS_VOLTAGE 230 // Mains voltage
  168. #define EMON_REFERENCE_VOLTAGE 3.3 // Reference voltage of the ADC
  169. #define EMON_CURRENT_RATIO 30 // Current ratio in the clamp (30V/1A)
  170. #define EMON_REPORT_CURRENT 0 // Report current
  171. #define EMON_REPORT_POWER 1 // Report power
  172. #define EMON_REPORT_ENERGY 1 // Report energy
  173. //------------------------------------------------------------------------------
  174. // Energy Monitor based on ADC121
  175. // Enable support by passing EMON_ADC121_SUPPORT=1 build flag
  176. //------------------------------------------------------------------------------
  177. #ifndef EMON_ADC121_SUPPORT
  178. #define EMON_ADC121_SUPPORT 0 // Do not build support by default
  179. #endif
  180. #define EMON_ADC121_I2C_ADDRESS 0x00 // 0x00 means auto
  181. #if EMON_ADC121_SUPPORT
  182. #undef I2C_SUPPORT
  183. #define I2C_SUPPORT 1
  184. #endif
  185. //------------------------------------------------------------------------------
  186. // Energy Monitor based on ADS1X15
  187. // Enable support by passing EMON_ADS1X15_SUPPORT=1 build flag
  188. //------------------------------------------------------------------------------
  189. #ifndef EMON_ADS1X15_SUPPORT
  190. #define EMON_ADS1X15_SUPPORT 0 // Do not build support by default
  191. #endif
  192. #define EMON_ADS1X15_I2C_ADDRESS 0x00 // 0x00 means auto
  193. #define EMON_ADS1X15_TYPE ADS1X15_CHIP_ADS1115
  194. #define EMON_ADS1X15_GAIN ADS1X15_REG_CONFIG_PGA_4_096V
  195. #define EMON_ADS1X15_MASK 0x0F // A0=1 A1=2 A2=4 A4=8
  196. #if EMON_ADS1X15_SUPPORT
  197. #undef I2C_SUPPORT
  198. #define I2C_SUPPORT 1
  199. #endif
  200. //------------------------------------------------------------------------------
  201. // Energy Monitor based on interval analog GPIO
  202. // Enable support by passing EMON_ANALOG_SUPPORT=1 build flag
  203. //------------------------------------------------------------------------------
  204. #ifndef EMON_ANALOG_SUPPORT
  205. #define EMON_ANALOG_SUPPORT 0 // Do not build support by default
  206. #endif
  207. #if EMON_ANALOG_SUPPORT
  208. #undef ADC_VCC_ENABLED
  209. #define ADC_VCC_ENABLED 0
  210. #endif
  211. //------------------------------------------------------------------------------
  212. // Counter sensor
  213. // Enable support by passing EVENTS_SUPPORT=1 build flag
  214. //------------------------------------------------------------------------------
  215. #ifndef EVENTS_SUPPORT
  216. #define EVENTS_SUPPORT 0 // Do not build with counter support by default
  217. #endif
  218. #ifndef EVENTS_PIN
  219. #define EVENTS_PIN 2 // GPIO to monitor
  220. #endif
  221. #ifndef EVENTS_PIN_MODE
  222. #define EVENTS_PIN_MODE INPUT // INPUT, INPUT_PULLUP
  223. #endif
  224. #ifndef EVENTS_INTERRUPT_MODE
  225. #define EVENTS_INTERRUPT_MODE RISING // RISING, FALLING, BOTH
  226. #endif
  227. #define EVENTS_DEBOUNCE 50 // Do not register events within less than 10 millis
  228. //------------------------------------------------------------------------------
  229. // HLW8012 Energy monitor IC
  230. // Enable support by passing HLW8012_SUPPORT=1 build flag
  231. //------------------------------------------------------------------------------
  232. #ifndef HLW8012_SUPPORT
  233. #define HLW8012_SUPPORT 0
  234. #endif
  235. #ifndef HLW8012_SEL_PIN
  236. #define HLW8012_SEL_PIN 5
  237. #endif
  238. #ifndef HLW8012_CF1_PIN
  239. #define HLW8012_CF1_PIN 13
  240. #endif
  241. #ifndef HLW8012_CF_PIN
  242. #define HLW8012_CF_PIN 14
  243. #endif
  244. #ifndef HLW8012_SEL_CURRENT
  245. #define HLW8012_SEL_CURRENT HIGH // SEL pin to HIGH to measure current
  246. #endif
  247. #ifndef HLW8012_CURRENT_R
  248. #define HLW8012_CURRENT_R 0.001 // Current resistor
  249. #endif
  250. #ifndef HLW8012_VOLTAGE_R_UP
  251. #define HLW8012_VOLTAGE_R_UP ( 5 * 470000 ) // Upstream voltage resistor
  252. #endif
  253. #ifndef HLW8012_VOLTAGE_R_DOWN
  254. #define HLW8012_VOLTAGE_R_DOWN ( 1000 ) // Downstream voltage resistor
  255. #endif
  256. #define HLW8012_USE_INTERRUPTS 1 // Use interrupts to trap HLW8012 signals
  257. //------------------------------------------------------------------------------
  258. // MHZ19 CO2 sensor
  259. // Enable support by passing MHZ19_SUPPORT=1 build flag
  260. //------------------------------------------------------------------------------
  261. #ifndef MHZ19_SUPPORT
  262. #define MHZ19_SUPPORT 0
  263. #endif
  264. #define MHZ19_RX_PIN 13
  265. #define MHZ19_TX_PIN 15
  266. //------------------------------------------------------------------------------
  267. // Particle Monitor based on Plantower PMSX003
  268. // Enable support by passing PMSX003_SUPPORT=1 build flag
  269. //------------------------------------------------------------------------------
  270. #ifndef PMSX003_SUPPORT
  271. #define PMSX003_SUPPORT 0
  272. #endif
  273. #define PMS_RX_PIN 13
  274. #define PMS_TX_PIN 15
  275. //------------------------------------------------------------------------------
  276. // SHT3X I2C (Wemos) temperature & humidity sensor
  277. // Enable support by passing SHT3X_SUPPORT=1 build flag
  278. //------------------------------------------------------------------------------
  279. #ifndef SHT3X_I2C_SUPPORT
  280. #define SHT3X_I2C_SUPPORT 0
  281. #endif
  282. #ifndef SHT3X_I2C_ADDRESS
  283. #define SHT3X_I2C_ADDRESS 0x00 // 0x00 means auto
  284. #endif
  285. #if SHT3X_I2C_SUPPORT
  286. #undef I2C_SUPPORT
  287. #define I2C_SUPPORT 1
  288. #endif
  289. //------------------------------------------------------------------------------
  290. // SI7021 temperature & humidity sensor
  291. // Enable support by passing SI7021_SUPPORT=1 build flag
  292. //------------------------------------------------------------------------------
  293. #ifndef SI7021_SUPPORT
  294. #define SI7021_SUPPORT 0
  295. #endif
  296. #ifndef SI7021_ADDRESS
  297. #define SI7021_ADDRESS 0x00 // 0x00 means auto
  298. #endif
  299. #if SI7021_SUPPORT
  300. #undef I2C_SUPPORT
  301. #define I2C_SUPPORT 1
  302. #endif
  303. //------------------------------------------------------------------------------
  304. // V9261F based power sensor
  305. // Enable support by passing SI7021_SUPPORT=1 build flag
  306. //------------------------------------------------------------------------------
  307. #ifndef V9261F_SUPPORT
  308. #define V9261F_SUPPORT 0
  309. #endif
  310. #ifndef V9261F_PIN
  311. #define V9261F_PIN 2 // TX pin from the V9261F
  312. #endif
  313. #ifndef V9261F_PIN_INVERSE
  314. #define V9261F_PIN_INVERSE 1 // Signal is inverted
  315. #endif
  316. #define V9261F_SYNC_INTERVAL 600 // Sync signal length (ms)
  317. #define V9261F_BAUDRATE 4800 // UART baudrate
  318. // Default ratios
  319. #define V9261F_CURRENT_FACTOR 79371434.0
  320. #define V9261F_VOLTAGE_FACTOR 4160651.0
  321. #define V9261F_POWER_FACTOR 153699.0
  322. #define V9261F_RPOWER_FACTOR V9261F_CURRENT_FACTOR
  323. // =============================================================================
  324. // Sensor helpers configuration
  325. // =============================================================================
  326. #if ANALOG_SUPPORT || BMX280_SUPPORT || DALLAS_SUPPORT \
  327. || DHT_SUPPORT || DIGITAL_SUPPORT || ECH1560_SUPPORT \
  328. || EMON_ADC121_SUPPORT || EMON_ADS1X15_SUPPORT \
  329. || EMON_ANALOG_SUPPORT || EVENTS_SUPPORT || HLW8012_SUPPORT \
  330. || MHZ19_SUPPORT || PMSX003_SUPPORT || SHT3X_I2C_SUPPORT \
  331. || SI7021_SUPPORT || V9261F_SUPPORT
  332. #define SENSOR_SUPPORT 1
  333. #endif
  334. // -----------------------------------------------------------------------------
  335. // I2C
  336. // -----------------------------------------------------------------------------
  337. #ifndef I2C_SUPPORT
  338. #define I2C_SUPPORT 0 // I2C enabled (1.98Kb)
  339. #endif
  340. #define I2C_USE_BRZO 0 // Use brzo_i2c library or standard Wire
  341. #ifndef I2C_SDA_PIN
  342. #define I2C_SDA_PIN SDA // SDA GPIO (Sonoff => 4)
  343. #endif
  344. #ifndef I2C_SCL_PIN
  345. #define I2C_SCL_PIN SCL // SCL GPIO (Sonoff => 14)
  346. #endif
  347. #define I2C_CLOCK_STRETCH_TIME 200 // BRZO clock stretch time
  348. #define I2C_SCL_FREQUENCY 1000 // BRZO SCL frequency
  349. #define I2C_CLEAR_BUS 0 // Clear I2C bus at boot
  350. //--------------------------------------------------------------------------------
  351. // Internal power monitor
  352. // Enable support by passing ADC_VCC_ENABLED=1 build flag
  353. // Do not enable this if using the analog GPIO for any other thing
  354. //--------------------------------------------------------------------------------
  355. #ifndef ADC_VCC_ENABLED
  356. #define ADC_VCC_ENABLED 1
  357. #endif
  358. #if ADC_VCC_ENABLED
  359. ADC_MODE(ADC_VCC);
  360. #endif
  361. //--------------------------------------------------------------------------------
  362. // Class loading
  363. //--------------------------------------------------------------------------------
  364. #if SENSOR_SUPPORT
  365. PROGMEM const unsigned char magnitude_decimals[] = {
  366. 0,
  367. 1, 0, 2,
  368. 3, 0, 0, 0, 0, 0, 0, 0,
  369. 0, 0, 0,
  370. 0, 0, 0,
  371. 0
  372. };
  373. PROGMEM const char magnitude_unknown_topic[] = "unknown";
  374. PROGMEM const char magnitude_temperature_topic[] = "temperature";
  375. PROGMEM const char magnitude_humidity_topic[] = "humidity";
  376. PROGMEM const char magnitude_pressure_topic[] = "pressure";
  377. PROGMEM const char magnitude_current_topic[] = "current";
  378. PROGMEM const char magnitude_voltage_topic[] = "voltage";
  379. PROGMEM const char magnitude_active_power_topic[] = "power";
  380. PROGMEM const char magnitude_apparent_power_topic[] = "apparent";
  381. PROGMEM const char magnitude_reactive_power_topic[] = "reactive";
  382. PROGMEM const char magnitude_power_factor_topic[] = "factor";
  383. PROGMEM const char magnitude_energy_topic[] = "energy";
  384. PROGMEM const char magnitude_energy_delta_topic[] = "energy_delta";
  385. PROGMEM const char magnitude_pm1dot0_topic[] = "pm1dot0";
  386. PROGMEM const char magnitude_pm2dot5_topic[] = "pm2dot5";
  387. PROGMEM const char magnitude_pm10_topic[] = "pm10";
  388. PROGMEM const char magnitude_analog_topic[] = "analog";
  389. PROGMEM const char magnitude_digital_topic[] = "digital";
  390. PROGMEM const char magnitude_events_topic[] = "events";
  391. PROGMEM const char magnitude_co2_topic[] = "co2";
  392. PROGMEM const char* const magnitude_topics[] = {
  393. magnitude_unknown_topic, magnitude_temperature_topic, magnitude_humidity_topic,
  394. magnitude_pressure_topic, magnitude_current_topic, magnitude_voltage_topic,
  395. magnitude_active_power_topic, magnitude_apparent_power_topic, magnitude_reactive_power_topic,
  396. magnitude_power_factor_topic, magnitude_energy_topic, magnitude_energy_delta_topic,
  397. magnitude_pm1dot0_topic, magnitude_pm2dot5_topic, magnitude_pm10_topic,
  398. magnitude_analog_topic, magnitude_digital_topic, magnitude_events_topic,
  399. magnitude_co2_topic
  400. };
  401. PROGMEM const char magnitude_empty[] = "";
  402. PROGMEM const char magnitude_celsius[] = "C";
  403. PROGMEM const char magnitude_fahrenheit[] = "F";
  404. PROGMEM const char magnitude_percentage[] = "%";
  405. PROGMEM const char magnitude_hectopascals[] = "hPa";
  406. PROGMEM const char magnitude_amperes[] = "A";
  407. PROGMEM const char magnitude_volts[] = "V";
  408. PROGMEM const char magnitude_watts[] = "W";
  409. PROGMEM const char magnitude_joules[] = "J";
  410. PROGMEM const char magnitude_ugm3[] = "µg/m3";
  411. PROGMEM const char magnitude_ppm[] = "ppm";
  412. PROGMEM const char* const magnitude_units[] = {
  413. magnitude_empty, magnitude_celsius, magnitude_percentage,
  414. magnitude_hectopascals, magnitude_amperes, magnitude_volts,
  415. magnitude_watts, magnitude_watts, magnitude_watts,
  416. magnitude_percentage, magnitude_joules, magnitude_joules,
  417. magnitude_ugm3, magnitude_ugm3, magnitude_ugm3,
  418. magnitude_empty, magnitude_empty, magnitude_empty,
  419. magnitude_ppm
  420. };
  421. #include "../sensors/BaseSensor.h"
  422. #if ANALOG_SUPPORT
  423. #include "../sensors/AnalogSensor.h"
  424. #endif
  425. #if BMX280_SUPPORT
  426. #include <SparkFunBME280.h>
  427. #include "../sensors/BMX280Sensor.h"
  428. #endif
  429. #if DALLAS_SUPPORT
  430. #include <OneWire.h>
  431. #include "../sensors/DallasSensor.h"
  432. #endif
  433. #if DHT_SUPPORT
  434. #include "../sensors/DHTSensor.h"
  435. #endif
  436. #if DIGITAL_SUPPORT
  437. #include "../sensors/DigitalSensor.h"
  438. #endif
  439. #if ECH1560_SUPPORT
  440. #include "../sensors/ECH1560Sensor.h"
  441. #endif
  442. #if EMON_ADC121_SUPPORT
  443. #include "../sensors/EmonADC121Sensor.h"
  444. #endif
  445. #if EMON_ADS1X15_SUPPORT
  446. #include "../sensors/EmonADS1X15Sensor.h"
  447. #endif
  448. #if EMON_ANALOG_SUPPORT
  449. #include "../sensors/EmonAnalogSensor.h"
  450. #endif
  451. #if EVENTS_SUPPORT
  452. #include "../sensors/EventSensor.h"
  453. #endif
  454. #if HLW8012_SUPPORT
  455. #include <HLW8012.h>
  456. #include "../sensors/HLW8012Sensor.h"
  457. #endif
  458. #if MHZ19_SUPPORT
  459. #include <SoftwareSerial.h>
  460. #include "../sensors/MHZ19Sensor.h"
  461. #endif
  462. #if PMSX003_SUPPORT
  463. #include <SoftwareSerial.h>
  464. #include <PMS.h>
  465. #include "../sensors/PMSX003Sensor.h"
  466. #endif
  467. #if SI7021_SUPPORT
  468. #include "../sensors/SI7021Sensor.h"
  469. #endif
  470. #if SHT3X_I2C_SUPPORT
  471. #include "../sensors/SHT3XI2CSensor.h"
  472. #endif
  473. #if V9261F_SUPPORT
  474. #include <SoftwareSerial.h>
  475. #include "../sensors/V9261FSensor.h"
  476. #endif
  477. #endif // SENSOR_SUPPORT