diff --git a/fhem/FHEM/10_EnOcean.pm b/fhem/FHEM/10_EnOcean.pm index 3126c0c0c..a420bee32 100755 --- a/fhem/FHEM/10_EnOcean.pm +++ b/fhem/FHEM/10_EnOcean.pm @@ -1519,7 +1519,7 @@ sub EnOcean_Get($@) { Log3 $name, 3, "EnOcean get $name $cmd"; } elsif ($cmd eq "signal") { - # trigger status massage of device + # trigger status message of device $rorg = "D0"; $destinationID = $hash->{DEF} if ($destinationID eq 'F' x 8); shift(@a); @@ -2575,7 +2575,12 @@ sub EnOcean_Set($@) { $data = sprintf "%02X%02X%02X%02X", $setpoint, $humidity, $actualTemp, $setCmd; } else { - return "Unknown argument " . $cmd . ", choose one of " . $cmdList . " setpoint:slider,0,1,255 setpointScaled switch:on,off teach:noArg" + if (AttrVal($name, 'devMode', 'master') eq 'master') { + return "Unknown argument " . $cmd . ", choose one of " . $cmdList . " setpoint:slider,0,1,255 setpointScaled switch:on,off teach:noArg" + } + else { + return undef; + } } Log3 $name, 3, "EnOcean set $name $cmd"; @@ -2710,7 +2715,12 @@ sub EnOcean_Set($@) { $data = sprintf "%02X%02X%02X%02X", $nightReduction, $setpointTemp, $actualTemp, $setCmd; } else { - return "Unknown argument " . $cmd . ", choose one of setpointTemp:slider,0,1,40 desired-temp nightReduction:0,1,2,3,4,5 teach:noArg" + if (AttrVal($name, 'devMode', 'master') eq 'master') { + return "Unknown argument " . $cmd . ", choose one of setpointTemp:slider,0,1,40 desired-temp nightReduction:0,1,2,3,4,5 teach:noArg" + } + else { + return undef; + } } } else { @@ -2879,7 +2889,12 @@ sub EnOcean_Set($@) { $data = sprintf "%02X%02X%02X%02X", $fanStage, $setpoint, $actualTemp, $setCmd; } else { - return "Unknown argument " . $cmd . ", choose one of " . $cmdList . "setpoint:slider,0,1,255 fanStage:auto,0,1,2,3 setpointScaled switch:on,off teach:noArg" + if (AttrVal($name, 'devMode', 'master') eq 'master') { + return "Unknown argument " . $cmd . ", choose one of " . $cmdList . "setpoint:slider,0,1,255 fanStage:auto,0,1,2,3 setpointScaled switch:on,off teach:noArg" + } + else { + return undef; + } } } @@ -9808,7 +9823,7 @@ sub EnOcean_Parse($$) { } elsif ($st eq "lightSensor.01") { # Light Sensor (EEP A5-06-01) - # [Eltako FAH60, FAH63, FIH63, Thermokon SR65 LI, untested] + # [Eltako FAH60, FAH63, FIH63, Thermokon SR65 LI] # $db[3] is the voltage where 0x00 = 0 V ... 0xFF = 5.1 V # $db[3] is the low illuminance for Eltako devices where # min 0x00 = 0 lx, max 0xFF = 100 lx, if $db[2] = 0 @@ -9838,7 +9853,12 @@ sub EnOcean_Parse($$) { } push @event, "3:brightness:$lux"; push @event, "3:state:$lux"; - + readingsDelete($hash, 'alarm'); + 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", 110), 'EnOcean_readingsSingleUpdate', $hash->{helper}{timer}{alarm}, 0); + } } elsif ($st eq "lightSensor.02") { # Light Sensor (EEP A5-06-02) # $db[3] is the voltage where 0x00 = 0 V ... 0xFF = 5.1 V @@ -9941,6 +9961,13 @@ sub EnOcean_Parse($$) { @{$hash->{helper}{timer}{state}} = ($hash, 'state', 'off', 1, 5); InternalTimer(gettimeofday() + AttrVal($name, 'trackerWakeUpCycle', 30) * 1.1, 'EnOcean_readingsSingleUpdate', $hash->{helper}{timer}{motion}, 0); InternalTimer(gettimeofday() + AttrVal($name, 'trackerWakeUpCycle', 30) * 1.1, 'EnOcean_readingsSingleUpdate', $hash->{helper}{timer}{state}, 0); + } else { + readingsDelete($hash, 'alarm'); + 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", 1320), 'EnOcean_readingsSingleUpdate', $hash->{helper}{timer}{alarm}, 0); + } } if (!exists($hash->{helper}{lastVoltage}) || $hash->{helper}{lastVoltage} != $db[3]) { push @event, "3:battery:" . ($db[3] * 0.02 > 2.8 ? "ok" : "low"); @@ -10032,6 +10059,12 @@ sub EnOcean_Parse($$) { } push @event, "3:brightness:$lux"; push @event, "3:motion:$motion"; + readingsDelete($hash, 'alarm'); + 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", 1320), 'EnOcean_readingsSingleUpdate', $hash->{helper}{timer}{alarm}, 0); + } } elsif ($st eq "lightCtrlState.01") { # Lighting Controller State (EEP A5-11-01) @@ -15450,7 +15483,7 @@ EnOcean_roomCtrlPanel_00Snd($$$$$$$$) my $messagePart = 1; if ($mid == 0) { - # general massage + # general message ($err, $response, $data, $logLevel) = EnOcean_roomCtrlPanel_00Cmd(undef, $hash, $mcf, $messagePart); EnOcean_SndRadio(undef, $hash, $packetType, "D2", $data, AttrVal($name, "subDef", "00000000"), "00", $hash->{DEF}); if ($err) { @@ -18724,6 +18757,7 @@ sub EnOcean_Delete($$) { attributes scaleMax, scaleMin and scaleDecimals for the additional scaled setting setpointScaled.
+ The profile behaves like a master or slave, see devMode.
The attr subType must be roomSensorControl.05. The attribute must be set manually.

@@ -18754,6 +18788,7 @@ sub EnOcean_Delete($$) { attributes scaleMax, scaleMin and scaleDecimals for the additional scaled setting setpointScaled.
+ The profile behaves like a master or slave, see devMode.
The attr subType must be roomSensorControl.05 and attr manufID must be 019. The attribute must be set manually.

@@ -18783,6 +18818,7 @@ sub EnOcean_Delete($$) { is teached in, the temperature control of the FTR55* can be either blocked or to a setpoint deviation of +/- 3 K be limited. For this use the optional parameter [block] = lock|unlock, unlock is default.
+ The profile behaves like a master or slave, see devMode.
The attr subType must be roomSensorControl.05 and attr manufID must be 00D. The attributes must be set manually. @@ -18815,6 +18851,7 @@ sub EnOcean_Delete($$) { attributes scaleMax, scaleMin and scaleDecimals for the additional scaled setting setpointScaled.
+ The profile behaves like a master or slave, see devMode.
The attr subType must be roomSensorControl.01. The attribute must be set manually.

@@ -18839,6 +18876,7 @@ sub EnOcean_Delete($$) { primarily or from the attribute actualTemp if it is set.
If the attribute setCmdTrigger is set to "refDev", a setpoint command is sent when the reference device is updated.
+ The profile behaves like a master or slave, see devMode.
The attr subType must be roomSensorControl.01 and attr manufID must be 00D. The attribute must be set manually.

@@ -21163,16 +21201,18 @@ sub EnOcean_Delete($$) { [Eltako FAH60, FAH63, FIH63, Thermokon SR65 LI]

- Eltako devices only support Brightness.
Please set the attribute model to Eltako_FAH60 if the sensor is from the production year 2015 or later.
The attr subType must be lightSensor.01 and attr manufID must be 00D for Eltako Devices. This is done if the device was created by - autocreate. + autocreate.
+ signOfLifeInterval ([signOfLifeInterval] = 110 is default).
+

@@ -21233,6 +21273,7 @@ sub EnOcean_Delete($$) { [EnOcean EOSW]

The attr subType must be occupSensor.<01|02>. This is done if the device was created by autocreate. Current is the solar panel current. Some values are - displayed only for certain types of devices. + displayed only for certain types of devices.
+ signOfLifeInterval ([signOfLifeInterval] = 1320 is default).


@@ -21268,6 +21310,7 @@ sub EnOcean_Delete($$) { [untested]

The attr subType must be occupSensor.03. This is done if the device was - created by autocreate. + created by autocreate.
+ signOfLifeInterval ([signOfLifeInterval] = 1320 is default).


@@ -21284,6 +21328,7 @@ sub EnOcean_Delete($$) { [Eltako FABH63, FBx5B, FBH55, FBH63, FBH65x, FBHF65SB, FIBH63, Thermokon SR-MDS, PEHA 482 FU-BM DE]