remove alive counter
This commit is contained in:
parent
8e393b1bd1
commit
8f1b164dd0
@ -235,7 +235,6 @@ sub Define($$) {
|
||||
$hash->{NOTIFYDEV} = 'global,' . $name;
|
||||
$hash->{VERSION} = version->parse($VERSION)->normal;
|
||||
$hash->{BRIDGEAPI} = FHEM::Meta::Get( $hash, 'x_apiversion' );
|
||||
$hash->{helper}->{aliveCount} = 0;
|
||||
$hash->{helper}->{actionQueue} = [];
|
||||
$hash->{helper}->{iowrite} = 0;
|
||||
my $infix = 'NUKIBridge';
|
||||
@ -397,10 +396,14 @@ sub Notify($$) {
|
||||
FirstRun($hash)
|
||||
if (
|
||||
(
|
||||
grep /^INITIALIZED$/, @{$events}
|
||||
or grep /^REREADCFG$/, @{$events}
|
||||
or grep /^MODIFIED.$name$/, @{$events}
|
||||
or grep /^DEFINED.$name$/, @{$events}
|
||||
grep /^INITIALIZED$/,
|
||||
@{$events}
|
||||
or grep /^REREADCFG$/,
|
||||
@{$events}
|
||||
or grep /^MODIFIED.$name$/,
|
||||
@{$events}
|
||||
or grep /^DEFINED.$name$/,
|
||||
@{$events}
|
||||
)
|
||||
and $devname eq 'global'
|
||||
and $init_done
|
||||
@ -573,10 +576,11 @@ sub Write($@) {
|
||||
};
|
||||
|
||||
$hash->{helper}->{lastDeviceAction} = $obj
|
||||
if ( ( defined($param)
|
||||
and $param)
|
||||
if (
|
||||
( defined($param) and $param )
|
||||
or ( defined($nukiId)
|
||||
and $nukiId) );
|
||||
and $nukiId )
|
||||
);
|
||||
|
||||
unshift( @{ $hash->{helper}->{actionQueue} }, $obj );
|
||||
|
||||
@ -703,9 +707,7 @@ sub Distribution($$$) {
|
||||
if ( $err ne '' ) {
|
||||
if ( $param->{endpoint} eq 'info' ) {
|
||||
readingsBulkUpdate( $hash, 'state', 'not connected' );
|
||||
# if ( $hash->{helper}{aliveCount} > 1 );
|
||||
Log3( $name, 5, "NUKIBridge ($name) - Bridge ist offline" );
|
||||
# $hash->{helper}{aliveCount} = $hash->{helper}{aliveCount} + 1;
|
||||
}
|
||||
|
||||
readingsBulkUpdate( $hash, 'lastError', $err )
|
||||
@ -909,8 +911,6 @@ sub ResponseProcessing($$$) {
|
||||
|
||||
InfoProcessing( $hash, $decode_json )
|
||||
if ( $endpoint eq 'info' );
|
||||
|
||||
$hash->{helper}{aliveCount} = 0;
|
||||
}
|
||||
else {
|
||||
Log3(
|
||||
@ -1336,7 +1336,7 @@ sub ParseJSON($$) {
|
||||
],
|
||||
"release_status": "under develop",
|
||||
"license": "GPL_2",
|
||||
"version": "v1.9.13",
|
||||
"version": "v1.9.14",
|
||||
"x_apiversion": "1.9",
|
||||
"author": [
|
||||
"Marko Oldenburg <leongaultier@gmail.com>"
|
||||
|
@ -30,7 +30,6 @@ package main;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
|
||||
package FHEM::NUKIDevice;
|
||||
|
||||
use strict;
|
||||
@ -363,10 +362,14 @@ sub Notify($$) {
|
||||
GetUpdate($hash)
|
||||
if (
|
||||
(
|
||||
grep /^INITIALIZED$/, @{$events}
|
||||
or grep /^REREADCFG$/, @{$events}
|
||||
or grep /^MODIFIED.$name$/, @{$events}
|
||||
or grep /^DEFINED.$name$/, @{$events}
|
||||
grep /^INITIALIZED$/,
|
||||
@{$events}
|
||||
or grep /^REREADCFG$/,
|
||||
@{$events}
|
||||
or grep /^MODIFIED.$name$/,
|
||||
@{$events}
|
||||
or grep /^DEFINED.$name$/,
|
||||
@{$events}
|
||||
)
|
||||
and $devname eq 'global'
|
||||
and $init_done
|
||||
@ -430,7 +433,8 @@ sub GetUpdate($) {
|
||||
my $name = $hash->{NAME};
|
||||
|
||||
if ( !IsDisabled($name) ) {
|
||||
IOWrite( $hash, 'lockState', undef, $hash->{NUKIID}, $hash->{DEVICETYPE} );
|
||||
IOWrite( $hash, 'lockState', undef, $hash->{NUKIID},
|
||||
$hash->{DEVICETYPE} );
|
||||
Log3( $name, 2, "NUKIDevice ($name) - GetUpdate Call IOWrite" );
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user