Skip to content

Commit

Permalink
Merge pull request #946 from mback2k/fix-mini-doorbell-record
Browse files Browse the repository at this point in the history
Fix clip recording for Blink Mini and Doorbell camera models
  • Loading branch information
fronzbot authored Jun 9, 2024
2 parents 2ffda46 + 23f450d commit 8e6774b
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions blinkpy/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,17 @@ async def async_arm(self, value):
await api.wait_for_command(self.sync.blink, response)
return response

async def record(self):
"""Initiate clip recording for a blink mini camera."""
url = (
f"{self.sync.urls.base_url}/api/v1/accounts/"
f"{self.sync.blink.account_id}/networks/"
f"{self.network_id}/owls/{self.camera_id}/clip"
)
response = await api.http_post(self.sync.blink, url)
await api.wait_for_command(self.sync.blink, response)
return response

async def snap_picture(self):
"""Snap picture for a blink mini camera."""
url = (
Expand Down Expand Up @@ -575,6 +586,18 @@ async def async_arm(self, value):
await api.wait_for_command(self.sync.blink, response)
return response

async def record(self):
"""Initiate clip recording for a blink doorbell camera."""
url = (
f"{self.sync.urls.base_url}/api/v1/accounts/"
f"{self.sync.blink.account_id}/networks/"
f"{self.sync.network_id}/doorbells/{self.camera_id}/clip"
)

response = await api.http_post(self.sync.blink, url)
await api.wait_for_command(self.sync.blink, response)
return response

async def snap_picture(self):
"""Snap picture for a blink doorbell camera."""
url = (
Expand Down

0 comments on commit 8e6774b

Please sign in to comment.