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