{"action":"created","comment":{"url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/pulls/comments/208169676","pull_request_review_id":143923207,"id":208169676,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwODE2OTY3Ng==","diff_hunk":"@@ -311,11 +311,20 @@ private void processSpiCommand(int[] packetData) {\n                     logger.debug(\"<-- RX SPI frame type mismatch SPI_CMD_EZSP != {}\",\n                             String.format(\"%02X\", lastFrameSent[0]));\n                 }\n+                \n+                // Only trace-log in case of NoCallBacksResponse (which is due to polling)\n+                String logMessage = String.format(\"<-- RX SPI frame: %s\", frameToString(packetData));\n+                if (EzspFrame.createHandler(Arrays.copyOfRange(packetData, 2, packetData.length)) instanceof EzspNoCallbacksResponse) {","path":"com.zsmartsystems.zigbee.dongle.ember/src/main/java/com/zsmartsystems/zigbee/dongle/ember/internal/spi/SpiFrameHandler.java","position":26,"original_position":26,"commit_id":"d221600fb235cfec18e58299b3f54824dd108e86","original_commit_id":"d221600fb235cfec18e58299b3f54824dd108e86","user":{"login":"hsudbrock","id":5314568,"node_id":"MDQ6VXNlcjUzMTQ1Njg=","avatar_url":"https://avatars0.githubusercontent.com/u/5314568?v=4","gravatar_id":"","url":"https://api.github.com/users/hsudbrock","html_url":"https://github.com/hsudbrock","followers_url":"https://api.github.com/users/hsudbrock/followers","following_url":"https://api.github.com/users/hsudbrock/following{/other_user}","gists_url":"https://api.github.com/users/hsudbrock/gists{/gist_id}","starred_url":"https://api.github.com/users/hsudbrock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hsudbrock/subscriptions","organizations_url":"https://api.github.com/users/hsudbrock/orgs","repos_url":"https://api.github.com/users/hsudbrock/repos","events_url":"https://api.github.com/users/hsudbrock/events{/privacy}","received_events_url":"https://api.github.com/users/hsudbrock/received_events","type":"User","site_admin":false},"body":"I had also thought about that, and I cannot really say if either of the two solutions is \"better\". I will replace by code that \"peek into the packet\", just to have it explicit (we can still go back if you have some argument that we should not do the \"peeking\").\r\n\r\nPeeking requires to hard-code the frame ID for the NoCallbacksResponse  (`0x07`) here, as the autocoder-generated frame ID constants in the `EzspFrame` class are `protected`.","created_at":"2018-08-07T09:58:46Z","updated_at":"2018-08-07T09:58:46Z","html_url":"https://github.com/zsmartsystems/com.zsmartsystems.zigbee/pull/345#discussion_r208169676","pull_request_url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/pulls/345","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/pulls/comments/208169676"},"html":{"href":"https://github.com/zsmartsystems/com.zsmartsystems.zigbee/pull/345#discussion_r208169676"},"pull_request":{"href":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/pulls/345"}},"in_reply_to_id":207737896},"pull_request":{"url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/pulls/345","id":204844724,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0ODQ0NzI0","html_url":"https://github.com/zsmartsystems/com.zsmartsystems.zigbee/pull/345","diff_url":"https://github.com/zsmartsystems/com.zsmartsystems.zigbee/pull/345.diff","patch_url":"https://github.com/zsmartsystems/com.zsmartsystems.zigbee/pull/345.patch","issue_url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/issues/345","number":345,"state":"open","locked":false,"title":"Use trace-level logging for logging due to SPI polling.","user":{"login":"hsudbrock","id":5314568,"node_id":"MDQ6VXNlcjUzMTQ1Njg=","avatar_url":"https://avatars0.githubusercontent.com/u/5314568?v=4","gravatar_id":"","url":"https://api.github.com/users/hsudbrock","html_url":"https://github.com/hsudbrock","followers_url":"https://api.github.com/users/hsudbrock/followers","following_url":"https://api.github.com/users/hsudbrock/following{/other_user}","gists_url":"https://api.github.com/users/hsudbrock/gists{/gist_id}","starred_url":"https://api.github.com/users/hsudbrock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hsudbrock/subscriptions","organizations_url":"https://api.github.com/users/hsudbrock/orgs","repos_url":"https://api.github.com/users/hsudbrock/repos","events_url":"https://api.github.com/users/hsudbrock/events{/privacy}","received_events_url":"https://api.github.com/users/hsudbrock/received_events","type":"User","site_admin":false},"body":"Resolves #343 \r\n\r\nAs discussed in https://github.com/zsmartsystems/com.zsmartsystems.zigbee/issues/343#issuecomment-408442532, this PR switches from DEBUG-logging to TRACE-logging for log messages caused by SPI polling.\r\n\r\nIn `SpiFrameHandler#processSpiCommand`, we need to find out whether the received frame is a `NoCallbacksResponse`. I use `EzspFrame#createHandler` here for getting the `EzspFrame` from the frame bytes. An alternative would be to inspect only the frame ID byte - checking whether it is `0x07` which encodes the `NoCallbacksResponse`. I decided against this, as the current solution will keep the EZSP-related logic in the `EzspFrame` class - but please comment if you think that the alternative is preferable.","created_at":"2018-07-30T15:34:58Z","updated_at":"2018-08-07T09:58:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"08e9f6a0b50af9483804a736f802b3a513c82111","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/pulls/345/commits","review_comments_url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/pulls/345/comments","review_comment_url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/issues/345/comments","statuses_url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/statuses/d221600fb235cfec18e58299b3f54824dd108e86","head":{"label":"hsudbrock:343-trace-logging-for-spi-polling","ref":"343-trace-logging-for-spi-polling","sha":"d221600fb235cfec18e58299b3f54824dd108e86","user":{"login":"hsudbrock","id":5314568,"node_id":"MDQ6VXNlcjUzMTQ1Njg=","avatar_url":"https://avatars0.githubusercontent.com/u/5314568?v=4","gravatar_id":"","url":"https://api.github.com/users/hsudbrock","html_url":"https://github.com/hsudbrock","followers_url":"https://api.github.com/users/hsudbrock/followers","following_url":"https://api.github.com/users/hsudbrock/following{/other_user}","gists_url":"https://api.github.com/users/hsudbrock/gists{/gist_id}","starred_url":"https://api.github.com/users/hsudbrock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hsudbrock/subscriptions","organizations_url":"https://api.github.com/users/hsudbrock/orgs","repos_url":"https://api.github.com/users/hsudbrock/repos","events_url":"https://api.github.com/users/hsudbrock/events{/privacy}","received_events_url":"https://api.github.com/users/hsudbrock/received_events","type":"User","site_admin":false},"repo":{"id":130407833,"node_id":"MDEwOlJlcG9zaXRvcnkxMzA0MDc4MzM=","name":"com.zsmartsystems.zigbee","full_name":"hsudbrock/com.zsmartsystems.zigbee","owner":{"login":"hsudbrock","id":5314568,"node_id":"MDQ6VXNlcjUzMTQ1Njg=","avatar_url":"https://avatars0.githubusercontent.com/u/5314568?v=4","gravatar_id":"","url":"https://api.github.com/users/hsudbrock","html_url":"https://github.com/hsudbrock","followers_url":"https://api.github.com/users/hsudbrock/followers","following_url":"https://api.github.com/users/hsudbrock/following{/other_user}","gists_url":"https://api.github.com/users/hsudbrock/gists{/gist_id}","starred_url":"https://api.github.com/users/hsudbrock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hsudbrock/subscriptions","organizations_url":"https://api.github.com/users/hsudbrock/orgs","repos_url":"https://api.github.com/users/hsudbrock/repos","events_url":"https://api.github.com/users/hsudbrock/events{/privacy}","received_events_url":"https://api.github.com/users/hsudbrock/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hsudbrock/com.zsmartsystems.zigbee","description":"ZigBee Java library supporting multiple dongles","fork":true,"url":"https://api.github.com/repos/hsudbrock/com.zsmartsystems.zigbee","forks_url":"https://api.github.com/repos/hsudbrock/com.zsmartsystems.zigbee/forks","keys_url":"https://api.github.com/repos/hsudbrock/com.zsmartsystems.zigbee/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hsudbrock/com.zsmartsystems.zigbee/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hsudbrock/com.zsmartsystems.zigbee/teams","hooks_url":"https://api.github.com/repos/hsudbrock/com.zsmartsystems.zigbee/hooks","issue_events_url":"https://api.github.com/repos/hsudbrock/com.zsmartsystems.zigbee/issues/events{/number}","events_url":"https://api.github.com/repos/hsudbrock/com.zsmartsystems.zigbee/events","assignees_url":"https://api.github.com/repos/hsudbrock/com.zsmartsystems.zigbee/assignees{/user}","branches_url":"https://api.github.com/repos/hsudbrock/com.zsmartsystems.zigbee/branches{/branch}","tags_url":"https://api.github.com/repos/hsudbrock/com.zsmartsystems.zigbee/tags","blobs_url":"https://api.github.com/repos/hsudbrock/com.zsmartsystems.zigbee/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hsudbrock/com.zsmartsystems.zigbee/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hsudbrock/com.zsmartsystems.zigbee/git/refs{/sha}","trees_url":"https://api.github.com/repos/hsudbrock/com.zsmartsystems.zigbee/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hsudbrock/com.zsmartsystems.zigbee/statuses/{sha}","languages_url":"https://api.github.com/repos/hsudbrock/com.zsmartsystems.zigbee/languages","stargazers_url":"https://api.github.com/repos/hsudbrock/com.zsmartsystems.zigbee/stargazers","contributors_url":"https://api.github.com/repos/hsudbrock/com.zsmartsystems.zigbee/contributors","subscribers_url":"https://api.github.com/repos/hsudbrock/com.zsmartsystems.zigbee/subscribers","subscription_url":"https://api.github.com/repos/hsudbrock/com.zsmartsystems.zigbee/subscription","commits_url":"https://api.github.com/repos/hsudbrock/com.zsmartsystems.zigbee/commits{/sha}","git_commits_url":"https://api.github.com/repos/hsudbrock/com.zsmartsystems.zigbee/git/commits{/sha}","comments_url":"https://api.github.com/repos/hsudbrock/com.zsmartsystems.zigbee/comments{/number}","issue_comment_url":"https://api.github.com/repos/hsudbrock/com.zsmartsystems.zigbee/issues/comments{/number}","contents_url":"https://api.github.com/repos/hsudbrock/com.zsmartsystems.zigbee/contents/{+path}","compare_url":"https://api.github.com/repos/hsudbrock/com.zsmartsystems.zigbee/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hsudbrock/com.zsmartsystems.zigbee/merges","archive_url":"https://api.github.com/repos/hsudbrock/com.zsmartsystems.zigbee/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hsudbrock/com.zsmartsystems.zigbee/downloads","issues_url":"https://api.github.com/repos/hsudbrock/com.zsmartsystems.zigbee/issues{/number}","pulls_url":"https://api.github.com/repos/hsudbrock/com.zsmartsystems.zigbee/pulls{/number}","milestones_url":"https://api.github.com/repos/hsudbrock/com.zsmartsystems.zigbee/milestones{/number}","notifications_url":"https://api.github.com/repos/hsudbrock/com.zsmartsystems.zigbee/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hsudbrock/com.zsmartsystems.zigbee/labels{/name}","releases_url":"https://api.github.com/repos/hsudbrock/com.zsmartsystems.zigbee/releases{/id}","deployments_url":"https://api.github.com/repos/hsudbrock/com.zsmartsystems.zigbee/deployments","created_at":"2018-04-20T19:53:55Z","updated_at":"2018-04-20T19:54:01Z","pushed_at":"2018-08-03T11:22:03Z","git_url":"git://github.com/hsudbrock/com.zsmartsystems.zigbee.git","ssh_url":"git@github.com:hsudbrock/com.zsmartsystems.zigbee.git","clone_url":"https://github.com/hsudbrock/com.zsmartsystems.zigbee.git","svn_url":"https://github.com/hsudbrock/com.zsmartsystems.zigbee","homepage":"","size":5690,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"epl-1.0","name":"Eclipse Public License 1.0","spdx_id":"EPL-1.0","url":"https://api.github.com/licenses/epl-1.0","node_id":"MDc6TGljZW5zZTc="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"zsmartsystems:master","ref":"master","sha":"59d3f542d1f390dcde2abe07fac63dbcf5d916df","user":{"login":"zsmartsystems","id":24925706,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0OTI1NzA2","avatar_url":"https://avatars3.githubusercontent.com/u/24925706?v=4","gravatar_id":"","url":"https://api.github.com/users/zsmartsystems","html_url":"https://github.com/zsmartsystems","followers_url":"https://api.github.com/users/zsmartsystems/followers","following_url":"https://api.github.com/users/zsmartsystems/following{/other_user}","gists_url":"https://api.github.com/users/zsmartsystems/gists{/gist_id}","starred_url":"https://api.github.com/users/zsmartsystems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zsmartsystems/subscriptions","organizations_url":"https://api.github.com/users/zsmartsystems/orgs","repos_url":"https://api.github.com/users/zsmartsystems/repos","events_url":"https://api.github.com/users/zsmartsystems/events{/privacy}","received_events_url":"https://api.github.com/users/zsmartsystems/received_events","type":"Organization","site_admin":false},"repo":{"id":80043676,"node_id":"MDEwOlJlcG9zaXRvcnk4MDA0MzY3Ng==","name":"com.zsmartsystems.zigbee","full_name":"zsmartsystems/com.zsmartsystems.zigbee","owner":{"login":"zsmartsystems","id":24925706,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0OTI1NzA2","avatar_url":"https://avatars3.githubusercontent.com/u/24925706?v=4","gravatar_id":"","url":"https://api.github.com/users/zsmartsystems","html_url":"https://github.com/zsmartsystems","followers_url":"https://api.github.com/users/zsmartsystems/followers","following_url":"https://api.github.com/users/zsmartsystems/following{/other_user}","gists_url":"https://api.github.com/users/zsmartsystems/gists{/gist_id}","starred_url":"https://api.github.com/users/zsmartsystems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zsmartsystems/subscriptions","organizations_url":"https://api.github.com/users/zsmartsystems/orgs","repos_url":"https://api.github.com/users/zsmartsystems/repos","events_url":"https://api.github.com/users/zsmartsystems/events{/privacy}","received_events_url":"https://api.github.com/users/zsmartsystems/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zsmartsystems/com.zsmartsystems.zigbee","description":"ZigBee Java library supporting multiple dongles","fork":false,"url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee","forks_url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/forks","keys_url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/teams","hooks_url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/hooks","issue_events_url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/issues/events{/number}","events_url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/events","assignees_url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/assignees{/user}","branches_url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/branches{/branch}","tags_url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/tags","blobs_url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/git/refs{/sha}","trees_url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/statuses/{sha}","languages_url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/languages","stargazers_url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/stargazers","contributors_url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/contributors","subscribers_url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/subscribers","subscription_url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/subscription","commits_url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/commits{/sha}","git_commits_url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/git/commits{/sha}","comments_url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/comments{/number}","issue_comment_url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/issues/comments{/number}","contents_url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/contents/{+path}","compare_url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/merges","archive_url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/downloads","issues_url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/issues{/number}","pulls_url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/pulls{/number}","milestones_url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/milestones{/number}","notifications_url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/labels{/name}","releases_url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/releases{/id}","deployments_url":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/deployments","created_at":"2017-01-25T18:26:54Z","updated_at":"2018-08-05T17:41:21Z","pushed_at":"2018-08-05T20:28:09Z","git_url":"git://github.com/zsmartsystems/com.zsmartsystems.zigbee.git","ssh_url":"git@github.com:zsmartsystems/com.zsmartsystems.zigbee.git","clone_url":"https://github.com/zsmartsystems/com.zsmartsystems.zigbee.git","svn_url":"https://github.com/zsmartsystems/com.zsmartsystems.zigbee","homepage":"","size":5696,"stargazers_count":31,"watchers_count":31,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":17,"mirror_url":null,"archived":false,"open_issues_count":20,"license":{"key":"epl-1.0","name":"Eclipse Public License 1.0","spdx_id":"EPL-1.0","url":"https://api.github.com/licenses/epl-1.0","node_id":"MDc6TGljZW5zZTc="},"forks":17,"open_issues":20,"watchers":31,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/pulls/345"},"html":{"href":"https://github.com/zsmartsystems/com.zsmartsystems.zigbee/pull/345"},"issue":{"href":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/issues/345"},"comments":{"href":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/issues/345/comments"},"review_comments":{"href":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/pulls/345/comments"},"review_comment":{"href":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/pulls/345/commits"},"statuses":{"href":"https://api.github.com/repos/zsmartsystems/com.zsmartsystems.zigbee/statuses/d221600fb235cfec18e58299b3f54824dd108e86"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"hsudbrock"}}