Handle QVR Pro dropping connection (#33591)

* Handle QVR Pro dropping connection

* Update homeassistant/components/qvr_pro/camera.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Update homeassistant/components/qvr_pro/manifest.json

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
pull/33591/merge
Matt Snyder 2020-04-07 18:19:31 -05:00 committed by GitHub
parent eae21be5b9
commit 8b5ab3221f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 2 deletions

View File

@ -90,6 +90,13 @@ class QVRProCamera(Camera):
def camera_image(self):
"""Get image bytes from camera."""
try:
return self._client.get_snapshot(self.guid)
except QVRResponseError as ex:
_LOGGER.error("Error getting image: %s", ex)
self._client.connect()
return self._client.get_snapshot(self.guid)
async def stream_source(self):

View File

@ -2,6 +2,6 @@
"domain": "qvr_pro",
"name": "QVR Pro",
"documentation": "https://www.home-assistant.io/integrations/qvr_pro",
"requirements": ["pyqvrpro==0.51"],
"requirements": ["pyqvrpro==0.52"],
"codeowners": ["@oblogic7"]
}

View File

@ -1499,7 +1499,7 @@ pypoint==1.1.2
pyps4-2ndscreen==1.0.7
# homeassistant.components.qvr_pro
pyqvrpro==0.51
pyqvrpro==0.52
# homeassistant.components.qwikswitch
pyqwikswitch==0.93