mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
CUL_MAX: Send Ack to ShutterContactState
git-svn-id: https://svn.fhem.de/fhem/trunk@2294 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
1103649ce0
commit
faa045abfc
@ -15,12 +15,10 @@ sub CUL_MAX_SendDeviceCmd($$);
|
|||||||
sub CUL_MAX_Send(@);
|
sub CUL_MAX_Send(@);
|
||||||
sub CUL_MAX_BroadcastTime($);
|
sub CUL_MAX_BroadcastTime($);
|
||||||
sub CUL_MAX_Set($@);
|
sub CUL_MAX_Set($@);
|
||||||
|
sub CUL_MAX_SendAck($$$);
|
||||||
sub CUL_MAX_SendTimeInformation(@);
|
sub CUL_MAX_SendTimeInformation(@);
|
||||||
sub CUL_MAX_Send(@);
|
sub CUL_MAX_Send(@);
|
||||||
|
|
||||||
# Todo for full MAXLAN replacement:
|
|
||||||
# - Send Ack on ShutterContactState (but never else)
|
|
||||||
|
|
||||||
my $pairmodeDuration = 30; #seconds
|
my $pairmodeDuration = 30; #seconds
|
||||||
|
|
||||||
my $timeBroadcastInterval = 6*60*60; #= 6 hours, the same time that the cube uses
|
my $timeBroadcastInterval = 6*60*60; #= 6 hours, the same time that the cube uses
|
||||||
@ -193,6 +191,10 @@ CUL_MAX_Parse($$)
|
|||||||
|
|
||||||
} elsif($msgType ~~ ["ShutterContactState", "WallThermostatState", "ThermostatState"]) {
|
} elsif($msgType ~~ ["ShutterContactState", "WallThermostatState", "ThermostatState"]) {
|
||||||
Dispatch($shash, "MAX,$msgType,$src,$payload", {RAWMSG => $rmsg});
|
Dispatch($shash, "MAX,$msgType,$src,$payload", {RAWMSG => $rmsg});
|
||||||
|
#Only ShutterContactState needs ack
|
||||||
|
if($msgType eq "ShutterContactState" and $dst eq $shash->{addr}) {
|
||||||
|
CUL_MAX_SendAck($shash,$msgcnt,$dst);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Log 5, "Unhandled message $msgType";
|
Log 5, "Unhandled message $msgType";
|
||||||
}
|
}
|
||||||
@ -202,7 +204,14 @@ CUL_MAX_Parse($$)
|
|||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
#All inputs are hex strings, $cmd is one from %msgCmd2Id
|
sub
|
||||||
|
CUL_MAX_SendAck($$$)
|
||||||
|
{
|
||||||
|
my ($hash,$msgcnt,$dst) = @_;
|
||||||
|
return CUL_MAX_Send($hash, "Ack", $dst, "00", "", "00", $msgcnt);
|
||||||
|
}
|
||||||
|
|
||||||
|
#All inputs are hex strings, $flags is binary in string format, $cmd is one from %msgCmd2Id
|
||||||
sub
|
sub
|
||||||
CUL_MAX_Send(@)
|
CUL_MAX_Send(@)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user