This commit is contained in:
Marko Oldenburg 2018-01-05 21:41:48 +01:00
parent 953a34d706
commit 551f4599af

View File

@ -47,7 +47,7 @@ use JSON;
use Blocking; use Blocking;
my $version = "1.4.1"; my $version = "1.4.1.1";
my %CallBatteryFirmwareAge = ( '8h' => 28800, my %CallBatteryFirmwareAge = ( '8h' => 28800,
'16h' => 57600, '16h' => 57600,
'24h' => 86400, '24h' => 86400,
@ -414,7 +414,6 @@ sub XiaomiFlowerSens_ExecGatttool_Run($) {
my $cmd; my $cmd;
my $loop; my $loop;
my @gtResult; my @gtResult;
$gtResult[0] = 'connect error';
my $wait = 1; my $wait = 1;
my $sshHost = AttrVal($name,"sshHost","none"); my $sshHost = AttrVal($name,"sshHost","none");
my $hci = AttrVal($name,"hciDevice","hci0"); my $hci = AttrVal($name,"hciDevice","hci0");
@ -449,6 +448,9 @@ sub XiaomiFlowerSens_ExecGatttool_Run($) {
Log3 $name, 5, "XiaomiFlowerSens ($name) - ExecGatttool_Run: gatttool loop result ".join(",", @gtResult); Log3 $name, 5, "XiaomiFlowerSens ($name) - ExecGatttool_Run: gatttool loop result ".join(",", @gtResult);
$loop++; $loop++;
$gtResult[0] = 'connect error'
unless( defined($gtResult[0]) );
} while( $loop < 5 and $gtResult[0] eq 'connect error' ); } while( $loop < 5 and $gtResult[0] eq 'connect error' );
Log3 $name, 4, "XiaomiFlowerSens ($name) - ExecGatttool_Run: gatttool result ".join(",", @gtResult); Log3 $name, 4, "XiaomiFlowerSens ($name) - ExecGatttool_Run: gatttool result ".join(",", @gtResult);