python-ring-doorbell icon indicating copy to clipboard operation
python-ring-doorbell copied to clipboard

get_snapshot() gives 405 error

Open dlemmink opened this issue 5 years ago • 3 comments

get_snapshot responds with a 405 error even when using new auth method

405 Client Error: Method Not Allowed for url: https://api.ring.com/clients_api/snapshots/timestamps?api_version=9

Previously working 1/11 @ 8:46a EDT per #147

dlemmink avatar Jan 11 '20 17:01 dlemmink

Got it to work and actually do snapshot with this change

def get_snapshot(self, retries=3, delay=1): """Take a snapshot and download it"""
try: url = SNAPSHOT_TIMESTAMP_ENDPOINT payload = {"doorbot_ids": [self._attrs.get("id")]} self._ring.query(url, method="POST", json=payload) request_time = time.time() for _ in range(retries): time.sleep(delay) response = self._ring.query(url, method="POST", json=payload).json() if response["timestamps"][0]["timestamp"] / 1000 > request_time: return self._ring.query( SNAPSHOT_ENDPOINT.format(self._attrs.get("id")) ).content return False except: return False

CristianMori avatar Feb 08 '20 19:02 CristianMori

I am not sure if #147 is related to the new Ring feature of taking ~5min still frame recordings? But that feature is/would be perfect for what I want, which is a continuous still frame feed. I used to compile timelapse of noon frames over a year for example, so having them at whatever frequency I can see in my app scrubber is great, once I determine how to fetch them all.

4Dolio avatar Jun 26 '20 05:06 4Dolio

I am also seeing that the snapshots are always between 3 and 5 minutes old.

clinkadink avatar Jun 27 '20 20:06 clinkadink

There hasn't been any activity on this issue recently. This issue has been automatically marked as stale because of that. It will be closed if no further activity occurs. Please make sure to update to the latest ring_doorbell version and check if that solves the issue. Thank you for your contributions.

github-actions[bot] avatar Apr 18 '24 18:04 github-actions[bot]