diff --git a/FHEM/10_EnOcean.pm b/FHEM/10_EnOcean.pm index 62581c2e9..2c1f11f6d 100755 --- a/FHEM/10_EnOcean.pm +++ b/FHEM/10_EnOcean.pm @@ -9644,9 +9644,11 @@ sub EnOcean_Parse($$) $hash->{helper}{lastEvent} = $data; } CommandDeleteReading(undef, "$name alarm"); - RemoveInternalTimer($hash->{helper}{timer}{alarm}) if(exists $hash->{helper}{timer}{alarm}); - @{$hash->{helper}{timer}{alarm}} = ($hash, 'alarm', 'dead_sensor', 1, 5); - InternalTimer(gettimeofday() + 66, 'EnOcean_readingsSingleUpdate', $hash->{helper}{timer}{alarm}, 0); + if (AttrVal($name, "signOfLife", 'on') eq 'on') { + RemoveInternalTimer($hash->{helper}{timer}{alarm}) if(exists $hash->{helper}{timer}{alarm}); + @{$hash->{helper}{timer}{alarm}} = ($hash, 'alarm', 'dead_sensor', 1, 5); + InternalTimer(gettimeofday() + AttrVal($name, "signOfLifeInterval", 66), 'EnOcean_readingsSingleUpdate', $hash->{helper}{timer}{alarm}, 0); + } } elsif ($st eq "windowContact") { # window contact (EEP A5-14-09, A5-14-0A) @@ -9662,9 +9664,11 @@ sub EnOcean_Parse($$) $hash->{helper}{lastEvent} = $data; } CommandDeleteReading(undef, "$name alarm"); - RemoveInternalTimer($hash->{helper}{timer}{alarm}) if(exists $hash->{helper}{timer}{alarm}); - @{$hash->{helper}{timer}{alarm}} = ($hash, 'alarm', 'dead_sensor', 1, 5); - InternalTimer(gettimeofday() + 66, 'EnOcean_readingsSingleUpdate', $hash->{helper}{timer}{alarm}, 0); + if (AttrVal($name, "signOfLife", 'on') eq 'on') { + RemoveInternalTimer($hash->{helper}{timer}{alarm}) if(exists $hash->{helper}{timer}{alarm}); + @{$hash->{helper}{timer}{alarm}} = ($hash, 'alarm', 'dead_sensor', 1, 5); + InternalTimer(gettimeofday() + AttrVal($name, "signOfLifeInterval", 990), 'EnOcean_readingsSingleUpdate', $hash->{helper}{timer}{alarm}, 0); + } } elsif ($st =~ m/^digitalInput\.0[12]$/) { # Digital Input (EEP A5-30-01, A5-30-02) @@ -20076,7 +20080,10 @@ EnOcean_Delete($$)