2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-23 14:46:24 +00:00

repair RT controlMode settings, remove statusRequest from Thermostat commandlist

git-svn-id: https://svn.fhem.de/fhem/trunk@4016 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
martinp876 2013-10-07 11:40:01 +00:00
parent 439f210717
commit 885d0b2b3c
3 changed files with 10 additions and 7 deletions

View File

@ -2364,7 +2364,7 @@ sub CUL_HM_Set($@) {
return "value:".$data." out of range for Reg \"".$regName."\"" return "value:".$data." out of range for Reg \"".$regName."\""
if (!($reg->{c} =~ m/^(lit|hex|min2time)$/)&& if (!($reg->{c} =~ m/^(lit|hex|min2time)$/)&&
($data < $reg->{min} ||$data > $reg->{max})); # none number ($data < $reg->{min} ||$data > $reg->{max})); # none number
return"invalid value. use:". join(",",keys%{$reg->{lit}}) return"invalid value. use:". join(",",sort keys%{$reg->{lit}})
if ($reg->{c} eq 'lit' && !defined($reg->{lit}{$data})); if ($reg->{c} eq 'lit' && !defined($reg->{lit}{$data}));
$data *= $reg->{f} if($reg->{f});# obey factor befor possible conversion $data *= $reg->{f} if($reg->{f});# obey factor befor possible conversion
@ -2461,11 +2461,12 @@ sub CUL_HM_Set($@) {
if ($cmd eq "on-till"){ if ($cmd eq "on-till"){
# to be extended to handle end date as well # to be extended to handle end date as well
my ($eH,$eM,$eSec) = split(':',$duration); my ($eH,$eM,$eSec) = split(':',$duration);
return "please enter time informat hh:mm:ss" if (!$eSec);
$eSec += $eH*3600 + $eM*60; $eSec += $eH*3600 + $eM*60;
my @lt = localtime; my @lt = localtime;
my $ltSec = $lt[2]*3600+$lt[1]*60+$lt[0];# actually strip of date my $ltSec = $lt[2]*3600+$lt[1]*60+$lt[0];# actually strip of date
$eSec += 3600*24 if ($ltSec > $eSec); # go for the next day $eSec += 3600*24 if ($ltSec > $eSec); # go for the next day
$duration = $eSec - $ltSec; $duration = $eSec - $ltSec;
} }
return "please enter the duration in seconds" return "please enter the duration in seconds"
if (!defined $duration || $duration !~ m/^[+-]?\d+(\.\d+)?$/); if (!defined $duration || $duration !~ m/^[+-]?\d+(\.\d+)?$/);
@ -2687,12 +2688,14 @@ sub CUL_HM_Set($@) {
CUL_HM_PushCmdStack($hash,$msg) if ($msg); CUL_HM_PushCmdStack($hash,$msg) if ($msg);
} }
elsif($cmd =~ m/^(controlMode|controlManu|controlParty)$/) { ################ elsif($cmd =~ m/^(controlMode|controlManu|controlParty)$/) { ################
my $mode = $a[1]; my $mode = $a[2];
if ($cmd ne "controlMode"){ if ($cmd ne "controlMode"){
$mode = substr($a[1],7); $mode = substr($a[1],7);
$a[2] = ($a[2] eq "off")?4.5:($a[2] eq "on"?30.5:$a[2]); $a[2] = ($a[2] eq "off")?4.5:($a[2] eq "on"?30.5:$a[2]);
} }
return "select of mode [auto|boost|day|night] or mode-manu, mode-party" $mode = lc $mode;
return "invalid $mode:select of mode [auto|boost|day|night] or"
." controlManu,controlParty"
if ($mode !~ m/^(auto|manu|party|boost|day|night)$/); if ($mode !~ m/^(auto|manu|party|boost|day|night)$/);
my ($temp,$party); my ($temp,$party);
if ($mode =~ m/^(auto|boost|day|night)$/){ if ($mode =~ m/^(auto|boost|day|night)$/){

View File

@ -301,6 +301,7 @@ sub HMinfo_SetFn($@) {#########################################################
} }
elsif($cmd eq "protoEvents"){##print protocol-events------------------------- elsif($cmd eq "protoEvents"){##print protocol-events-------------------------
my ($type) = @a; my ($type) = @a;
$type = "long" if(!$type);
my @paramList; my @paramList;
my @IOlist; my @IOlist;
foreach my $dName (HMinfo_getEntities($opt."dv",$filter)){ foreach my $dName (HMinfo_getEntities($opt."dv",$filter)){

View File

@ -918,7 +918,7 @@ my %culHmSubTypeDevSets = (# device of this subtype
blindActuator =>{ statusRequest =>""}, blindActuator =>{ statusRequest =>""},
# remote =>{ }, # remote =>{ },
threeStateSensor =>{ statusRequest =>""}, threeStateSensor =>{ statusRequest =>""},
THSensor =>{ statusRequest =>""}, # THSensor =>{ statusRequest =>""}, at least OT/OT2 do not support this
# virtual =>{ }, # virtual =>{ },
smokeDetector =>{ statusRequest =>""}, smokeDetector =>{ statusRequest =>""},
winMatic =>{ statusRequest =>""}, winMatic =>{ statusRequest =>""},
@ -965,8 +965,7 @@ my %culHmSubTypeSets = (# channels of this subtype
remote =>{ peerChan =>"<btnNumber> <actChn> ... [single|dual] [set|unset] [actor|remote|both]"}, remote =>{ peerChan =>"<btnNumber> <actChn> ... [single|dual] [set|unset] [actor|remote|both]"},
threeStateSensor =>{ peerChan =>"<btnNumber> <actChn> ... single [set|unset] [actor|remote|both]" threeStateSensor =>{ peerChan =>"<btnNumber> <actChn> ... single [set|unset] [actor|remote|both]"
,statusRequest =>""}, ,statusRequest =>""},
THSensor =>{ peerChan =>"<btnNumber> <actChn> ... single [set|unset] [actor|remote|both]" THSensor =>{ peerChan =>"<btnNumber> <actChn> ... single [set|unset] [actor|remote|both]"},
,statusRequest =>""},
virtual =>{ peerChan =>"<btnNumber> <actChn> ... [single|dual] [set|unset] [actor|remote|both]" virtual =>{ peerChan =>"<btnNumber> <actChn> ... [single|dual] [set|unset] [actor|remote|both]"
,press =>"[long|short]..." ,press =>"[long|short]..."
,postEvent =>"<condition>" ,postEvent =>"<condition>"