{"action":"created","comment":{"url":"https://api.github.com/repos/openhab/openhab2-addons/pulls/comments/84573665","pull_request_review_id":5345857,"id":84573665,"diff_hunk":"@@ -0,0 +1,210 @@\n+/**\n+ * Copyright (c) 2014-2016 by the respective copyright holders.\n+ *\n+ * All rights reserved. This program and the accompanying materials\n+ * are made available under the terms of the Eclipse Public License v1.0\n+ * which accompanies this distribution, and is available at\n+ * http://www.eclipse.org/legal/epl-v10.html\n+ */\n+package org.openhab.binding.minecraft.discovery;\n+\n+import java.util.HashMap;\n+import java.util.List;\n+import java.util.Map;\n+import java.util.Set;\n+\n+import org.eclipse.smarthome.config.discovery.AbstractDiscoveryService;\n+import org.eclipse.smarthome.config.discovery.DiscoveryResult;\n+import org.eclipse.smarthome.config.discovery.DiscoveryResultBuilder;\n+import org.eclipse.smarthome.core.thing.ThingTypeUID;\n+import org.eclipse.smarthome.core.thing.ThingUID;\n+import org.openhab.binding.minecraft.MinecraftBindingConstants;\n+import org.openhab.binding.minecraft.config.ServerConfig;\n+import org.openhab.binding.minecraft.handler.MinecraftServerHandler;\n+import org.openhab.binding.minecraft.handler.server.ServerConnection;\n+import org.openhab.binding.minecraft.internal.MinecraftHandlerFactory;\n+import org.openhab.binding.minecraft.message.data.PlayerData;\n+import org.openhab.binding.minecraft.message.data.SignData;\n+import org.openhab.binding.minecraft.util.Pair;\n+import org.slf4j.Logger;\n+import org.slf4j.LoggerFactory;\n+\n+import rx.Observable;\n+import rx.Subscription;\n+import rx.functions.Action1;\n+import rx.functions.Func1;\n+import rx.functions.Func2;\n+import rx.schedulers.Schedulers;\n+import rx.subscriptions.CompositeSubscription;\n+\n+/**\n+ * Handles discovery of Minecraft server, players and signs.\n+ *\n+ * @author Mattias Markehed\n+ */\n+public class MinecraftDiscoveryService extends AbstractDiscoveryService {\n+\n+    private final Logger logger = LoggerFactory.getLogger(MinecraftDiscoveryService.class);\n+\n+    private static final int DISCOVER_TIMEOUT_SECONDS = 60;\n+\n+    private CompositeSubscription subscription;\n+\n+    public MinecraftDiscoveryService() {\n+        super(MinecraftBindingConstants.SUPPORTED_THING_TYPES_UIDS, DISCOVER_TIMEOUT_SECONDS, false);","path":"addons/binding/org.openhab.binding.minecraft/src/main/java/org/openhab/binding/minecraft/discovery/MinecraftDiscoveryService.java","position":54,"original_position":54,"commit_id":"6af04473d986a008d06aab38b83d094a594f77a1","original_commit_id":"6af04473d986a008d06aab38b83d094a594f77a1","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":"This isn't correct - SUPPORTED_THING_TYPES_UIDS is a singleton with the Server, but you support players and signs here.","created_at":"2016-10-22T09:31:15Z","updated_at":"2016-10-22T09:32:03Z","html_url":"https://github.com/openhab/openhab2-addons/pull/1195#discussion_r84573665","pull_request_url":"https://api.github.com/repos/openhab/openhab2-addons/pulls/1195","_links":{"self":{"href":"https://api.github.com/repos/openhab/openhab2-addons/pulls/comments/84573665"},"html":{"href":"https://github.com/openhab/openhab2-addons/pull/1195#discussion_r84573665"},"pull_request":{"href":"https://api.github.com/repos/openhab/openhab2-addons/pulls/1195"}}},"pull_request":{"url":"https://api.github.com/repos/openhab/openhab2-addons/pulls/1195","id":81188559,"html_url":"https://github.com/openhab/openhab2-addons/pull/1195","diff_url":"https://github.com/openhab/openhab2-addons/pull/1195.diff","patch_url":"https://github.com/openhab/openhab2-addons/pull/1195.patch","issue_url":"https://api.github.com/repos/openhab/openhab2-addons/issues/1195","number":1195,"state":"open","locked":false,"title":"Added minecraft server binding","user":{"login":"ibaton","id":448200,"avatar_url":"https://avatars.githubusercontent.com/u/448200?v=3","gravatar_id":"","url":"https://api.github.com/users/ibaton","html_url":"https://github.com/ibaton","followers_url":"https://api.github.com/users/ibaton/followers","following_url":"https://api.github.com/users/ibaton/following{/other_user}","gists_url":"https://api.github.com/users/ibaton/gists{/gist_id}","starred_url":"https://api.github.com/users/ibaton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ibaton/subscriptions","organizations_url":"https://api.github.com/users/ibaton/orgs","repos_url":"https://api.github.com/users/ibaton/repos","events_url":"https://api.github.com/users/ibaton/events{/privacy}","received_events_url":"https://api.github.com/users/ibaton/received_events","type":"User","site_admin":false},"body":"Signed-off-by: Mattias Markehed <mattias.markehed@gmail.com> (github:ibaton)","created_at":"2016-08-12T21:54:11Z","updated_at":"2016-10-22T09:32:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8f7604ffede89112a49eb6c5afd93e32e999698d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/openhab/openhab2-addons/pulls/1195/commits","review_comments_url":"https://api.github.com/repos/openhab/openhab2-addons/pulls/1195/comments","review_comment_url":"https://api.github.com/repos/openhab/openhab2-addons/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openhab/openhab2-addons/issues/1195/comments","statuses_url":"https://api.github.com/repos/openhab/openhab2-addons/statuses/6af04473d986a008d06aab38b83d094a594f77a1","head":{"label":"ibaton:minecraft-binding","ref":"minecraft-binding","sha":"6af04473d986a008d06aab38b83d094a594f77a1","user":{"login":"ibaton","id":448200,"avatar_url":"https://avatars.githubusercontent.com/u/448200?v=3","gravatar_id":"","url":"https://api.github.com/users/ibaton","html_url":"https://github.com/ibaton","followers_url":"https://api.github.com/users/ibaton/followers","following_url":"https://api.github.com/users/ibaton/following{/other_user}","gists_url":"https://api.github.com/users/ibaton/gists{/gist_id}","starred_url":"https://api.github.com/users/ibaton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ibaton/subscriptions","organizations_url":"https://api.github.com/users/ibaton/orgs","repos_url":"https://api.github.com/users/ibaton/repos","events_url":"https://api.github.com/users/ibaton/events{/privacy}","received_events_url":"https://api.github.com/users/ibaton/received_events","type":"User","site_admin":false},"repo":{"id":65582584,"name":"openhab2-addons","full_name":"ibaton/openhab2-addons","owner":{"login":"ibaton","id":448200,"avatar_url":"https://avatars.githubusercontent.com/u/448200?v=3","gravatar_id":"","url":"https://api.github.com/users/ibaton","html_url":"https://github.com/ibaton","followers_url":"https://api.github.com/users/ibaton/followers","following_url":"https://api.github.com/users/ibaton/following{/other_user}","gists_url":"https://api.github.com/users/ibaton/gists{/gist_id}","starred_url":"https://api.github.com/users/ibaton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ibaton/subscriptions","organizations_url":"https://api.github.com/users/ibaton/orgs","repos_url":"https://api.github.com/users/ibaton/repos","events_url":"https://api.github.com/users/ibaton/events{/privacy}","received_events_url":"https://api.github.com/users/ibaton/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ibaton/openhab2-addons","description":"The next-generation open Home Automation Bus (openHAB)","fork":true,"url":"https://api.github.com/repos/ibaton/openhab2-addons","forks_url":"https://api.github.com/repos/ibaton/openhab2-addons/forks","keys_url":"https://api.github.com/repos/ibaton/openhab2-addons/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ibaton/openhab2-addons/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ibaton/openhab2-addons/teams","hooks_url":"https://api.github.com/repos/ibaton/openhab2-addons/hooks","issue_events_url":"https://api.github.com/repos/ibaton/openhab2-addons/issues/events{/number}","events_url":"https://api.github.com/repos/ibaton/openhab2-addons/events","assignees_url":"https://api.github.com/repos/ibaton/openhab2-addons/assignees{/user}","branches_url":"https://api.github.com/repos/ibaton/openhab2-addons/branches{/branch}","tags_url":"https://api.github.com/repos/ibaton/openhab2-addons/tags","blobs_url":"https://api.github.com/repos/ibaton/openhab2-addons/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ibaton/openhab2-addons/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ibaton/openhab2-addons/git/refs{/sha}","trees_url":"https://api.github.com/repos/ibaton/openhab2-addons/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ibaton/openhab2-addons/statuses/{sha}","languages_url":"https://api.github.com/repos/ibaton/openhab2-addons/languages","stargazers_url":"https://api.github.com/repos/ibaton/openhab2-addons/stargazers","contributors_url":"https://api.github.com/repos/ibaton/openhab2-addons/contributors","subscribers_url":"https://api.github.com/repos/ibaton/openhab2-addons/subscribers","subscription_url":"https://api.github.com/repos/ibaton/openhab2-addons/subscription","commits_url":"https://api.github.com/repos/ibaton/openhab2-addons/commits{/sha}","git_commits_url":"https://api.github.com/repos/ibaton/openhab2-addons/git/commits{/sha}","comments_url":"https://api.github.com/repos/ibaton/openhab2-addons/comments{/number}","issue_comment_url":"https://api.github.com/repos/ibaton/openhab2-addons/issues/comments{/number}","contents_url":"https://api.github.com/repos/ibaton/openhab2-addons/contents/{+path}","compare_url":"https://api.github.com/repos/ibaton/openhab2-addons/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ibaton/openhab2-addons/merges","archive_url":"https://api.github.com/repos/ibaton/openhab2-addons/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ibaton/openhab2-addons/downloads","issues_url":"https://api.github.com/repos/ibaton/openhab2-addons/issues{/number}","pulls_url":"https://api.github.com/repos/ibaton/openhab2-addons/pulls{/number}","milestones_url":"https://api.github.com/repos/ibaton/openhab2-addons/milestones{/number}","notifications_url":"https://api.github.com/repos/ibaton/openhab2-addons/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ibaton/openhab2-addons/labels{/name}","releases_url":"https://api.github.com/repos/ibaton/openhab2-addons/releases{/id}","deployments_url":"https://api.github.com/repos/ibaton/openhab2-addons/deployments","created_at":"2016-08-12T20:45:01Z","updated_at":"2016-08-12T20:45:06Z","pushed_at":"2016-10-19T05:09:55Z","git_url":"git://github.com/ibaton/openhab2-addons.git","ssh_url":"git@github.com:ibaton/openhab2-addons.git","clone_url":"https://github.com/ibaton/openhab2-addons.git","svn_url":"https://github.com/ibaton/openhab2-addons","homepage":null,"size":47157,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"openhab:master","ref":"master","sha":"ff2b2584f35783b75ea6d0668795678e34acf3cc","user":{"login":"openhab","id":1007353,"avatar_url":"https://avatars.githubusercontent.com/u/1007353?v=3","gravatar_id":"","url":"https://api.github.com/users/openhab","html_url":"https://github.com/openhab","followers_url":"https://api.github.com/users/openhab/followers","following_url":"https://api.github.com/users/openhab/following{/other_user}","gists_url":"https://api.github.com/users/openhab/gists{/gist_id}","starred_url":"https://api.github.com/users/openhab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openhab/subscriptions","organizations_url":"https://api.github.com/users/openhab/orgs","repos_url":"https://api.github.com/users/openhab/repos","events_url":"https://api.github.com/users/openhab/events{/privacy}","received_events_url":"https://api.github.com/users/openhab/received_events","type":"Organization","site_admin":false},"repo":{"id":19753195,"name":"openhab2-addons","full_name":"openhab/openhab2-addons","owner":{"login":"openhab","id":1007353,"avatar_url":"https://avatars.githubusercontent.com/u/1007353?v=3","gravatar_id":"","url":"https://api.github.com/users/openhab","html_url":"https://github.com/openhab","followers_url":"https://api.github.com/users/openhab/followers","following_url":"https://api.github.com/users/openhab/following{/other_user}","gists_url":"https://api.github.com/users/openhab/gists{/gist_id}","starred_url":"https://api.github.com/users/openhab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openhab/subscriptions","organizations_url":"https://api.github.com/users/openhab/orgs","repos_url":"https://api.github.com/users/openhab/repos","events_url":"https://api.github.com/users/openhab/events{/privacy}","received_events_url":"https://api.github.com/users/openhab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openhab/openhab2-addons","description":"The next-generation open Home Automation Bus (openHAB)","fork":false,"url":"https://api.github.com/repos/openhab/openhab2-addons","forks_url":"https://api.github.com/repos/openhab/openhab2-addons/forks","keys_url":"https://api.github.com/repos/openhab/openhab2-addons/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openhab/openhab2-addons/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openhab/openhab2-addons/teams","hooks_url":"https://api.github.com/repos/openhab/openhab2-addons/hooks","issue_events_url":"https://api.github.com/repos/openhab/openhab2-addons/issues/events{/number}","events_url":"https://api.github.com/repos/openhab/openhab2-addons/events","assignees_url":"https://api.github.com/repos/openhab/openhab2-addons/assignees{/user}","branches_url":"https://api.github.com/repos/openhab/openhab2-addons/branches{/branch}","tags_url":"https://api.github.com/repos/openhab/openhab2-addons/tags","blobs_url":"https://api.github.com/repos/openhab/openhab2-addons/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openhab/openhab2-addons/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openhab/openhab2-addons/git/refs{/sha}","trees_url":"https://api.github.com/repos/openhab/openhab2-addons/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openhab/openhab2-addons/statuses/{sha}","languages_url":"https://api.github.com/repos/openhab/openhab2-addons/languages","stargazers_url":"https://api.github.com/repos/openhab/openhab2-addons/stargazers","contributors_url":"https://api.github.com/repos/openhab/openhab2-addons/contributors","subscribers_url":"https://api.github.com/repos/openhab/openhab2-addons/subscribers","subscription_url":"https://api.github.com/repos/openhab/openhab2-addons/subscription","commits_url":"https://api.github.com/repos/openhab/openhab2-addons/commits{/sha}","git_commits_url":"https://api.github.com/repos/openhab/openhab2-addons/git/commits{/sha}","comments_url":"https://api.github.com/repos/openhab/openhab2-addons/comments{/number}","issue_comment_url":"https://api.github.com/repos/openhab/openhab2-addons/issues/comments{/number}","contents_url":"https://api.github.com/repos/openhab/openhab2-addons/contents/{+path}","compare_url":"https://api.github.com/repos/openhab/openhab2-addons/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openhab/openhab2-addons/merges","archive_url":"https://api.github.com/repos/openhab/openhab2-addons/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openhab/openhab2-addons/downloads","issues_url":"https://api.github.com/repos/openhab/openhab2-addons/issues{/number}","pulls_url":"https://api.github.com/repos/openhab/openhab2-addons/pulls{/number}","milestones_url":"https://api.github.com/repos/openhab/openhab2-addons/milestones{/number}","notifications_url":"https://api.github.com/repos/openhab/openhab2-addons/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openhab/openhab2-addons/labels{/name}","releases_url":"https://api.github.com/repos/openhab/openhab2-addons/releases{/id}","deployments_url":"https://api.github.com/repos/openhab/openhab2-addons/deployments","created_at":"2014-05-13T19:41:58Z","updated_at":"2016-10-18T15:15:34Z","pushed_at":"2016-10-22T09:12:21Z","git_url":"git://github.com/openhab/openhab2-addons.git","ssh_url":"git@github.com:openhab/openhab2-addons.git","clone_url":"https://github.com/openhab/openhab2-addons.git","svn_url":"https://github.com/openhab/openhab2-addons","homepage":null,"size":191139,"stargazers_count":425,"watchers_count":425,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":662,"mirror_url":null,"open_issues_count":138,"forks":662,"open_issues":138,"watchers":425,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openhab/openhab2-addons/pulls/1195"},"html":{"href":"https://github.com/openhab/openhab2-addons/pull/1195"},"issue":{"href":"https://api.github.com/repos/openhab/openhab2-addons/issues/1195"},"comments":{"href":"https://api.github.com/repos/openhab/openhab2-addons/issues/1195/comments"},"review_comments":{"href":"https://api.github.com/repos/openhab/openhab2-addons/pulls/1195/comments"},"review_comment":{"href":"https://api.github.com/repos/openhab/openhab2-addons/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openhab/openhab2-addons/pulls/1195/commits"},"statuses":{"href":"https://api.github.com/repos/openhab/openhab2-addons/statuses/6af04473d986a008d06aab38b83d094a594f77a1"}}}}
{"actor":{"display_login":"kaikreuzer"}}