diff --git a/fhem/FHEM/00_CUL.pm b/fhem/FHEM/00_CUL.pm index caacf622e..2c985d9cc 100755 --- a/fhem/FHEM/00_CUL.pm +++ b/fhem/FHEM/00_CUL.pm @@ -126,15 +126,22 @@ CUL_Initialize($) $hash->{GetFn} = "CUL_Get"; $hash->{SetFn} = "CUL_Set"; $hash->{AttrFn} = "CUL_Attr"; - $hash->{AttrList}= "do_not_notify:1,0 dummy:1,0 " . - "showtime:1,0 model:CUL,CUN sendpool addvaltrigger ". - "rfmode:SlowRF,HomeMatic,MAX,WMBus_T,WMBus_S,KOPP_FC ". - "hmId longids ". - "hmProtocolEvents:0_off,1_dump,2_dumpFull,3_dumpTrigger " . - $readingFnAttributes; - + no warnings 'qw'; + my @attrList = qw( + addvaltrigger + connectCommand + do_not_notify:1,0 + dummy:1,0 " . + hmId longids + hmProtocolEvents:0_off,1_dump,2_dumpFull,3_dumpTrigger + model:CUL,CUN,CUNO,SCC,nanoCUL + rfmode:SlowRF,HomeMatic,MAX,WMBus_T,WMBus_S,KOPP_FC + sendpool + showtime:1,0 + ); + use warnings 'qw'; + $hash->{AttrList} = join(" ", @attrList)." ".$readingFnAttributes; $hash->{ShutdownFn} = "CUL_Shutdown"; - } sub @@ -495,6 +502,9 @@ CUL_DoInit($) } } + my $cc = AttrVal($name, "connectCommand", undef); + CUL_SimpleWrite($hash, $cc) if($cc); + readingsSingleUpdate($hash, "state", "Initialized", 1); # Reset the counter @@ -1010,9 +1020,10 @@ sub CUL_Attr(@) { my ($cmd,$name,$aName,$aVal) = @_; + my $hash = $defs{$name}; + if($aName eq "rfmode") { - my $hash = $defs{$name}; $aVal = "SlowRF" if(!$aVal || ($aVal ne "HomeMatic" @@ -1106,6 +1117,10 @@ CUL_Attr(@) return "wrong syntax: hmId must be 6-digit-hex-code (3 byte)" if($aVal !~ m/^[A-F0-9]{6}$/i); } + + } elsif($aName eq "connectCommand"){ + CUL_SimpleWrite($hash, $aVal) if($cmd eq "set"); + } return undef; @@ -1311,10 +1326,62 @@ CUL_prefix($$$) Attributes
+
  • showtime
  • -
  • hmId
    - Set the HomeMatic ID of this device. If this attribute is absent, the - ID will be F1<FHTID>. Note 1: After setting or changing this - attribute you have to relearn all your HomeMatic devices. Note 2: The - value must be a 6 digit hex number, and 000000 is not valid. FHEM - won't complain if it is not correct, but the communication won't work. -

  • - -
  • hmProtocolEvents
    - Generate events for HomeMatic protocol messages. These are normally - used for debugging, by activating "inform timer" in a telnet session, - or looking at the Event Monitor window in the FHEMWEB frontend.
    - Example: - -

  • - -
  • longids
    - Comma separated list of device-types for CUL that should be handled - using long IDs. This additional ID allows it to differentiate some - weather sensors, if they are sending on the same channel. - Therefore a random generated id is added. If you choose to use longids, - then you'll have to define a different device after battery change. - Default is not to use long IDs.
    - Modules which are using this functionality are for e.g. : - 14_Hideki, 41_OREGON, 14_CUL_TCM97001, 14_SD_WS07.
    - - Examples:
    - -

  • readingFnAttributes
  • @@ -1519,9 +1542,9 @@ CUL_prefix($$$)