mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 04:36:36 +00:00
59_LuftdatenInfo: added parsing of BME280 sensor data
git-svn-id: https://svn.fhem.de/fhem/trunk@14070 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
625174985d
commit
4bdc2dd4c0
@ -327,7 +327,7 @@ sub LuftdatenInfo_ParseHttpResponse($) {
|
||||
LuftdatenInfo_GetHttpResponse($hash, $SENSORID2)
|
||||
if(defined($SENSORID2));
|
||||
}
|
||||
elsif($sensor_type eq "DHT22"){
|
||||
elsif($sensor_type ne "SDS011"){
|
||||
Log3 $SELF, 5, "$TYPE ($SELF) - parsing $sensor_type data";
|
||||
|
||||
if( $sensor->{location}{latitude} ne
|
||||
@ -339,7 +339,8 @@ sub LuftdatenInfo_ParseHttpResponse($) {
|
||||
|
||||
Log3(
|
||||
$SELF, 2
|
||||
, "$TYPE ($SELF) - DHT22 position differs from SDS011 position"
|
||||
, "$TYPE ($SELF) - "
|
||||
. "$sensor_type position differs from SDS011 position"
|
||||
);
|
||||
|
||||
return;
|
||||
@ -357,6 +358,9 @@ sub LuftdatenInfo_ParseHttpResponse($) {
|
||||
elsif($_->{value_type} eq "humidity"){
|
||||
readingsBulkUpdate($hash, "humidity", $1);
|
||||
}
|
||||
elsif($_->{value_type} eq "pressure"){
|
||||
readingsBulkUpdate($hash, "pressure", $1);
|
||||
}
|
||||
}
|
||||
|
||||
readingsBulkUpdate($hash, "state", "active");
|
||||
@ -376,6 +380,9 @@ sub LuftdatenInfo_ParseHttpResponse($) {
|
||||
elsif($_->{value_type} eq "humidity"){
|
||||
readingsBulkUpdate($hash, "humidity", $1);
|
||||
}
|
||||
elsif($_->{value_type} eq "pressure"){
|
||||
readingsBulkUpdate($hash, "pressure", $1);
|
||||
}
|
||||
elsif($_->{value_type} eq "SDS_P1"){
|
||||
readingsBulkUpdate($hash, "PM10", $1);
|
||||
}
|
||||
@ -456,7 +463,9 @@ sub LuftdatenInfo_statusRequest($) {
|
||||
<ul>
|
||||
<code>
|
||||
define <name> LuftdatenInfo
|
||||
(<SDS011sensorID> [<DHT22sensorID>]|<ip>)
|
||||
(<SDS011sensorID>
|
||||
[<DHT22sensorID>|<BME280sensorID>]
|
||||
|<ip>)
|
||||
</code><br>
|
||||
To query the data from the server, the SDS011 SensorID must be
|
||||
specified.<br>
|
||||
@ -498,6 +507,11 @@ sub LuftdatenInfo_statusRequest($) {
|
||||
<code>humidity</code><br>
|
||||
Relative humidity in%
|
||||
</li>
|
||||
<li>
|
||||
<code>pressure</code><br>
|
||||
Pressure in hPa<br>
|
||||
Only available with BME280 sensor.
|
||||
</li>
|
||||
<li>
|
||||
<code>latitude</code><br>
|
||||
latitude<br>
|
||||
@ -575,7 +589,9 @@ sub LuftdatenInfo_statusRequest($) {
|
||||
<ul>
|
||||
<code>
|
||||
define <name> LuftdatenInfo
|
||||
(<SDS011sensorID> [<DHT22sensorID>]|<ip>)
|
||||
(<SDS011sensorID>
|
||||
[<DHT22sensorID>|<BME280sensorID>]
|
||||
|<ip>)
|
||||
</code><br>
|
||||
Für eine Abfrage der Daten vom Server muss die SensorID von dem
|
||||
SDS011 Sensor angegeben werden. Diese steht rechts auf der Seite
|
||||
@ -616,6 +632,11 @@ sub LuftdatenInfo_statusRequest($) {
|
||||
<code>humidity</code><br>
|
||||
Relative Luftfeuchtgkeit in %
|
||||
</li>
|
||||
<li>
|
||||
<code>pressure</code><br>
|
||||
Luftdruck in hPa<br>
|
||||
Nur bei einem BME280 Sensor verfügbar.
|
||||
</li>
|
||||
<li>
|
||||
<code>latitude</code><br>
|
||||
Breitengrad<br>
|
||||
|
Loading…
x
Reference in New Issue
Block a user