From 598360d8413b8567c7dfab1c42ed3dd635271504 Mon Sep 17 00:00:00 2001
From: "klaus.schauer" <>
Date: Sun, 15 Dec 2024 16:48:57 +0000
Subject: [PATCH] 10_EnOean: subType: hvac.01, hvac.04, hvac.06: new function
signOfLife; subType hvac.04: add alarm Timer
git-svn-id: https://svn.fhem.de/fhem/trunk@29431 2b470e98-0d58-463d-a4d8-8e2adae1ed80
---
fhem/FHEM/10_EnOcean.pm | 52 +++++++++++++++++++++++++++++++++--------
1 file changed, 42 insertions(+), 10 deletions(-)
diff --git a/fhem/FHEM/10_EnOcean.pm b/fhem/FHEM/10_EnOcean.pm
index f8f221b89..36ae9c11e 100755
--- a/fhem/FHEM/10_EnOcean.pm
+++ b/fhem/FHEM/10_EnOcean.pm
@@ -8559,9 +8559,13 @@ sub EnOcean_Parse($$) {
# set alarm timer
EnOcean_ReadingsDelete($hash, 'alarm', 'reset', 1);
RemoveInternalTimer($hash->{helper}{timer}{alarm}) if(exists $hash->{helper}{timer}{alarm});
- @{$hash->{helper}{timer}{alarm}} = ($hash, 'alarm', 'no_response_from_actuator', 1, 3);
- InternalTimer(gettimeofday() + $wakeUpCycle * 1.1, "EnOcean_readingsSingleUpdate", $hash->{helper}{timer}{alarm}, 0);
-
+ if (AttrVal($name, "signOfLife", 'on') eq 'on') {
+ @{$hash->{helper}{timer}{alarm}} = ($hash, 'alarm', 'no_response_from_actuator', 1, 3);
+ #InternalTimer(gettimeofday() + $wakeUpCycle * 1.1, "EnOcean_readingsSingleUpdate", $hash->{helper}{timer}{alarm}, 0);
+ my $signOfLifeInterval = AttrVal($name, "signOfLifeInterval", 1);
+ $signOfLifeInterval = $wakeUpCycle if ($signOfLifeInterval < $wakeUpCycle);
+ InternalTimer(gettimeofday() + $signOfLifeInterval * 1.1, "EnOcean_readingsSingleUpdate", $hash->{helper}{timer}{alarm}, 0);
+ }
my $actionCmd = AttrVal($name, "rcvRespAction", undef);
if (defined $actionCmd) {
my %specials = ("%ACTUATORSTATE" => (($db[2] & 1) ? "obstructed" : "ok"),
@@ -8975,6 +8979,17 @@ sub EnOcean_Parse($$) {
$wakeUpCycle = 50 if ($wakeUpCycle < 50);
}
+ # set alarm timer
+ EnOcean_ReadingsDelete($hash, 'alarm', 'reset', 1);
+ RemoveInternalTimer($hash->{helper}{timer}{alarm}) if(exists $hash->{helper}{timer}{alarm});
+ if (AttrVal($name, "signOfLife", 'on') eq 'on') {
+ @{$hash->{helper}{timer}{alarm}} = ($hash, 'alarm', 'no_response_from_actuator', 1, 3);
+ #InternalTimer(gettimeofday() + $wakeUpCycleInv{$wakeUpCycle} * 1.1, "EnOcean_readingsSingleUpdate", $hash->{helper}{timer}{alarm}, 0);
+ my $signOfLifeInterval = AttrVal($name, "signOfLifeInterval", 1);
+ $signOfLifeInterval = $wakeUpCycleInv{$wakeUpCycle} if ($signOfLifeInterval < $wakeUpCycleInv{$wakeUpCycle});
+ InternalTimer(gettimeofday() + $signOfLifeInterval * 1.1, "EnOcean_readingsSingleUpdate", $hash->{helper}{timer}{alarm}, 0);
+ }
+
my $actionCmd = AttrVal($name, "rcvRespAction", undef);
if (defined $actionCmd) {
my %specials = ("%BATTERY" => $battery,
@@ -9267,11 +9282,16 @@ sub EnOcean_Parse($$) {
readingsSingleUpdate($hash, 'wakeUpCycle', $wakeUpCycle, 1);
# set alarm timer
EnOcean_ReadingsDelete($hash, 'alarm', 'reset', 1);
- if ($waitingCmds ne "standby") {
- RemoveInternalTimer($hash->{helper}{timer}{alarm}) if(exists $hash->{helper}{timer}{alarm});
+ RemoveInternalTimer($hash->{helper}{timer}{alarm}) if(exists $hash->{helper}{timer}{alarm});
+ if ($waitingCmds ne "standby" && AttrVal($name, "signOfLife", 'on') eq 'on') {
@{$hash->{helper}{timer}{alarm}} = ($hash, 'alarm', 'no_response_from_actuator', 1, 3);
- InternalTimer(gettimeofday() + ($wakeUpCycle < 600 ? 600 : $wakeUpCycle) * 1.1, "EnOcean_readingsSingleUpdate", $hash->{helper}{timer}{alarm}, 0);
+ #InternalTimer(gettimeofday() + ($wakeUpCycle < 600 ? 600 : $wakeUpCycle) * 1.1, "EnOcean_readingsSingleUpdate", $hash->{helper}{timer}{alarm}, 0);
+ my $signOfLifeInterval = AttrVal($name, "signOfLifeInterval", 1);
+ $signOfLifeInterval = $wakeUpCycle if ($signOfLifeInterval < $wakeUpCycle);
+ $signOfLifeInterval = 600 if ($signOfLifeInterval < 600);
+ InternalTimer(gettimeofday() + $signOfLifeInterval * 1.1, "EnOcean_readingsSingleUpdate", $hash->{helper}{timer}{alarm}, 0);
}
+
my $actionCmd = AttrVal($name, "rcvRespAction", undef);
if (defined $actionCmd) {
my %specials = ("%ACTUATORSTATE" => (($db[0] & 1) ? "obstructed" : "ok"),
@@ -20035,7 +20055,11 @@ sub EnOcean_Delete($$) {
created by autocreate. To control the device, it must be bidirectional paired,
see Teach-In / Teach-Out.
The command is not sent until the device wakes up and sends a message, usually
- every 10 minutes.
+ every 10 minutes.
+ A monitoring period can be set for signOfLife telegrams of the actor, see
+ signOfLife and signOfLifeInterval.
+ Default is "on" and an interval of the wakeUpCycle value. If the signOfLifeInterval
+ is less than the wakeUpCycle value, the interval is set to the wakeUpCycle value.
@@ -20100,7 +20124,11 @@ sub EnOcean_Delete($$) {
The OEM version of the Holter SmartDrive MX has an internal PID controller. This function is activated by
attr model Holter_OEM and attr pidCtrl off.
The command is not sent until the device wakes up and sends a message, usually
- every 5 minutes.
+ every 5 minutes.
+ A monitoring period can be set for signOfLife telegrams of the actor, see
+ signOfLife and signOfLifeInterval.
+ Default is "on" and an interval of the wakeUpCycle value. If the signOfLifeInterval
+ is less than the wakeUpCycle value, the interval is set to the wakeUpCycle value.
@@ -20162,7 +20190,11 @@ sub EnOcean_Delete($$) {
The actuator has an internal PID controller. This function is activated by
attr pidCtrl off.
The command is not sent until the device wakes up and sends a message, usually
- every 2 to 10 minutes.
+ every 2 to 10 minutes.
+ A monitoring period can be set for signOfLife telegrams of the actor, see
+ signOfLife and signOfLifeInterval.
+ Default is "on" and an interval of the wakeUpCycle value. If the signOfLifeInterval
+ is less than the wakeUpCycle value, the interval is set to the wakeUpCycle value.
@@ -23150,7 +23182,7 @@ sub EnOcean_Delete($$) {
windSpeedWindy,
windSpeedWindyDelay.
Execution of custom alarm commands, see customCmdAlarmOff,
- customCmdAlarmOn, signOfLife ([signOfLive] = on is default) and
+ customCmdAlarmOn, signOfLife ([signOfLife] = on is default) and
signOfLifeInterval ([signOfLifeInterval] = 660 is default).
Execution of custom up and down commands that can be triggered by the readings dayNight, isRaining, isStormy,
isSunny, isSunnyEast, isSunnySouth, isSunnyWest and isWindy, see customCmdDown and