{"action":"closed","number":2,"pull_request":{"url":"https://api.github.com/repos/planetk/homebridge-netatmo/pulls/2","id":52592069,"html_url":"https://github.com/planetk/homebridge-netatmo/pull/2","diff_url":"https://github.com/planetk/homebridge-netatmo/pull/2.diff","patch_url":"https://github.com/planetk/homebridge-netatmo/pull/2.patch","issue_url":"https://api.github.com/repos/planetk/homebridge-netatmo/issues/2","number":2,"state":"closed","locked":false,"title":"Don't crash if module is not reachable, also did some code cleanup","user":{"login":"patricks","id":132167,"avatar_url":"https://avatars.githubusercontent.com/u/132167?v=3","gravatar_id":"","url":"https://api.github.com/users/patricks","html_url":"https://github.com/patricks","followers_url":"https://api.github.com/users/patricks/followers","following_url":"https://api.github.com/users/patricks/following{/other_user}","gists_url":"https://api.github.com/users/patricks/gists{/gist_id}","starred_url":"https://api.github.com/users/patricks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patricks/subscriptions","organizations_url":"https://api.github.com/users/patricks/orgs","repos_url":"https://api.github.com/users/patricks/repos","events_url":"https://api.github.com/users/patricks/events{/privacy}","received_events_url":"https://api.github.com/users/patricks/received_events","type":"User","site_admin":false},"body":"I have a now 12 Netatmo sensor in my homebridge system. No one of this sensors is not reachable anymore (maybe battery is empty). So there is no Temperature and Humidity value available in the JSON file. The JSON looks like this:\r\n\r\n\r\n```\r\n\"modules\": [\r\n          {\r\n            \"_id\": \"02:00:00:15:e4:26\",\r\n            \"module_name\": \"Module\",\r\n            \"type\": \"NAModule1\",\r\n            \"data_type\": [\r\n              \"Temperature\",\r\n              \"Humidity\"\r\n            ]\r\n          }\r\n        ],\r\n```\r\n\r\nSo I have added a check to fix some crashes.","created_at":"2015-12-03T21:03:47Z","updated_at":"2015-12-03T21:08:30Z","closed_at":"2015-12-03T21:08:30Z","merged_at":"2015-12-03T21:08:30Z","merge_commit_sha":"3ec793d38192190a5c5bc10cc37548f1309c9ae9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/planetk/homebridge-netatmo/pulls/2/commits","review_comments_url":"https://api.github.com/repos/planetk/homebridge-netatmo/pulls/2/comments","review_comment_url":"https://api.github.com/repos/planetk/homebridge-netatmo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/planetk/homebridge-netatmo/issues/2/comments","statuses_url":"https://api.github.com/repos/planetk/homebridge-netatmo/statuses/df03d51250289e908de449f17de647c633375f27","head":{"label":"patricks:master","ref":"master","sha":"df03d51250289e908de449f17de647c633375f27","user":{"login":"patricks","id":132167,"avatar_url":"https://avatars.githubusercontent.com/u/132167?v=3","gravatar_id":"","url":"https://api.github.com/users/patricks","html_url":"https://github.com/patricks","followers_url":"https://api.github.com/users/patricks/followers","following_url":"https://api.github.com/users/patricks/following{/other_user}","gists_url":"https://api.github.com/users/patricks/gists{/gist_id}","starred_url":"https://api.github.com/users/patricks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patricks/subscriptions","organizations_url":"https://api.github.com/users/patricks/orgs","repos_url":"https://api.github.com/users/patricks/repos","events_url":"https://api.github.com/users/patricks/events{/privacy}","received_events_url":"https://api.github.com/users/patricks/received_events","type":"User","site_admin":false},"repo":{"id":47359882,"name":"homebridge-netatmo","full_name":"patricks/homebridge-netatmo","owner":{"login":"patricks","id":132167,"avatar_url":"https://avatars.githubusercontent.com/u/132167?v=3","gravatar_id":"","url":"https://api.github.com/users/patricks","html_url":"https://github.com/patricks","followers_url":"https://api.github.com/users/patricks/followers","following_url":"https://api.github.com/users/patricks/following{/other_user}","gists_url":"https://api.github.com/users/patricks/gists{/gist_id}","starred_url":"https://api.github.com/users/patricks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patricks/subscriptions","organizations_url":"https://api.github.com/users/patricks/orgs","repos_url":"https://api.github.com/users/patricks/repos","events_url":"https://api.github.com/users/patricks/events{/privacy}","received_events_url":"https://api.github.com/users/patricks/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/patricks/homebridge-netatmo","description":"","fork":true,"url":"https://api.github.com/repos/patricks/homebridge-netatmo","forks_url":"https://api.github.com/repos/patricks/homebridge-netatmo/forks","keys_url":"https://api.github.com/repos/patricks/homebridge-netatmo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/patricks/homebridge-netatmo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/patricks/homebridge-netatmo/teams","hooks_url":"https://api.github.com/repos/patricks/homebridge-netatmo/hooks","issue_events_url":"https://api.github.com/repos/patricks/homebridge-netatmo/issues/events{/number}","events_url":"https://api.github.com/repos/patricks/homebridge-netatmo/events","assignees_url":"https://api.github.com/repos/patricks/homebridge-netatmo/assignees{/user}","branches_url":"https://api.github.com/repos/patricks/homebridge-netatmo/branches{/branch}","tags_url":"https://api.github.com/repos/patricks/homebridge-netatmo/tags","blobs_url":"https://api.github.com/repos/patricks/homebridge-netatmo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/patricks/homebridge-netatmo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/patricks/homebridge-netatmo/git/refs{/sha}","trees_url":"https://api.github.com/repos/patricks/homebridge-netatmo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/patricks/homebridge-netatmo/statuses/{sha}","languages_url":"https://api.github.com/repos/patricks/homebridge-netatmo/languages","stargazers_url":"https://api.github.com/repos/patricks/homebridge-netatmo/stargazers","contributors_url":"https://api.github.com/repos/patricks/homebridge-netatmo/contributors","subscribers_url":"https://api.github.com/repos/patricks/homebridge-netatmo/subscribers","subscription_url":"https://api.github.com/repos/patricks/homebridge-netatmo/subscription","commits_url":"https://api.github.com/repos/patricks/homebridge-netatmo/commits{/sha}","git_commits_url":"https://api.github.com/repos/patricks/homebridge-netatmo/git/commits{/sha}","comments_url":"https://api.github.com/repos/patricks/homebridge-netatmo/comments{/number}","issue_comment_url":"https://api.github.com/repos/patricks/homebridge-netatmo/issues/comments{/number}","contents_url":"https://api.github.com/repos/patricks/homebridge-netatmo/contents/{+path}","compare_url":"https://api.github.com/repos/patricks/homebridge-netatmo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/patricks/homebridge-netatmo/merges","archive_url":"https://api.github.com/repos/patricks/homebridge-netatmo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/patricks/homebridge-netatmo/downloads","issues_url":"https://api.github.com/repos/patricks/homebridge-netatmo/issues{/number}","pulls_url":"https://api.github.com/repos/patricks/homebridge-netatmo/pulls{/number}","milestones_url":"https://api.github.com/repos/patricks/homebridge-netatmo/milestones{/number}","notifications_url":"https://api.github.com/repos/patricks/homebridge-netatmo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/patricks/homebridge-netatmo/labels{/name}","releases_url":"https://api.github.com/repos/patricks/homebridge-netatmo/releases{/id}","created_at":"2015-12-03T20:56:13Z","updated_at":"2015-12-03T20:56:14Z","pushed_at":"2015-12-03T20:59:53Z","git_url":"git://github.com/patricks/homebridge-netatmo.git","ssh_url":"git@github.com:patricks/homebridge-netatmo.git","clone_url":"https://github.com/patricks/homebridge-netatmo.git","svn_url":"https://github.com/patricks/homebridge-netatmo","homepage":null,"size":12,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"planetk:master","ref":"master","sha":"264aa6654f09724797c9ecef697b1bc6fa1970e6","user":{"login":"planetk","id":841526,"avatar_url":"https://avatars.githubusercontent.com/u/841526?v=3","gravatar_id":"","url":"https://api.github.com/users/planetk","html_url":"https://github.com/planetk","followers_url":"https://api.github.com/users/planetk/followers","following_url":"https://api.github.com/users/planetk/following{/other_user}","gists_url":"https://api.github.com/users/planetk/gists{/gist_id}","starred_url":"https://api.github.com/users/planetk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/planetk/subscriptions","organizations_url":"https://api.github.com/users/planetk/orgs","repos_url":"https://api.github.com/users/planetk/repos","events_url":"https://api.github.com/users/planetk/events{/privacy}","received_events_url":"https://api.github.com/users/planetk/received_events","type":"User","site_admin":false},"repo":{"id":45613293,"name":"homebridge-netatmo","full_name":"planetk/homebridge-netatmo","owner":{"login":"planetk","id":841526,"avatar_url":"https://avatars.githubusercontent.com/u/841526?v=3","gravatar_id":"","url":"https://api.github.com/users/planetk","html_url":"https://github.com/planetk","followers_url":"https://api.github.com/users/planetk/followers","following_url":"https://api.github.com/users/planetk/following{/other_user}","gists_url":"https://api.github.com/users/planetk/gists{/gist_id}","starred_url":"https://api.github.com/users/planetk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/planetk/subscriptions","organizations_url":"https://api.github.com/users/planetk/orgs","repos_url":"https://api.github.com/users/planetk/repos","events_url":"https://api.github.com/users/planetk/events{/privacy}","received_events_url":"https://api.github.com/users/planetk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/planetk/homebridge-netatmo","description":"","fork":false,"url":"https://api.github.com/repos/planetk/homebridge-netatmo","forks_url":"https://api.github.com/repos/planetk/homebridge-netatmo/forks","keys_url":"https://api.github.com/repos/planetk/homebridge-netatmo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/planetk/homebridge-netatmo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/planetk/homebridge-netatmo/teams","hooks_url":"https://api.github.com/repos/planetk/homebridge-netatmo/hooks","issue_events_url":"https://api.github.com/repos/planetk/homebridge-netatmo/issues/events{/number}","events_url":"https://api.github.com/repos/planetk/homebridge-netatmo/events","assignees_url":"https://api.github.com/repos/planetk/homebridge-netatmo/assignees{/user}","branches_url":"https://api.github.com/repos/planetk/homebridge-netatmo/branches{/branch}","tags_url":"https://api.github.com/repos/planetk/homebridge-netatmo/tags","blobs_url":"https://api.github.com/repos/planetk/homebridge-netatmo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/planetk/homebridge-netatmo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/planetk/homebridge-netatmo/git/refs{/sha}","trees_url":"https://api.github.com/repos/planetk/homebridge-netatmo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/planetk/homebridge-netatmo/statuses/{sha}","languages_url":"https://api.github.com/repos/planetk/homebridge-netatmo/languages","stargazers_url":"https://api.github.com/repos/planetk/homebridge-netatmo/stargazers","contributors_url":"https://api.github.com/repos/planetk/homebridge-netatmo/contributors","subscribers_url":"https://api.github.com/repos/planetk/homebridge-netatmo/subscribers","subscription_url":"https://api.github.com/repos/planetk/homebridge-netatmo/subscription","commits_url":"https://api.github.com/repos/planetk/homebridge-netatmo/commits{/sha}","git_commits_url":"https://api.github.com/repos/planetk/homebridge-netatmo/git/commits{/sha}","comments_url":"https://api.github.com/repos/planetk/homebridge-netatmo/comments{/number}","issue_comment_url":"https://api.github.com/repos/planetk/homebridge-netatmo/issues/comments{/number}","contents_url":"https://api.github.com/repos/planetk/homebridge-netatmo/contents/{+path}","compare_url":"https://api.github.com/repos/planetk/homebridge-netatmo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/planetk/homebridge-netatmo/merges","archive_url":"https://api.github.com/repos/planetk/homebridge-netatmo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/planetk/homebridge-netatmo/downloads","issues_url":"https://api.github.com/repos/planetk/homebridge-netatmo/issues{/number}","pulls_url":"https://api.github.com/repos/planetk/homebridge-netatmo/pulls{/number}","milestones_url":"https://api.github.com/repos/planetk/homebridge-netatmo/milestones{/number}","notifications_url":"https://api.github.com/repos/planetk/homebridge-netatmo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/planetk/homebridge-netatmo/labels{/name}","releases_url":"https://api.github.com/repos/planetk/homebridge-netatmo/releases{/id}","created_at":"2015-11-05T13:36:00Z","updated_at":"2015-12-03T21:04:08Z","pushed_at":"2015-12-03T21:08:30Z","git_url":"git://github.com/planetk/homebridge-netatmo.git","ssh_url":"git@github.com:planetk/homebridge-netatmo.git","clone_url":"https://github.com/planetk/homebridge-netatmo.git","svn_url":"https://github.com/planetk/homebridge-netatmo","homepage":null,"size":12,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":0,"forks":2,"open_issues":0,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/planetk/homebridge-netatmo/pulls/2"},"html":{"href":"https://github.com/planetk/homebridge-netatmo/pull/2"},"issue":{"href":"https://api.github.com/repos/planetk/homebridge-netatmo/issues/2"},"comments":{"href":"https://api.github.com/repos/planetk/homebridge-netatmo/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/planetk/homebridge-netatmo/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/planetk/homebridge-netatmo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/planetk/homebridge-netatmo/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/planetk/homebridge-netatmo/statuses/df03d51250289e908de449f17de647c633375f27"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"planetk","id":841526,"avatar_url":"https://avatars.githubusercontent.com/u/841526?v=3","gravatar_id":"","url":"https://api.github.com/users/planetk","html_url":"https://github.com/planetk","followers_url":"https://api.github.com/users/planetk/followers","following_url":"https://api.github.com/users/planetk/following{/other_user}","gists_url":"https://api.github.com/users/planetk/gists{/gist_id}","starred_url":"https://api.github.com/users/planetk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/planetk/subscriptions","organizations_url":"https://api.github.com/users/planetk/orgs","repos_url":"https://api.github.com/users/planetk/repos","events_url":"https://api.github.com/users/planetk/events{/privacy}","received_events_url":"https://api.github.com/users/planetk/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":1,"additions":21,"deletions":15,"changed_files":1}}