36_LaCrosseGateway.pm: added loop time readings
git-svn-id: https://svn.fhem.de/fhem/trunk@14090 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -40,6 +40,7 @@ sub LaCrosseGateway_Initialize($) {
|
|||||||
." disable:0,1"
|
." disable:0,1"
|
||||||
." tftFile"
|
." tftFile"
|
||||||
." kvp:dispatch,readings,both"
|
." kvp:dispatch,readings,both"
|
||||||
|
." loopTimeReadings:1,0"
|
||||||
." ownSensors:dispatch,readings,both"
|
." ownSensors:dispatch,readings,both"
|
||||||
." mode:USB,WiFi,Cable"
|
." mode:USB,WiFi,Cable"
|
||||||
." usbFlashCommand"
|
." usbFlashCommand"
|
||||||
@@ -473,6 +474,7 @@ sub LaCrosseGateway_DeleteKVPReadings($) {
|
|||||||
#=======================================================================================
|
#=======================================================================================
|
||||||
sub LaCrosseGateway_HandleKVP($$) {
|
sub LaCrosseGateway_HandleKVP($$) {
|
||||||
my ($hash, $kvp) = @_;
|
my ($hash, $kvp) = @_;
|
||||||
|
my $name = $hash->{NAME};
|
||||||
|
|
||||||
readingsBeginUpdate($hash);
|
readingsBeginUpdate($hash);
|
||||||
|
|
||||||
@@ -495,6 +497,18 @@ sub LaCrosseGateway_HandleKVP($$) {
|
|||||||
readingsBulkUpdate($hash, "OLED", $1);
|
readingsBulkUpdate($hash, "OLED", $1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(AttrVal($name, "loopTimeReadings", "0") == "1") {
|
||||||
|
if($kvp =~ m/LD\.Min=(.*?)(\,|\ ,)/) {
|
||||||
|
readingsBulkUpdate($hash, "LD.Min", $1);
|
||||||
|
}
|
||||||
|
if($kvp =~ m/LD\.Avg=(.*?)(\,|\ ,)/) {
|
||||||
|
readingsBulkUpdate($hash, "LD.Avg", $1);
|
||||||
|
}
|
||||||
|
if($kvp =~ m/LD\.Max=(.*?)(\,|\ ,)/) {
|
||||||
|
readingsBulkUpdate($hash, "LD.Max", $1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
readingsEndUpdate($hash, 1);
|
readingsEndUpdate($hash, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user