ZachBenz / RingForIndigo

Ring plugin for Indigo Home Automation Server from Indigo Domotics
GNU Lesser General Public License v3.0
0 stars 1 forks source link

Unable to get video for event (probably timing issue?) #51

Open ZachBenz opened 4 years ago

ZachBenz commented 4 years ago
Traceback (most recent call last):
  File "plugin.py", line 830, in downloadVideoForEvent
  File "/Library/Application Support/Perceptive Automation/Indigo 7.4/Plugins/RingForIndigo.indigoPlugin/Contents/Server Plugin/ring_doorbell/doorbot.py", line 298, in recording_download
  File "/Library/Application Support/Perceptive Automation/Indigo 7.4/Plugins/RingForIndigo.indigoPlugin/Contents/Server Plugin/ring_doorbell/__init__.py", line 40, in query
  File "/Library/Application Support/Perceptive Automation/Indigo 7.4/Plugins/RingForIndigo.indigoPlugin/Contents/Server Plugin/ring_doorbell/auth.py", line 95, in query
  File "/Library/Application Support/Perceptive Automation/Indigo 7.4/Plugins/RingForIndigo.indigoPlugin/Contents/Server Plugin/requests/models.py", line 940, in raise_for_status
HTTPError: 404 Client Error: Not Found for url: https://api.ring.com/clients_api/dings/xxxxxxx/recording?api_version=9

My initial guess is that the video is simply not available yet - i.e. the request for download is coming too soon after the triggering of the event

ZachBenz commented 4 years ago

Indeed, appears to be timing. Waiting 60 seconds after the event works most of the time, though occasionally is still too soon. Going to trap the error and give the user a useful error message suggesting waiting a delay of ~90 seconds before downloading.