mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-19 18:56:03 +00:00
30_HUEBridge.pm: fixed typo
git-svn-id: https://svn.fhem.de/fhem/trunk@25525 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
e9da46f062
commit
d35652f792
@ -429,7 +429,7 @@ HUEBridge_closeEventStream($)
|
|||||||
return if( !defined($hash->{helper}{HTTP_CONNECTION}) );
|
return if( !defined($hash->{helper}{HTTP_CONNECTION}) );
|
||||||
|
|
||||||
$hash->{EventStream} = 'closing';
|
$hash->{EventStream} = 'closing';
|
||||||
Log3 $name, 4, "name: EventStream: $hash->{EventStream}";
|
Log3 $name, 4, "$name: EventStream: $hash->{EventStream}";
|
||||||
|
|
||||||
HttpUtils_Close( $hash->{helper}{HTTP_CONNECTION} );
|
HttpUtils_Close( $hash->{helper}{HTTP_CONNECTION} );
|
||||||
delete $hash->{helper}{HTTP_CONNECTION};
|
delete $hash->{helper}{HTTP_CONNECTION};
|
||||||
@ -437,7 +437,7 @@ HUEBridge_closeEventStream($)
|
|||||||
delete $hash->{buf};
|
delete $hash->{buf};
|
||||||
|
|
||||||
delete($hash->{EventStream});
|
delete($hash->{EventStream});
|
||||||
Log3 $name, 4, "name: EventStream: closed";
|
Log3 $name, 4, "$name: EventStream: closed";
|
||||||
}
|
}
|
||||||
sub
|
sub
|
||||||
HUEBridge_openEventStream($)
|
HUEBridge_openEventStream($)
|
||||||
@ -451,7 +451,7 @@ HUEBridge_openEventStream($)
|
|||||||
HUEBridge_closeEventStream($hash);
|
HUEBridge_closeEventStream($hash);
|
||||||
|
|
||||||
$hash->{EventStream} = 'connecting';
|
$hash->{EventStream} = 'connecting';
|
||||||
Log3 $name, 4, "name: EventStream: $hash->{EventStream}";
|
Log3 $name, 4, "$name: EventStream: $hash->{EventStream}";
|
||||||
|
|
||||||
my $params = {
|
my $params = {
|
||||||
url => "https://$hash->{host}/eventstream/clip/v2",
|
url => "https://$hash->{host}/eventstream/clip/v2",
|
||||||
@ -2219,12 +2219,12 @@ HUEBridge_dispatch($$$;$)
|
|||||||
if( $type eq 'event' ) {
|
if( $type eq 'event' ) {
|
||||||
if( defined($hash->{helper}{HTTP_CONNECTION}) && defined($hash->{helper}{HTTP_CONNECTION}{lastID}) ) {
|
if( defined($hash->{helper}{HTTP_CONNECTION}) && defined($hash->{helper}{HTTP_CONNECTION}{lastID}) ) {
|
||||||
$hash->{EventStream} = 'terminated';
|
$hash->{EventStream} = 'terminated';
|
||||||
Log3 $name, 2, "name: EventStream: $hash->{EventStream}";
|
Log3 $name, 2, "$name: EventStream: $hash->{EventStream}";
|
||||||
HUEBridge_openEventStream( $hash );
|
HUEBridge_openEventStream( $hash );
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$hash->{EventStream} = 'terminated; retrying later';
|
$hash->{EventStream} = 'terminated; retrying later';
|
||||||
Log3 $name, 2, "name: EventStream: $hash->{EventStream}";
|
Log3 $name, 2, "$name: EventStream: $hash->{EventStream}";
|
||||||
|
|
||||||
RemoveInternalTimer($hash, "HUEBridge_openEventStream" );
|
RemoveInternalTimer($hash, "HUEBridge_openEventStream" );
|
||||||
InternalTimer(gettimeofday()+2, "HUEBridge_openEventStream", $hash, 0);
|
InternalTimer(gettimeofday()+2, "HUEBridge_openEventStream", $hash, 0);
|
||||||
@ -2254,7 +2254,7 @@ HUEBridge_dispatch($$$;$)
|
|||||||
} elsif( defined($type) && $type eq 'event' ) {
|
} elsif( defined($type) && $type eq 'event' ) {
|
||||||
if( $hash->{EventStream} && $hash->{EventStream} ne 'connected' ) {
|
if( $hash->{EventStream} && $hash->{EventStream} ne 'connected' ) {
|
||||||
$hash->{EventStream} = 'connected';
|
$hash->{EventStream} = 'connected';
|
||||||
Log3 $name, 4, "name: EventStream: $hash->{EventStream}";
|
Log3 $name, 4, "$name: EventStream: $hash->{EventStream}";
|
||||||
}
|
}
|
||||||
|
|
||||||
if( defined(my $create = AttrVal($name,'createEventTimestampReading',undef )) ) {
|
if( defined(my $create = AttrVal($name,'createEventTimestampReading',undef )) ) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user