mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-08 13:24:56 +00:00
CUR time commands
git-svn-id: https://svn.fhem.de/fhem/trunk@363 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
68679a3b82
commit
9e0ced360e
@ -20,7 +20,8 @@ my %gets = (
|
||||
"raw" => "",
|
||||
"ccconf" => "=",
|
||||
"uptime" => "t",
|
||||
"file" => ""
|
||||
"file" => "",
|
||||
"time" => "c03"
|
||||
);
|
||||
|
||||
my %sets = (
|
||||
@ -32,7 +33,8 @@ my %sets = (
|
||||
"verbose" => "X",
|
||||
"led" => "l",
|
||||
"patable" => "x",
|
||||
"file" => ""
|
||||
"file" => "",
|
||||
"time" => ""
|
||||
);
|
||||
|
||||
my @ampllist = (24, 27, 30, 33, 36, 38, 40, 42);
|
||||
@ -271,6 +273,14 @@ WRITEEND:
|
||||
CUL_SimpleWrite($hash, $initstr);
|
||||
return "$name: $err" if($err);
|
||||
|
||||
} elsif($type eq "time") {
|
||||
|
||||
return "Only supported for CUR devices (see VERSION)"
|
||||
if($hash->{VERSION} !~ m/CUR/);
|
||||
my @a = localtime;
|
||||
my $msg = sprintf("c%02d%02d%02d", $a[2],$a[1],$a[0]);
|
||||
CUL_SimpleWrite($hash, $msg);
|
||||
|
||||
} else {
|
||||
|
||||
return "Expecting a 0-padded hex number"
|
||||
@ -442,6 +452,12 @@ CUL_DoInit($)
|
||||
}
|
||||
$hash->{VERSION} = $ver;
|
||||
|
||||
if($ver =~ m/CUR/) {
|
||||
my @a = localtime;
|
||||
my $msg = sprintf("c%02d%02d%02d", $a[2],$a[1],$a[0]);
|
||||
CUL_SimpleWrite($hash, $msg);
|
||||
}
|
||||
|
||||
CUL_SimpleWrite($hash, $initstr);
|
||||
$hash->{STATE} = "Initialized";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user