From 9d013e7b76ed52c56938893c0b4c2d35d7348610 Mon Sep 17 00:00:00 2001 From: martinp876 Date: Mon, 7 Oct 2013 11:40:01 +0000 Subject: [PATCH] repair RT controlMode settings, remove statusRequest from Thermostat commandlist git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@4016 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/10_CUL_HM.pm | 11 +++++++---- fhem/FHEM/98_HMinfo.pm | 1 + fhem/FHEM/HMConfig.pm | 5 ++--- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/fhem/FHEM/10_CUL_HM.pm b/fhem/FHEM/10_CUL_HM.pm index 734fbeaf4..bbaafd656 100755 --- a/fhem/FHEM/10_CUL_HM.pm +++ b/fhem/FHEM/10_CUL_HM.pm @@ -2364,7 +2364,7 @@ sub CUL_HM_Set($@) { return "value:".$data." out of range for Reg \"".$regName."\"" if (!($reg->{c} =~ m/^(lit|hex|min2time)$/)&& ($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})); $data *= $reg->{f} if($reg->{f});# obey factor befor possible conversion @@ -2461,11 +2461,12 @@ sub CUL_HM_Set($@) { if ($cmd eq "on-till"){ # to be extended to handle end date as well my ($eH,$eM,$eSec) = split(':',$duration); + return "please enter time informat hh:mm:ss" if (!$eSec); $eSec += $eH*3600 + $eM*60; my @lt = localtime; 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 - $duration = $eSec - $ltSec; + $duration = $eSec - $ltSec; } return "please enter the duration in seconds" if (!defined $duration || $duration !~ m/^[+-]?\d+(\.\d+)?$/); @@ -2687,12 +2688,14 @@ sub CUL_HM_Set($@) { CUL_HM_PushCmdStack($hash,$msg) if ($msg); } elsif($cmd =~ m/^(controlMode|controlManu|controlParty)$/) { ################ - my $mode = $a[1]; + my $mode = $a[2]; if ($cmd ne "controlMode"){ $mode = substr($a[1],7); $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)$/); my ($temp,$party); if ($mode =~ m/^(auto|boost|day|night)$/){ diff --git a/fhem/FHEM/98_HMinfo.pm b/fhem/FHEM/98_HMinfo.pm index 59872f4e6..deb144b60 100644 --- a/fhem/FHEM/98_HMinfo.pm +++ b/fhem/FHEM/98_HMinfo.pm @@ -301,6 +301,7 @@ sub HMinfo_SetFn($@) {######################################################### } elsif($cmd eq "protoEvents"){##print protocol-events------------------------- my ($type) = @a; + $type = "long" if(!$type); my @paramList; my @IOlist; foreach my $dName (HMinfo_getEntities($opt."dv",$filter)){ diff --git a/fhem/FHEM/HMConfig.pm b/fhem/FHEM/HMConfig.pm index b4a1f28f1..add64f875 100644 --- a/fhem/FHEM/HMConfig.pm +++ b/fhem/FHEM/HMConfig.pm @@ -918,7 +918,7 @@ my %culHmSubTypeDevSets = (# device of this subtype blindActuator =>{ statusRequest =>""}, # remote =>{ }, threeStateSensor =>{ statusRequest =>""}, - THSensor =>{ statusRequest =>""}, +# THSensor =>{ statusRequest =>""}, at least OT/OT2 do not support this # virtual =>{ }, smokeDetector =>{ statusRequest =>""}, winMatic =>{ statusRequest =>""}, @@ -965,8 +965,7 @@ my %culHmSubTypeSets = (# channels of this subtype remote =>{ peerChan =>" ... [single|dual] [set|unset] [actor|remote|both]"}, threeStateSensor =>{ peerChan =>" ... single [set|unset] [actor|remote|both]" ,statusRequest =>""}, - THSensor =>{ peerChan =>" ... single [set|unset] [actor|remote|both]" - ,statusRequest =>""}, + THSensor =>{ peerChan =>" ... single [set|unset] [actor|remote|both]"}, virtual =>{ peerChan =>" ... [single|dual] [set|unset] [actor|remote|both]" ,press =>"[long|short]..." ,postEvent =>""