Commit Graph

12 Commits

Author SHA1 Message Date
Pim van Pelt
affa077d61 Add four new drivers!
HTU21DF
SHT31
SI7021
MCP9808

.. which will be published to GitHub after launch review at Google.
2018-04-03 19:52:52 +02:00
Pim van Pelt
2a32858b86 Refactor VEML6075
the _create() method now takes the mgos_i2c bus as first argument.
2018-04-03 19:52:13 +02:00
Pim van Pelt
945aaf44c4 Update README 2018-03-26 15:11:24 +02:00
Pim van Pelt
74c5ea060e Merge branch 'master' of git.ipng.nl:pim/prometheus-sensors 2018-03-26 15:11:12 +02:00
Pim van Pelt
a7b78521f1 Add BME280 Sensor
- Plumb BME280 all the way through to Prometheus.
- Add README detailing the diff between BME280 and BMP280
- Refactor source files to be *_drv.c to avoid naming clashes with
  upstream libraries.
2018-03-26 15:07:17 +02:00
Pim van Pelt
d7677adab6 Now that mgos_prometheus_metrics_printf() allows for multiple lines with the same name, remove the hacks 2018-03-25 22:27:54 +02:00
Pim van Pelt
fb87c4070a Add VEML6075; Update DHT reported values 2018-03-22 15:39:06 +01:00
Pim van Pelt
9cd0681e4d Add VEML6075 scaffolding.
Also, remove DHT dependency and add a note in mos.yml to have
application owners include those libraries. Without them, we'll compile
no scaffolding. With them, we'll pull those in based on -DHAVE_* macros.
2018-03-21 23:07:04 +01:00
Pim van Pelt
d80ba14e03 Fix broken includes after refactor 2018-03-21 15:35:58 +01:00
Pim van Pelt
f43dea1d7b Add DHT temp/humidity getters.
+float mgos_prometheus_sensors_dht_get_temp(uint8_t idx);
+float mgos_prometheus_sensors_dht_get_humidity(uint8_t idx);

They return NAN if the index is invalid, or the sensor couldn't be
found. Otherwise, they return the last measured temperature or humidity
values as floats.
2018-03-04 17:01:17 +01:00
Pim van Pelt
0d48de1ba8 Add Prometheus timer.
This timer will periodically upload Prometheus information to the push
gateway. By default, every `sensors.pushgateway_period` (10) seconds.
2018-03-04 16:38:10 +01:00
Pim van Pelt
1ff7642bea Initial Checkin.
Only DHT (AM3202) supported at this time.
2018-03-04 16:11:07 +01:00