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.

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