{"action":"created","comment":{"url":"https://api.github.com/repos/openhab/openhab/pulls/comments/66212501","id":66212501,"diff_hunk":"@@ -0,0 +1,120 @@\n+/**\n+ * Copyright (c) 2010-2016, openHAB.org and others.\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.horizon.internal;\n+\n+import java.util.HashMap;\n+\n+import nl.kuijp.horizoncontrol.Keys;\n+\n+import org.apache.commons.lang.StringUtils;\n+import org.openhab.binding.horizon.HorizonBindingProvider;\n+import org.openhab.core.binding.BindingConfig;\n+import org.openhab.core.items.Item;\n+import org.openhab.core.library.items.DimmerItem;\n+import org.openhab.core.library.items.NumberItem;\n+import org.openhab.core.library.items.RollershutterItem;\n+import org.openhab.core.library.items.StringItem;\n+import org.openhab.core.library.items.SwitchItem;\n+import org.openhab.model.item.binding.AbstractGenericBindingProvider;\n+import org.openhab.model.item.binding.BindingConfigParseException;\n+\n+/**\n+ * This class is responsible for parsing the binding configuration.\n+ * \n+ * @author Jurgen Kuijpers\n+ * @since 1.9.0\n+ */\n+public class HorizonGenericBindingProvider extends AbstractGenericBindingProvider implements HorizonBindingProvider {\n+\n+\t/**\n+\t * {@inheritDoc}\n+\t */\n+\tpublic String getBindingType() {\n+\t\treturn \"horizon\";\n+\t}\n+\n+\t/**\n+\t * @{inheritDoc}\n+\t */\n+\t@Override\n+\tpublic void validateItemType(Item item, String bindingConfig) throws BindingConfigParseException {\n+\t\tif (!(item instanceof SwitchItem \n+\t\t\t\t|| item instanceof NumberItem\n+\t\t\t\t|| item instanceof DimmerItem\n+\t\t\t\t|| item instanceof RollershutterItem \n+\t\t\t\t|| item instanceof StringItem)) {\n+\t\t\tthrow new BindingConfigParseException(\n+\t\t\t\t\t\"item '\"\n+\t\t\t\t\t\t\t+ item.getName()\n+\t\t\t\t\t\t\t+ \"' is of type '\"\n+\t\t\t\t\t\t\t+ item.getClass().getSimpleName()\n+\t\t\t\t\t\t\t+ \"', only SwitchItem, NumberItem, DimmerItem, RollershutterItem and StringItem are allowed - please check your *.items configuration\");","path":"bundles/binding/org.openhab.binding.horizon/src/main/java/org/openhab/binding/horizon/internal/HorizonGenericBindingProvider.java","position":57,"original_position":57,"commit_id":"4c2e5d074d4c3469a1d9b08380b82a6b498655ae","original_commit_id":"4c2e5d074d4c3469a1d9b08380b82a6b498655ae","user":{"login":"watou","id":3008217,"avatar_url":"https://avatars.githubusercontent.com/u/3008217?v=3","gravatar_id":"","url":"https://api.github.com/users/watou","html_url":"https://github.com/watou","followers_url":"https://api.github.com/users/watou/followers","following_url":"https://api.github.com/users/watou/following{/other_user}","gists_url":"https://api.github.com/users/watou/gists{/gist_id}","starred_url":"https://api.github.com/users/watou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/watou/subscriptions","organizations_url":"https://api.github.com/users/watou/orgs","repos_url":"https://api.github.com/users/watou/repos","events_url":"https://api.github.com/users/watou/events{/privacy}","received_events_url":"https://api.github.com/users/watou/received_events","type":"User","site_admin":false},"body":"More user-friendly to say \"', only Switch, Number, Dimmer, Rollershutter and String items are allowed - please check your *.items configuration\"","created_at":"2016-06-08T08:31:09Z","updated_at":"2016-06-08T08:31:09Z","html_url":"https://github.com/openhab/openhab/pull/3919#discussion_r66212501","pull_request_url":"https://api.github.com/repos/openhab/openhab/pulls/3919","_links":{"self":{"href":"https://api.github.com/repos/openhab/openhab/pulls/comments/66212501"},"html":{"href":"https://github.com/openhab/openhab/pull/3919#discussion_r66212501"},"pull_request":{"href":"https://api.github.com/repos/openhab/openhab/pulls/3919"}}},"pull_request":{"url":"https://api.github.com/repos/openhab/openhab/pulls/3919","id":57699140,"html_url":"https://github.com/openhab/openhab/pull/3919","diff_url":"https://github.com/openhab/openhab/pull/3919.diff","patch_url":"https://github.com/openhab/openhab/pull/3919.patch","issue_url":"https://api.github.com/repos/openhab/openhab/issues/3919","number":3919,"state":"open","locked":false,"title":"Added Horizon mediabox binding","user":{"login":"kuijp","id":8521833,"avatar_url":"https://avatars.githubusercontent.com/u/8521833?v=3","gravatar_id":"","url":"https://api.github.com/users/kuijp","html_url":"https://github.com/kuijp","followers_url":"https://api.github.com/users/kuijp/followers","following_url":"https://api.github.com/users/kuijp/following{/other_user}","gists_url":"https://api.github.com/users/kuijp/gists{/gist_id}","starred_url":"https://api.github.com/users/kuijp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kuijp/subscriptions","organizations_url":"https://api.github.com/users/kuijp/orgs","repos_url":"https://api.github.com/users/kuijp/repos","events_url":"https://api.github.com/users/kuijp/events{/privacy}","received_events_url":"https://api.github.com/users/kuijp/received_events","type":"User","site_admin":false},"body":"Added the binding for the horizon mediabox. Discussed [here](https://community.openhab.org/t/horizon-tv-mediabox-binding/6642). Description of binding in [this](https://github.com/openhab/openhab/wiki/Horizon-mediabox-binding) wiki page","created_at":"2016-01-29T20:34:39Z","updated_at":"2016-06-08T08:31:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d583863f4e0be4f1540a1ffd8e4490103fc1c72a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openhab/openhab/pulls/3919/commits","review_comments_url":"https://api.github.com/repos/openhab/openhab/pulls/3919/comments","review_comment_url":"https://api.github.com/repos/openhab/openhab/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openhab/openhab/issues/3919/comments","statuses_url":"https://api.github.com/repos/openhab/openhab/statuses/4c2e5d074d4c3469a1d9b08380b82a6b498655ae","head":{"label":"kuijp:horizon","ref":"horizon","sha":"4c2e5d074d4c3469a1d9b08380b82a6b498655ae","user":{"login":"kuijp","id":8521833,"avatar_url":"https://avatars.githubusercontent.com/u/8521833?v=3","gravatar_id":"","url":"https://api.github.com/users/kuijp","html_url":"https://github.com/kuijp","followers_url":"https://api.github.com/users/kuijp/followers","following_url":"https://api.github.com/users/kuijp/following{/other_user}","gists_url":"https://api.github.com/users/kuijp/gists{/gist_id}","starred_url":"https://api.github.com/users/kuijp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kuijp/subscriptions","organizations_url":"https://api.github.com/users/kuijp/orgs","repos_url":"https://api.github.com/users/kuijp/repos","events_url":"https://api.github.com/users/kuijp/events{/privacy}","received_events_url":"https://api.github.com/users/kuijp/received_events","type":"User","site_admin":false},"repo":{"id":50295770,"name":"openhab","full_name":"kuijp/openhab","owner":{"login":"kuijp","id":8521833,"avatar_url":"https://avatars.githubusercontent.com/u/8521833?v=3","gravatar_id":"","url":"https://api.github.com/users/kuijp","html_url":"https://github.com/kuijp","followers_url":"https://api.github.com/users/kuijp/followers","following_url":"https://api.github.com/users/kuijp/following{/other_user}","gists_url":"https://api.github.com/users/kuijp/gists{/gist_id}","starred_url":"https://api.github.com/users/kuijp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kuijp/subscriptions","organizations_url":"https://api.github.com/users/kuijp/orgs","repos_url":"https://api.github.com/users/kuijp/repos","events_url":"https://api.github.com/users/kuijp/events{/privacy}","received_events_url":"https://api.github.com/users/kuijp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kuijp/openhab","description":"Source code of the open Home Automation Bus (openHAB)","fork":true,"url":"https://api.github.com/repos/kuijp/openhab","forks_url":"https://api.github.com/repos/kuijp/openhab/forks","keys_url":"https://api.github.com/repos/kuijp/openhab/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kuijp/openhab/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kuijp/openhab/teams","hooks_url":"https://api.github.com/repos/kuijp/openhab/hooks","issue_events_url":"https://api.github.com/repos/kuijp/openhab/issues/events{/number}","events_url":"https://api.github.com/repos/kuijp/openhab/events","assignees_url":"https://api.github.com/repos/kuijp/openhab/assignees{/user}","branches_url":"https://api.github.com/repos/kuijp/openhab/branches{/branch}","tags_url":"https://api.github.com/repos/kuijp/openhab/tags","blobs_url":"https://api.github.com/repos/kuijp/openhab/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kuijp/openhab/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kuijp/openhab/git/refs{/sha}","trees_url":"https://api.github.com/repos/kuijp/openhab/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kuijp/openhab/statuses/{sha}","languages_url":"https://api.github.com/repos/kuijp/openhab/languages","stargazers_url":"https://api.github.com/repos/kuijp/openhab/stargazers","contributors_url":"https://api.github.com/repos/kuijp/openhab/contributors","subscribers_url":"https://api.github.com/repos/kuijp/openhab/subscribers","subscription_url":"https://api.github.com/repos/kuijp/openhab/subscription","commits_url":"https://api.github.com/repos/kuijp/openhab/commits{/sha}","git_commits_url":"https://api.github.com/repos/kuijp/openhab/git/commits{/sha}","comments_url":"https://api.github.com/repos/kuijp/openhab/comments{/number}","issue_comment_url":"https://api.github.com/repos/kuijp/openhab/issues/comments{/number}","contents_url":"https://api.github.com/repos/kuijp/openhab/contents/{+path}","compare_url":"https://api.github.com/repos/kuijp/openhab/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kuijp/openhab/merges","archive_url":"https://api.github.com/repos/kuijp/openhab/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kuijp/openhab/downloads","issues_url":"https://api.github.com/repos/kuijp/openhab/issues{/number}","pulls_url":"https://api.github.com/repos/kuijp/openhab/pulls{/number}","milestones_url":"https://api.github.com/repos/kuijp/openhab/milestones{/number}","notifications_url":"https://api.github.com/repos/kuijp/openhab/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kuijp/openhab/labels{/name}","releases_url":"https://api.github.com/repos/kuijp/openhab/releases{/id}","deployments_url":"https://api.github.com/repos/kuijp/openhab/deployments","created_at":"2016-01-24T16:14:44Z","updated_at":"2016-01-24T16:14:57Z","pushed_at":"2016-01-29T20:52:43Z","git_url":"git://github.com/kuijp/openhab.git","ssh_url":"git@github.com:kuijp/openhab.git","clone_url":"https://github.com/kuijp/openhab.git","svn_url":"https://github.com/kuijp/openhab","homepage":null,"size":188156,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"1ffa5f38e6cd03a30fbcd86d06f75a68d7fbb961","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":12983151,"name":"openhab","full_name":"openhab/openhab","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/openhab","description":"Source code of the open Home Automation Bus (openHAB)","fork":false,"url":"https://api.github.com/repos/openhab/openhab","forks_url":"https://api.github.com/repos/openhab/openhab/forks","keys_url":"https://api.github.com/repos/openhab/openhab/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openhab/openhab/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openhab/openhab/teams","hooks_url":"https://api.github.com/repos/openhab/openhab/hooks","issue_events_url":"https://api.github.com/repos/openhab/openhab/issues/events{/number}","events_url":"https://api.github.com/repos/openhab/openhab/events","assignees_url":"https://api.github.com/repos/openhab/openhab/assignees{/user}","branches_url":"https://api.github.com/repos/openhab/openhab/branches{/branch}","tags_url":"https://api.github.com/repos/openhab/openhab/tags","blobs_url":"https://api.github.com/repos/openhab/openhab/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openhab/openhab/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openhab/openhab/git/refs{/sha}","trees_url":"https://api.github.com/repos/openhab/openhab/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openhab/openhab/statuses/{sha}","languages_url":"https://api.github.com/repos/openhab/openhab/languages","stargazers_url":"https://api.github.com/repos/openhab/openhab/stargazers","contributors_url":"https://api.github.com/repos/openhab/openhab/contributors","subscribers_url":"https://api.github.com/repos/openhab/openhab/subscribers","subscription_url":"https://api.github.com/repos/openhab/openhab/subscription","commits_url":"https://api.github.com/repos/openhab/openhab/commits{/sha}","git_commits_url":"https://api.github.com/repos/openhab/openhab/git/commits{/sha}","comments_url":"https://api.github.com/repos/openhab/openhab/comments{/number}","issue_comment_url":"https://api.github.com/repos/openhab/openhab/issues/comments{/number}","contents_url":"https://api.github.com/repos/openhab/openhab/contents/{+path}","compare_url":"https://api.github.com/repos/openhab/openhab/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openhab/openhab/merges","archive_url":"https://api.github.com/repos/openhab/openhab/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openhab/openhab/downloads","issues_url":"https://api.github.com/repos/openhab/openhab/issues{/number}","pulls_url":"https://api.github.com/repos/openhab/openhab/pulls{/number}","milestones_url":"https://api.github.com/repos/openhab/openhab/milestones{/number}","notifications_url":"https://api.github.com/repos/openhab/openhab/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openhab/openhab/labels{/name}","releases_url":"https://api.github.com/repos/openhab/openhab/releases{/id}","deployments_url":"https://api.github.com/repos/openhab/openhab/deployments","created_at":"2013-09-20T20:28:43Z","updated_at":"2016-06-08T05:44:27Z","pushed_at":"2016-06-07T17:41:34Z","git_url":"git://github.com/openhab/openhab.git","ssh_url":"git@github.com:openhab/openhab.git","clone_url":"https://github.com/openhab/openhab.git","svn_url":"https://github.com/openhab/openhab","homepage":null,"size":288909,"stargazers_count":2690,"watchers_count":2690,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1342,"mirror_url":null,"open_issues_count":335,"forks":1342,"open_issues":335,"watchers":2690,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openhab/openhab/pulls/3919"},"html":{"href":"https://github.com/openhab/openhab/pull/3919"},"issue":{"href":"https://api.github.com/repos/openhab/openhab/issues/3919"},"comments":{"href":"https://api.github.com/repos/openhab/openhab/issues/3919/comments"},"review_comments":{"href":"https://api.github.com/repos/openhab/openhab/pulls/3919/comments"},"review_comment":{"href":"https://api.github.com/repos/openhab/openhab/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openhab/openhab/pulls/3919/commits"},"statuses":{"href":"https://api.github.com/repos/openhab/openhab/statuses/4c2e5d074d4c3469a1d9b08380b82a6b498655ae"}}}}
{"actor":{"display_login":"watou"}}