From 34fa5925aee4717c3452d5895ef0b04ba02a315c Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Mon, 1 Jun 2009 15:06:18 +0000 Subject: [PATCH] Setting FHT time via CUL git-svn-id: https://svn.fhem.de/fhem/trunk@382 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/00_CUL.pm | 3 ++- fhem/FHEM/11_FHT.pm | 14 +++++++++++--- fhem/docs/commandref.html | 7 ++++--- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/fhem/FHEM/00_CUL.pm b/fhem/FHEM/00_CUL.pm index 170537a10..9bbcfe1a8 100755 --- a/fhem/FHEM/00_CUL.pm +++ b/fhem/FHEM/00_CUL.pm @@ -21,7 +21,8 @@ my %gets = ( "ccconf" => "=", "uptime" => "t", "file" => "", - "time" => "c03" + "time" => "c03", + "fhtbuf" => "T03" ); my %sets = ( diff --git a/fhem/FHEM/11_FHT.pm b/fhem/FHEM/11_FHT.pm index 7ab5278f9..f6c1aadd8 100755 --- a/fhem/FHEM/11_FHT.pm +++ b/fhem/FHEM/11_FHT.pm @@ -99,8 +99,8 @@ my %cantset = ( my %priority = ( "desired-temp"=> 1, "mode" => 2, - "report1" => 3, - "report2" => 3, + "report1" => 3, + "report2" => 3, "holiday1" => 4, "holiday2" => 5, "day-temp" => 6, @@ -157,10 +157,18 @@ FHT_Set($@) return "\"set $a[0]\" needs at least two parameters" if(@a < 2); my $name = shift(@a); - # Backward compatibility, replace refreshvalues with report1 and report2. + + # Replace refreshvalues with report1 and report2, and time with hour/minute for(my $i = 0; $i < @a; $i++) { splice(@a,$i,1,("report1","255","report2","255")) if($a[$i] eq "refreshvalues"); + + if($a[$i] eq "time") { # CUL hack + my @t = localtime; + splice(@a,$i,1,("hour",$t[2],"minute",$t[1])); + IOWrite($hash, "", sprintf("T04%x", $t[0]) ) + if($hash->{IODev} && $hash->{IODev}->{TYPE} eq "CUL"); + } } my $ncmd = 0; diff --git a/fhem/docs/commandref.html b/fhem/docs/commandref.html index 1126757ce..6f5791c2c 100644 --- a/fhem/docs/commandref.html +++ b/fhem/docs/commandref.html @@ -1538,7 +1538,7 @@ A line ending with \ will be concatenated with the next one, so long lines Define
define <name> CUL <serial-device> [mobile]
define <name> CUL <serial-device> <housecode> [mobile]