diff --git a/README.md b/README.md index a28232f..3bd9c43 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,9 @@ Monitor some parameters of Freifunk routers ## heating Some heating rules, based on a time schedule, presence and TV status. +## luftdaten +Monitor some parameters of Luftdaten.info sensors + ## presence Wifi Presence - Detect a person with his/her smartphone entering or leaving the wireless home network (based on a Fritzbox and two DD-WRT based access points). diff --git a/luftdaten/DHT22_Luftfeuchtigkeit.js b/luftdaten/DHT22_Luftfeuchtigkeit.js new file mode 100644 index 0000000..34e7d23 --- /dev/null +++ b/luftdaten/DHT22_Luftfeuchtigkeit.js @@ -0,0 +1 @@ +JSON.parse(input).sensors['3'].lastMeasurement.value; diff --git a/luftdaten/DHT22_Temperatur.js b/luftdaten/DHT22_Temperatur.js new file mode 100644 index 0000000..3f74f31 --- /dev/null +++ b/luftdaten/DHT22_Temperatur.js @@ -0,0 +1 @@ +JSON.parse(input).sensors['2'].lastMeasurement.value; diff --git a/luftdaten/README.md b/luftdaten/README.md new file mode 100644 index 0000000..f394eee --- /dev/null +++ b/luftdaten/README.md @@ -0,0 +1,10 @@ +# Luftdaten.info +Monitor particulate matter, temperature and humidity parameters of [Luftdaten](http://luftdaten.info) sensors. + +I run a [Luftdaten](http://luftdaten.info) particulate matter sensor and use [openSenseMap](https://opensensemap.org) to collect data from it to display and use in openHAB. + +First you need to register your sensor with openSenseMap. You can access the data of your sensor through a JSON file. All you need is the box id of your sensor as described [here](https://github.com/sensebox/OpenSenseMap-API/wiki/API-Dokumentation). + +* **luftdaten.items**: Put this file into your */etc/openhab2/items* directory and modify it for your specific setup. Maybe everything suits your needs, but you need to enter the correct box id for your sensor like described [here](https://github.com/sensebox/OpenSenseMap-API/wiki/API-Dokumentation). +* **DHT22_\*.js**: Put these files into your */etc/openhab2/transform* directory. +* **SDS011_\*.js**: Put these files into your */etc/openhab2/transform* directory. \ No newline at end of file diff --git a/luftdaten/SDS011_PM10.js b/luftdaten/SDS011_PM10.js new file mode 100644 index 0000000..696d932 --- /dev/null +++ b/luftdaten/SDS011_PM10.js @@ -0,0 +1 @@ +JSON.parse(input).sensors['0'].lastMeasurement.value; diff --git a/luftdaten/SDS011_PM25.js b/luftdaten/SDS011_PM25.js new file mode 100644 index 0000000..70bb172 --- /dev/null +++ b/luftdaten/SDS011_PM25.js @@ -0,0 +1 @@ +JSON.parse(input).sensors['1'].lastMeasurement.value; diff --git a/luftdaten/luftdaten.items b/luftdaten/luftdaten.items new file mode 100644 index 0000000..e24c2e2 --- /dev/null +++ b/luftdaten/luftdaten.items @@ -0,0 +1,5 @@ +Number SDS011_PM10 "PM10 [%s]" { http="<[https://api.opensensemap.org/boxes/1234567890abcdefabcdefabc:60000:JS(SDS011_PM10.js)]" } +Number SDS011_PM25 "PM2.5 [%s]" { http="<[https://api.opensensemap.org/boxes/1234567890abcdefabcdefabc:60000:JS(SDS011_PM25.js)]" } + +Number DHT22_Temperatur "Temperatur [%.1f °C]" { http="<[https://api.opensensemap.org/boxes/1234567890abcdefabcdefabc:60000:JS(DHT22_Temperatur.js)]" } +Number DHT22_Luftfeuchtigkeit "Luftfeuchtigkeit [%.1f %%]" { http="<[https://api.opensensemap.org/boxes/1234567890abcdefabcdefabc:60000:JS(DHT22_Luftfeuchtigkeit.js)]" }