mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 06:39:11 +00:00
30_MilightBridge: Use new RemoveInternalTimer function
git-svn-id: https://svn.fhem.de/fhem/trunk@16085 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
3b499aba4a
commit
468e268468
@ -1,5 +1,6 @@
|
||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||
# Do not insert empty lines here, update check depends on it.
|
||||
- change: 30_MilightBridge: Use new RemoveInternalTimer function
|
||||
- new: 52_I2C_EMC1001.pm: initial check in
|
||||
- feature: 30_HUEBridge, 31_HUEDevice: added createGroupReadings attribute
|
||||
- feature: f18: implement dragging / dashboard
|
||||
|
@ -63,13 +63,13 @@ sub MilightBridge_Define($$)
|
||||
|
||||
return "Usage: define <name> MilightBridge <host/ip:port>" if(@args < 3);
|
||||
|
||||
my ($name, $type, $host) = @args;
|
||||
my ($name, $type, $hostandport) = @args;
|
||||
|
||||
$hash->{Clients} = ":MilightDevice:";
|
||||
my %matchList = ( "1:MilightDevice" => ".*" );
|
||||
$hash->{MatchList} = \%matchList;
|
||||
|
||||
my ($host, $port) = split(":", $host);
|
||||
my ($host, $port) = split(":", $hostandport);
|
||||
# Parameters
|
||||
$hash->{HOST} = $host;
|
||||
# Set Port (Default 8899, old bridge (V2) uses 50000
|
||||
@ -415,14 +415,7 @@ sub MilightBridge_CmdQueue_Send(@)
|
||||
#Log3 ($hash, 5, "$hash->{NAME}_cmdQueue_Send: cmdLastSent: $hash->{cmdLastSent}; Next: ".(gettimeofday()+($hash->{INTERVAL}/1000)));
|
||||
|
||||
# Remove any existing timers and trigger a new one
|
||||
foreach my $args (keys %intAt)
|
||||
{
|
||||
if (($intAt{$args}{ARG} eq $hash) && ($intAt{$args}{FN} eq 'MilightBridge_CmdQueue_Send'))
|
||||
{
|
||||
Log3 ($hash, 5, "$hash->{NAME}_CmdQueue_Send: Remove timer at: ".$intAt{$args}{TRIGGERTIME});
|
||||
delete($intAt{$args});
|
||||
}
|
||||
}
|
||||
RemoveInternalTimer($hash, 'MilightBridge_CmdQueue_Send');
|
||||
InternalTimer(gettimeofday()+($hash->{INTERVAL}/1000), "MilightBridge_CmdQueue_Send", $hash, 0);
|
||||
}
|
||||
|
||||
@ -433,6 +426,8 @@ sub MilightBridge_CmdQueue_Send(@)
|
||||
1;
|
||||
|
||||
=pod
|
||||
=item device
|
||||
=item summary Interface to a Milight Bridge connected to the network using a Wifi connection
|
||||
=begin html
|
||||
|
||||
<a name="MilightBridge"></a>
|
||||
|
@ -2354,6 +2354,8 @@ sub MilightDevice_roundfunc($) {
|
||||
1;
|
||||
|
||||
=pod
|
||||
=item device
|
||||
=item summary This module represents a Milight LED Bulb or LED strip controller
|
||||
=begin html
|
||||
|
||||
<a name="MilightDevice"></a>
|
||||
|
Loading…
Reference in New Issue
Block a user