fix fetch remote data over ssh
This commit is contained in:
parent
581cdb042d
commit
c57422cefd
@ -47,7 +47,7 @@ use JSON;
|
|||||||
use Blocking;
|
use Blocking;
|
||||||
|
|
||||||
|
|
||||||
my $version = "1.1.58";
|
my $version = "1.1.60";
|
||||||
my %readings = ();
|
my %readings = ();
|
||||||
my %CallBatteryFirmwareAge = ( '8h' => 28800,
|
my %CallBatteryFirmwareAge = ( '8h' => 28800,
|
||||||
'16h' => 57600,
|
'16h' => 57600,
|
||||||
@ -416,7 +416,11 @@ sub XiaomiFlowerSens_ExecGatttool_Run($) {
|
|||||||
if($gtResult[1] =~ /^([0-9a-f]{2}(\s?))*$/) {
|
if($gtResult[1] =~ /^([0-9a-f]{2}(\s?))*$/) {
|
||||||
return "$name|$mac|ok|$gattCmd|$handle|$json_notification";
|
return "$name|$mac|ok|$gattCmd|$handle|$json_notification";
|
||||||
} elsif($gtResult[0] ne 'connect error' and $gattCmd eq 'write') {
|
} elsif($gtResult[0] ne 'connect error' and $gattCmd eq 'write') {
|
||||||
return "$name|$mac|ok|$gattCmd|$handle|$json_notification";
|
if( $sshHost ne 'none' ) {
|
||||||
|
XiaomiFlowerSens_ExecGatttool_Run($name."|".$mac."|read|0x35");
|
||||||
|
} else {
|
||||||
|
return "$name|$mac|ok|$gattCmd|$handle|$json_notification";
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return "$name|$mac|error|$gattCmd|$handle|$json_notification";
|
return "$name|$mac|error|$gattCmd|$handle|$json_notification";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user