{"action":"created","comment":{"url":"https://api.github.com/repos/eclipse/smarthome/pulls/comments/71900366","id":71900366,"diff_hunk":"@@ -496,5 +482,59 @@ private boolean isEqual(State state1, State state2) {\n         }\n         return colorModeIsEqual && effectIsEqual;\n     }\n+    \n+    private boolean isReachable() {\n+        try {\n+            // note that InetAddress.isReachable is unreliable, see\n+            // http://stackoverflow.com/questions/9922543/why-does-inetaddress-isreachable-return-false-when-i-can-ping-the-ip-address\n+            // That's why we do an HTTP access instead\n+\n+            if (bridge != null) {\n+                // If there is no connection, this line will fail\n+                bridge.authenticate(\"invalid\");\n+            }\n+        } catch (IOException e) {\n+            return false;\n+        } catch (ApiException e) {\n+            if (e.getMessage().contains(\"SocketTimeout\") || e.getMessage().contains(\"ConnectException\")\n+                    || e.getMessage().contains(\"NoRouteToHostException\")) {\n+                return false;\n+            } else {\n+                // this seems to be only an authentication issue\n+                return true;\n+            }\n+        }\n+        return true;\n+    }\n+\n+    @Override\n+    public Collection<ConfigStatusMessage> getConfigStatus() {\n+        // The bridge IP address to be used for checks\n+        final String bridgeIpAddress = (String) getThing().getConfiguration().get(HOST);\n+\n+        // Check whether an IP address is provided\n+        if (bridgeIpAddress == null) {\n+\n+            return ImmutableList.of(ConfigStatusMessage.Builder.error(HOST)\n+                    .withMessageKey(HueConfigStatusMessage.IP_ADDRESS_MISSING.getMessageKey()).build());\n+        }\n+\n+        // Check if the bridge on the given IP address is reachable\n+        if (!isReachable()) {\n+\n+            return ImmutableList.of(ConfigStatusMessage.Builder.error(HOST)","path":"extensions/binding/org.eclipse.smarthome.binding.hue/src/main/java/org/eclipse/smarthome/binding/hue/handler/HueBridgeHandler.java","position":119,"original_position":119,"commit_id":"bdf9be09c79256e5cf7cf7285658ae9770a7168d","original_commit_id":"bdf9be09c79256e5cf7cf7285658ae9770a7168d","user":{"login":"kaikreuzer","id":3244965,"avatar_url":"https://avatars.githubusercontent.com/u/3244965?v=3","gravatar_id":"","url":"https://api.github.com/users/kaikreuzer","html_url":"https://github.com/kaikreuzer","followers_url":"https://api.github.com/users/kaikreuzer/followers","following_url":"https://api.github.com/users/kaikreuzer/following{/other_user}","gists_url":"https://api.github.com/users/kaikreuzer/gists{/gist_id}","starred_url":"https://api.github.com/users/kaikreuzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaikreuzer/subscriptions","organizations_url":"https://api.github.com/users/kaikreuzer/orgs","repos_url":"https://api.github.com/users/kaikreuzer/repos","events_url":"https://api.github.com/users/kaikreuzer/events{/privacy}","received_events_url":"https://api.github.com/users/kaikreuzer/received_events","type":"User","site_admin":false},"body":"Not for me, that was just an example...","created_at":"2016-07-22T15:46:13Z","updated_at":"2016-07-22T15:46:13Z","html_url":"https://github.com/eclipse/smarthome/pull/1819#discussion_r71900366","pull_request_url":"https://api.github.com/repos/eclipse/smarthome/pulls/1819","_links":{"self":{"href":"https://api.github.com/repos/eclipse/smarthome/pulls/comments/71900366"},"html":{"href":"https://github.com/eclipse/smarthome/pull/1819#discussion_r71900366"},"pull_request":{"href":"https://api.github.com/repos/eclipse/smarthome/pulls/1819"}}},"pull_request":{"url":"https://api.github.com/repos/eclipse/smarthome/pulls/1819","id":76387809,"html_url":"https://github.com/eclipse/smarthome/pull/1819","diff_url":"https://github.com/eclipse/smarthome/pull/1819.diff","patch_url":"https://github.com/eclipse/smarthome/pull/1819.patch","issue_url":"https://api.github.com/repos/eclipse/smarthome/issues/1819","number":1819,"state":"open","locked":false,"title":"Implemented configuration status handling for hue bridge.","user":{"login":"AlexanderKostadinov28","id":3617448,"avatar_url":"https://avatars.githubusercontent.com/u/3617448?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexanderKostadinov28","html_url":"https://github.com/AlexanderKostadinov28","followers_url":"https://api.github.com/users/AlexanderKostadinov28/followers","following_url":"https://api.github.com/users/AlexanderKostadinov28/following{/other_user}","gists_url":"https://api.github.com/users/AlexanderKostadinov28/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexanderKostadinov28/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexanderKostadinov28/subscriptions","organizations_url":"https://api.github.com/users/AlexanderKostadinov28/orgs","repos_url":"https://api.github.com/users/AlexanderKostadinov28/repos","events_url":"https://api.github.com/users/AlexanderKostadinov28/events{/privacy}","received_events_url":"https://api.github.com/users/AlexanderKostadinov28/received_events","type":"User","site_admin":false},"body":"Implemented config status handling for hue bridge (unit tests included).\r\n\r\nSigned-off-by: Alexander Kostadinov <alexander.g.kostadinov@gmail.com>","created_at":"2016-07-06T07:14:17Z","updated_at":"2016-07-22T15:46:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d1fa07a4a10434ee09660eff8d7629a5f6b37710","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/eclipse/smarthome/pulls/1819/commits","review_comments_url":"https://api.github.com/repos/eclipse/smarthome/pulls/1819/comments","review_comment_url":"https://api.github.com/repos/eclipse/smarthome/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eclipse/smarthome/issues/1819/comments","statuses_url":"https://api.github.com/repos/eclipse/smarthome/statuses/bdf9be09c79256e5cf7cf7285658ae9770a7168d","head":{"label":"qivicon:hue-bridge-config-status-handling","ref":"hue-bridge-config-status-handling","sha":"bdf9be09c79256e5cf7cf7285658ae9770a7168d","user":{"login":"qivicon","id":3966591,"avatar_url":"https://avatars.githubusercontent.com/u/3966591?v=3","gravatar_id":"","url":"https://api.github.com/users/qivicon","html_url":"https://github.com/qivicon","followers_url":"https://api.github.com/users/qivicon/followers","following_url":"https://api.github.com/users/qivicon/following{/other_user}","gists_url":"https://api.github.com/users/qivicon/gists{/gist_id}","starred_url":"https://api.github.com/users/qivicon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qivicon/subscriptions","organizations_url":"https://api.github.com/users/qivicon/orgs","repos_url":"https://api.github.com/users/qivicon/repos","events_url":"https://api.github.com/users/qivicon/events{/privacy}","received_events_url":"https://api.github.com/users/qivicon/received_events","type":"Organization","site_admin":false},"repo":{"id":17598413,"name":"smarthome","full_name":"qivicon/smarthome","owner":{"login":"qivicon","id":3966591,"avatar_url":"https://avatars.githubusercontent.com/u/3966591?v=3","gravatar_id":"","url":"https://api.github.com/users/qivicon","html_url":"https://github.com/qivicon","followers_url":"https://api.github.com/users/qivicon/followers","following_url":"https://api.github.com/users/qivicon/following{/other_user}","gists_url":"https://api.github.com/users/qivicon/gists{/gist_id}","starred_url":"https://api.github.com/users/qivicon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qivicon/subscriptions","organizations_url":"https://api.github.com/users/qivicon/orgs","repos_url":"https://api.github.com/users/qivicon/repos","events_url":"https://api.github.com/users/qivicon/events{/privacy}","received_events_url":"https://api.github.com/users/qivicon/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/qivicon/smarthome","description":"Eclipse SmartHome project","fork":true,"url":"https://api.github.com/repos/qivicon/smarthome","forks_url":"https://api.github.com/repos/qivicon/smarthome/forks","keys_url":"https://api.github.com/repos/qivicon/smarthome/keys{/key_id}","collaborators_url":"https://api.github.com/repos/qivicon/smarthome/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/qivicon/smarthome/teams","hooks_url":"https://api.github.com/repos/qivicon/smarthome/hooks","issue_events_url":"https://api.github.com/repos/qivicon/smarthome/issues/events{/number}","events_url":"https://api.github.com/repos/qivicon/smarthome/events","assignees_url":"https://api.github.com/repos/qivicon/smarthome/assignees{/user}","branches_url":"https://api.github.com/repos/qivicon/smarthome/branches{/branch}","tags_url":"https://api.github.com/repos/qivicon/smarthome/tags","blobs_url":"https://api.github.com/repos/qivicon/smarthome/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/qivicon/smarthome/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/qivicon/smarthome/git/refs{/sha}","trees_url":"https://api.github.com/repos/qivicon/smarthome/git/trees{/sha}","statuses_url":"https://api.github.com/repos/qivicon/smarthome/statuses/{sha}","languages_url":"https://api.github.com/repos/qivicon/smarthome/languages","stargazers_url":"https://api.github.com/repos/qivicon/smarthome/stargazers","contributors_url":"https://api.github.com/repos/qivicon/smarthome/contributors","subscribers_url":"https://api.github.com/repos/qivicon/smarthome/subscribers","subscription_url":"https://api.github.com/repos/qivicon/smarthome/subscription","commits_url":"https://api.github.com/repos/qivicon/smarthome/commits{/sha}","git_commits_url":"https://api.github.com/repos/qivicon/smarthome/git/commits{/sha}","comments_url":"https://api.github.com/repos/qivicon/smarthome/comments{/number}","issue_comment_url":"https://api.github.com/repos/qivicon/smarthome/issues/comments{/number}","contents_url":"https://api.github.com/repos/qivicon/smarthome/contents/{+path}","compare_url":"https://api.github.com/repos/qivicon/smarthome/compare/{base}...{head}","merges_url":"https://api.github.com/repos/qivicon/smarthome/merges","archive_url":"https://api.github.com/repos/qivicon/smarthome/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/qivicon/smarthome/downloads","issues_url":"https://api.github.com/repos/qivicon/smarthome/issues{/number}","pulls_url":"https://api.github.com/repos/qivicon/smarthome/pulls{/number}","milestones_url":"https://api.github.com/repos/qivicon/smarthome/milestones{/number}","notifications_url":"https://api.github.com/repos/qivicon/smarthome/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/qivicon/smarthome/labels{/name}","releases_url":"https://api.github.com/repos/qivicon/smarthome/releases{/id}","deployments_url":"https://api.github.com/repos/qivicon/smarthome/deployments","created_at":"2014-03-10T15:53:08Z","updated_at":"2016-06-07T08:35:19Z","pushed_at":"2016-07-22T12:45:02Z","git_url":"git://github.com/qivicon/smarthome.git","ssh_url":"git@github.com:qivicon/smarthome.git","clone_url":"https://github.com/qivicon/smarthome.git","svn_url":"https://github.com/qivicon/smarthome","homepage":null,"size":33022,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":3,"default_branch":"master"}},"base":{"label":"eclipse:master","ref":"master","sha":"894a0e185f99c8ca238ff0b00192472e86f27e54","user":{"login":"eclipse","id":56974,"avatar_url":"https://avatars.githubusercontent.com/u/56974?v=3","gravatar_id":"","url":"https://api.github.com/users/eclipse","html_url":"https://github.com/eclipse","followers_url":"https://api.github.com/users/eclipse/followers","following_url":"https://api.github.com/users/eclipse/following{/other_user}","gists_url":"https://api.github.com/users/eclipse/gists{/gist_id}","starred_url":"https://api.github.com/users/eclipse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eclipse/subscriptions","organizations_url":"https://api.github.com/users/eclipse/orgs","repos_url":"https://api.github.com/users/eclipse/repos","events_url":"https://api.github.com/users/eclipse/events{/privacy}","received_events_url":"https://api.github.com/users/eclipse/received_events","type":"Organization","site_admin":false},"repo":{"id":15778981,"name":"smarthome","full_name":"eclipse/smarthome","owner":{"login":"eclipse","id":56974,"avatar_url":"https://avatars.githubusercontent.com/u/56974?v=3","gravatar_id":"","url":"https://api.github.com/users/eclipse","html_url":"https://github.com/eclipse","followers_url":"https://api.github.com/users/eclipse/followers","following_url":"https://api.github.com/users/eclipse/following{/other_user}","gists_url":"https://api.github.com/users/eclipse/gists{/gist_id}","starred_url":"https://api.github.com/users/eclipse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eclipse/subscriptions","organizations_url":"https://api.github.com/users/eclipse/orgs","repos_url":"https://api.github.com/users/eclipse/repos","events_url":"https://api.github.com/users/eclipse/events{/privacy}","received_events_url":"https://api.github.com/users/eclipse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/eclipse/smarthome","description":"Eclipse SmartHome project","fork":false,"url":"https://api.github.com/repos/eclipse/smarthome","forks_url":"https://api.github.com/repos/eclipse/smarthome/forks","keys_url":"https://api.github.com/repos/eclipse/smarthome/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eclipse/smarthome/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eclipse/smarthome/teams","hooks_url":"https://api.github.com/repos/eclipse/smarthome/hooks","issue_events_url":"https://api.github.com/repos/eclipse/smarthome/issues/events{/number}","events_url":"https://api.github.com/repos/eclipse/smarthome/events","assignees_url":"https://api.github.com/repos/eclipse/smarthome/assignees{/user}","branches_url":"https://api.github.com/repos/eclipse/smarthome/branches{/branch}","tags_url":"https://api.github.com/repos/eclipse/smarthome/tags","blobs_url":"https://api.github.com/repos/eclipse/smarthome/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eclipse/smarthome/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eclipse/smarthome/git/refs{/sha}","trees_url":"https://api.github.com/repos/eclipse/smarthome/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eclipse/smarthome/statuses/{sha}","languages_url":"https://api.github.com/repos/eclipse/smarthome/languages","stargazers_url":"https://api.github.com/repos/eclipse/smarthome/stargazers","contributors_url":"https://api.github.com/repos/eclipse/smarthome/contributors","subscribers_url":"https://api.github.com/repos/eclipse/smarthome/subscribers","subscription_url":"https://api.github.com/repos/eclipse/smarthome/subscription","commits_url":"https://api.github.com/repos/eclipse/smarthome/commits{/sha}","git_commits_url":"https://api.github.com/repos/eclipse/smarthome/git/commits{/sha}","comments_url":"https://api.github.com/repos/eclipse/smarthome/comments{/number}","issue_comment_url":"https://api.github.com/repos/eclipse/smarthome/issues/comments{/number}","contents_url":"https://api.github.com/repos/eclipse/smarthome/contents/{+path}","compare_url":"https://api.github.com/repos/eclipse/smarthome/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eclipse/smarthome/merges","archive_url":"https://api.github.com/repos/eclipse/smarthome/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eclipse/smarthome/downloads","issues_url":"https://api.github.com/repos/eclipse/smarthome/issues{/number}","pulls_url":"https://api.github.com/repos/eclipse/smarthome/pulls{/number}","milestones_url":"https://api.github.com/repos/eclipse/smarthome/milestones{/number}","notifications_url":"https://api.github.com/repos/eclipse/smarthome/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eclipse/smarthome/labels{/name}","releases_url":"https://api.github.com/repos/eclipse/smarthome/releases{/id}","deployments_url":"https://api.github.com/repos/eclipse/smarthome/deployments","created_at":"2014-01-09T20:47:19Z","updated_at":"2016-07-20T12:26:37Z","pushed_at":"2016-07-22T14:33:50Z","git_url":"git://github.com/eclipse/smarthome.git","ssh_url":"git@github.com:eclipse/smarthome.git","clone_url":"https://github.com/eclipse/smarthome.git","svn_url":"https://github.com/eclipse/smarthome","homepage":null,"size":33800,"stargazers_count":326,"watchers_count":326,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":324,"mirror_url":null,"open_issues_count":203,"forks":324,"open_issues":203,"watchers":326,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eclipse/smarthome/pulls/1819"},"html":{"href":"https://github.com/eclipse/smarthome/pull/1819"},"issue":{"href":"https://api.github.com/repos/eclipse/smarthome/issues/1819"},"comments":{"href":"https://api.github.com/repos/eclipse/smarthome/issues/1819/comments"},"review_comments":{"href":"https://api.github.com/repos/eclipse/smarthome/pulls/1819/comments"},"review_comment":{"href":"https://api.github.com/repos/eclipse/smarthome/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eclipse/smarthome/pulls/1819/commits"},"statuses":{"href":"https://api.github.com/repos/eclipse/smarthome/statuses/bdf9be09c79256e5cf7cf7285658ae9770a7168d"}}}}
{"actor":{"display_login":"kaikreuzer"}}