toto / homebridge-airrohr

HomeBridge module for the DIY luftdaten.info particulates sensor. See http://luftdaten.info how to build your own
http://luftdaten.info
MIT License
52 stars 12 forks source link

Add support for other sensor types #18

Closed arouanet closed 6 years ago

arouanet commented 6 years ago

Hi Thomas,

The following pull request adds support for other sensor types supported by the Airrohr. It also prioritises the BME280 over the DHT22 when both sensors are present in local data. Deciding which sensor is more accurate is not a clear-cut issue, but I think the consensus on BME280 vs. DHT22 is pretty strong. See opendata-stuttgart/sensors-software#170 for example.

Ideally it would be nice to let the user define (in the configuration file) which sensor should take priority when a given metric is available through multiple sensors, but this might be too much work for such an uncommon use case.

I hope I'm not being anoying with all these pull requests! I promise I'm almost done. :smile: