{"action":"created","issue":{"url":"https://api.github.com/repos/pavoni/pyvera/issues/35","repository_url":"https://api.github.com/repos/pavoni/pyvera","labels_url":"https://api.github.com/repos/pavoni/pyvera/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/pavoni/pyvera/issues/35/comments","events_url":"https://api.github.com/repos/pavoni/pyvera/issues/35/events","html_url":"https://github.com/pavoni/pyvera/pull/35","id":190551758,"number":35,"title":"Add timeout to all requests calls","user":{"login":"sdague","id":14367,"avatar_url":"https://avatars.githubusercontent.com/u/14367?v=3","gravatar_id":"","url":"https://api.github.com/users/sdague","html_url":"https://github.com/sdague","followers_url":"https://api.github.com/users/sdague/followers","following_url":"https://api.github.com/users/sdague/following{/other_user}","gists_url":"https://api.github.com/users/sdague/gists{/gist_id}","starred_url":"https://api.github.com/users/sdague/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdague/subscriptions","organizations_url":"https://api.github.com/users/sdague/orgs","repos_url":"https://api.github.com/users/sdague/repos","events_url":"https://api.github.com/users/sdague/events{/privacy}","received_events_url":"https://api.github.com/users/sdague/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-11-20T11:02:37Z","updated_at":"2016-11-21T10:36:28Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/pavoni/pyvera/pulls/35","html_url":"https://github.com/pavoni/pyvera/pull/35","diff_url":"https://github.com/pavoni/pyvera/pull/35.diff","patch_url":"https://github.com/pavoni/pyvera/pull/35.patch"},"body":"I am seeing a situation where the pyvera component just stops getting\r\nnew info in home-assistant, no errors logged. In looking through the\r\nrequests documentation it looks like if requests calls don't have a\r\ntimeout, then requests can hang forever -\r\nhttp://docs.python-requests.org/en/master/user/quickstart/#timeouts\r\n\r\nThis adds a timeout to all calls, but most importantly is the poll\r\nloop."},"comment":{"url":"https://api.github.com/repos/pavoni/pyvera/issues/comments/261901680","html_url":"https://github.com/pavoni/pyvera/pull/35#issuecomment-261901680","issue_url":"https://api.github.com/repos/pavoni/pyvera/issues/35","id":261901680,"user":{"login":"sdague","id":14367,"avatar_url":"https://avatars.githubusercontent.com/u/14367?v=3","gravatar_id":"","url":"https://api.github.com/users/sdague","html_url":"https://github.com/sdague","followers_url":"https://api.github.com/users/sdague/followers","following_url":"https://api.github.com/users/sdague/following{/other_user}","gists_url":"https://api.github.com/users/sdague/gists{/gist_id}","starred_url":"https://api.github.com/users/sdague/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdague/subscriptions","organizations_url":"https://api.github.com/users/sdague/orgs","repos_url":"https://api.github.com/users/sdague/repos","events_url":"https://api.github.com/users/sdague/events{/privacy}","received_events_url":"https://api.github.com/users/sdague/received_events","type":"User","site_admin":false},"created_at":"2016-11-21T10:36:28Z","updated_at":"2016-11-21T10:36:28Z","body":"Ok. I set the timeout to 5 seconds, and it all seems to fail gracefully. This is what my logs are looking like after that.\r\n\r\n16-11-21 05:35:33 INFO (Vera Poll Thread) [pyvera.subscribe] Could not contact Vera - will retry in 10s\r\n16-11-21 05:35:44 INFO (Vera Poll Thread) [pyvera.subscribe] Poll returned\r\n16-11-21 05:35:47 INFO (Vera Poll Thread) [pyvera.subscribe] Poll returned\r\n16-11-21 05:35:53 INFO (Vera Poll Thread) [pyvera.subscribe] Poll returned\r\n"}}
{"actor":{"display_login":"sdague"}}