Commit Graph

18 Commits

Author SHA1 Message Date
096192138c Code Formatting (uncrustify) 2018-04-09 19:44:04 +02:00
9067ab01dd Format code (BCPP) 2018-04-09 19:06:32 +02:00
9a358e31ab Add statistics to DHT 2018-04-04 16:54:10 +02:00
e41fb6900d Add BME280 statistics 2018-04-04 15:01:20 +02:00
9a71d580c0 Expose mgos_*_stats in Prometheus 2018-04-04 14:03:50 +02:00
b4b81f7542 Some finishing touches.
- Print *_timer_cb consistently (add units "C" and "%" at .2f precision)
- Guard HTU21DF and SI7021 from co-existing (both devices are on the same I2C address)
- Differentiate between BME280 and BMP280 in metrics
- Update README with timing information
- Link in all drivers
2018-04-03 23:57:49 +02:00
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
2a32858b86 Refactor VEML6075
the _create() method now takes the mgos_i2c bus as first argument.
2018-04-03 19:52:13 +02:00
945aaf44c4 Update README 2018-03-26 15:11:24 +02:00
74c5ea060e Merge branch 'master' of git.ipng.nl:pim/prometheus-sensors 2018-03-26 15:11:12 +02:00
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
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
fb87c4070a Add VEML6075; Update DHT reported values 2018-03-22 15:39:06 +01:00
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
d80ba14e03 Fix broken includes after refactor 2018-03-21 15:35:58 +01:00
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
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
1ff7642bea Initial Checkin.
Only DHT (AM3202) supported at this time.
2018-03-04 16:11:07 +01:00