homebridge-eufy-security 4.4.2-beta.4 → 4.4.2-beta.41

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 (205) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/FUNDING.yml +1 -0
  3. package/README.md +46 -53
  4. package/dist/accessories/AutoSyncStationAccessory.js +26 -30
  5. package/dist/accessories/AutoSyncStationAccessory.js.map +1 -1
  6. package/dist/accessories/BaseAccessory.js +88 -50
  7. package/dist/accessories/BaseAccessory.js.map +1 -1
  8. package/dist/accessories/CameraAccessory.js +92 -167
  9. package/dist/accessories/CameraAccessory.js.map +1 -1
  10. package/dist/accessories/Device.js +11 -15
  11. package/dist/accessories/Device.js.map +1 -1
  12. package/dist/accessories/EntrySensorAccessory.js +7 -12
  13. package/dist/accessories/EntrySensorAccessory.js.map +1 -1
  14. package/dist/accessories/LockAccessory.js +20 -24
  15. package/dist/accessories/LockAccessory.js.map +1 -1
  16. package/dist/accessories/MotionSensorAccessory.js +7 -12
  17. package/dist/accessories/MotionSensorAccessory.js.map +1 -1
  18. package/dist/accessories/SmartDropAccessory.js +145 -0
  19. package/dist/accessories/SmartDropAccessory.js.map +1 -0
  20. package/dist/accessories/StationAccessory.js +40 -45
  21. package/dist/accessories/StationAccessory.js.map +1 -1
  22. package/dist/config.js +1 -4
  23. package/dist/config.js.map +1 -1
  24. package/dist/controller/LocalLivestreamManager.js +85 -89
  25. package/dist/controller/LocalLivestreamManager.js.map +1 -1
  26. package/dist/controller/recordingDelegate.js +116 -108
  27. package/dist/controller/recordingDelegate.js.map +1 -1
  28. package/dist/controller/snapshotDelegate.js +379 -0
  29. package/dist/controller/snapshotDelegate.js.map +1 -0
  30. package/dist/controller/streamingDelegate.js +202 -207
  31. package/dist/controller/streamingDelegate.js.map +1 -1
  32. package/dist/index.js +9 -7
  33. package/dist/index.js.map +1 -1
  34. package/dist/interfaces.js +1 -2
  35. package/dist/interfaces.js.map +1 -1
  36. package/dist/platform.js +169 -135
  37. package/dist/platform.js.map +1 -1
  38. package/dist/settings.js +26 -17
  39. package/dist/settings.js.map +1 -1
  40. package/dist/utils/Talkback.js +9 -13
  41. package/dist/utils/Talkback.js.map +1 -1
  42. package/dist/utils/configTypes.js +12 -8
  43. package/dist/utils/configTypes.js.map +1 -1
  44. package/dist/utils/ffmpeg.js +374 -395
  45. package/dist/utils/ffmpeg.js.map +1 -1
  46. package/dist/utils/interfaces.js +1 -5
  47. package/dist/utils/interfaces.js.map +1 -1
  48. package/dist/utils/utils.js +32 -134
  49. package/dist/utils/utils.js.map +1 -1
  50. package/dist/version.js +1 -4
  51. package/dist/version.js.map +1 -1
  52. package/eslint.config.mjs +25 -47
  53. package/homebridge-eufy-security.png +0 -0
  54. package/homebridge-ui/public/app.js +225 -0
  55. package/homebridge-ui/public/assets/devices/BATTERY_DOORBELL_C30.png +0 -0
  56. package/homebridge-ui/public/assets/devices/BATTERY_DOORBELL_C31.png +0 -0
  57. package/homebridge-ui/public/assets/devices/batterydoorbell_e340_large.png +0 -0
  58. package/homebridge-ui/public/assets/devices/eufycam3pro_large.png +0 -0
  59. package/homebridge-ui/public/assets/devices/homebase3_large.png +0 -0
  60. package/homebridge-ui/public/assets/devices/homebasemini_large.jpg +0 -0
  61. package/homebridge-ui/public/assets/devices/indoorcamC210_large.png +0 -0
  62. package/homebridge-ui/public/assets/devices/indoorcamC220_large.png +0 -0
  63. package/homebridge-ui/public/assets/devices/indoorcamE30_large.png +0 -0
  64. package/homebridge-ui/public/assets/devices/smartdrop_t8790_large.png +0 -0
  65. package/homebridge-ui/public/assets/devices/smartlock_t8500_large.png +0 -0
  66. package/homebridge-ui/public/assets/devices/smartlock_t8503_large.png +0 -0
  67. package/homebridge-ui/public/assets/devices/smartlock_t8510P_t8520P_large.png +0 -0
  68. package/homebridge-ui/public/assets/devices/smartlock_touch_and_wifi_t8502_large.png +0 -0
  69. package/homebridge-ui/public/assets/devices/smartlock_touch_and_wifi_t8506_large.png +0 -0
  70. package/homebridge-ui/public/assets/devices/smartlock_touch_and_wifi_t8520_large.png +0 -0
  71. package/homebridge-ui/public/assets/devices/smartlock_touch_t8510_large.png +0 -0
  72. package/homebridge-ui/public/assets/devices/smartlock_video_t8530_large.png +0 -0
  73. package/homebridge-ui/public/assets/devices/smartsafe_s10_t7400_large.png +0 -0
  74. package/homebridge-ui/public/assets/devices/smartsafe_s12_t7401_large.png +0 -0
  75. package/homebridge-ui/public/assets/devices/smarttrack_card_t87B2_large.png +0 -0
  76. package/homebridge-ui/public/assets/devices/smarttrack_link_t87B0_large.png +0 -0
  77. package/homebridge-ui/public/assets/devices/solocamc35_large.png +0 -0
  78. package/homebridge-ui/public/assets/devices/solocame30_large.png +0 -0
  79. package/homebridge-ui/public/assets/devices/wireddoorbell2k_large.png +0 -0
  80. package/homebridge-ui/public/assets/icons/attach.svg +1 -0
  81. package/homebridge-ui/public/assets/icons/battery_0.svg +1 -0
  82. package/homebridge-ui/public/assets/icons/battery_1.svg +1 -0
  83. package/homebridge-ui/public/assets/icons/battery_2.svg +1 -0
  84. package/homebridge-ui/public/assets/icons/battery_3.svg +1 -0
  85. package/homebridge-ui/public/assets/icons/battery_4.svg +1 -0
  86. package/homebridge-ui/public/assets/icons/battery_5.svg +1 -0
  87. package/homebridge-ui/public/assets/icons/battery_6.svg +1 -0
  88. package/homebridge-ui/public/assets/icons/bolt.svg +1 -0
  89. package/homebridge-ui/public/assets/icons/bug-report.svg +1 -0
  90. package/homebridge-ui/public/assets/icons/copy.svg +1 -0
  91. package/homebridge-ui/public/assets/icons/delete.svg +1 -0
  92. package/homebridge-ui/public/assets/icons/download.svg +1 -0
  93. package/homebridge-ui/public/assets/icons/info.svg +1 -0
  94. package/homebridge-ui/public/assets/icons/inventory.svg +1 -0
  95. package/homebridge-ui/public/assets/icons/refresh.svg +1 -0
  96. package/homebridge-ui/public/assets/icons/satellite_alt.svg +1 -0
  97. package/homebridge-ui/public/assets/icons/settings.svg +1 -0
  98. package/homebridge-ui/public/assets/icons/settings_backup_restore.svg +1 -0
  99. package/homebridge-ui/public/assets/icons/solar_power.svg +1 -0
  100. package/homebridge-ui/public/assets/icons/warning.svg +1 -0
  101. package/homebridge-ui/public/components/device-card.js +156 -0
  102. package/homebridge-ui/public/components/guard-modes.js +88 -0
  103. package/homebridge-ui/public/components/number-input.js +121 -0
  104. package/homebridge-ui/public/components/select.js +73 -0
  105. package/homebridge-ui/public/components/toggle.js +68 -0
  106. package/homebridge-ui/public/index.html +25 -14
  107. package/homebridge-ui/public/services/api.js +198 -0
  108. package/homebridge-ui/public/services/config.js +144 -0
  109. package/homebridge-ui/public/style.css +779 -0
  110. package/homebridge-ui/public/utils/countries.js +73 -0
  111. package/homebridge-ui/public/utils/device-images.js +89 -0
  112. package/homebridge-ui/public/utils/helpers.js +87 -0
  113. package/homebridge-ui/public/views/dashboard.js +219 -0
  114. package/homebridge-ui/public/views/device-detail.js +631 -0
  115. package/homebridge-ui/public/views/diagnostics.js +266 -0
  116. package/homebridge-ui/public/views/login.js +634 -0
  117. package/homebridge-ui/public/views/settings.js +192 -0
  118. package/homebridge-ui/public/views/unsupported-detail.js +282 -0
  119. package/homebridge-ui/server.js +897 -497
  120. package/package.json +19 -59
  121. package/.gitmodules +0 -0
  122. package/dist/accessories/AutoSyncStationAccessory.d.ts +0 -42
  123. package/dist/accessories/AutoSyncStationAccessory.d.ts.map +0 -1
  124. package/dist/accessories/BaseAccessory.d.ts +0 -56
  125. package/dist/accessories/BaseAccessory.d.ts.map +0 -1
  126. package/dist/accessories/CameraAccessory.d.ts +0 -84
  127. package/dist/accessories/CameraAccessory.d.ts.map +0 -1
  128. package/dist/accessories/Device.d.ts +0 -19
  129. package/dist/accessories/Device.d.ts.map +0 -1
  130. package/dist/accessories/EntrySensorAccessory.d.ts +0 -25
  131. package/dist/accessories/EntrySensorAccessory.d.ts.map +0 -1
  132. package/dist/accessories/LockAccessory.d.ts +0 -45
  133. package/dist/accessories/LockAccessory.d.ts.map +0 -1
  134. package/dist/accessories/MotionSensorAccessory.d.ts +0 -25
  135. package/dist/accessories/MotionSensorAccessory.d.ts.map +0 -1
  136. package/dist/accessories/StationAccessory.d.ts +0 -86
  137. package/dist/accessories/StationAccessory.d.ts.map +0 -1
  138. package/dist/config.d.ts +0 -31
  139. package/dist/config.d.ts.map +0 -1
  140. package/dist/controller/LocalLivestreamManager.d.ts +0 -31
  141. package/dist/controller/LocalLivestreamManager.d.ts.map +0 -1
  142. package/dist/controller/SnapshotManager.d.ts +0 -64
  143. package/dist/controller/SnapshotManager.d.ts.map +0 -1
  144. package/dist/controller/SnapshotManager.js +0 -434
  145. package/dist/controller/SnapshotManager.js.map +0 -1
  146. package/dist/controller/recordingDelegate.d.ts +0 -27
  147. package/dist/controller/recordingDelegate.d.ts.map +0 -1
  148. package/dist/controller/streamingDelegate.d.ts +0 -52
  149. package/dist/controller/streamingDelegate.d.ts.map +0 -1
  150. package/dist/index.d.ts +0 -7
  151. package/dist/index.d.ts.map +0 -1
  152. package/dist/interfaces.d.ts +0 -15
  153. package/dist/interfaces.d.ts.map +0 -1
  154. package/dist/platform.d.ts +0 -82
  155. package/dist/platform.d.ts.map +0 -1
  156. package/dist/settings.d.ts +0 -21
  157. package/dist/settings.d.ts.map +0 -1
  158. package/dist/utils/Talkback.d.ts +0 -21
  159. package/dist/utils/Talkback.d.ts.map +0 -1
  160. package/dist/utils/configTypes.d.ts +0 -68
  161. package/dist/utils/configTypes.d.ts.map +0 -1
  162. package/dist/utils/ffmpeg.d.ts +0 -111
  163. package/dist/utils/ffmpeg.d.ts.map +0 -1
  164. package/dist/utils/interfaces.d.ts +0 -8
  165. package/dist/utils/interfaces.d.ts.map +0 -1
  166. package/dist/utils/utils.d.ts +0 -35
  167. package/dist/utils/utils.d.ts.map +0 -1
  168. package/dist/version.d.ts +0 -2
  169. package/dist/version.d.ts.map +0 -1
  170. package/homebridge-ui/configui/app/util/types.d.ts +0 -66
  171. package/homebridge-ui/configui/app/util/types.d.ts.map +0 -1
  172. package/homebridge-ui/configui/app/util/types.js +0 -18
  173. package/homebridge-ui/configui/app/util/types.js.map +0 -1
  174. package/homebridge-ui/public/3rdpartylicenses.txt +0 -561
  175. package/homebridge-ui/public/assets/devices/batterydoorbell2k_large.png +0 -0
  176. package/homebridge-ui/public/assets/devices/batterydoorbell_e340_large.jpg +0 -0
  177. package/homebridge-ui/public/assets/devices/homebase2_large.jpg +0 -0
  178. package/homebridge-ui/public/assets/devices/homebase3_large.jpg +0 -0
  179. package/homebridge-ui/public/assets/devices/smartdrop_t8790_large.jpg +0 -0
  180. package/homebridge-ui/public/assets/devices/smartlock_t8500_large.jpg +0 -0
  181. package/homebridge-ui/public/assets/devices/smartlock_t8503_large.jpg +0 -0
  182. package/homebridge-ui/public/assets/devices/smartlock_t8510P_t8520P_large.jpg +0 -0
  183. package/homebridge-ui/public/assets/devices/smartlock_touch_and_wifi_t8502_large.jpg +0 -0
  184. package/homebridge-ui/public/assets/devices/smartlock_touch_and_wifi_t8506_large.jpg +0 -0
  185. package/homebridge-ui/public/assets/devices/smartlock_touch_and_wifi_t8520_large.jpg +0 -0
  186. package/homebridge-ui/public/assets/devices/smartlock_touch_t8510_large.jpg +0 -0
  187. package/homebridge-ui/public/assets/devices/smartlock_video_t8530_large.jpg +0 -0
  188. package/homebridge-ui/public/assets/devices/smartsafe_s10_t7400_large.jpg +0 -0
  189. package/homebridge-ui/public/assets/devices/smartsafe_s12_t7401_large.jpg +0 -0
  190. package/homebridge-ui/public/assets/devices/smarttrack_card_t87B2_large.jpg +0 -0
  191. package/homebridge-ui/public/assets/devices/smarttrack_link_t87B0_large.jpg +0 -0
  192. package/homebridge-ui/public/assets/devices/wireddoorbell2k_large.jpg +0 -0
  193. package/homebridge-ui/public/assets/images/homebridge-eufy-security.png +0 -0
  194. package/homebridge-ui/public/favicon.ico +0 -0
  195. package/homebridge-ui/public/main.13895ebc61bdaf90.js +0 -1
  196. package/homebridge-ui/public/polyfills.efa2f09ba3e49167.js +0 -1
  197. package/homebridge-ui/public/runtime.ccde331d62c423b3.js +0 -1
  198. package/homebridge-ui/public/styles.13e635bf7a488639.css +0 -5
  199. package/homebridge-ui/server.d.ts +0 -2
  200. package/homebridge-ui/server.d.ts.map +0 -1
  201. package/homebridge-ui/server.js.map +0 -1
  202. package/homebridge-ui/version.d.ts +0 -2
  203. package/homebridge-ui/version.d.ts.map +0 -1
  204. package/homebridge-ui/version.js +0 -5
  205. package/homebridge-ui/version.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # Change Log
2
2
 
3
- You can find the complete detailled changelog for every release [here](https://github.com/homebridge-eufy-security/plugin/releases).
3
+ You can find the complete detailled changelog for every release [here](https://github.com/homebridge-plugins/homebridge-eufy-security/releases).
4
4
 
5
5
  Before transitioning to a major version, it's strongly advised to back up your configuration and begin anew. Major updates have the potential to disrupt automation setups and bridge/unbridge accessory functionalities.
package/FUNDING.yml ADDED
@@ -0,0 +1 @@
1
+ github: [lenoxys]
package/README.md CHANGED
@@ -1,74 +1,67 @@
1
1
  <p align="center">
2
- <a href="https://github.com/homebridge-eufy-security/plugin"><img src="https://raw.githubusercontent.com/wiki/homebridge-eufy-security/plugin/img/homebridge-eufy-security.png" width="456px"></a>
2
+ <a href="https://github.com/homebridge-plugins/homebridge-eufy-security"><img src="https://raw.githubusercontent.com/wiki/homebridge-eufy-security/plugin/img/homebridge-eufy-security.png" width="456px"></a>
3
3
  </p>
4
- <span align="center">
5
4
 
6
- # homebridge-eufy-security
7
-
8
- Homebridge plugin to control certain Eufy Security devices
9
-
10
- [![npm](https://img.shields.io/npm/v/homebridge-eufy-security?color=green)](https://www.npmjs.com/package/homebridge-eufy-security)
11
- [![verified-by-homebridge](https://badgen.net/badge/homebridge/verified/purple)](https://github.com/homebridge/homebridge/wiki/Verified-Plugins)
12
- [![npm](https://img.shields.io/npm/dt/homebridge-eufy-security)](https://www.npmjs.com/package/homebridge-eufy-security)
13
-
14
- [![npm](https://img.shields.io/npm/v/homebridge-eufy-security/rc?label=rc)](https://github.com/homebridge-eufy-security/plugin/wiki/Special-Version-(BETA---RC---HKSV))
15
- [![npm](https://img.shields.io/npm/v/homebridge-eufy-security/beta?label=beta)](https://github.com/homebridge-eufy-security/plugin/wiki/Special-Version-(BETA---RC---HKSV))
16
- [![npm](https://img.shields.io/npm/v/homebridge-eufy-security/hksv?label=hksv)](https://github.com/homebridge-eufy-security/plugin/wiki/Special-Version-(BETA---RC---HKSV))
17
- [![Discord](https://img.shields.io/discord/432663330281226270?color=728ED5&logo=discord&label=hb-discord)](https://discord.com/channels/432663330281226270/876907345962229791)
18
-
19
- </span>
20
-
21
- ### Plugin Information
5
+ <p align="center">
6
+ <strong>Control your Eufy Security devices from Apple HomeKit</strong>
7
+ </p>
22
8
 
23
- - This plugin allows you to view and control your Eufy Security devices within HomeKit. The plugin:
24
- - requires your Eufy Security credentials **(we highly recommend to use [Family/Guest Account](https://support.eufylife.com/s/article/Share-Your-eufySecurity-Devices-With-Your-Family) dedicated to the plugin)**
25
- - we support Eufy Security OTP validation by email and captcha
9
+ <p align="center">
10
+ <a href="https://www.npmjs.com/package/homebridge-eufy-security"><img src="https://img.shields.io/npm/v/homebridge-eufy-security?color=green&label=stable" alt="stable"></a>
11
+ <a href="https://github.com/homebridge-plugins/homebridge-eufy-security/wiki/Special-Version-(BETA---RC---HKSV)"><img src="https://img.shields.io/npm/v/homebridge-eufy-security/beta?label=beta" alt="beta"></a>
12
+ <a href="https://github.com/homebridge/homebridge/wiki/Verified-Plugins"><img src="https://badgen.net/badge/homebridge/verified/purple" alt="verified"></a>
13
+ <a href="https://www.npmjs.com/package/homebridge-eufy-security"><img src="https://img.shields.io/npm/dt/homebridge-eufy-security" alt="downloads"></a>
14
+ <a href="https://discord.com/channels/432663330281226270/876907345962229791"><img src="https://img.shields.io/discord/432663330281226270?color=728ED5&logo=discord&label=discord" alt="discord"></a>
15
+ </p>
26
16
 
27
- ### Prerequisites
17
+ ---
28
18
 
29
- - To use this plugin, you will need to already have [Homebridge](https://homebridge.io) (at least v1.6.1) installed. Refer to the links for more information and installation instructions.
30
- - For configuration Homebridge UI is recommenend. If you have 2FA enabled it is mandatory.
19
+ ## Features
31
20
 
32
- ### ⚠️ Warning
33
- Starting from Node.js versions `18.19.1`, `20.11.1`, and `21.6.2`, the removal of `RSA_PKCS1_PADDING` support breaks Eufy Security's livestream/P2P functionality. We advise against using Node.js versions beyond **v20.11.0** until compatibility with the plugin has been confirmed. If you encounter any issues, consider reverting to the recommended LTS version within the **v20** branch. See [here](https://github.com/homebridge-eufy-security/plugin/wiki/Node.js-Compatibility-with-Eufy-Security-Plugin) for more information.
21
+ | | |
22
+ |---|---|
23
+ | 🎥 **Live Streaming** | P2P & RTSP livestream in the Home app |
24
+ | 📹 **HomeKit Secure Video** | Record and review clips natively in HomeKit |
25
+ | 🔔 **Doorbell & Sensors** | Ring notifications, motion & entry sensors |
26
+ | 🔐 **Locks & Guard Modes** | Smart lock control, arm/disarm your station |
27
+ | 🏠 **Bridged & Unbridged** | Run cameras as separate accessories for performance |
34
28
 
35
- #### Setup
36
- * [Installation](https://github.com/homebridge-eufy-security/plugin/wiki/Installation-and-Configuration#installation)
37
- * [Configuration](https://github.com/homebridge-eufy-security/plugin/wiki/Installation-and-Configuration#configuration)
38
- * [Bridged and Unbridged Mode](https://github.com/homebridge-eufy-security/plugin/wiki/Bridged-and-Unbridged-Mode-and-Problems)
39
- * [Beta Version](https://github.com/homebridge-eufy-security/plugin/wiki/Special-Version-(BETA---RC---HKSV))
40
- * [Uninstallation](https://github.com/homebridge-eufy-security/plugin/wiki/Uninstallation)
29
+ > **Supported devices** — Cameras, doorbells, floodlights, indoor cams, locks, sensors, stations & more.
30
+ > See the full [Supported Devices](https://github.com/homebridge-plugins/homebridge-eufy-security/wiki/Supported-Devices) list.
41
31
 
42
- #### Features
43
- * [Streaming](https://github.com/homebridge-eufy-security/plugin/wiki/Streaming-Settings)
44
- * [HomeKit Secure Video](https://github.com/homebridge-eufy-security/plugin/wiki/HomeKit-Secure-Video)
32
+ ---
45
33
 
46
- #### Help
47
- * [Basic Troubleshooting](https://github.com/homebridge-eufy-security/plugin/wiki/Basic-Troubleshooting)
48
- * [Common Issues](https://github.com/homebridge-eufy-security/plugin/wiki/Common-Issues)
49
- * [Support Request](https://github.com/homebridge-eufy-security/plugin/issues/new/choose)
50
- * [Changelog](https://github.com/homebridge-eufy-security/plugin/blob/master/CHANGELOG.md)
34
+ ## 🚀 Getting Started
51
35
 
52
- ### Supporting
36
+ | Requirement | |
37
+ |---|---|
38
+ | [Homebridge](https://homebridge.io) | `>=1.9.0` |
39
+ | Node.js | `20`, `22` or `24` |
40
+ | Eufy Account | A [dedicated guest account](https://support.eufylife.com/s/article/Share-Your-eufySecurity-Devices-With-Your-Family) is **mandatory** |
53
41
 
54
- If you appreciate this plugin and want to support the work we do, you can use one of the following links:
42
+ > **💡 Node.js & RSA_PKCS1_PADDING** — Node.js `18.19.1+`, `20.11.1+` and `21.6.2+` removed `RSA_PKCS1_PADDING` which affects P2P livestream on some devices. The plugin includes a built-in **Embedded PKCS1 Support** setting that works around this on Node.js 20 and 22. Node.js `24.5.0+` restores native support. See the [compatibility guide](https://github.com/homebridge-plugins/homebridge-eufy-security/wiki/Node.js-Compatibility-with-Eufy-Security-Plugin) for details.
55
43
 
56
- **Active Contributors**
44
+ ---
57
45
 
58
- - **[lenoxys](https://github.com/sponsors/lenoxys)**
59
- - **[schliemann](https://github.com/schliemann)**
60
- - **[thieren](https://ko-fi.com/thieren)**
46
+ ## 📖 Documentation
61
47
 
62
- **The guy who started it all**
48
+ | Setup | Features | Help |
49
+ |---|---|---|
50
+ | [Installation](https://github.com/homebridge-plugins/homebridge-eufy-security/wiki/Installation-and-Configuration#installation) | [Streaming](https://github.com/homebridge-plugins/homebridge-eufy-security/wiki/Streaming-Settings) | [Troubleshooting](https://github.com/homebridge-plugins/homebridge-eufy-security/wiki/Basic-Troubleshooting) |
51
+ | [Configuration](https://github.com/homebridge-plugins/homebridge-eufy-security/wiki/Installation-and-Configuration#configuration) | [HomeKit Secure Video](https://github.com/homebridge-plugins/homebridge-eufy-security/wiki/HomeKit-Secure-Video) | [Common Issues](https://github.com/homebridge-plugins/homebridge-eufy-security/wiki/Common-Issues) |
52
+ | [Bridged & Unbridged](https://github.com/homebridge-plugins/homebridge-eufy-security/wiki/Bridged-and-Unbridged-Mode-and-Problems) | [Supported Devices](https://github.com/homebridge-plugins/homebridge-eufy-security/wiki/Supported-Devices) | [Report a Bug](https://github.com/homebridge-plugins/homebridge-eufy-security/issues/new/choose) |
53
+ | [Beta Versions](https://github.com/homebridge-plugins/homebridge-eufy-security/wiki/Special-Version-(BETA---RC---HKSV)) | | [Changelog](https://github.com/homebridge-plugins/homebridge-eufy-security/blob/master/CHANGELOG.md) |
63
54
 
64
- - **[samemory](https://ko-fi.com/S6S24XCVJ)**
55
+ ---
65
56
 
57
+ ## 💛 Supporting
66
58
 
67
- **And also**
59
+ | Active Contributors |
60
+ |---|
61
+ | [Lenoxys](https://github.com/sponsors/lenoxys) |
68
62
 
69
- Big thanks to **[bropat](https://github.com/bropat)** who made this possible. You can support him [here](https://ko-fi.com/bropat)
63
+ **Founded by** [samemory](https://ko-fi.com/S6S24XCVJ) · **Powered by** [bropat](https://ko-fi.com/bropat)'s [eufy-security-client](https://github.com/bropat/eufy-security-client)
70
64
 
71
- ### Disclaimer
65
+ ---
72
66
 
73
- - We are in no way affiliated with Eufy Security and this plugin is a personal project that we maintain in our free time.
74
- - Use this plugin entirely at your own risk - please see licence for more information.
67
+ <sub>This project is not affiliated with Anker or Eufy Security. Use entirely at your own risk see [LICENSE](LICENSE) for details.</sub>
@@ -1,15 +1,12 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AutoSyncStationAccessory = void 0;
4
- const eufy_security_client_1 = require("eufy-security-client");
5
- const StationAccessory_1 = require("./StationAccessory");
6
- const utils_1 = require("../utils/utils");
1
+ import { AlarmEvent, GuardMode } from 'eufy-security-client';
2
+ import { StationAccessory } from './StationAccessory.js';
3
+ import { CHAR, SERV, log } from '../utils/utils.js';
7
4
  /**
8
5
  * Platform Auto Accessory
9
6
  * An instance of this class is created for each accessory your platform registers
10
7
  * Each accessory may expose multiple services of different service types.
11
8
  */
12
- class AutoSyncStationAccessory {
9
+ export class AutoSyncStationAccessory {
13
10
  accessory;
14
11
  device;
15
12
  static first = true;
@@ -32,14 +29,14 @@ class AutoSyncStationAccessory {
32
29
  // if it's the first we do create a full station accessory and then store it
33
30
  // if not we need to fire event from Eufy to push to HK and vice versa
34
31
  if (first) {
35
- utils_1.log.debug(`${this.accessory.displayName} Constructed First Station`);
32
+ log.debug(`${this.accessory.displayName} Constructed First Station`);
36
33
  // Create the Station accessory
37
- AutoSyncStationAccessory.first_station = new StationAccessory_1.StationAccessory(platform, accessory, device);
34
+ AutoSyncStationAccessory.first_station = new StationAccessory(platform, accessory, device);
38
35
  this.device.on('guard mode', this.changeModeToAllChilds.bind(this));
39
36
  this.device.on('alarm event', this.fireAlarmToAllChilds.bind(this));
40
37
  }
41
38
  else {
42
- utils_1.log.debug(`${this.accessory.displayName} Constructed Child Station`);
39
+ log.debug(`${this.accessory.displayName} Constructed Child Station`);
43
40
  // Register to Eufy event of all childs
44
41
  this.initChildEventRegister();
45
42
  }
@@ -49,18 +46,18 @@ class AutoSyncStationAccessory {
49
46
  initChildEventRegister() {
50
47
  const first_station = AutoSyncStationAccessory.first_station;
51
48
  this.device.on('current mode', (station, currentMode) => {
52
- utils_1.log.debug(`FWD ${this.name} 'current mode' TO clearTimeout (${currentMode})`);
49
+ log.debug(`FWD ${this.name} 'current mode' TO clearTimeout (${currentMode})`);
53
50
  if (this.guardModeChangeTimeout.timeout) {
54
51
  // If there's an existing timeout, clear it
55
52
  clearTimeout(this.guardModeChangeTimeout.timeout);
56
53
  }
57
54
  });
58
55
  this.device.on('alarm arm delay event', (station, armDelay) => {
59
- utils_1.log.debug(`FWD ${this.name} 'alarm arm delay event' TO ${first_station.name}`);
56
+ log.debug(`FWD ${this.name} 'alarm arm delay event' TO ${first_station.name}`);
60
57
  first_station.onStationAlarmDelayedEvent(station, armDelay);
61
58
  });
62
59
  this.device.on('alarm armed event', () => {
63
- utils_1.log.debug(`FWD ${this.name} 'alarm armed event' TO ${first_station.name}`);
60
+ log.debug(`FWD ${this.name} 'alarm armed event' TO ${first_station.name}`);
64
61
  first_station.onStationAlarmArmedEvent();
65
62
  });
66
63
  this.device.on('alarm event', this.fireAlarmToAllChilds.bind(this));
@@ -69,7 +66,7 @@ class AutoSyncStationAccessory {
69
66
  * Handle requests to set the 'Security System Target State' to all childs
70
67
  */
71
68
  changeModeToAllChilds(station, guardMode) {
72
- utils_1.log.info(`FWD ${this.name} 'guard mode (${eufy_security_client_1.GuardMode[guardMode]})' TO all the childs`);
69
+ log.info(`FWD ${this.name} 'guard mode (${GuardMode[guardMode]})' TO all the childs`);
73
70
  AutoSyncStationAccessory.childs.forEach((child, index) => {
74
71
  if (index === 0) {
75
72
  return;
@@ -86,7 +83,7 @@ class AutoSyncStationAccessory {
86
83
  const first_station = AutoSyncStationAccessory.first_station;
87
84
  const manualAlarmSeconds = first_station.stationConfig.manualAlarmSeconds;
88
85
  // Log the received alarm event
89
- utils_1.log.debug(`RECEIVED ${this.name} 'alarm event' REASON ${eufy_security_client_1.AlarmEvent[alarmEvent]}`);
86
+ log.debug(`RECEIVED ${this.name} 'alarm event' REASON ${AlarmEvent[alarmEvent]}`);
90
87
  // Prevent looping with multiple received events
91
88
  // Reinit after manualAlarmSeconds * 4 / 5
92
89
  if (AutoSyncStationAccessory.alarmFired) {
@@ -94,26 +91,26 @@ class AutoSyncStationAccessory {
94
91
  }
95
92
  else {
96
93
  AutoSyncStationAccessory.alarmFired = true;
97
- utils_1.log.debug(`SET TIMEOUT ${this.name} 'alarm event' REASON ${eufy_security_client_1.AlarmEvent[alarmEvent]} FOR ${manualAlarmSeconds * 4 / 5}sec`);
94
+ log.debug(`SET TIMEOUT ${this.name} 'alarm event' REASON ${AlarmEvent[alarmEvent]} FOR ${manualAlarmSeconds * 4 / 5}sec`);
98
95
  AutoSyncStationAccessory.alarmFiredTimeout.timeout = setTimeout(() => {
99
96
  AutoSyncStationAccessory.alarmFired = false;
100
- utils_1.log.debug(`TIMEOUT ${this.name} 'alarm event' REASON ${eufy_security_client_1.AlarmEvent[alarmEvent]}`);
97
+ log.debug(`TIMEOUT ${this.name} 'alarm event' REASON ${AlarmEvent[alarmEvent]}`);
101
98
  }, manualAlarmSeconds * 4 / 5 * 1000);
102
99
  }
103
100
  // List of alarm events fired to stop alarm
104
101
  const pluginFiredAlarmStopEvents = [
105
- eufy_security_client_1.AlarmEvent.HUB_STOP,
106
- eufy_security_client_1.AlarmEvent.HUB_STOP_BY_APP,
107
- eufy_security_client_1.AlarmEvent.HUB_STOP_BY_HAND,
108
- eufy_security_client_1.AlarmEvent.HUB_STOP_BY_KEYPAD,
109
- eufy_security_client_1.AlarmEvent.DEV_STOP
102
+ AlarmEvent.HUB_STOP,
103
+ AlarmEvent.HUB_STOP_BY_APP,
104
+ AlarmEvent.HUB_STOP_BY_HAND,
105
+ AlarmEvent.HUB_STOP_BY_KEYPAD,
106
+ AlarmEvent.DEV_STOP
110
107
  ];
111
108
  // Check if the alarm event is a plugin-fired alarm stop event
112
109
  if (pluginFiredAlarmStopEvents.includes(alarmEvent)) {
113
110
  return;
114
111
  }
115
- const characteristic = first_station.getService(utils_1.SERV.SecuritySystem)
116
- .getCharacteristic(utils_1.CHAR.SecuritySystemCurrentState);
112
+ const characteristic = first_station.getService(SERV.SecuritySystem)
113
+ .getCharacteristic(CHAR.SecuritySystemCurrentState);
117
114
  first_station.onStationAlarmEventPushNotification(characteristic, alarmEvent);
118
115
  // Iterate over child stations to synchronize the alarm event
119
116
  AutoSyncStationAccessory.childs.forEach(child => {
@@ -122,7 +119,7 @@ class AutoSyncStationAccessory {
122
119
  return; // Already fired by itself so do nothing for him
123
120
  }
124
121
  // Log the forwarded alarm event along with the reason and duration
125
- utils_1.log.debug(`FWD ${this.name} 'alarm event' TO ${child.name} REASON ${eufy_security_client_1.AlarmEvent[alarmEvent]} FOR ${manualAlarmSeconds}sec`);
122
+ log.debug(`FWD ${this.name} 'alarm event' TO ${child.name} REASON ${AlarmEvent[alarmEvent]} FOR ${manualAlarmSeconds}sec`);
126
123
  // Trigger the alarm sound on the child station with the specified duration
127
124
  child.device.triggerStationAlarmSound(manualAlarmSeconds);
128
125
  });
@@ -132,29 +129,28 @@ class AutoSyncStationAccessory {
132
129
  */
133
130
  handleSecuritySystemTargetStateSet(mode) {
134
131
  try {
135
- utils_1.log.debug(`${this.name} SET StationGuardMode Eufy: ${eufy_security_client_1.GuardMode[mode]}(${mode})`);
132
+ log.debug(`${this.name} SET StationGuardMode Eufy: ${GuardMode[mode]}(${mode})`);
136
133
  // Call the device's setGuardMode method to initiate the action
137
134
  this.device.setGuardMode(mode);
138
135
  // Set a new timeout
139
136
  this.guardModeChangeTimeout.timeout = setTimeout(() => {
140
137
  // This code is executed when the timeout elapses, indicating that the action may not have completed yet.
141
138
  // You can include a message indicating that the action is being retried.
142
- utils_1.log.warn(`${this.accessory.displayName} Changing guard mode to ${eufy_security_client_1.GuardMode[mode]} did not complete. Retry...'`);
139
+ log.warn(`${this.accessory.displayName} Changing guard mode to ${GuardMode[mode]} did not complete. Retry...'`);
143
140
  // Call the device's setGuardMode method to initiate the action
144
141
  this.device.setGuardMode(mode);
145
142
  // Set a secondary timeout for retry, if needed
146
143
  const retryTimeout = setTimeout(() => {
147
144
  // This code is executed if the retry also times out, indicating a failure.
148
- utils_1.log.error(`${this.accessory.displayName} Changing guard mode to ${eufy_security_client_1.GuardMode[mode]} timed out!`);
145
+ log.error(`${this.accessory.displayName} Changing guard mode to ${GuardMode[mode]} timed out!`);
149
146
  }, this.guardModeChangeTimeout.delay);
150
147
  // Store the retry timeout as part of guardModeChangeTimeout
151
148
  this.guardModeChangeTimeout.timeout = retryTimeout;
152
149
  }, this.guardModeChangeTimeout.delay);
153
150
  }
154
151
  catch (error) {
155
- utils_1.log.error(`${this.name} Error Setting security mode! ${error}`);
152
+ log.error(`${this.name} Error Setting security mode! ${error}`);
156
153
  }
157
154
  }
158
155
  }
159
- exports.AutoSyncStationAccessory = AutoSyncStationAccessory;
160
156
  //# sourceMappingURL=AutoSyncStationAccessory.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AutoSyncStationAccessory.js","sourceRoot":"","sources":["../../src/plugin/accessories/AutoSyncStationAccessory.ts"],"names":[],"mappings":";;;AAEA,+DAAsE;AACtE,yDAAsD;AACtD,0CAAiD;AAEjD;;;;GAIG;AACH,MAAa,wBAAwB;IAqBzB;IACA;IApBF,MAAM,CAAC,KAAK,GAAY,IAAI,CAAC;IAC7B,MAAM,CAAC,UAAU,GAAY,KAAK,CAAC;IACnC,MAAM,CAAC,MAAM,GAA+B,EAAE,CAAC;IAC/C,MAAM,CAAC,aAAa,GAAqB,EAAsB,CAAC;IAExD,IAAI,CAAS;IAEnB,sBAAsB,GAG5B,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IAEzB,MAAM,CAAC,iBAAiB,GAG9B,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IAEnC,YACE,QAA8B,EACtB,SAA4B,EAC5B,MAAe;QADf,cAAS,GAAT,SAAS,CAAmB;QAC5B,WAAM,GAAN,MAAM,CAAS;QAGvB,sDAAsD;QACtD,IAAI,KAAK,GAAG,KAAK,CAAC;QAClB,IAAI,wBAAwB,CAAC,KAAK,EAAE,CAAC;YACnC,wBAAwB,CAAC,KAAK,GAAG,KAAK,CAAC;YACvC,KAAK,GAAG,IAAI,CAAC;QACf,CAAC;QAED,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QAElC,4EAA4E;QAC5E,sEAAsE;QACtE,IAAI,KAAK,EAAE,CAAC;YACV,WAAG,CAAC,KAAK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,CAAC,SAAS,CAAC,WAAW,2BAA2B,SAAS,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;gBAClG,CAAC,EAAE,IAAI,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAC;gBAEtC,4DAA4D;gBAC5D,IAAI,CAAC,sBAAsB,CAAC,OAAO,GAAG,YAAY,CAAC;YACrD,CAAC,EAAE,IAAI,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAC;QAExC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,GAAG,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,IAAI,iCAAiC,KAAK,EAAE,CAAC,CAAC;QAClE,CAAC;IACH,CAAC"}
@@ -1,9 +1,8 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BaseAccessory = void 0;
4
- const eufy_security_client_1 = require("eufy-security-client");
5
- const events_1 = require("events");
6
- const utils_1 = require("../utils/utils");
1
+ // Servicing and caching strategy inspired
2
+ // by homebridge-ring https://github.com/dgreif/ring
3
+ import { DeviceType } from 'eufy-security-client';
4
+ import { EventEmitter } from 'events';
5
+ import { CHAR, SERV, log } from '../utils/utils.js';
7
6
  /**
8
7
  * Determine if the serviceType is an instance of Service.
9
8
  *
@@ -11,10 +10,9 @@ const utils_1 = require("../utils/utils");
11
10
  * @returns {boolean} Returns true if the serviceType is an instance of Service, otherwise false.
12
11
  */
13
12
  function isServiceInstance(serviceType) {
14
- // eslint-disable-next-line
15
13
  return typeof serviceType === 'object';
16
14
  }
17
- class BaseAccessory extends events_1.EventEmitter {
15
+ export class BaseAccessory extends EventEmitter {
18
16
  platform;
19
17
  accessory;
20
18
  device;
@@ -22,9 +20,13 @@ class BaseAccessory extends events_1.EventEmitter {
22
20
  SN;
23
21
  name;
24
22
  log;
25
- constructor(platform, accessory,
26
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
27
- device) {
23
+ /**
24
+ * Tracks characteristics with getValue for cache-based updates.
25
+ * Values are seeded once at registration and refreshed via
26
+ * the device's 'property changed' event (push-based).
27
+ */
28
+ registeredGetters = [];
29
+ constructor(platform, accessory, device) {
28
30
  super();
29
31
  this.platform = platform;
30
32
  this.accessory = accessory;
@@ -32,55 +34,82 @@ class BaseAccessory extends events_1.EventEmitter {
32
34
  this.device = device;
33
35
  this.SN = this.device.getSerial();
34
36
  this.name = this.device.getName();
35
- this.log = utils_1.log.getSubLogger({
37
+ this.log = log.getSubLogger({
36
38
  name: '',
37
39
  prefix: [this.name],
38
40
  });
39
41
  this.registerCharacteristic({
40
- serviceType: utils_1.SERV.AccessoryInformation,
41
- characteristicType: utils_1.CHAR.Manufacturer,
42
+ serviceType: SERV.AccessoryInformation,
43
+ characteristicType: CHAR.Manufacturer,
42
44
  getValue: () => 'Eufy',
43
45
  });
44
46
  this.registerCharacteristic({
45
- serviceType: utils_1.SERV.AccessoryInformation,
46
- characteristicType: utils_1.CHAR.Name,
47
+ serviceType: SERV.AccessoryInformation,
48
+ characteristicType: CHAR.Name,
47
49
  getValue: () => this.name || 'Unknowm',
48
50
  });
49
51
  this.registerCharacteristic({
50
- serviceType: utils_1.SERV.AccessoryInformation,
51
- characteristicType: utils_1.CHAR.Model,
52
- getValue: () => eufy_security_client_1.DeviceType[this.device.getDeviceType()] || 'Unknowm',
52
+ serviceType: SERV.AccessoryInformation,
53
+ characteristicType: CHAR.Model,
54
+ getValue: () => DeviceType[this.device.getDeviceType()] || 'Unknowm',
53
55
  });
54
56
  this.registerCharacteristic({
55
- serviceType: utils_1.SERV.AccessoryInformation,
56
- characteristicType: utils_1.CHAR.SerialNumber,
57
+ serviceType: SERV.AccessoryInformation,
58
+ characteristicType: CHAR.SerialNumber,
57
59
  getValue: () => this.SN || 'Unknowm',
58
60
  });
59
61
  this.registerCharacteristic({
60
- serviceType: utils_1.SERV.AccessoryInformation,
61
- characteristicType: utils_1.CHAR.FirmwareRevision,
62
+ serviceType: SERV.AccessoryInformation,
63
+ characteristicType: CHAR.FirmwareRevision,
62
64
  getValue: () => this.device.getSoftwareVersion() || 'Unknowm',
63
65
  });
64
66
  this.registerCharacteristic({
65
- serviceType: utils_1.SERV.AccessoryInformation,
66
- characteristicType: utils_1.CHAR.HardwareRevision,
67
+ serviceType: SERV.AccessoryInformation,
68
+ characteristicType: CHAR.HardwareRevision,
67
69
  getValue: () => this.device.getHardwareVersion() || 'Unknowm',
68
70
  });
71
+ // Cameras accumulate many listeners (property changes, events, snapshots, streaming).
72
+ // Raise limit to prevent MaxListenersExceededWarning in Node 22+.
73
+ if (typeof this.device.setMaxListeners === 'function') {
74
+ this.device.setMaxListeners(30);
75
+ }
69
76
  if (this.platform.config.enableDetailedLogging) {
70
77
  this.device.on('raw property changed', this.handleRawPropertyChange.bind(this));
71
78
  this.device.on('property changed', this.handlePropertyChange.bind(this));
72
79
  }
80
+ // Refresh cached characteristic values on any device property change.
81
+ // This keeps all getValue-based characteristics up-to-date via push
82
+ // without requiring HomeKit to poll through onGet.
83
+ this.device.on('property changed', this.refreshCachedValues.bind(this));
73
84
  this.logPropertyKeys();
74
85
  }
75
86
  // Function to extract and log keys
76
87
  logPropertyKeys() {
77
88
  this.log.debug(`Property Keys:`, this.device.getProperties());
78
89
  }
79
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
90
+ /**
91
+ * Re-evaluate every registered getValue and push updates to HomeKit
92
+ * only when the returned value has actually changed.
93
+ * Triggered by the device's 'property changed' event.
94
+ */
95
+ refreshCachedValues() {
96
+ for (const reg of this.registeredGetters) {
97
+ try {
98
+ const newValue = reg.getValue(undefined, reg.characteristic, reg.service);
99
+ if (newValue !== reg.lastValue) {
100
+ reg.lastValue = newValue;
101
+ reg.characteristic.updateValue(newValue);
102
+ this.log.debug(`CACHE '${reg.serviceTypeName} / ${reg.characteristicTypeName}':`, newValue);
103
+ }
104
+ }
105
+ catch {
106
+ // silently ignore errors during cache refresh
107
+ }
108
+ }
109
+ }
80
110
  handleRawPropertyChange(device, type, value) {
81
111
  this.log.debug(`Raw Property Changes:`, type, value);
82
112
  }
83
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
84
113
  handlePropertyChange(device, name, value) {
85
114
  this.log.debug(`Property Changes:`, name, value);
86
115
  }
@@ -98,11 +127,30 @@ class BaseAccessory extends events_1.EventEmitter {
98
127
  const characteristic = service.getCharacteristic(characteristicType);
99
128
  this.log.debug(`REGISTER CHARACTERISTIC (${service.UUID}) / (${characteristic.UUID})`);
100
129
  if (getValue) {
101
- characteristic.onGet(async (data) => {
102
- const value = getValue(data, characteristic, service);
103
- this.log.debug(`GET '${serviceType.name} / ${characteristicType.name}':`, value);
104
- return value;
130
+ // Seed initial value and track for property-change refresh.
131
+ // No onGet handler is registered — HomeKit uses the value set by
132
+ // updateValue(), making polls (every ~10s) zero-cost.
133
+ // Fresh values are pushed via 'property changed', onSimpleValue,
134
+ // onValue, and onMultipleValue events.
135
+ let initialValue;
136
+ try {
137
+ initialValue = getValue(undefined, characteristic, service);
138
+ this.log.debug(`SEED '${serviceType.name} / ${characteristicType.name}':`, initialValue);
139
+ }
140
+ catch (e) {
141
+ this.log.debug(`SEED FAIL '${serviceType.name} / ${characteristicType.name}':`, e);
142
+ }
143
+ this.registeredGetters.push({
144
+ getValue,
145
+ characteristic,
146
+ service,
147
+ serviceTypeName: serviceType.name || 'unknown',
148
+ characteristicTypeName: characteristicType.name || 'unknown',
149
+ lastValue: initialValue,
105
150
  });
151
+ if (initialValue !== undefined && initialValue !== null) {
152
+ characteristic.updateValue(initialValue);
153
+ }
106
154
  }
107
155
  if (setValue && setValueDebounceTime) {
108
156
  let timeoutId = null;
@@ -122,7 +170,6 @@ class BaseAccessory extends events_1.EventEmitter {
122
170
  });
123
171
  }
124
172
  if (onSimpleValue) {
125
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
126
173
  this.device.on(onSimpleValue, (device, value) => {
127
174
  this.log.info(`ON '${serviceType.name} / ${characteristicType.name} / ${onSimpleValue}':`, value);
128
175
  characteristic.updateValue(value);
@@ -135,7 +182,6 @@ class BaseAccessory extends events_1.EventEmitter {
135
182
  if (onMultipleValue) {
136
183
  // Attach the common event handler to each event type
137
184
  onMultipleValue.forEach(eventType => {
138
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
139
185
  this.device.on(eventType, (device, value) => {
140
186
  this.log.info(`ON '${serviceType.name} / ${characteristicType.name} / ${eventType}':`, value);
141
187
  characteristic.updateValue(value);
@@ -170,8 +216,16 @@ class BaseAccessory extends events_1.EventEmitter {
170
216
  return service;
171
217
  }
172
218
  pruneUnusedServices() {
219
+ // Services managed by CameraController must never be pruned.
220
+ // CameraController creates these automatically during configureController()
221
+ // and they are not tracked in servicesInUse.
173
222
  const safeServiceUUIDs = [
174
- utils_1.SERV.CameraRTPStreamManagement.UUID,
223
+ SERV.CameraRTPStreamManagement.UUID, // 00000110
224
+ '0000021A-0000-1000-8000-0026BB765291', // CameraOperatingMode (HKSV)
225
+ '00000204-0000-1000-8000-0026BB765291', // CameraRecordingManagement (HKSV)
226
+ '00000129-0000-1000-8000-0026BB765291', // DataStreamTransportManagement (HKSV)
227
+ SERV.Microphone.UUID, // 00000112 (created by CameraController)
228
+ SERV.Speaker.UUID, // 00000113 (created by CameraController)
175
229
  ];
176
230
  this.accessory.services.forEach((service) => {
177
231
  if (!this.servicesInUse.includes(service) &&
@@ -181,21 +235,5 @@ class BaseAccessory extends events_1.EventEmitter {
181
235
  }
182
236
  });
183
237
  }
184
- handleDummyEventGet(serviceName) {
185
- const characteristicValues = {
186
- 'EventSnapshotsActive': utils_1.CHAR.EventSnapshotsActive.DISABLE,
187
- 'HomeKitCameraActive': utils_1.CHAR.HomeKitCameraActive.OFF,
188
- };
189
- const currentValue = characteristicValues[serviceName];
190
- if (currentValue === undefined) {
191
- throw new Error(`Invalid serviceName: ${serviceName}`);
192
- }
193
- this.log.debug(`IGNORE GET ${serviceName}: ${currentValue}`);
194
- return Promise.resolve(currentValue);
195
- }
196
- handleDummyEventSet(serviceName, value) {
197
- this.log.debug(`IGNORE SET ${serviceName}: ${value}`);
198
- }
199
238
  }
200
- exports.BaseAccessory = BaseAccessory;
201
239
  //# sourceMappingURL=BaseAccessory.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BaseAccessory.js","sourceRoot":"","sources":["../../src/plugin/accessories/BaseAccessory.ts"],"names":[],"mappings":";;;AAQA,+DAA+G;AAC/G,mCAAsC;AACtC,0CAAiD;AAGjD;;;;;GAKG;AACH,SAAS,iBAAiB,CACxB,WAA+C;IAE/C,2BAA2B;IAC3B,OAAO,OAAQ,WAAmB,KAAK,QAAQ,CAAC;AAClD,CAAC;AAKD,MAAsB,aAAc,SAAQ,qBAAY;IAQpC;IACA;IAET;IATC,aAAa,GAAc,EAAE,CAAC;IACxB,EAAE,CAAS;IACX,IAAI,CAAS;IACb,GAAG,CAAkB;IAErC,YACkB,QAA8B,EAC9B,SAA4B;IAC5C,8DAA8D;IACvD,MAAW;QAElB,KAAK,EAAE,CAAC;QALQ,aAAQ,GAAR,QAAQ,CAAsB;QAC9B,cAAS,GAAT,SAAS,CAAmB;QAErC,WAAM,GAAN,MAAM,CAAK;QAIlB,IAAI,CAAC,MAAM,GAAG,MAA0B,CAAC;QAEzC,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;QAClC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QAElC,IAAI,CAAC,GAAG,GAAG,WAAG,CAAC,YAAY,CAAC;YAC1B,IAAI,EAAE,EAAE;YACR,MAAM,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC;SACpB,CAAC,CAAC;QAEH,IAAI,CAAC,sBAAsB,CAAC;YAC1B,WAAW,EAAE,YAAI,CAAC,oBAAoB;YACtC,kBAAkB,EAAE,YAAI,CAAC,YAAY;YACrC,QAAQ,EAAE,GAAG,EAAE,CAAC,MAAM;SACvB,CAAC,CAAC;QACH,IAAI,CAAC,sBAAsB,CAAC;YAC1B,WAAW,EAAE,YAA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