mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
10_DUOFERNSTICK: raw command added
git-svn-id: https://svn.fhem.de/fhem/trunk@11487 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
91d0dc414a
commit
b40d76a05d
@ -17,6 +17,7 @@ my %sets = (
|
|||||||
"pair:noArg" => "",
|
"pair:noArg" => "",
|
||||||
"unpair:noArg" => "",
|
"unpair:noArg" => "",
|
||||||
"remotePair" => "",
|
"remotePair" => "",
|
||||||
|
"raw" => "",
|
||||||
);
|
);
|
||||||
|
|
||||||
my $duoInit1 = "01000000000000000000000000000000000000000000";
|
my $duoInit1 = "01000000000000000000000000000000000000000000";
|
||||||
@ -135,6 +136,12 @@ DUOFERNSTICK_Set($@)
|
|||||||
DUOFERNSTICK_AddSendQueue($hash, $duoStatusRequest);
|
DUOFERNSTICK_AddSendQueue($hash, $duoStatusRequest);
|
||||||
return undef;
|
return undef;
|
||||||
|
|
||||||
|
} elsif ($cmd eq "raw") {
|
||||||
|
return "wrong raw format: specify a 44 digit hex value"
|
||||||
|
if(!$arg || (uc($arg) !~ m/^[a-f0-9]{44}$/i));
|
||||||
|
DUOFERNSTICK_AddSendQueue($hash, $arg);
|
||||||
|
return undef;
|
||||||
|
|
||||||
} elsif ($cmd eq "pair") {
|
} elsif ($cmd eq "pair") {
|
||||||
DUOFERNSTICK_AddSendQueue($hash, $duoStartPair);
|
DUOFERNSTICK_AddSendQueue($hash, $duoStartPair);
|
||||||
$hash->{pair} = 1;
|
$hash->{pair} = 1;
|
||||||
@ -203,7 +210,7 @@ DUOFERNSTICK_Read($)
|
|||||||
|
|
||||||
my $now = gettimeofday();
|
my $now = gettimeofday();
|
||||||
if ($hash->{PARTIAL} ne "") {
|
if ($hash->{PARTIAL} ne "") {
|
||||||
InternalTimer($now+0.1, "DUOFERNSTICK_Flush_Buffer", "$hash->{NAME}:FB", 0);
|
InternalTimer($now+0.5, "DUOFERNSTICK_Flush_Buffer", "$hash->{NAME}:FB", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -319,6 +326,10 @@ DUOFERNSTICK_Flush_Buffer($)
|
|||||||
{
|
{
|
||||||
my ($name,$id) = split(":",$_[0]);
|
my ($name,$id) = split(":",$_[0]);
|
||||||
|
|
||||||
|
if ($defs{$name}{PARTIAL} ne "") {
|
||||||
|
Log3 $name, 4, "$name discard $defs{$name}{PARTIAL}";
|
||||||
|
}
|
||||||
|
|
||||||
$defs{$name}{PARTIAL} ="";
|
$defs{$name}{PARTIAL} ="";
|
||||||
|
|
||||||
return undef;
|
return undef;
|
||||||
@ -601,12 +612,12 @@ DUOFERNSTICK_AddSendQueue($$)
|
|||||||
<p><b>Set</b></p>
|
<p><b>Set</b></p>
|
||||||
<ul>
|
<ul>
|
||||||
<li><b>pair</b><br>
|
<li><b>pair</b><br>
|
||||||
Set the DuoFern stick in pairing-mode. Any DouFern device set into
|
Set the DuoFern stick in pairing mode for 60 seconds. Any DouFern device set into
|
||||||
pairing mode in this time will be paired with the DuoFern stick.
|
pairing mode in this time will be paired with the DuoFern stick.
|
||||||
</li><br>
|
</li><br>
|
||||||
<li><b>unpair</b><br>
|
<li><b>unpair</b><br>
|
||||||
Set the DuoFern stick in unpairing-mode. Any DouFern device set into
|
Set the DuoFern stick in unpairing mode for 60 seconds. Any DouFern device set into
|
||||||
unpairing mode in this time will be paired with the DuoFern stick.
|
unpairing mode in this time will be unpaired from the DuoFern stick.
|
||||||
</li><br>
|
</li><br>
|
||||||
<li><b>reopen</b><br>
|
<li><b>reopen</b><br>
|
||||||
Reopens the connection to the device and reinitializes it.
|
Reopens the connection to the device and reinitializes it.
|
||||||
@ -618,6 +629,9 @@ DUOFERNSTICK_AddSendQueue($$)
|
|||||||
Activates the pairing mode on the device specified by the code.<br>
|
Activates the pairing mode on the device specified by the code.<br>
|
||||||
Some actors accept this command in unpaired mode up to two hours afte power up.
|
Some actors accept this command in unpaired mode up to two hours afte power up.
|
||||||
</li><br>
|
</li><br>
|
||||||
|
<li><b>raw <rawmsg></b><br>
|
||||||
|
Sends a raw message.
|
||||||
|
</li><br>
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
<b>Get</b> <ul>N/A</ul><br>
|
<b>Get</b> <ul>N/A</ul><br>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user