Skip to content

Commit

Permalink
Deprecation message for bridged cameras
Browse files Browse the repository at this point in the history
  • Loading branch information
dgreif committed Jul 24, 2024
1 parent 422c6f6 commit ebb681e
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/heavy-dogs-eat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'homebridge-ring': patch
---

Add deprecation warning for bridged cameras. Only unbridged cameras will be supported in the next major release.
2 changes: 1 addition & 1 deletion packages/homebridge-ring/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Only include an optional parameter if you actually need it. Default behavior wit

| Option | Default | Explanation |
| ---------------------------- | ------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `unbridgeCameras` | `false` | if `true`, all Ring Cameras we be treated as external accessories, which generally leads to better performance. This means they each need to be individually added to HomeKit. WARNING: If your cameras are already bridged, they will be deleted from HomeKit when you enable this option, and you will need to reconfigure any associated automations or HomeKit settings |
| `unbridgeCameras` | `false` | if `true`, all Ring Cameras we be treated as external accessories, which generally leads to better performance. This means they each need to be individually added to HomeKit. This option will be enabled by default in the next major release. WARNING: If your cameras are already bridged, they will be deleted from HomeKit when you enable this option, and you will need to reconfigure any associated automations or HomeKit settings |
| `alarmOnEntryDelay` | `false` | if `true`, HomeKit will register a delayed entry event as a triggered alarm. There are some households where this is a nice feature as a heads up if you have other people who enter your house and you want an alert so that you can disable the alarm for them before it actually goes off. This works well if you automatically arm/disarm on leave/arrive (see setup instructions below) |
| `beamDurationSeconds` | `60` for light groups, previous from Ring app for individual lights | Ring smart lighting has a default behavior of only staying on for 60 seconds when you turn on a light via the Ring app. To force a duration when the light is turned on from HomeKit, set this option to a specific number of seconds. If this option is not set, the lights will use the duration from the previous time the light was turned on in the Ring app. For light groups, this will default to 60 seconds. The maximum value is `32767`, which is ~9.1 hours. |
| `hideDeviceIds` | `[]` | Allows you to hide specific devices by an array of ids. The id for each device is logged when homebridge starts. |
Expand Down
2 changes: 1 addition & 1 deletion packages/homebridge-ring/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"unbridgeCameras": {
"title": "Unbridge Cameras",
"type": "boolean",
"description": "If enabled, all Ring Cameras we be treated as external accessories, which generally leads to better performance. This means they each need to be individually added to HomeKit. WARNING: If your cameras are already bridged, they will be deleted from HomeKit when you enable this option, and you will need to reconfigure any associated automations or HomeKit settings"
"description": "If enabled, all Ring Cameras we be treated as external accessories, which generally leads to better performance. This means they each need to be individually added to HomeKit. This option will be enabled by default in the next major release. WARNING: If your cameras are already bridged, they will be deleted from HomeKit when you enable this option, and you will need to reconfigure any associated automations or HomeKit settings"
},
"alarmOnEntryDelay": {
"title": "Alarm on Entry Delay",
Expand Down
11 changes: 10 additions & 1 deletion packages/homebridge-ring/ring-platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import { Switch } from './switch'
import { Camera } from './camera'
import { PanicButtons } from './panic-buttons'
import { RefreshTokenAuth } from 'ring-client-api/rest-client'
import { logInfo, useLogger } from 'ring-client-api/util'
import { logError, logInfo, useLogger } from 'ring-client-api/util'
import { BaseAccessory } from './base-accessory'
import { FloodFreezeSensor } from './flood-freeze-sensor'
import { FreezeSensor } from './freeze-sensor'
Expand Down Expand Up @@ -208,6 +208,7 @@ export class RingPlatform implements DynamicPlatformPlugin {
platformAccessories: PlatformAccessory[] = [],
externalAccessories: PlatformAccessory[] = [],
activeAccessoryIds: string[] = []
let hasBridgedCameras = false

logInfo('Found the following locations:')

Expand Down Expand Up @@ -354,6 +355,8 @@ export class RingPlatform implements DynamicPlatformPlugin {

this.homebridgeAccessories[uuid] = homebridgeAccessory
activeAccessoryIds.push(uuid)

hasBridgedCameras ||= isCamera && !isExternalCamera
},
)
}),
Expand Down Expand Up @@ -400,5 +403,11 @@ export class RingPlatform implements DynamicPlatformPlugin {
})
},
)

if (hasBridgedCameras) {
logError(
'Bridged camera support will be removed in the next major release of homebridge-ring. Please enable the unbridgeCameras option in your configuration and add the individual cameras to HomeKit to prepare for this change.',
)
}
}
}

0 comments on commit ebb681e

Please sign in to comment.