Skip to content

Commit

Permalink
Fix notification delay with doorbell_graham_cracker
Browse files Browse the repository at this point in the history
* The low cost wired Ring doorbell cannot take snapshots whilst recording
  which leads to a ~15sec delay in the HomeKit notifications. This patch
  bypasses the snapshot load for these devices only.
  See issue dgreif#933.
  • Loading branch information
townsen committed Aug 2, 2023
1 parent 6d3a166 commit ae5f20f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packages/homebridge-ring/camera.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,19 @@ export class Camera extends BaseDataAccessory<RingCamera> {
) {
let imageUuid = this.device.latestNotificationSnapshotUuid

/**
* The low cost wired doorbell is effectively a battery camera and
* cannot fetch a new snapshot while recording is in progress
* See: https://github.com/dgreif/ring/issues/933
*/
if (this.device.deviceType === 'doorbell_graham_cracker' && !imageUuid) {
logInfo(
this.device.name +
` ${eventDescription}. Bypassing snapshot load before sending event to HomeKit`
)
return characteristicValue
}

/**
* Battery cameras may receive an initial notification with no image uuid,
* followed shortly by a second notification with the image uuid. We need to
Expand Down

0 comments on commit ae5f20f

Please sign in to comment.