diff --git a/fhem/FHEM/10_CUL_HM.pm b/fhem/FHEM/10_CUL_HM.pm index bdf20a831..d9d2e44e3 100755 --- a/fhem/FHEM/10_CUL_HM.pm +++ b/fhem/FHEM/10_CUL_HM.pm @@ -844,7 +844,7 @@ sub CUL_HM_Parse($$) {############################## push @event, "desired-temp:$setTemp"; push @event, "ValvePosition:$vp %"; push @event, "mode:$ctlTbl{$ctrlMode}"; - push @event, "state:T:$actTemp desired:$setTemp valve:$vp %"; + push @event, "state:T: $actTemp desired: $setTemp valve: $vp %"; push @entities,CUL_HM_UpdtReadBulk($dHash,1 ,"battery:".($err&0x80?"low":"ok") ,"batteryLevel:$bat V" @@ -2902,6 +2902,49 @@ sub CUL_HM_Set($@) { $pressCnt)); } } + elsif($cmd eq "postEvent") { ################################################ + my (undef,undef,$cond) = @a; + if ($cond =~ m/[+-]?\d+/){ + return "condition value:$cond above 200 illegal" if ($cond > 200); + } + else{ + my $val; + my @keys; + foreach my $tp (keys %lvlStr){ + foreach my $mk (keys %{$lvlStr{$tp}}){ + foreach (keys %{$lvlStr{$tp}{$mk}}){ + $val = hex($_) if ($cond eq $lvlStr{$tp}{$mk}{$_}); + push @keys,$lvlStr{$tp}{$mk}{$_}; + } + } + } + return "cond:$cond not allowed. choose one of:[0..200]," + .join(",",sort @keys) + if (!defined $val); + $cond = $val; + } + my $pressCnt = (!$hash->{helper}{count}?1:$hash->{helper}{count}+1)%256; + $hash->{helper}{count}=$pressCnt;# remember for next round + + my @peerList; + if ($st eq 'virtual'){#serve all peers of virtual button + foreach my $peer (sort(split(',',AttrVal($name,"peerIDs","")))) { + push (@peerList,substr($peer,0,6)); + } + @peerList = CUL_HM_noDup(@peerList); + push @peerList,'00000000' if (!@peerList);#send to broadcast if no peer + foreach my $peer (sort @peerList){ + my $peerFlag = $peer eq '00000000'?'A4': + CUL_HM_getFlag(CUL_HM_id2Hash($peer)); + $peerFlag =~ s/0/4/;# either 'A4' or 'B4' + CUL_HM_PushCmdStack($hash, sprintf("++%s41%s%s%02X%02X%02X" + ,$peerFlag,$dst,$peer + ,$chn + ,$pressCnt + ,$cond)); + } + } + } elsif($cmd eq "peerChan") { ############################################# reg #peerChan ... [single|dual] [set|unset] [actor|remote|both] my ($bNo,$peerN,$single,$set,$target) = ($a[2],$a[3],$a[4],$a[5],$a[6]); @@ -4985,6 +5028,12 @@ sub CUL_HM_putHash($) {# provide data for HMinfo implementation will not specify the duration for long. Only one trigger will be sent of type "long". +
  • postEvent <[0..200]> + simulates an event. A value must be given between 0 and 200.
    + Alternally a literal ca be given as used by other sensors. enter
    + postEvent ?
    + to get options
    +
  • smokeDetector
    @@ -5370,7 +5419,8 @@ sub CUL_HM_putHash($) {# provide data for HMinfo humidity $h
    actuator $vp %
    desired-temp $dTemp
    - desired-temp-manu $dTemp
    + desired-temp-manu $dTemp #temperature if switchen to manual mode
    + desired-temp-cent $dTemp #temperature if switchen to central mode
    windowopen-temp-%d %.1f (sensor:%s)
    tempList$wd hh:mm $t hh:mm $t ...
    displayMode temp-[hum|only]
    diff --git a/fhem/FHEM/98_HMinfo.pm b/fhem/FHEM/98_HMinfo.pm index e0312c828..14042aca5 100644 --- a/fhem/FHEM/98_HMinfo.pm +++ b/fhem/FHEM/98_HMinfo.pm @@ -375,7 +375,12 @@ sub HMinfo_SetFn($@) {######################################################### my ($found,$para) = HMinfo_getParam($id,@a); push @paramList,$para if($found || $optEmpty); } - $ret = $cmd." done:" ."\n param list" ."\n ".(join "\n ",sort @paramList) + my $prtHdr = "entity \t: "; + $prtHdr .= sprintf("%-20s \t|",$_)foreach (@a); + $ret = $cmd." done:" + ."\n param list" ."\n " + .$prtHdr ."\n " + .(join "\n ",sort @paramList) ; } elsif($cmd eq "regCheck") {##check register-------------------------------- diff --git a/fhem/FHEM/HMConfig.pm b/fhem/FHEM/HMConfig.pm index 034bd1224..9b52041dd 100644 --- a/fhem/FHEM/HMConfig.pm +++ b/fhem/FHEM/HMConfig.pm @@ -190,7 +190,7 @@ my %culHmModel=( "0092" => {name=>"Schueco_263-144" ,st=>'switch' ,cyc=>'' ,rxt=>'c' ,lst=>'4' ,chn=>"",}, # HM Switch Interface 3 switches "0093" => {name=>"Schueco_263-158" ,st=>'THSensor' ,cyc=>'00:10' ,rxt=>'c:w' ,lst=>'p' ,chn=>"",}, # "0094" => {name=>"IS-WDS-TH-OD-S-R3" ,st=>'THSensor' ,cyc=>'00:10' ,rxt=>'c:w' ,lst=>'p' ,chn=>"",}, # - "0095" => {name=>"HM-CC-RT-DN" ,st=>'thermostat' ,cyc=>'' ,rxt=>'c:w:b' ,lst=>'p:1p.2p.5p.6p,3:3p.6p,7:4' + "0095" => {name=>"HM-CC-RT-DN" ,st=>'thermostat' ,cyc=>'' ,rxt=>'c:w' ,lst=>'p:1p.2p.5p.6p,3:3p.6p,7:4' ,chn=>"Weather:1:1,Climate:2:2,WindowRec:3:3,ClimRT_tr:4:4,ClimaTeam:5:5,remote:6:6"}, # "0096" => {name=>"WDF-solar" ,st=>'blindActuatorSol' ,cyc=>'' ,rxt=>'b' ,lst=>'1,3' ,chn=>"win:1:1,blind_2:3",}, # "009B" => {name=>"Schueco_263-xxx" ,st=>'tipTronic' ,cyc=>'28:00' ,rxt=>'c:w' ,lst=>'1:1.2,3:1p.3p',chn=>"act:1:1,sen:2:2,sec:3:3",}, # @@ -940,6 +940,7 @@ my %culHmSubTypeSets = (# channels of this subtype ,statusRequest =>""}, virtual =>{ peerChan =>" ... [single|dual] [set|unset] [actor|remote|both]" ,press =>"[long|short]..." + ,postEvent =>"" ,valvePos =>""},#acting as TC smokeDetector =>{ test =>"" ,alarmOn =>"" @@ -999,7 +1000,7 @@ my %culHmChanSets = ( "party-temp" =>"[on,off,6.0..30.0]", "desired-temp" =>"[on,off,6.0..30.0]", sysTime =>"" }, - "HM-CC-TC02" =>{ peerChan =>" ... single [set|unset] [actor|remote|both]" + "HM-CC-TC02" =>{ peerChan =>" 0 ... single [set|unset] [actor|remote|both]" ,"day-temp" =>"[on,off,6.0..30.0]" ,"night-temp" =>"[on,off,6.0..30.0]" ,"party-temp" =>"[on,off,6.0..30.0]" @@ -1023,8 +1024,8 @@ my %culHmChanSets = ( "HM-OU-CFM-PL01" =>{ led =>"[,...] []"}, "HM-OU-CFM-PL02" =>{ playTone =>"[,...] []"}, - "WDF-solar01" =>{ peerChan =>" ... single [set|unset] [actor|remote|both]"}, - "HM-Sen-RD-O01" =>{ peerChan =>" ... single [set|unset] [actor|remote|both]"}, + "WDF-solar01" =>{ peerChan =>" 0 ... single [set|unset] [actor|remote|both]"}, + "HM-Sen-RD-O01" =>{ peerChan =>" 0 ... single [set|unset] [actor|remote|both]"}, "HM-Sen-RD-O02" =>{ "on-for-timer" =>"" ,"on-till" =>"