mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-29 23:47:10 +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:
parent
d25ef9d1a7
commit
34fa5925ae
@ -21,7 +21,8 @@ my %gets = (
|
|||||||
"ccconf" => "=",
|
"ccconf" => "=",
|
||||||
"uptime" => "t",
|
"uptime" => "t",
|
||||||
"file" => "",
|
"file" => "",
|
||||||
"time" => "c03"
|
"time" => "c03",
|
||||||
|
"fhtbuf" => "T03"
|
||||||
);
|
);
|
||||||
|
|
||||||
my %sets = (
|
my %sets = (
|
||||||
|
@ -99,8 +99,8 @@ my %cantset = (
|
|||||||
my %priority = (
|
my %priority = (
|
||||||
"desired-temp"=> 1,
|
"desired-temp"=> 1,
|
||||||
"mode" => 2,
|
"mode" => 2,
|
||||||
"report1" => 3,
|
"report1" => 3,
|
||||||
"report2" => 3,
|
"report2" => 3,
|
||||||
"holiday1" => 4,
|
"holiday1" => 4,
|
||||||
"holiday2" => 5,
|
"holiday2" => 5,
|
||||||
"day-temp" => 6,
|
"day-temp" => 6,
|
||||||
@ -157,10 +157,18 @@ FHT_Set($@)
|
|||||||
return "\"set $a[0]\" needs at least two parameters" if(@a < 2);
|
return "\"set $a[0]\" needs at least two parameters" if(@a < 2);
|
||||||
|
|
||||||
my $name = shift(@a);
|
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++) {
|
for(my $i = 0; $i < @a; $i++) {
|
||||||
splice(@a,$i,1,("report1","255","report2","255"))
|
splice(@a,$i,1,("report1","255","report2","255"))
|
||||||
if($a[$i] eq "refreshvalues");
|
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;
|
my $ncmd = 0;
|
||||||
|
@ -1538,7 +1538,7 @@ A line ending with \ will be concatenated with the next one, so long lines
|
|||||||
<a name="CULdefine"></a>
|
<a name="CULdefine"></a>
|
||||||
<b>Define</b>
|
<b>Define</b>
|
||||||
<ul>
|
<ul>
|
||||||
<code>define <name> CUL <serial-device> [mobile]</code> <br>
|
<code>define <name> CUL <serial-device> <housecode> [mobile]</code> <br>
|
||||||
<br>
|
<br>
|
||||||
Specifies the serial port to communicate with the CUL or CUR.
|
Specifies the serial port to communicate with the CUL or CUR.
|
||||||
The name(s) of the serial-device(s) depends on your distribution,
|
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
|
If the serial-device is called none, then no device will be opened, so you
|
||||||
can experiment without hardware attached.<br>
|
can experiment without hardware attached.<br>
|
||||||
If you specify the "mobile" parameter, then fhem.pl won't block if the
|
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>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<a name="CULset"></a>
|
<a name="CULset"></a>
|
||||||
<b>Set </b>
|
<b>Set </b>
|
||||||
<ul>
|
<ul>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user