{"action":"created","issue":{"url":"https://api.github.com/repos/plasticrake/homebridge-tplink-smarthome/issues/40","repository_url":"https://api.github.com/repos/plasticrake/homebridge-tplink-smarthome","labels_url":"https://api.github.com/repos/plasticrake/homebridge-tplink-smarthome/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/plasticrake/homebridge-tplink-smarthome/issues/40/comments","events_url":"https://api.github.com/repos/plasticrake/homebridge-tplink-smarthome/issues/40/events","html_url":"https://github.com/plasticrake/homebridge-tplink-smarthome/issues/40","id":268176269,"number":40,"title":"TP-Link Smarthome plugin crashes homebridge when devices go offline","user":{"login":"ydogandjiev","id":3357245,"avatar_url":"https://avatars0.githubusercontent.com/u/3357245?v=4","gravatar_id":"","url":"https://api.github.com/users/ydogandjiev","html_url":"https://github.com/ydogandjiev","followers_url":"https://api.github.com/users/ydogandjiev/followers","following_url":"https://api.github.com/users/ydogandjiev/following{/other_user}","gists_url":"https://api.github.com/users/ydogandjiev/gists{/gist_id}","starred_url":"https://api.github.com/users/ydogandjiev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ydogandjiev/subscriptions","organizations_url":"https://api.github.com/users/ydogandjiev/orgs","repos_url":"https://api.github.com/users/ydogandjiev/repos","events_url":"https://api.github.com/users/ydogandjiev/events{/privacy}","received_events_url":"https://api.github.com/users/ydogandjiev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-10-24T20:34:00Z","updated_at":"2017-10-25T15:34:09Z","closed_at":null,"author_association":"NONE","body":"### Expected Behavior\r\nIf one of my TP-Link plugs goes offline it shouldn't take my entire homebridge down with it.\r\n\r\n### Current Behavior\r\nWhen one of my TP-Link plugs is disconnected from the power completely it causes an exception to be thrown by the TP-Link Smarthome plugin which in turn takes down the whole homebridge with it.\r\n\r\n### Steps to Reproduce (for bugs)\r\n<!-- Please add a series of steps to reproduce the problem. -->\r\n\r\n### Versions\r\n<!-- Please run commands and include versions below. -->\r\n- **Node**: 8.7.0\r\n- **Homebridge**: 0.4.29\r\n- **OS**: Raspbian GNU/Linux 9.1 (stretch)\r\n\r\n### Configuration\r\n```\r\n  \"platforms\": [\r\n    {\r\n      \"platform\": \"TplinkSmarthome\",\r\n      \"name\": \"TplinkSmarthome\"\r\n    }\r\n  ]\r\n```\r\n\r\n### Homebridge Log / Command Output\r\n```\r\n[2017-10-24 15:31:24] [TplinkSmarthome.API] TCP Timeout\r\n[2017-10-24 15:31:24] [TplinkSmarthome.API] [Bedroom Backlight] device.send() Error: TCP Timeout\r\n[2017-10-24 15:31:24] [TplinkSmarthome] [Bedroom Backlight] getSysInfo\r\n[2017-10-24 15:31:24] [TplinkSmarthome] Error: TCP Timeout\r\n    at Timeout._onTimeout (/usr/lib/node_modules/homebridge-tplink-smarthome/node_modules/tplink-smarthome-api/lib/client.js:248:20)\r\n    at ontimeout (timers.js:471:11)\r\n    at tryOnTimeout (timers.js:306:5)\r\n    at Timer.listOnTimeout (timers.js:266:5)\r\n/usr/lib/node_modules/homebridge-tplink-smarthome/node_modules/tplink-smarthome-api/lib/client.js:287\r\n          throw err;\r\n          ^\r\n\r\nError: connect EHOSTUNREACH 192.168.1.229:9999\r\n    at Object._errnoException (util.js:1021:11)\r\n    at _exceptionWithHostPort (util.js:1043:20)\r\n    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1175:14)\r\n```"},"comment":{"url":"https://api.github.com/repos/plasticrake/homebridge-tplink-smarthome/issues/comments/339371077","html_url":"https://github.com/plasticrake/homebridge-tplink-smarthome/issues/40#issuecomment-339371077","issue_url":"https://api.github.com/repos/plasticrake/homebridge-tplink-smarthome/issues/40","id":339371077,"user":{"login":"plasticrake","id":1383980,"avatar_url":"https://avatars1.githubusercontent.com/u/1383980?v=4","gravatar_id":"","url":"https://api.github.com/users/plasticrake","html_url":"https://github.com/plasticrake","followers_url":"https://api.github.com/users/plasticrake/followers","following_url":"https://api.github.com/users/plasticrake/following{/other_user}","gists_url":"https://api.github.com/users/plasticrake/gists{/gist_id}","starred_url":"https://api.github.com/users/plasticrake/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plasticrake/subscriptions","organizations_url":"https://api.github.com/users/plasticrake/orgs","repos_url":"https://api.github.com/users/plasticrake/repos","events_url":"https://api.github.com/users/plasticrake/events{/privacy}","received_events_url":"https://api.github.com/users/plasticrake/received_events","type":"User","site_admin":false},"created_at":"2017-10-25T15:34:09Z","updated_at":"2017-10-25T15:34:09Z","author_association":"OWNER","body":"Hi @ydogandjiev, I made a change to a dependency that should properly reject the promise instead of throwing an error. If you uninstall and reinstall this plugin it should pull in the updated dependency (`tplink-smarthome-api@0.20.1`)"}}
{"actor":{"display_login":"plasticrake"}}