mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
51_MOBILEALERTS.pm:Added Sensor WL2000
git-svn-id: https://svn.fhem.de/fhem/trunk@15815 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
98a58f4293
commit
41e147ae3e
@ -1,5 +1,6 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||||
# Do not insert empty lines here, update check depends on it.
|
# Do not insert empty lines here, update check depends on it.
|
||||||
|
- feature: 51_MOBILEALERTS: Added Sensor WL2000
|
||||||
- change: 93_DbRep: V7.3.0, charfilter avoid control characters in datasets
|
- change: 93_DbRep: V7.3.0, charfilter avoid control characters in datasets
|
||||||
to export, function exportToFile importFromFile improved
|
to export, function exportToFile importFromFile improved
|
||||||
- feature: FHEMWEB: new style f18
|
- feature: FHEMWEB: new style f18
|
||||||
|
@ -336,6 +336,55 @@ sub MOBILEALERTS_Parse_d4 ($$) {
|
|||||||
"T: " . $temperature . " H: " . $humidity . " " . $wetness );
|
"T: " . $temperature . " H: " . $humidity . " " . $wetness );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub MOBILEALERTS_Parse_05_da ($$) {
|
||||||
|
my ( $hash, $message ) = @_;
|
||||||
|
MOBILEALERTS_readingsBulkUpdateIfChanged( $hash, 0, "deviceType",
|
||||||
|
"WL2000" );
|
||||||
|
my ( $txCounter, $temperatureOut, $temperatureIn, $humidityIn, $co2,
|
||||||
|
$prevTemperatureOut, $prevTemperatureIn, $prevHumidityIn )
|
||||||
|
= unpack( "nnnnnnnn", $message );
|
||||||
|
|
||||||
|
MOBILEALERTS_readingsBulkUpdate( $hash, 0, "txCounter",
|
||||||
|
MOBILEALERTS_decodeTxCounter($txCounter) );
|
||||||
|
MOBILEALERTS_readingsBulkUpdate( $hash, 0, "triggered",
|
||||||
|
MOBILEALERTS_triggeredTxCounter($txCounter) );
|
||||||
|
$temperatureIn = MOBILEALERTS_decodeTemperature($temperatureIn);
|
||||||
|
MOBILEALERTS_readingsBulkUpdate( $hash, 0, "temperatureIn",
|
||||||
|
$temperatureIn );
|
||||||
|
MOBILEALERTS_readingsBulkUpdate( $hash, 0, "temperatureStringIn",
|
||||||
|
MOBILEALERTS_temperatureToString($temperatureIn) );
|
||||||
|
$temperatureOut = MOBILEALERTS_decodeTemperature($temperatureOut);
|
||||||
|
MOBILEALERTS_readingsBulkUpdate( $hash, 0, "temperatureOut",
|
||||||
|
$temperatureOut );
|
||||||
|
MOBILEALERTS_readingsBulkUpdate( $hash, 0, "temperatureStringOut",
|
||||||
|
MOBILEALERTS_temperatureToString($temperatureOut) );
|
||||||
|
$humidityIn = MOBILEALERTS_decodeHumidity($humidityIn);
|
||||||
|
MOBILEALERTS_readingsBulkUpdate( $hash, 0, "humidity", $humidityIn );
|
||||||
|
MOBILEALERTS_readingsBulkUpdate( $hash, 0, "humidityString",
|
||||||
|
MOBILEALERTS_humidityToString($humidityIn) );
|
||||||
|
$co2 = MOBILEALERTS_decodeCO2($co2);
|
||||||
|
MOBILEALERTS_readingsBulkUpdate( $hash, 0, "co2", $co2 );
|
||||||
|
MOBILEALERTS_readingsBulkUpdate( $hash, 0, "co2String",
|
||||||
|
MOBILEALERTS_cO2ToString($co2) );
|
||||||
|
$prevTemperatureIn = MOBILEALERTS_decodeTemperature($prevTemperatureIn);
|
||||||
|
MOBILEALERTS_readingsBulkUpdate( $hash, 1, "prevTemperatureIn",
|
||||||
|
$prevTemperatureIn );
|
||||||
|
$prevTemperatureOut = MOBILEALERTS_decodeTemperature($prevTemperatureOut);
|
||||||
|
MOBILEALERTS_readingsBulkUpdate( $hash, 1, "prevTemperatureOut",
|
||||||
|
$prevTemperatureOut );
|
||||||
|
$prevHumidityIn = MOBILEALERTS_decodeHumidity($prevHumidityIn);
|
||||||
|
MOBILEALERTS_readingsBulkUpdate( $hash, 1, "prevHumidityIn",
|
||||||
|
$prevHumidityIn );
|
||||||
|
MOBILEALERTS_readingsBulkUpdate( $hash, 0, "state",
|
||||||
|
"In T: "
|
||||||
|
. $temperatureIn . " H: "
|
||||||
|
. $humidityIn
|
||||||
|
. " Out T: "
|
||||||
|
. $temperatureOut
|
||||||
|
. " CO2: "
|
||||||
|
. $co2 );
|
||||||
|
}
|
||||||
|
|
||||||
sub MOBILEALERTS_Parse_07_da ($$) {
|
sub MOBILEALERTS_Parse_07_da ($$) {
|
||||||
my ( $hash, $message ) = @_;
|
my ( $hash, $message ) = @_;
|
||||||
MOBILEALERTS_readingsBulkUpdateIfChanged( $hash, 0, "deviceType",
|
MOBILEALERTS_readingsBulkUpdateIfChanged( $hash, 0, "deviceType",
|
||||||
@ -718,6 +767,18 @@ sub MOBILEALERTS_humidityToString($) {
|
|||||||
return $humidity . "%";
|
return $humidity . "%";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub MOBILEALERTS_decodeCO2($) {
|
||||||
|
my ($co2) = @_;
|
||||||
|
return 9999 if ( ( $co2 & 0x80 ) == 0x80 );
|
||||||
|
return ( $co2 & 0x7F ) * 50;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub MOBILEALERTS_cO2ToString($) {
|
||||||
|
my ($co2) = @_;
|
||||||
|
return "---" if ( $co2 == 9999 );
|
||||||
|
return $co2 . " ppm";
|
||||||
|
}
|
||||||
|
|
||||||
sub MOBILEALERTS_decodeWetness($) {
|
sub MOBILEALERTS_decodeWetness($) {
|
||||||
my ($wetness) = @_;
|
my ($wetness) = @_;
|
||||||
|
|
||||||
@ -813,6 +874,7 @@ sub MOBILEALERTS_time2sec($) {
|
|||||||
|
|
||||||
sub MOBILEALERTS_CheckRainSensorTimed($) {
|
sub MOBILEALERTS_CheckRainSensorTimed($) {
|
||||||
my ($hash) = @_;
|
my ($hash) = @_;
|
||||||
|
$hash->{".expertMode"} = AttrVal( $hash->{NAME}, "expert", 0 );
|
||||||
readingsBeginUpdate($hash);
|
readingsBeginUpdate($hash);
|
||||||
MOBILEALERTS_CheckRainSensor( $hash, 0 );
|
MOBILEALERTS_CheckRainSensor( $hash, 0 );
|
||||||
readingsEndUpdate( $hash, 1 );
|
readingsEndUpdate( $hash, 1 );
|
||||||
@ -971,8 +1033,8 @@ sub MOBILEALERTS_ActionDetector($) {
|
|||||||
The MOBILEALERTS is a fhem module for the german MobileAlerts devices and TFA WEATHERHUB devices.
|
The MOBILEALERTS is a fhem module for the german MobileAlerts devices and TFA WEATHERHUB devices.
|
||||||
<br><br>
|
<br><br>
|
||||||
The fhem module represents a MobileAlerts device. The connection is provided by the <a href="#MOBILEALERTSGW">MOBILELAERTSGW</a> module.
|
The fhem module represents a MobileAlerts device. The connection is provided by the <a href="#MOBILEALERTSGW">MOBILELAERTSGW</a> module.
|
||||||
Currently supported: MA10100, MA10200, MA10230, MA10300, MA10650, MA10320PRO, MA10350, MA10410, MA10450, MA10660, MA10700, TFA 30.3312.02<br>
|
Currently supported: MA10100, MA10200, MA10230, MA10300, MA10650, MA10320PRO, MA10350, MA10410, MA10450, MA10660, MA10700, TFA 30.3312.02, MA10800, WL2000<br>
|
||||||
Supported but untested: MA10800<br>
|
Supported but untested: ./.<br>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<a name="MOBILEALERTSdefine"></a>
|
<a name="MOBILEALERTSdefine"></a>
|
||||||
@ -1050,8 +1112,8 @@ sub MOBILEALERTS_ActionDetector($) {
|
|||||||
<br><br>
|
<br><br>
|
||||||
Dieses FHEM Modul stellt jeweils ein MobileAlerts Gerät dar. Die Verbindung wird durch das
|
Dieses FHEM Modul stellt jeweils ein MobileAlerts Gerät dar. Die Verbindung wird durch das
|
||||||
<a href="#MOBILEALERTSGW">MOBILELAERTSGW</a> Modul bereitgestellt.<br>
|
<a href="#MOBILEALERTSGW">MOBILELAERTSGW</a> Modul bereitgestellt.<br>
|
||||||
Aktuell werden unterstüzt: MA10100, MA10200, MA10230, MA10300, MA10650, MA10320PRO, MA10350, MA10410, MA10450, MA10660, MA10700, TFA 30.3312.02<br>
|
Aktuell werden unterstüzt: MA10100, MA10200, MA10230, MA10300, MA10650, MA10320PRO, MA10350, MA10410, MA10450, MA10660, MA10700, TFA 30.3312.02, MA10800, WL2000<br>
|
||||||
Unterstüzt aber ungetestet: MA10800<br>
|
Unterstüzt aber ungetestet: ./.<br>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<a name="MOBILEALERTSdefine"></a>
|
<a name="MOBILEALERTSdefine"></a>
|
||||||
|
Loading…
Reference in New Issue
Block a user