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.

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