homebridge-unifi-protect 6.19.0 → 6.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/README.md +35 -49
  2. package/dist/devices/protect-camera-package.js +1 -1
  3. package/dist/devices/protect-camera-package.js.map +1 -1
  4. package/dist/devices/protect-camera.d.ts +6 -4
  5. package/dist/devices/protect-camera.js +144 -218
  6. package/dist/devices/protect-camera.js.map +1 -1
  7. package/dist/devices/protect-chime.d.ts +3 -0
  8. package/dist/devices/protect-chime.js +100 -28
  9. package/dist/devices/protect-chime.js.map +1 -1
  10. package/dist/devices/protect-device.d.ts +9 -2
  11. package/dist/devices/protect-device.js +162 -105
  12. package/dist/devices/protect-device.js.map +1 -1
  13. package/dist/devices/protect-doorbell.js +48 -81
  14. package/dist/devices/protect-doorbell.js.map +1 -1
  15. package/dist/devices/protect-light.js +33 -43
  16. package/dist/devices/protect-light.js.map +1 -1
  17. package/dist/devices/protect-liveviews.js +10 -20
  18. package/dist/devices/protect-liveviews.js.map +1 -1
  19. package/dist/devices/protect-nvr-systeminfo.js +3 -9
  20. package/dist/devices/protect-nvr-systeminfo.js.map +1 -1
  21. package/dist/devices/protect-securitysystem.d.ts +1 -2
  22. package/dist/devices/protect-securitysystem.js +31 -58
  23. package/dist/devices/protect-securitysystem.js.map +1 -1
  24. package/dist/devices/protect-sensor.d.ts +2 -3
  25. package/dist/devices/protect-sensor.js +154 -204
  26. package/dist/devices/protect-sensor.js.map +1 -1
  27. package/dist/devices/protect-viewer.js +21 -28
  28. package/dist/devices/protect-viewer.js.map +1 -1
  29. package/dist/ffmpeg/protect-ffmpeg-options.d.ts +14 -2
  30. package/dist/ffmpeg/protect-ffmpeg-options.js +61 -46
  31. package/dist/ffmpeg/protect-ffmpeg-options.js.map +1 -1
  32. package/dist/ffmpeg/protect-ffmpeg-record.js +11 -2
  33. package/dist/ffmpeg/protect-ffmpeg-record.js.map +1 -1
  34. package/dist/ffmpeg/protect-ffmpeg-stream.js +2 -2
  35. package/dist/ffmpeg/protect-ffmpeg-stream.js.map +1 -1
  36. package/dist/ffmpeg/protect-ffmpeg.js +2 -2
  37. package/dist/ffmpeg/protect-ffmpeg.js.map +1 -1
  38. package/dist/protect-events.js +25 -20
  39. package/dist/protect-events.js.map +1 -1
  40. package/dist/protect-mqtt.d.ts +2 -2
  41. package/dist/protect-mqtt.js +17 -3
  42. package/dist/protect-mqtt.js.map +1 -1
  43. package/dist/protect-nvr.d.ts +5 -0
  44. package/dist/protect-nvr.js +46 -24
  45. package/dist/protect-nvr.js.map +1 -1
  46. package/dist/protect-options.d.ts +7 -2
  47. package/dist/protect-options.js +24 -12
  48. package/dist/protect-options.js.map +1 -1
  49. package/dist/protect-record.d.ts +3 -1
  50. package/dist/protect-record.js +29 -15
  51. package/dist/protect-record.js.map +1 -1
  52. package/dist/protect-rtp.d.ts +2 -2
  53. package/dist/protect-rtp.js +8 -9
  54. package/dist/protect-rtp.js.map +1 -1
  55. package/dist/protect-snapshot.js +13 -1
  56. package/dist/protect-snapshot.js.map +1 -1
  57. package/dist/protect-stream.js +26 -8
  58. package/dist/protect-stream.js.map +1 -1
  59. package/dist/protect-types.d.ts +10 -0
  60. package/dist/protect-types.js +6 -1
  61. package/dist/protect-types.js.map +1 -1
  62. package/dist/settings.d.ts +1 -0
  63. package/dist/settings.js +2 -0
  64. package/dist/settings.js.map +1 -1
  65. package/homebridge-ui/public/index.html +11 -12
  66. package/package.json +12 -12
package/README.md CHANGED
@@ -13,12 +13,12 @@
13
13
  </DIV>
14
14
  </SPAN>
15
15
 
16
- `homebridge-unifi-protect` is a [Homebridge](https://homebridge.io) plugin that provides HomeKit support to the [UniFi Protect](https://ui.com/us/camera-security) device ecosystem. [UniFi Protect](https://ui.com/us/camera-security) is [Ubiquiti's](https://www.ui.com) video security platform, with rich camera, doorbell, and NVR controller hardware options for you to choose from, as well as an app which you can use to view, configure and manage your video camera and doorbells.
16
+ `homebridge-unifi-protect` is a [Homebridge](https://homebridge.io) plugin that provides HomeKit support to the [UniFi Protect](https://ui.com/camera-security) device ecosystem. [UniFi Protect](https://ui.com/us/camera-security) is [Ubiquiti's](https://www.ui.com) video security platform, with rich camera, doorbell, and NVR controller hardware options for you to choose from, as well as an app which you can use to view, configure and manage your video camera and doorbells.
17
17
 
18
18
  ## <A NAME="why"></A>Why Use This Plugin For UniFi Protect Support In HomeKit?
19
- This plugin attempts to bridge a gap in the UniFi Protect ecosystem by providing native HomeKit support on par with what you would expect from a first-party of native HomeKit solution. My north star is to create a plugin that *just works* with minimal required configuration by you to get up and running. The goal is to provide as close to a streamlined experience as you would expect from a first-party or native HomeKit solution. For the adventurous, there are more granular options available to enable you to further tailor your experience.
19
+ This plugin attempts to bridge a gap in the UniFi Protect ecosystem by providing native HomeKit support on par with what you would expect from a first-party native HomeKit solution. My north star has always been to create a plugin that *just works* with minimal required configuration by you to get up and running. All you need is the hostname or IP address of the Protect controller and local user credentials on the Protect controller. That's it. The defaults are sane and correct for the vast majority of people. For the adventurous, there are rich capabilities you can explore to enable you to further tailor your experience. All provided through an elegant webUI accessed through the Homebridge Config UI that allows you to explore all of the more sophisticated capabilities of this plugin in an approachable way.
20
20
 
21
- What does *just works* mean in practice? It means that this plugin will discover all your supported UniFi Protect devices and make them available in HomeKit. It supports all known UniFi Protect controller configurations (UniFi CloudKey Gen2+, UniFi Dream Machine Pro/SE, and UniFi Protect NVR).
21
+ What does *it just works* mean in practice? It means that this plugin will discover all your supported UniFi Protect devices and make them available in HomeKit. It supports all current UniFi Protect controller releases.
22
22
 
23
23
  For the more technically inclined - this plugin has continued to pioneer the HomeKit user experience for UniFi Protect by being the ***first*** Homebridge plugin (and first third-party app, to my knowledge) to successfully reverse engineer the UniFi Protect realtime events API that was introduced with UniFi OS. This allows instantaneous, realtime capturing of events as they occur in the Protect ecosystem, allowing us to provide that same level of realtime sensor and camera feedback to HomeKit. Since reverse engineering the realtime events API, most of the major open source smart automation projects have benefited and also incorporated our work, improving the experience for everyone across smart home ecosystems.
24
24
 
@@ -31,9 +31,9 @@ For the more technically inclined - this plugin has continued to pioneer the Hom
31
31
 
32
32
  - **Incredibly high performance.** I've spent the time to optimize the video streaming experience to ensure it feels very responsive, and *just works*. For those that have hardware-accelerated CPUs and GPUs, live video stream load times using the Home app on iOS average at 0.2-0.3 seconds on a day-to-day basis, which is often better than the native UniFi Protect app! Supported hardware-accelerated platforms are currently: Apple Macs (both Intel and Apple Silicon), Intel Quick Sync Video-enabled CPUs, and Raspberry Pi 4. When not using hardware acceleration, or on slower systems, you can expect live video streams to load within 1-2 seconds.
33
33
 
34
- - **[Full UniFi Protect Doorbell support.](https://github.com/hjdhjd/homebridge-unifi-protect/blob/main/docs/Doorbell.md).** This plugin provides complete support for [UniFi Protect Doorbells](https://store.ui.com/collections/unifi-protect/products/uvc-g4-doorbell). We support all the features of the doorbell including - doorbell rings, two-way audio, package camera support, and the use of the onboard LCD screen for messages. Two-way audio has caveats you should be aware of.
34
+ - **[Full UniFi Protect Doorbell support.](https://github.com/hjdhjd/homebridge-unifi-protect/blob/main/docs/Doorbell.md).** This plugin provides complete support for [UniFi Protect Doorbells](https://store.ui.com/us/en?category=cameras-doorbells). We support all features of UniFi Protect doorbells including - doorbell rings, two-way audio, package camera support, and the use of the onboard LCD screen for messages. Two-way audio has caveats you should be aware of.
35
35
 
36
- - **[Two-way audio support](https://github.com/hjdhjd/homebridge-unifi-protect/blob/main/docs/Doorbell.md#doorbell-twoway) for all UniFi Protect cameras that support it**. Some Protect devices that support two-way audio capabilities include [UniFi Protect Doorbells](https://store.ui.com/collections/unifi-protect/products/uvc-g4-doorbell), the [UniFi Protect Instant Cameras](https://store.ui.com/collections/unifi-protect/products/unifi-video-g3-micro), and more. If the Protect device supports two-way audio, that functionality is available to you in HomeKit.
36
+ - **[Two-way audio support](https://github.com/hjdhjd/homebridge-unifi-protect/blob/main/docs/Doorbell.md#doorbell-twoway) for all UniFi Protect cameras that support it**. Some Protect devices that support two-way audio capabilities include [UniFi Protect Doorbells](https://store.ui.com/us/en?category=cameras-doorbells), the [UniFi Protect AI Pro Cameras](https://store.ui.com/us/en/pro/category/cameras-bullet/products/uvc-ai-pro), and more. If the Protect device supports two-way audio, that functionality is available to you in HomeKit.
37
37
 
38
38
  - **Support for multiple controllers.** This plugin can support multiple UniFi Protect controllers. If you have more than one controller, it's easy to add them to this plugin, and integrate them seamlessly into HomeKit.
39
39
 
@@ -49,6 +49,8 @@ For the more technically inclined - this plugin has continued to pioneer the Hom
49
49
 
50
50
  - **MQTT support.** [MQTT](https://mqtt.org) support is available for those that want to [make UniFi Protect accessible to an MQTT broker](https://github.com/hjdhjd/homebridge-unifi-protect/blob/main/docs/MQTT.md).
51
51
 
52
+ - **And more...**
53
+
52
54
  ### What's Not In This Plugin Yet
53
55
  Acoustic Echo Cancellation (AEC) support for two-way audio in UniFi Protect. We're most of the way there with two-way audio support, and hopefully AEC support can be reverse-engineered in the future.
54
56
 
@@ -57,67 +59,51 @@ I hope to continue to work on this one to get AEC working for two-way audio. [Yo
57
59
  ## Documentation
58
60
  * Getting Started
59
61
  * [Installation](#installation): installing this plugin, including system requirements.
60
- * [Plugin Configuration](#plugin-configuration): how to quickly get up and running.
62
+ * [Plugin Configuration](#getting-started): how to quickly get up and running.
61
63
  * [Best Practices](https://github.com/hjdhjd/homebridge-unifi-protect/blob/main/docs/BestPractices.md): best practices for getting the most of your HomeKit setup and UniFi Protect.
62
64
  * [Troubleshooting](https://github.com/hjdhjd/homebridge-unifi-protect/blob/main/docs/Troubleshooting.md): running into login problems or streaming issues? Give this a read before looking anywhere else.
63
- * Advanced Topics
64
- * [Autoconfiguration](https://github.com/hjdhjd/homebridge-unifi-protect/blob/main/docs/Autoconfiguration.md): how Protect controller autoconfiguration, transcoding and transmuxing work in HBUP, and why.
65
+ * [Changelog](https://github.com/hjdhjd/homebridge-unifi-protect/blob/main/docs/Changelog.md): changes and release history of this plugin, starting with v3.0.
66
+
67
+ * Additional Topics
65
68
  * [Feature Options](https://github.com/hjdhjd/homebridge-unifi-protect/blob/main/docs/FeatureOptions.md): granular options to allow you to set the camera quality individually, show or hide specific cameras, controllers, and more.
69
+ * [Autoconfiguration](https://github.com/hjdhjd/homebridge-unifi-protect/blob/main/docs/Autoconfiguration.md): how Protect controller autoconfiguration, transcoding and transmuxing work in HBUP, and why.
66
70
  * [Audio Options](https://github.com/hjdhjd/homebridge-unifi-protect/blob/main/docs/AudioOptions.md): options to further tailor how audio is handled from Protect, such as background noise reduction.
67
71
  * [Doorbells](https://github.com/hjdhjd/homebridge-unifi-protect/blob/main/docs/Doorbell.md): how UniFi Protect doorbell support works in this plugin, and how to use all the available features including doorbell messages.
68
72
  * [HomeKit Secure Video](https://github.com/hjdhjd/homebridge-unifi-protect/blob/main/docs/HomeKitSecureVideo.md): how HomeKit Secure Video support works in this plugin with UniFi Protect.
69
73
  * [Liveview Scenes](https://github.com/hjdhjd/homebridge-unifi-protect/blob/main/docs/Liveviews.md): use the UniFi Protect liveviews feature (available in the UniFi Protect controller webUI) to create motion-detection scenes.
70
74
  * [MQTT](https://github.com/hjdhjd/homebridge-unifi-protect/blob/main/docs/MQTT.md): how to configure MQTT support.
71
- * [Advanced Configuration](https://github.com/hjdhjd/homebridge-unifi-protect/blob/main/docs/AdvancedOptions.md): complete list of configuration options available in this plugin.
72
- * [realtime API Documentation](https://github.com/hjdhjd/homebridge-unifi-protect/blob/main/docs/ProtectAPI.md): documentation of how the Ubiquiti realtime updates API works and how to decode the binary protocol.
73
- * [Changelog](https://github.com/hjdhjd/homebridge-unifi-protect/blob/main/docs/Changelog.md): changes and release history of this plugin, starting with v3.0.
75
+ * [Plugin Configuration Reference](https://github.com/hjdhjd/homebridge-unifi-protect/blob/main/docs/ConfigurationReference.md): complete list of configuration options available in this plugin.
74
76
 
75
77
  ## Installation
76
- If you are new to Homebridge, please first read the [Homebridge](https://homebridge.io) [documentation](https://github.com/homebridge/homebridge/wiki) and installation instructions before proceeding.
77
-
78
- If you have installed the [Homebridge Config UI](https://github.com/homebridge/homebridge-config-ui-x), you can intall this plugin by going to the `Plugins` tab and searching for `homebridge-unifi-protect` and installing it.
78
+ ### Prerequisites:
79
79
 
80
- **Important:** you will need a working **ffmpeg** installation for `homebridge-unifi-protect` to work correctly. To make installation more convenient, this plugin uses [ffmpeg-for-homebridge](https://www.npmjs.com/package/ffmpeg-for-homebridge) which provides prebuilt versions of ffmpeg for some of the more popular platforms. [Click here](https://github.com/homebridge/ffmpeg-for-homebridge#supported-platforms) for a list of platforms supported by `ffmpeg-for-homebridge`. If you don't find your platform listed, you'll need to install a working version of ffmpeg for yourself, if you want video streaming to work. **Setting up and configuring ffmpeg is beyond the scope of this documentation.**
80
+ * Ensure you are using a machine that can handle the CPU and GPU requirements of `homebridge-unifi-protect`. The more cameras you have, the higher the performance requirements. If you intend to use HomeKit Secure Video, in particular, you will need a capable, modern CPU. Raspberry Pi 4 is a great piece of hardware, but it cannot keep up with the demands of more than a few Protect cameras, and definitely not the higher end members of the Protect camera ecosystem.
81
+ * If you are new to Homebridge, please first read the [Homebridge](https://homebridge.io) [documentation](https://github.com/homebridge/homebridge/wiki) and installation instructions before proceeding. Ensure you've installed Homebridge and the [Homebridge Config UI](https://github.com/homebridge/homebridge-config-ui-x) before proceeding.
82
+ * Ensure you have a ***local user*** account on your UniFi console dedicated to `homebridge-unifi-protect`. To create a local user account on your UniFi console:
83
+ * Go to the ***OS Settings*** tab on the Protect controller web interface. This is typicaly near the top left of the Protect controller UI page.
84
+ * Click ***Add Admin*** located near the top right of the ***OS Settings*** page.
85
+ * Click ***Restrict to local access only*** and then enter in a username and password for the new local user.
86
+ * Optionally customize the role of the user to adjust the roles. HBUP requires the ***Full Management*** role for all of it's capabilities to work, although it will work in a more limited form without administrative privileges.
81
87
 
82
- ### Audio
83
- Audio on cameras is tricky in the HomeKit world to begin with, and when you throw in some of the specifics of how UniFi Protect works, it gets even more interesting. Some things to keep in mind if you want to use audio with UniFi Protect:
88
+ ### Getting Started
89
+ To install `homebridge-unifi-protect`:
84
90
 
85
- * This plugin provides audio on UniFi cameras and doorbells. This includes two-way audio on the [G4 Doorbell](https://store.ui.com/collections/unifi-protect/products/uvc-g4-doorbell), [G3 Micro](https://store.ui.com/collections/unifi-protect/products/unifi-video-g3-micro), and other UniFi Protect devices that support two-way audio.
91
+ 1. Go to the `Plugins` tab in the Homebridge Config UI and searching for `homebridge-unifi-protect` and install it.
92
+ 2. Click on the ***Set Up*** icon located in the top right corner of the Homebridge UniFi Protect tile and then enter the hostname or IP address of the Protect controller as well as the username and password you created in the steps above and then login to the Protect controller.
93
+ 3. For the moment, don't make any other configuration changes and click ***Save*** and then click ***Restart Homebridge***.
94
+ 4. After restarting Homebridge, click on the ***Set Up Child Bridge*** icon located in the top right corner of the Homebridge UniFi Protect tile. Toggle the child bridge setting for UniFi Protect to ***on*** and then save and restart Homebridge.
95
+ 5. After restarting Homebridge, click on the ***Connect to HomeKit*** icon located in the top right corner of the Homebridge UniFi Protect tile. Use the Home app on your iPhone and scan the QR code to connect UniFi Protect to HomeKit. The Home app may ask questions about where to locate your cameras and whether you want to enable HomeKit Secure Video. Answer according to your preferences.
96
+ 6. That's it! You should now be able to access all your UniFi Protect devices in HomeKit. You can further tailor your experience by going to the Homebridge UniFi Protect webUI and exploring the various features and options that are available to you.
86
97
 
87
- * There is one notable caveat, currently, with two-way audio: the lack of acoustic echo cancellation, or AEC. [Read more on about two-way audio here](https://github.com/hjdhjd/homebridge-unifi-protect/blob/main/docs/Doorbell.md#doorbell-twoway).
98
+ ### Technical Considerations
88
99
 
89
- * **Audio support will not work unless you have a version of FFmpeg that supports fdk-aac.** Unfortunately, most default installations of FFmpeg are not compiled with support for fdk-aac. You'll need to compile or acquire a version of FFmpeg that does. Doing so is beyond the scope of this documentation. There are plenty of guides to this - Google is your friend. This plugin uses [ffmpeg-for-homebridge](https://www.npmjs.com/package/ffmpeg-for-homebridge) which eases the pain somewhat by providing prebuilt static binaries of FFmpeg for certain platforms, and save you the trouble of having to compile a version of FFmpeg yourself.
100
+ HBUP includes everything required to get up and running on many of the [more popular platforms and operating systems](https://github.com/homebridge/ffmpeg-for-homebridge#supported-platforms). **If you're running on an unsupported platform, you will need to install a working version of *FFmpeg* for `homebridge-unifi-protect` to work correctly with your cameras. Additionally, your FFmpeg will need to support the *fdk-aac* codec if you want audio support to work. Setting up and configuring FFmpeg is beyond the scope of this documentation.**
90
101
 
91
102
  ### Things To Be Aware Of
92
- - **Make sure you are running on the latest production / stable firmwares for both your controller platform (UCKgen2+, UDM-Pro, UNVR, etc.) as well as the latest production / stable UniFi Protect controller firmware.**
93
- - **No beta versions of iOS, iPadOS, macOS, tvOS, or watchOS are supported. You are on your own if you choose to install / run beta firmwares - don't expect support or sympathy if you run into issues.**
94
- - **No beta or early access versions of device controller firmware (UCKgen2+, UDM-Pro, UNVR, etc.) are supported by this plugin. You are on your own if you choose to install / run beta firmwares - don't expect support or sympathy if you run into issues.**
95
- - **No beta or early access versions of UniFi Protect firmware are supported by this plugin. You are on your own if you choose to install / run beta firmwares - don't expect support or sympathy if you run into issues.**
96
- - **No beta or early access versions of UniFi Protect hardware are supported by this plugin. You are on your own if you choose to use non-production/GA hardware - don't expect support or sympathy if you run into issues.**
97
- - **My philosophy is to aggressively adopt the capability and features (that make sense in a HomeKit context) in the latest production / stable Ubiquiti firmware releases and to deprecate old functionality that's been superceded by newer, richer, or more performant capabilities - either by HomeKit or Ubiquiti. Read the [Changelog](https://github.com/hjdhjd/homebridge-unifi-protect/blob/main/docs/Changelog.md) carefully for the latest information on what's new.**
98
- - ***For extra clarity and to reiterate the above - before you install this plugin, make sure you are on the latest production / stable controller platform firmware and the latest production / stable UniFi Protect firmware.***
99
-
100
- ## Plugin Configuration
101
- If you choose to configure this plugin directly instead of using the [Homebridge Configuration webUI](https://github.com/homebridge/homebridge-config-ui-x), you'll need to add the platform to your `config.json` in your home directory inside `.homebridge`.
102
-
103
- ```js
104
- "platforms": [
105
- {
106
- "platform": "UniFi Protect",
107
-
108
- "controllers": [
109
- {
110
- "address": "1.2.3.4",
111
- "username": "some-unifi-protect-user (or create a new one just for homebridge)",
112
- "password": "some-password"
113
- }
114
- ]
115
- }
116
- ]
117
- ```
118
- **For most people, I recommend using [Homebridge Configuration web UI](https://github.com/homebridge/homebridge-config-ui-x) to configure this plugin rather than doing so directly. It's easier to use for most users, especially newer users, and less prone to typos, leading to other problems. This plugin has a custom webUI built on top of the Homebridge webUI framework that should simplify feature configuration, and make them more accessible to users.**
119
-
120
- You can use your Ubiquiti account credentials, though 2FA is not currently supported. That said, **I strongly recommend creating a local user just for Homebridge instead of using this option.**
103
+ - Only official releases of UniFi Protect and UniFi OS firmwares are supported. **No beta, early access, or release candidate versions of any kind are supported**.
104
+ - Only official hardware releases for UniFi Protect are supported. Early access or beta hardware is unsupported.
105
+ - No support is provided for any beta versions of Apple operating systems (iOS, iPadOS, macOS, tvOS, etc.).
106
+ - **My philosophy is to aggressively adopt the capability and features (that make sense in a HomeKit context) in the latest official Ubiquiti firmware releases and to deprecate old functionality that's been superceded by newer, richer, or more performant capabilities - either by HomeKit or Ubiquiti. Read the [Changelog](https://github.com/hjdhjd/homebridge-unifi-protect/blob/main/docs/Changelog.md) carefully for the latest information on what's new.**
121
107
 
122
108
  ## Plugin Development Dashboard
123
109
  This is mostly of interest to the true developer nerds amongst us.
@@ -15,7 +15,7 @@ export class ProtectCameraPackage extends ProtectCamera {
15
15
  if (parentCamera) {
16
16
  this.hints.timeshift = parentCamera.hints.timeshift;
17
17
  this.hints.hardwareDecoding = parentCamera.hints.hardwareDecoding;
18
- this.hints.hardwareTranscoding = parentCamera.hints.hardwareTranscoding;
18
+ this.hints.hardwareTranscoding = false;
19
19
  this.hints.logHksv = parentCamera.hints.logHksv;
20
20
  }
21
21
  // Clean out the context object in case it's been polluted somehow.
@@ -1 +1 @@
1
- {"version":3,"file":"protect-camera-package.js","sourceRoot":"","sources":["../../src/devices/protect-camera-package.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,O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AC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS;YAChE,IAAI,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,GAAG,GAAG;YAClG,UAAU,EAAE,CAAE,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,CAAE;YAC1D,GAAG,EAAG,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,GAAG,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,GAAG,GAAG,OAAO,CAAC,SAAS,GAAG,aAAa;SACjI,CAAC;IACJ,CAAC;IAED,kDAAkD;IAC3C,iBAAiB;QAEtB,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;IACzB,CAAC;IAED,yDAAyD;IAClD,UAAU,CAAC,SAAiB;QAEjC,0BAA0B;QAC1B,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,SAAS,CAAC,CAAC;QAEhE,OAAO,OAAO,EAAE,OAAO,IAAI,CAAC,CAAC,CAAC;IAChC,CAAC;IAED,iDAAiD;IAC1C,UAAU;QAEf,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;CACF"}
@@ -13,9 +13,7 @@ export interface RtspEntry {
13
13
  export declare class ProtectCamera extends ProtectDevice {
14
14
  hasHksv: boolean;
15
15
  private isDeleted;
16
- private isDoorbellConfigured;
17
16
  isRinging: boolean;
18
- private isVideoConfigured;
19
17
  detectLicensePlate: string[];
20
18
  private rtspEntries;
21
19
  private rtspQuality;
@@ -42,8 +40,12 @@ export declare class ProtectCamera extends ProtectDevice {
42
40
  getBitrate(channelId: number): number;
43
41
  setBitrate(channelId: number, value: number): Promise<boolean>;
44
42
  private findRtspEntry;
45
- findRtsp(width: number, height: number, rtspEntries?: RtspEntry[], constrainPixels?: number): RtspEntry | null;
46
- findRecordingRtsp(width: number, height: number, rtspEntries?: RtspEntry[]): RtspEntry | null;
43
+ findRtsp(width: number, height: number, options?: {
44
+ biasHigher?: boolean;
45
+ maxPixels?: number;
46
+ rtspEntries?: RtspEntry[];
47
+ }): RtspEntry | null;
48
+ findRecordingRtsp(width: number, height: number): RtspEntry | null;
47
49
  private sortByResolutions;
48
50
  protected getResolution(resolution: Resolution): string;
49
51
  }