Skip to content
Browse files

GitHub #46 - No longer need to complain about hash format.

  • Loading branch information...
1 parent 8169c74 commit 3ba1c72d72ba20730ff6cceb7382d081e6b56c54 @sqmk committed
Showing with 3 additions and 15 deletions.
  1. +2 −2 bin/phue-create-user
  2. +1 −7 bin/phue-light-finder
  3. +0 −6 bin/phue-list-lights
View
4 bin/phue-create-user
@@ -42,13 +42,13 @@ for ($i = 1; $i <= $maxTries; ++$i) {
new \Phue\Command\CreateUser($argv[2])
);
- echo "\n", "Successfully created new user: {$response->username}", "\n\n";
+ echo "\n\n", "Successfully created new user: {$response->username}", "\n\n";
break;
} catch (\Phue\Transport\Exception\LinkButtonException $e) {
echo ".";
} catch (Exception $e) {
- echo "\n", "Failure to create user. Please try again!",
+ echo "\n\n", "Failure to create user. Please try again!",
"\n", "Reason: {$e->getMessage()}", "\n\n";
break;
View
8 bin/phue-light-finder
@@ -18,12 +18,6 @@ if (!isset($argv[1], $argv[2])) {
// Initialize client
$client = new \Phue\Client($argv[1], $argv[2]);
-// Hash username if doesn't appear to be hash
-if ($client->getUsername() != $argv[2]) {
- echo "! - Username {$argv[2]} doesn't appear to be 32 character hash (A-F, 0-9)", "\n",
- "! - Using this for username instead: {$client->getUsername()}", "\n\n";
-}
-
echo "Testing connection to bridge at {$client->getHost()}", "\n";
try {
@@ -43,7 +37,7 @@ if (!$client->sendCommand(new \Phue\Command\IsAuthorized)) {
exit(1);
}
-// Start light scan,
+// Start light scan,
$client->sendCommand(
new \Phue\Command\StartLightScan
);
View
6 bin/phue-list-lights
@@ -18,12 +18,6 @@ if (!isset($argv[1], $argv[2])) {
// Initialize client
$client = new \Phue\Client($argv[1], $argv[2]);
-// Hash username if doesn't appear to be hash
-if ($client->getUsername() != $argv[2]) {
- echo "! - Username {$argv[2]} doesn't appear to be 32 character hash (A-F, 0-9)", "\n",
- "! - Using this for username instead: {$client->getUsername()}", "\n\n";
-}
-
echo "Testing connection to bridge at {$client->getHost()}", "\n";
try {

0 comments on commit 3ba1c72

Please sign in to comment.
Something went wrong with that request. Please try again.