From 9b390cfdd47cc5d80123f9256e4c30fd578c490d Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Thu, 9 Jan 2020 04:58:46 +0100 Subject: [PATCH] add special debug output for testing --- 74_XiaomiBTLESens.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/74_XiaomiBTLESens.pm b/74_XiaomiBTLESens.pm index e95c9e7..20f98cd 100644 --- a/74_XiaomiBTLESens.pm +++ b/74_XiaomiBTLESens.pm @@ -724,12 +724,13 @@ qx(ssh $sshHost '$psCommand | grep -E "$gatttoolCmdlineStaticEscaped"') Log3($name, 5, "XiaomiBTLESens ($name) - ExecGatttool_Run: gatttool loop result " . join( ",", @gtResult )); - $loop++; $returnCode = 2 unless ( defined( $gtResult[0] ) ); - # } while ( $loop < 5 and $gtResult[0] eq 'connect error' ); + print('DEBUG BTLESens!!! - Exit Code: ' . $returnCode . "\n"); + + $loop++; } while ( $loop < 5 and $returnCode != 0 ); Log3($name, 3, "XiaomiBTLESens ($name) - ExecGatttool_Run: errorcode: \"$returnCode\", ErrorString: \"$returnString\"")