diff --git a/fhem/FHEM/00_TCM.pm b/fhem/FHEM/00_TCM.pm
index d9b43755f..7f7753d50 100755
--- a/fhem/FHEM/00_TCM.pm
+++ b/fhem/FHEM/00_TCM.pm
@@ -59,7 +59,8 @@ TCM_Initialize($)
$hash->{UndefFn} = "TCM_Undef";
$hash->{GetFn} = "TCM_Get";
$hash->{SetFn} = "TCM_Set";
- $hash->{AttrList}= "do_not_notify:1,0 dummy:1,0 blockSenderID:own,no";
+ $hash->{AttrFn} = "TCM_Attr";
+ $hash->{AttrList}= "do_not_notify:1,0 dummy:1,0 blockSenderID:own,no teachMode:always,demand,nearfield";
}
# Define
@@ -798,6 +799,30 @@ TCM_ReadAnswer($$)
}
}
+sub
+TCM_Attr(@) {
+ my ($cmd, $name, $attrName, $attrVal) = @_;
+ my $hash = $defs{$name};
+
+ if ($attrName eq "blockSenderID") {
+ if (!defined $attrVal) {
+ } elsif ($attrVal !~ m/^(own|no)$/) {
+ Log3 $name, 3, "EnOcean $name attribute-value [$attrName] = $attrVal wrong";
+ CommandDeleteAttr(undef, "$name $attrName");
+ }
+
+ } elsif ($attrName eq "teachMode") {
+ if (!defined $attrVal){
+
+ } elsif ($attrVal !~ m/^(always|demand|nearfield)$/) {
+ Log3 $name, 3, "EnOcean $name attribute-value [$attrName] = $attrVal wrong";
+ CommandDeleteAttr(undef, "$name $attrName");
+ }
+
+ }
+ return undef;
+}
+
# Undef
sub
TCM_Undef($$)
@@ -874,11 +899,12 @@ TCM_Undef($$)
to specify the baudrate: the TCM120 should be opened with 9600 Baud, the
TCM310 with 57600 baud. For Eltako FGW14 devices, type has to be set to 120 and
the baudrate has to be set to 57600 baud if the FGW14 operating mode
- rotary switch is on position 6.
+ rotary switch is on position 6.
+
Example:
define BscBor TCM 120 /dev/ttyACM0@9600
- define FGW14 TCM 120 /dev/ttyS3@57600
+ define FGW14 TCM 120 /dev/ttyS3@57600
define TCM310 TCM 310 /dev/ttyACM0@57600
define TCM310 TCM 310 COM1@57600 (Windows)
set <IODev> teach <t/s>