From 4d7ae66448fdc8a48ba2a2273b2db21d95b64cac Mon Sep 17 00:00:00 2001 From: Vincent Date: Wed, 4 Sep 2019 10:06:37 +0200 Subject: [PATCH] . --- .idea/workspace.xml | 22 +++++++++------------- scripts/lib/insteon.php | 7 ++++--- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 186da78..2bafdce 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -3,11 +3,7 @@ - - - - diff --git a/scripts/lib/insteon.php b/scripts/lib/insteon.php index a213dbe..c9d7a09 100644 --- a/scripts/lib/insteon.php +++ b/scripts/lib/insteon.php @@ -26,11 +26,11 @@ function runInsteonCommand($command, $attempts = 3) insteonClearBuffer(); echo "\n" . '-- Command ' . $command . ' attempt #' . $attempts . ' --' . "\n"; echo "command : " . _insteonCommand($command) . "\n"; - for ($i = 1; $i <= 3; $i++) { - usleep(1000000 * 0.1); + for ($i = 1; $i <= 5; $i++) { + usleep(1000000 * 0.01); $buff = insteonBuffer(); echo $buff . "\n"; - if (stristr($buff, '0250') || stristr($buff, '0258')) { + if (stristr($buff, '0250') || stristr($buff, '0258') || stristr($buff, '0262')) { insteonClearBuffer(); return; } @@ -80,6 +80,7 @@ function insteonBuffer() return (string)($xml->BS); } else { $insteonHasKnocked = false; + insteonKnock(); return ''; } } \ No newline at end of file -- 2.39.5