Skip to content

Commit

Permalink
Update philipsbulb-sample.php
Browse files Browse the repository at this point in the history
Небольшие изменения.
  • Loading branch information
skysilver-lab authored Oct 26, 2017
1 parent 1c5ac9e commit 7fafe7b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions philipsbulb-sample.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
error_reporting(-1);
ini_set('display_errors', 1);

$ip = '192.168.1.48';
$token = 'b35f0af9064e6434d3f571ec05e5acc6';
$ip = '192.168.1.46';
$token = '40011346b40fdb540a5b6eeae1167bf5';
$bind_ip = null;
$debug = false;

Expand All @@ -25,7 +25,6 @@
echo 'Сцена: ' . $bulb->status['snm'] . PHP_EOL;
echo 'Таймер выключения: ' . $bulb->status['dv'] . PHP_EOL;


sleep(2);

echo PHP_EOL . date('H:m:s', time()) . PHP_EOL;
Expand All @@ -50,3 +49,7 @@
if($bulb->setScene($i)) echo " Включена сцена $i." . PHP_EOL;
sleep(2);
}

echo PHP_EOL . date('H:m:s', time());
if($bulb->powerOff()) echo ' Лампа выключена.' . PHP_EOL;
else echo "Лампа не выключена. Ошибка: $bulb->error" . PHP_EOL;

0 comments on commit 7fafe7b

Please sign in to comment.