2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

Setting FHT time via CUL

git-svn-id: https://svn.fhem.de/fhem/trunk@382 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2009-06-01 15:06:18 +00:00
parent d25ef9d1a7
commit 34fa5925ae
3 changed files with 17 additions and 7 deletions

View File

@ -21,7 +21,8 @@ my %gets = (
"ccconf" => "=",
"uptime" => "t",
"file" => "",
"time" => "c03"
"time" => "c03",
"fhtbuf" => "T03"
);
my %sets = (

View File

@ -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;

View File

@ -1538,7 +1538,7 @@ A line ending with \ will be concatenated with the next one, so long lines
<a name="CULdefine"></a>
<b>Define</b>
<ul>
<code>define &lt;name&gt; CUL &lt;serial-device&gt; [mobile]</code> <br>
<code>define &lt;name&gt; CUL &lt;serial-device&gt; &lt;housecode&gt; [mobile]</code> <br>
<br>
Specifies the serial port to communicate with the CUL or CUR.
The name(s) of the serial-device(s) depends on your distribution,
@ -1548,10 +1548,11 @@ A line ending with \ will be concatenated with the next one, so long lines
If the serial-device is called none, then no device will be opened, so you
can experiment without hardware attached.<br>
If you specify the "mobile" parameter, then fhem.pl won't block if the
device is removed. This is mainly intended for the CUR.
device is removed. This is mainly intended for the CUR.<br>
The housecode is a 4 digit hex number, and it is used when the CUL/CUR
talks to FHT devices or when CUR requests data.
</ul>
<br>
<a name="CULset"></a>
<b>Set </b>
<ul>