@homebridge-plugins/homebridge-eufy-security 4.7.2 → 5.0.0-beta.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.
- package/AUTHORS +4 -0
- package/CODE_OF_CONDUCT.md +30 -0
- package/CONTRIBUTING.md +77 -0
- package/README.md +152 -49
- package/SECURITY.md +30 -0
- package/config.schema.json +92 -3
- package/dist/account/ownership.js +290 -0
- package/dist/account/ownership.js.map +1 -0
- package/dist/account/persistence.js +274 -0
- package/dist/account/persistence.js.map +1 -0
- package/dist/account/temporary-authentication.js +348 -0
- package/dist/account/temporary-authentication.js.map +1 -0
- package/dist/configuration.js +167 -0
- package/dist/configuration.js.map +1 -0
- package/dist/device/member-evidence.js +66 -0
- package/dist/device/member-evidence.js.map +1 -0
- package/dist/device/member-trust.js +114 -0
- package/dist/device/member-trust.js.map +1 -0
- package/dist/device/snapshot.js +190 -0
- package/dist/device/snapshot.js.map +1 -0
- package/dist/diagnostics.js +2218 -0
- package/dist/diagnostics.js.map +1 -0
- package/dist/homekit/adapter.js +2 -0
- package/dist/homekit/adapter.js.map +1 -0
- package/dist/homekit/adapters/battery.js +208 -0
- package/dist/homekit/adapters/battery.js.map +1 -0
- package/dist/homekit/adapters/camera-controls.js +527 -0
- package/dist/homekit/adapters/camera-controls.js.map +1 -0
- package/dist/homekit/adapters/camera-streaming.js +1515 -0
- package/dist/homekit/adapters/camera-streaming.js.map +1 -0
- package/dist/homekit/adapters/contact.js +138 -0
- package/dist/homekit/adapters/contact.js.map +1 -0
- package/dist/homekit/adapters/doorbell.js +57 -0
- package/dist/homekit/adapters/doorbell.js.map +1 -0
- package/dist/homekit/adapters/information.js +55 -0
- package/dist/homekit/adapters/information.js.map +1 -0
- package/dist/homekit/adapters/lock.js +489 -0
- package/dist/homekit/adapters/lock.js.map +1 -0
- package/dist/homekit/adapters/motion.js +100 -0
- package/dist/homekit/adapters/motion.js.map +1 -0
- package/dist/homekit/adapters/registry.js +26 -0
- package/dist/homekit/adapters/registry.js.map +1 -0
- package/dist/homekit/adapters/security-system.js +425 -0
- package/dist/homekit/adapters/security-system.js.map +1 -0
- package/dist/homekit/adapters/siren.js +136 -0
- package/dist/homekit/adapters/siren.js.map +1 -0
- package/dist/homekit/adapters/smart-light.js +662 -0
- package/dist/homekit/adapters/smart-light.js.map +1 -0
- package/dist/homekit/coverage-matrix.js +119 -0
- package/dist/homekit/coverage-matrix.js.map +1 -0
- package/dist/homekit/device-control.js +175 -0
- package/dist/homekit/device-control.js.map +1 -0
- package/dist/homekit/reconciler.js +319 -0
- package/dist/homekit/reconciler.js.map +1 -0
- package/dist/homekit/representation.js +23 -0
- package/dist/homekit/representation.js.map +1 -0
- package/dist/index.js +4 -9
- package/dist/index.js.map +1 -1
- package/dist/media/contracts.js +2 -0
- package/dist/media/contracts.js.map +1 -0
- package/dist/media/last-successful-image.js +208 -0
- package/dist/media/last-successful-image.js.map +1 -0
- package/dist/media/live-stream.js +1003 -0
- package/dist/media/live-stream.js.map +1 -0
- package/dist/media/recording.js +560 -0
- package/dist/media/recording.js.map +1 -0
- package/dist/media/session-budget.js +39 -0
- package/dist/media/session-budget.js.map +1 -0
- package/dist/media/snapshot.js +406 -0
- package/dist/media/snapshot.js.map +1 -0
- package/dist/media/station-live-sessions.js +101 -0
- package/dist/media/station-live-sessions.js.map +1 -0
- package/dist/platform.js +97 -809
- package/dist/platform.js.map +1 -1
- package/dist/runtime/channel.js +375 -0
- package/dist/runtime/channel.js.map +1 -0
- package/dist/runtime/owner.js +682 -0
- package/dist/runtime/owner.js.map +1 -0
- package/dist/runtime/sdk-client.js +211 -0
- package/dist/runtime/sdk-client.js.map +1 -0
- package/dist/runtime/tracker.js +211 -0
- package/dist/runtime/tracker.js.map +1 -0
- package/dist/settings.js +1 -43
- package/dist/settings.js.map +1 -1
- package/dist/storage.js +59 -0
- package/dist/storage.js.map +1 -0
- package/dist/ui/dashboard.js +181 -0
- package/dist/ui/dashboard.js.map +1 -0
- package/dist/ui/device-image.js +22 -0
- package/dist/ui/device-image.js.map +1 -0
- package/dist/ui/runtime-channel-client.js +305 -0
- package/dist/ui/runtime-channel-client.js.map +1 -0
- package/dist/ui/server.js +259 -0
- package/dist/ui/server.js.map +1 -0
- package/homebridge-ui/public/app.css +1902 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T1250.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2070.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2080.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2081.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2103.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2117.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2118.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2119.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T211A.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2120.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2123.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2128.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2130.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2132.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2150.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2181.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2182.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2190.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2192.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2193.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2194.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2210.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2250.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2251.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2252.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2253.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2254.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2255.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2256.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2257.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2258.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2259.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2261.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2262.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2266.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2267.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2268.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2270.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2272.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2273.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2276.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2277.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2278.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2280.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2292.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2320.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2351.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2352.webp +0 -0
- package/homebridge-ui/public/assets/devices/clean/clean-T2353.webp +0 -0
- package/homebridge-ui/public/assets/devices/life/life-T8L00.webp +0 -0
- package/homebridge-ui/public/assets/devices/life/life-T8L01.webp +0 -0
- package/homebridge-ui/public/assets/devices/life/life-T8L02.webp +0 -0
- package/homebridge-ui/public/assets/devices/life/life-T8L04.webp +0 -0
- package/homebridge-ui/public/assets/devices/life/life-T8L10.webp +0 -0
- package/homebridge-ui/public/assets/devices/life/life-T8L20.webp +0 -0
- package/homebridge-ui/public/assets/devices/life/life-T8L30.webp +0 -0
- package/homebridge-ui/public/assets/devices/life/life-T8L40.webp +0 -0
- package/homebridge-ui/public/assets/devices/mower/mower-T2801.webp +0 -0
- package/homebridge-ui/public/assets/devices/mower/mower-T280B.webp +0 -0
- package/homebridge-ui/public/assets/devices/mower/mower-T2880.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T7400.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T7401.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8001.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8002.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8010.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8021.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8023.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8025.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8030.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8110.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8111.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8112.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8113.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8114.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8122.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8123.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8124.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8130.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8131.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8134.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8140.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8141.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8150.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8151.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8152.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8153.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8160.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8161.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8162.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8170.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8171.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8172.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8173.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8200.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8200X.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8201.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8203.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8210.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8213.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8214.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8222.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8400.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8401.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8410.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8411.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8414.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8416.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8417.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8419.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8419N.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8420.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8420X.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8422.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8423.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8424.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8425.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8441.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8442.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8452.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T84A0.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T84A1.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8500.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8502.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8503.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8504.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8506.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8510.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8510P.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8520.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8520P.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8530.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8531.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T85D0.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T85L0.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T85P0.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T85V0.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8600.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T86P2.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8790.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T87B0.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T87B2.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8900.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8910.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8920.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8960.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8B0.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8E00.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8N00.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T8W11C.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T90F0.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T90M0.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T90R0.webp +0 -0
- package/homebridge-ui/public/assets/devices/security/security-T90S0.webp +0 -0
- package/homebridge-ui/public/assets/icons/inventory.svg +1 -1
- package/homebridge-ui/public/assets/icons/troubleshoot.svg +1 -0
- package/homebridge-ui/public/assets/icons/warning.svg +1 -1
- package/homebridge-ui/public/assets/logo-dark.svg +10 -0
- package/homebridge-ui/public/assets/logo.svg +10 -0
- package/homebridge-ui/public/i18n/en.json +218 -0
- package/homebridge-ui/public/i18n/fr.json +218 -0
- package/homebridge-ui/public/index.html +377 -28
- package/homebridge-ui/public/js/app.js +1065 -0
- package/homebridge-ui/public/js/dashboard.js +385 -0
- package/homebridge-ui/public/js/legacy-settings.js +37 -0
- package/homebridge-ui/public/js/profile-wizard.js +68 -0
- package/homebridge-ui/server.js +2 -1393
- package/i18n/runtime/en.json +100 -0
- package/media/Snapshot-Unavailable.jpg +0 -0
- package/media/Snapshot-black.jpg +0 -0
- package/media/camera-disabled.jpg +0 -0
- package/media/camera-offline.jpg +0 -0
- package/package.json +29 -24
- package/.claude/CLAUDE.md +0 -175
- package/.claude/PRD.md +0 -241
- package/.claude/docs/debug-recording-lessons.md +0 -91
- package/.claude/docs/hksv-recording-fix.md +0 -160
- package/.claude/skills/architect/SKILL.md +0 -76
- package/.claude/skills/developer/SKILL.md +0 -59
- package/.claude/skills/new-device-support/SKILL.md +0 -212
- package/.claude/skills/new-device-support/check-device.mjs +0 -363
- package/.claude/skills/new-device-support/map-properties.mjs +0 -450
- package/.claude/skills/new-device-support/verify-device.mjs +0 -272
- package/.claude/skills/planner/SKILL.md +0 -100
- package/.claude/skills/qa/SKILL.md +0 -79
- package/.claude/skills/support/SKILL.md +0 -175
- package/.prettierignore +0 -7
- package/.prettierrc.json +0 -7
- package/FUNDING.yml +0 -1
- package/dist/accessories/AutoSyncStationAccessory.js +0 -157
- package/dist/accessories/AutoSyncStationAccessory.js.map +0 -1
- package/dist/accessories/BaseAccessory.js +0 -261
- package/dist/accessories/BaseAccessory.js.map +0 -1
- package/dist/accessories/CameraAccessory.js +0 -459
- package/dist/accessories/CameraAccessory.js.map +0 -1
- package/dist/accessories/Device.js +0 -65
- package/dist/accessories/Device.js.map +0 -1
- package/dist/accessories/EntrySensorAccessory.js +0 -48
- package/dist/accessories/EntrySensorAccessory.js.map +0 -1
- package/dist/accessories/GarageDoorAccessory.js +0 -160
- package/dist/accessories/GarageDoorAccessory.js.map +0 -1
- package/dist/accessories/LockAccessory.js +0 -142
- package/dist/accessories/LockAccessory.js.map +0 -1
- package/dist/accessories/MotionSensorAccessory.js +0 -48
- package/dist/accessories/MotionSensorAccessory.js.map +0 -1
- package/dist/accessories/SmartDropAccessory.js +0 -141
- package/dist/accessories/SmartDropAccessory.js.map +0 -1
- package/dist/accessories/StationAccessory.js +0 -373
- package/dist/accessories/StationAccessory.js.map +0 -1
- package/dist/config.js +0 -26
- package/dist/config.js.map +0 -1
- package/dist/controller/DebugRecordingManager.js +0 -402
- package/dist/controller/DebugRecordingManager.js.map +0 -1
- package/dist/controller/LocalLivestreamManager.js +0 -371
- package/dist/controller/LocalLivestreamManager.js.map +0 -1
- package/dist/controller/recordingDelegate.js +0 -252
- package/dist/controller/recordingDelegate.js.map +0 -1
- package/dist/controller/snapshotDelegate.js +0 -348
- package/dist/controller/snapshotDelegate.js.map +0 -1
- package/dist/controller/streamingDelegate.js +0 -389
- package/dist/controller/streamingDelegate.js.map +0 -1
- package/dist/interfaces.js +0 -2
- package/dist/interfaces.js.map +0 -1
- package/dist/media/Snapshot-Unavailable.png +0 -0
- package/dist/media/Snapshot-Unavailable.xcf +0 -0
- package/dist/media/Snapshot-black.png +0 -0
- package/dist/media/camera-disabled.png +0 -0
- package/dist/media/camera-offline.png +0 -0
- package/dist/media/media/Snapshot-Unavailable.png +0 -0
- package/dist/media/media/Snapshot-Unavailable.xcf +0 -0
- package/dist/media/media/Snapshot-black.png +0 -0
- package/dist/media/media/camera-disabled.png +0 -0
- package/dist/media/media/camera-offline.png +0 -0
- package/dist/utils/Talkback.js +0 -162
- package/dist/utils/Talkback.js.map +0 -1
- package/dist/utils/accessoriesStore.js +0 -210
- package/dist/utils/accessoriesStore.js.map +0 -1
- package/dist/utils/configTypes.js +0 -38
- package/dist/utils/configTypes.js.map +0 -1
- package/dist/utils/ffmpeg.js +0 -1111
- package/dist/utils/ffmpeg.js.map +0 -1
- package/dist/utils/interfaces.js +0 -8
- package/dist/utils/interfaces.js.map +0 -1
- package/dist/utils/utils.js +0 -224
- package/dist/utils/utils.js.map +0 -1
- package/dist/version.js +0 -2
- package/dist/version.js.map +0 -1
- package/homebridge-eufy-security.png +0 -0
- package/homebridge-ui/diagnosticsCrypto.js +0 -112
- package/homebridge-ui/public/app.js +0 -237
- package/homebridge-ui/public/assets/devices/4g_lte_cam_s330_large.png +0 -0
- package/homebridge-ui/public/assets/devices/4g_lte_starlight_large.jpg +0 -0
- package/homebridge-ui/public/assets/devices/BATTERY_DOORBELL_C30.png +0 -0
- package/homebridge-ui/public/assets/devices/BATTERY_DOORBELL_C31.png +0 -0
- package/homebridge-ui/public/assets/devices/batterydoorbell1080p_large.jpg +0 -0
- package/homebridge-ui/public/assets/devices/batterydoorbell2k_large.png +0 -0
- package/homebridge-ui/public/assets/devices/batterydoorbell2kdual_large.jpg +0 -0
- package/homebridge-ui/public/assets/devices/batterydoorbell_e340_large.png +0 -0
- package/homebridge-ui/public/assets/devices/eufy-security-client.png +0 -0
- package/homebridge-ui/public/assets/devices/eufyCamS4_large.png +0 -0
- package/homebridge-ui/public/assets/devices/eufycam2_large.png +0 -0
- package/homebridge-ui/public/assets/devices/eufycam2c_large.jpg +0 -0
- package/homebridge-ui/public/assets/devices/eufycam2cpro_large.jpg +0 -0
- package/homebridge-ui/public/assets/devices/eufycam2pro_large.jpg +0 -0
- package/homebridge-ui/public/assets/devices/eufycam3_large.jpg +0 -0
- package/homebridge-ui/public/assets/devices/eufycam3c_large.jpg +0 -0
- package/homebridge-ui/public/assets/devices/eufycam3pro_large.png +0 -0
- package/homebridge-ui/public/assets/devices/eufycam_large.jpg +0 -0
- package/homebridge-ui/public/assets/devices/eufycame330_large.jpg +0 -0
- package/homebridge-ui/public/assets/devices/flood_freeze_sensor_e20_t90F0_large.png +0 -0
- package/homebridge-ui/public/assets/devices/floodlight2_large.jpg +0 -0
- package/homebridge-ui/public/assets/devices/floodlight2pro_large.jpg +0 -0
- package/homebridge-ui/public/assets/devices/floodlight_large.jpg +0 -0
- package/homebridge-ui/public/assets/devices/floodlightcame340_large.jpg +0 -0
- package/homebridge-ui/public/assets/devices/garage_camera_t8452_large.png +0 -0
- package/homebridge-ui/public/assets/devices/homebase2_large.png +0 -0
- package/homebridge-ui/public/assets/devices/homebase3_large.png +0 -0
- package/homebridge-ui/public/assets/devices/homebase_large.jpg +0 -0
- package/homebridge-ui/public/assets/devices/homebasemini_large.png +0 -0
- package/homebridge-ui/public/assets/devices/indoorcamC210_large.png +0 -0
- package/homebridge-ui/public/assets/devices/indoorcamC220_large.png +0 -0
- package/homebridge-ui/public/assets/devices/indoorcamC220_t8419N_large.png +0 -0
- package/homebridge-ui/public/assets/devices/indoorcamE30_large.png +0 -0
- package/homebridge-ui/public/assets/devices/indoorcamc120_large.png +0 -0
- package/homebridge-ui/public/assets/devices/indoorcammini_large.jpg +0 -0
- package/homebridge-ui/public/assets/devices/indoorcamp24_large.png +0 -0
- package/homebridge-ui/public/assets/devices/indoorcams350_large.png +0 -0
- package/homebridge-ui/public/assets/devices/keypad_large.png +0 -0
- package/homebridge-ui/public/assets/devices/minibase_chime_T8023_large.jpg +0 -0
- package/homebridge-ui/public/assets/devices/motionsensor_large.png +0 -0
- package/homebridge-ui/public/assets/devices/nvr_s4_max_T8N00_large.png +0 -0
- package/homebridge-ui/public/assets/devices/pir_sensor_e20_large.png +0 -0
- package/homebridge-ui/public/assets/devices/poe_bullet_ptz_cam_s4_T8E00_large.png +0 -0
- package/homebridge-ui/public/assets/devices/sensor_large.png +0 -0
- package/homebridge-ui/public/assets/devices/siren_sensor_e20_large.png +0 -0
- package/homebridge-ui/public/assets/devices/smartdrop_t8790_large.png +0 -0
- package/homebridge-ui/public/assets/devices/smartlock_t8500_large.png +0 -0
- package/homebridge-ui/public/assets/devices/smartlock_t8500_wifibridge_large.jpg +0 -0
- package/homebridge-ui/public/assets/devices/smartlock_t8503_large.png +0 -0
- package/homebridge-ui/public/assets/devices/smartlock_t8504_large.jpg +0 -0
- package/homebridge-ui/public/assets/devices/smartlock_t8510P_t8520P_large.png +0 -0
- package/homebridge-ui/public/assets/devices/smartlock_t85D0_large.png +0 -0
- package/homebridge-ui/public/assets/devices/smartlock_t85L0_large.png +0 -0
- package/homebridge-ui/public/assets/devices/smartlock_t85P0_large.png +0 -0
- package/homebridge-ui/public/assets/devices/smartlock_t85V0_large.png +0 -0
- package/homebridge-ui/public/assets/devices/smartlock_touch_and_wifi_t8502_large.png +0 -0
- package/homebridge-ui/public/assets/devices/smartlock_touch_and_wifi_t8506_large.png +0 -0
- package/homebridge-ui/public/assets/devices/smartlock_touch_and_wifi_t8520_large.png +0 -0
- package/homebridge-ui/public/assets/devices/smartlock_touch_t8510_large.png +0 -0
- package/homebridge-ui/public/assets/devices/smartlock_touch_t8510_wifibridge_large.jpg +0 -0
- package/homebridge-ui/public/assets/devices/smartlock_video_t8530_large.png +0 -0
- package/homebridge-ui/public/assets/devices/smartlock_video_t8531_large.png +0 -0
- package/homebridge-ui/public/assets/devices/smartlockwifibridge_t8021_large.jpg +0 -0
- package/homebridge-ui/public/assets/devices/smartsafe_s10_t7400_large.png +0 -0
- package/homebridge-ui/public/assets/devices/smartsafe_s12_t7401_large.png +0 -0
- package/homebridge-ui/public/assets/devices/smarttrack_card_t87B2_large.png +0 -0
- package/homebridge-ui/public/assets/devices/smarttrack_link_t87B0_large.png +0 -0
- package/homebridge-ui/public/assets/devices/smoke_alarm_e10_t90S0_large.png +0 -0
- package/homebridge-ui/public/assets/devices/solocamc210_large.jpg +0 -0
- package/homebridge-ui/public/assets/devices/solocamc35_large.png +0 -0
- package/homebridge-ui/public/assets/devices/solocame20_large.jpg +0 -0
- package/homebridge-ui/public/assets/devices/solocame30_large.png +0 -0
- package/homebridge-ui/public/assets/devices/solocame40_large.jpg +0 -0
- package/homebridge-ui/public/assets/devices/solocame42_large.png +0 -0
- package/homebridge-ui/public/assets/devices/solocaml20_large.jpg +0 -0
- package/homebridge-ui/public/assets/devices/solocams220_large.jpg +0 -0
- package/homebridge-ui/public/assets/devices/solocams340_large.png +0 -0
- package/homebridge-ui/public/assets/devices/solocams40_large.jpg +0 -0
- package/homebridge-ui/public/assets/devices/soloindoorcamc24_large.jpg +0 -0
- package/homebridge-ui/public/assets/devices/solooutdoorcamc22_large.png +0 -0
- package/homebridge-ui/public/assets/devices/solooutdoorcamc24_large.jpg +0 -0
- package/homebridge-ui/public/assets/devices/unknown.png +0 -0
- package/homebridge-ui/public/assets/devices/walllight_s100_large.png +0 -0
- package/homebridge-ui/public/assets/devices/walllight_s120_large.png +0 -0
- package/homebridge-ui/public/assets/devices/water_freeze_sensor_t8920_large.png +0 -0
- package/homebridge-ui/public/assets/devices/wireddoorbell1080p_large.jpg +0 -0
- package/homebridge-ui/public/assets/devices/wireddoorbell2k_large.png +0 -0
- package/homebridge-ui/public/assets/devices/wireddoorbelldual_large.jpg +0 -0
- package/homebridge-ui/public/assets/icons/attach.svg +0 -1
- package/homebridge-ui/public/assets/icons/battery_0.svg +0 -1
- package/homebridge-ui/public/assets/icons/battery_1.svg +0 -1
- package/homebridge-ui/public/assets/icons/battery_2.svg +0 -1
- package/homebridge-ui/public/assets/icons/battery_3.svg +0 -1
- package/homebridge-ui/public/assets/icons/battery_4.svg +0 -1
- package/homebridge-ui/public/assets/icons/battery_5.svg +0 -1
- package/homebridge-ui/public/assets/icons/battery_6.svg +0 -1
- package/homebridge-ui/public/assets/icons/copy.svg +0 -1
- package/homebridge-ui/public/assets/icons/delete.svg +0 -1
- package/homebridge-ui/public/assets/icons/download.svg +0 -1
- package/homebridge-ui/public/assets/icons/info.svg +0 -1
- package/homebridge-ui/public/assets/icons/refresh.svg +0 -1
- package/homebridge-ui/public/assets/icons/satellite_alt.svg +0 -1
- package/homebridge-ui/public/assets/icons/solar_power.svg +0 -1
- package/homebridge-ui/public/components/device-card.js +0 -174
- package/homebridge-ui/public/components/guard-modes.js +0 -88
- package/homebridge-ui/public/components/number-input.js +0 -121
- package/homebridge-ui/public/components/select.js +0 -73
- package/homebridge-ui/public/components/toggle.js +0 -68
- package/homebridge-ui/public/services/api.js +0 -250
- package/homebridge-ui/public/services/config.js +0 -144
- package/homebridge-ui/public/style.css +0 -818
- package/homebridge-ui/public/utils/countries.js +0 -73
- package/homebridge-ui/public/utils/device-images.js +0 -102
- package/homebridge-ui/public/utils/helpers.js +0 -115
- package/homebridge-ui/public/views/dashboard.js +0 -226
- package/homebridge-ui/public/views/device-detail.js +0 -654
- package/homebridge-ui/public/views/diagnostics.js +0 -402
- package/homebridge-ui/public/views/login.js +0 -650
- package/homebridge-ui/public/views/recordings.js +0 -319
- package/homebridge-ui/public/views/settings.js +0 -197
- package/homebridge-ui/public/views/unsupported-detail.js +0 -296
- package/media/Snapshot-Unavailable.png +0 -0
- package/media/Snapshot-Unavailable.xcf +0 -0
- package/media/Snapshot-black.png +0 -0
- package/media/camera-disabled.png +0 -0
- package/media/camera-offline.png +0 -0
- package/scripts/decrypt-diagnostics.mjs +0 -257
|
@@ -1,319 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Recordings View — list, download, and manage debug livestream recordings.
|
|
3
|
-
* Users can compare raw (pre-FFmpeg) vs processed (post-FFmpeg) MP4 files
|
|
4
|
-
* to narrow down whether streaming issues originate in the underlying
|
|
5
|
-
* library or in the plugin's FFmpeg pipeline.
|
|
6
|
-
*/
|
|
7
|
-
// eslint-disable-next-line no-unused-vars
|
|
8
|
-
const RecordingsView = {
|
|
9
|
-
|
|
10
|
-
_downloadInProgress: false,
|
|
11
|
-
|
|
12
|
-
async render(container) {
|
|
13
|
-
container.innerHTML = '';
|
|
14
|
-
|
|
15
|
-
// Header
|
|
16
|
-
const header = document.createElement('div');
|
|
17
|
-
header.className = 'eufy-header';
|
|
18
|
-
|
|
19
|
-
const backBtn = document.createElement('button');
|
|
20
|
-
backBtn.className = 'btn btn-link p-0';
|
|
21
|
-
backBtn.innerHTML = '← Back';
|
|
22
|
-
backBtn.style.textDecoration = 'none';
|
|
23
|
-
backBtn.addEventListener('click', () => App.navigate('diagnostics'));
|
|
24
|
-
|
|
25
|
-
const titleEl = document.createElement('h4');
|
|
26
|
-
titleEl.textContent = 'Debug Recordings';
|
|
27
|
-
|
|
28
|
-
header.appendChild(backBtn);
|
|
29
|
-
header.appendChild(titleEl);
|
|
30
|
-
header.appendChild(document.createElement('div'));
|
|
31
|
-
container.appendChild(header);
|
|
32
|
-
|
|
33
|
-
// Info banner
|
|
34
|
-
const info = document.createElement('div');
|
|
35
|
-
info.className = 'alert alert-info';
|
|
36
|
-
info.style.fontSize = '0.85rem';
|
|
37
|
-
info.innerHTML = Helpers.iconHtml('info.svg') + ' <strong>HKSV</strong> = recording triggered by motion (HomeKit Secure Video). <strong>Livestream</strong> = manual stream from Home app. <strong>Processed</strong> = RTSP re-encoded stream.';
|
|
38
|
-
container.appendChild(info);
|
|
39
|
-
|
|
40
|
-
// Toolbar row (Reload + Delete All)
|
|
41
|
-
const toolbar = document.createElement('div');
|
|
42
|
-
toolbar.className = 'd-flex justify-content-between align-items-center mb-3';
|
|
43
|
-
toolbar.id = 'recordings-toolbar';
|
|
44
|
-
|
|
45
|
-
const btnReload = document.createElement('button');
|
|
46
|
-
btnReload.className = 'btn btn-outline-primary btn-sm';
|
|
47
|
-
btnReload.appendChild(Helpers.icon('refresh.svg'));
|
|
48
|
-
btnReload.append(' Reload');
|
|
49
|
-
btnReload.addEventListener('click', () => this._loadRecordings(container));
|
|
50
|
-
|
|
51
|
-
const btnDeleteAll = document.createElement('button');
|
|
52
|
-
btnDeleteAll.className = 'btn btn-outline-danger btn-sm';
|
|
53
|
-
btnDeleteAll.id = 'recordings-delete-all';
|
|
54
|
-
btnDeleteAll.style.display = 'none';
|
|
55
|
-
btnDeleteAll.appendChild(Helpers.icon('delete.svg'));
|
|
56
|
-
btnDeleteAll.append(' Delete All');
|
|
57
|
-
btnDeleteAll.addEventListener('click', () => this._confirmDeleteAll(container));
|
|
58
|
-
|
|
59
|
-
toolbar.appendChild(btnReload);
|
|
60
|
-
toolbar.appendChild(btnDeleteAll);
|
|
61
|
-
container.appendChild(toolbar);
|
|
62
|
-
|
|
63
|
-
// Recordings list container
|
|
64
|
-
const listContainer = document.createElement('div');
|
|
65
|
-
listContainer.id = 'recordings-list';
|
|
66
|
-
container.appendChild(listContainer);
|
|
67
|
-
|
|
68
|
-
// Download progress area
|
|
69
|
-
const progressArea = document.createElement('div');
|
|
70
|
-
progressArea.id = 'recording-download-progress';
|
|
71
|
-
container.appendChild(progressArea);
|
|
72
|
-
|
|
73
|
-
// Load recordings
|
|
74
|
-
await this._loadRecordings(container);
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
async _loadRecordings(container) {
|
|
78
|
-
const listContainer = container.querySelector('#recordings-list');
|
|
79
|
-
const btnDeleteAll = container.querySelector('#recordings-delete-all');
|
|
80
|
-
|
|
81
|
-
try {
|
|
82
|
-
const result = await Api.listDebugRecordings();
|
|
83
|
-
const recordings = result.recordings || [];
|
|
84
|
-
|
|
85
|
-
if (recordings.length === 0) {
|
|
86
|
-
if (btnDeleteAll) btnDeleteAll.style.display = 'none';
|
|
87
|
-
listContainer.innerHTML = `
|
|
88
|
-
<div class="text-muted text-center py-4" style="font-size: 0.9rem;">
|
|
89
|
-
No debug recordings found.<br>
|
|
90
|
-
<small>Enable <strong>Debug Livestream</strong> in Diagnostics, restart the plugin, then open a camera in the Home app.</small>
|
|
91
|
-
</div>
|
|
92
|
-
`;
|
|
93
|
-
return;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
if (btnDeleteAll) btnDeleteAll.style.display = '';
|
|
97
|
-
|
|
98
|
-
// Group by serial, then by session
|
|
99
|
-
const bySerial = {};
|
|
100
|
-
for (const rec of recordings) {
|
|
101
|
-
if (!bySerial[rec.serial]) bySerial[rec.serial] = [];
|
|
102
|
-
bySerial[rec.serial].push(rec);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
listContainer.innerHTML = '';
|
|
106
|
-
|
|
107
|
-
for (const [serial, recs] of Object.entries(bySerial)) {
|
|
108
|
-
const section = document.createElement('div');
|
|
109
|
-
section.className = 'settings-section';
|
|
110
|
-
|
|
111
|
-
const sectionTitle = document.createElement('div');
|
|
112
|
-
sectionTitle.className = 'detail-section__title';
|
|
113
|
-
sectionTitle.textContent = serial;
|
|
114
|
-
section.appendChild(sectionTitle);
|
|
115
|
-
|
|
116
|
-
// Group into sessions: recordings with matching timestamp are paired
|
|
117
|
-
const sessions = this._groupIntoSessions(recs);
|
|
118
|
-
|
|
119
|
-
for (const session of sessions) {
|
|
120
|
-
const firstRec = session[0];
|
|
121
|
-
|
|
122
|
-
const row = document.createElement('div');
|
|
123
|
-
row.className = 'd-flex align-items-center justify-content-between py-2 border-bottom';
|
|
124
|
-
row.style.fontSize = '0.85rem';
|
|
125
|
-
|
|
126
|
-
// Left: date and size info
|
|
127
|
-
const leftCol = document.createElement('div');
|
|
128
|
-
const dateStr = firstRec.createdAtISO
|
|
129
|
-
? new Date(firstRec.createdAtISO).toLocaleString()
|
|
130
|
-
: firstRec.timestamp || 'Unknown';
|
|
131
|
-
const typeLabels = { hksv: 'HKSV', livestream: 'Live', processed: 'Proc', raw: 'Raw' };
|
|
132
|
-
const sizeInfo = session.map(r => {
|
|
133
|
-
const label = typeLabels[r.type] || r.type;
|
|
134
|
-
return label + ':' + r.sizeMB + 'MB';
|
|
135
|
-
}).join(' / ');
|
|
136
|
-
|
|
137
|
-
const dateLine = document.createElement('div');
|
|
138
|
-
dateLine.textContent = dateStr;
|
|
139
|
-
const sizeLine = document.createElement('small');
|
|
140
|
-
sizeLine.className = 'text-muted';
|
|
141
|
-
sizeLine.textContent = sizeInfo;
|
|
142
|
-
leftCol.appendChild(dateLine);
|
|
143
|
-
leftCol.appendChild(sizeLine);
|
|
144
|
-
|
|
145
|
-
// Right: action buttons
|
|
146
|
-
const rightCol = document.createElement('div');
|
|
147
|
-
rightCol.className = 'd-flex align-items-center gap-1';
|
|
148
|
-
|
|
149
|
-
const btnStyles = { hksv: 'btn-outline-warning', livestream: 'btn-outline-success', processed: 'btn-outline-primary', raw: 'btn-outline-success' };
|
|
150
|
-
for (const rec of session) {
|
|
151
|
-
const btn = document.createElement('button');
|
|
152
|
-
btn.className = 'btn ' + (btnStyles[rec.type] || 'btn-outline-secondary') + ' btn-sm';
|
|
153
|
-
btn.title = 'Download ' + (typeLabels[rec.type] || rec.type);
|
|
154
|
-
btn.textContent = typeLabels[rec.type] || rec.type;
|
|
155
|
-
btn.addEventListener('click', () => this._downloadRecording(container, rec.filename, rec.sizeBytes));
|
|
156
|
-
rightCol.appendChild(btn);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
const btnDelete = document.createElement('button');
|
|
160
|
-
btnDelete.className = 'btn btn-outline-danger btn-sm';
|
|
161
|
-
btnDelete.title = 'Delete';
|
|
162
|
-
btnDelete.appendChild(Helpers.icon('delete.svg'));
|
|
163
|
-
btnDelete.addEventListener('click', async () => {
|
|
164
|
-
try {
|
|
165
|
-
for (const rec of session) {
|
|
166
|
-
await Api.deleteDebugRecording(rec.filename);
|
|
167
|
-
}
|
|
168
|
-
homebridge.toast.success('Deleted ' + session.length + ' file(s).');
|
|
169
|
-
await this._loadRecordings(container);
|
|
170
|
-
} catch (e) {
|
|
171
|
-
homebridge.toast.error('Delete failed: ' + (e.message || e));
|
|
172
|
-
}
|
|
173
|
-
});
|
|
174
|
-
rightCol.appendChild(btnDelete);
|
|
175
|
-
|
|
176
|
-
row.appendChild(leftCol);
|
|
177
|
-
row.appendChild(rightCol);
|
|
178
|
-
section.appendChild(row);
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
listContainer.appendChild(section);
|
|
182
|
-
}
|
|
183
|
-
} catch (e) {
|
|
184
|
-
listContainer.innerHTML = '<div class="alert alert-danger">Failed to load recordings: ' + Helpers.escHtml(e.message || String(e)) + '</div>';
|
|
185
|
-
}
|
|
186
|
-
},
|
|
187
|
-
|
|
188
|
-
/**
|
|
189
|
-
* Download a recording file in chunks and trigger browser download.
|
|
190
|
-
* Uses paginated reads to avoid loading the entire file into memory at once.
|
|
191
|
-
*/
|
|
192
|
-
async _downloadRecording(container, filename, totalSize) {
|
|
193
|
-
if (this._downloadInProgress) {
|
|
194
|
-
homebridge.toast.warning('A download is already in progress.');
|
|
195
|
-
return;
|
|
196
|
-
}
|
|
197
|
-
this._downloadInProgress = true;
|
|
198
|
-
|
|
199
|
-
const progressArea = container.querySelector('#recording-download-progress');
|
|
200
|
-
if (progressArea) {
|
|
201
|
-
progressArea.innerHTML = `
|
|
202
|
-
<div class="mt-2">
|
|
203
|
-
<div class="progress">
|
|
204
|
-
<div class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" style="width: 0%" id="rec-progress-bar"></div>
|
|
205
|
-
</div>
|
|
206
|
-
<small class="text-muted" id="rec-progress-status">Downloading...</small>
|
|
207
|
-
</div>
|
|
208
|
-
`;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
try {
|
|
212
|
-
const chunks = [];
|
|
213
|
-
let offset = 0;
|
|
214
|
-
const chunkSize = 256 * 1024; // 256 KB per request
|
|
215
|
-
|
|
216
|
-
while (true) {
|
|
217
|
-
const result = await Api.downloadDebugRecording(filename, offset, chunkSize);
|
|
218
|
-
|
|
219
|
-
if (result.data) {
|
|
220
|
-
const bytes = new Uint8Array(result.data.data || result.data);
|
|
221
|
-
chunks.push(bytes);
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
// Update progress
|
|
225
|
-
const pct = totalSize > 0 ? Math.min(100, Math.round((result.offset / totalSize) * 100)) : 0;
|
|
226
|
-
const bar = document.querySelector('#rec-progress-bar');
|
|
227
|
-
const status = document.querySelector('#rec-progress-status');
|
|
228
|
-
if (bar) bar.style.width = pct + '%';
|
|
229
|
-
if (status) status.textContent = `Downloading... ${pct}%`;
|
|
230
|
-
|
|
231
|
-
if (result.done) break;
|
|
232
|
-
offset = result.offset;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
// Combine chunks and trigger browser download
|
|
236
|
-
const totalLength = chunks.reduce((sum, c) => sum + c.length, 0);
|
|
237
|
-
const combined = new Uint8Array(totalLength);
|
|
238
|
-
let pos = 0;
|
|
239
|
-
for (const chunk of chunks) {
|
|
240
|
-
combined.set(chunk, pos);
|
|
241
|
-
pos += chunk.length;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
let binary = '';
|
|
245
|
-
for (let i = 0; i < combined.length; i++) {
|
|
246
|
-
binary += String.fromCharCode(combined[i]);
|
|
247
|
-
}
|
|
248
|
-
const base64 = btoa(binary);
|
|
249
|
-
const a = document.createElement('a');
|
|
250
|
-
a.href = 'data:application/octet-stream;base64,' + base64;
|
|
251
|
-
a.download = filename;
|
|
252
|
-
document.body.appendChild(a);
|
|
253
|
-
a.click();
|
|
254
|
-
document.body.removeChild(a);
|
|
255
|
-
|
|
256
|
-
homebridge.toast.success('Downloaded: ' + filename);
|
|
257
|
-
} catch (e) {
|
|
258
|
-
homebridge.toast.error('Download failed: ' + (e.message || e));
|
|
259
|
-
} finally {
|
|
260
|
-
this._downloadInProgress = false;
|
|
261
|
-
if (progressArea) progressArea.innerHTML = '';
|
|
262
|
-
}
|
|
263
|
-
},
|
|
264
|
-
|
|
265
|
-
/**
|
|
266
|
-
* Group recordings into sessions by extracting the timestamp portion from
|
|
267
|
-
* the filename. Recordings sharing a timestamp are a raw/processed pair.
|
|
268
|
-
*/
|
|
269
|
-
_groupIntoSessions(recs) {
|
|
270
|
-
const map = {};
|
|
271
|
-
for (const rec of recs) {
|
|
272
|
-
// Filename: <serial>_<timestamp>_<type>.mp4 — extract timestamp as session key
|
|
273
|
-
const match = rec.filename.match(/^[A-Za-z0-9_-]+?_(\d{4}-\d{2}-\d{2}T\d{2}-\d{2}-\d{2}(?:-\d{3}Z)?)(?:_|\.mp4$)/);
|
|
274
|
-
const key = match ? match[1] : rec.filename;
|
|
275
|
-
if (!map[key]) map[key] = [];
|
|
276
|
-
map[key].push(rec);
|
|
277
|
-
}
|
|
278
|
-
// Sort sessions by newest first, within each session: raw before processed
|
|
279
|
-
return Object.values(map)
|
|
280
|
-
.sort((a, b) => (b[0].createdAt || 0) - (a[0].createdAt || 0))
|
|
281
|
-
.map(session => {
|
|
282
|
-
const order = { hksv: 0, livestream: 1, raw: 2, processed: 3 };
|
|
283
|
-
return session.sort((a, b) => (order[a.type] ?? 9) - (order[b.type] ?? 9));
|
|
284
|
-
});
|
|
285
|
-
},
|
|
286
|
-
|
|
287
|
-
_confirmDeleteAll(container) {
|
|
288
|
-
const existing = container.querySelector('#delete-all-confirm');
|
|
289
|
-
if (existing) { existing.remove(); return; }
|
|
290
|
-
|
|
291
|
-
const confirm = document.createElement('div');
|
|
292
|
-
confirm.id = 'delete-all-confirm';
|
|
293
|
-
confirm.className = 'alert alert-danger mt-2';
|
|
294
|
-
confirm.innerHTML = `
|
|
295
|
-
<strong>Delete all recordings?</strong> This cannot be undone.
|
|
296
|
-
<div class="mt-2">
|
|
297
|
-
<button class="btn btn-danger btn-sm me-2" id="btn-confirm-delete-all">Yes, Delete All</button>
|
|
298
|
-
<button class="btn btn-outline-secondary btn-sm" id="btn-cancel-delete-all">Cancel</button>
|
|
299
|
-
</div>
|
|
300
|
-
`;
|
|
301
|
-
|
|
302
|
-
confirm.querySelector('#btn-confirm-delete-all').addEventListener('click', async () => {
|
|
303
|
-
try {
|
|
304
|
-
const result = await Api.deleteAllDebugRecordings();
|
|
305
|
-
homebridge.toast.success('Deleted ' + result.deleted + ' recording(s).');
|
|
306
|
-
confirm.remove();
|
|
307
|
-
await this._loadRecordings(container);
|
|
308
|
-
} catch (e) {
|
|
309
|
-
homebridge.toast.error('Delete failed: ' + (e.message || e));
|
|
310
|
-
}
|
|
311
|
-
});
|
|
312
|
-
|
|
313
|
-
confirm.querySelector('#btn-cancel-delete-all').addEventListener('click', () => {
|
|
314
|
-
confirm.remove();
|
|
315
|
-
});
|
|
316
|
-
|
|
317
|
-
container.appendChild(confirm);
|
|
318
|
-
},
|
|
319
|
-
};
|
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Settings View — global plugin settings with progressive disclosure.
|
|
3
|
-
* Account info and advanced configuration options.
|
|
4
|
-
*/
|
|
5
|
-
// eslint-disable-next-line no-unused-vars
|
|
6
|
-
const SettingsView = {
|
|
7
|
-
|
|
8
|
-
_advancedOpen: false,
|
|
9
|
-
|
|
10
|
-
async render(container) {
|
|
11
|
-
container.innerHTML = '';
|
|
12
|
-
this._advancedOpen = false;
|
|
13
|
-
|
|
14
|
-
const config = await Config.get();
|
|
15
|
-
|
|
16
|
-
// Header
|
|
17
|
-
const header = document.createElement('div');
|
|
18
|
-
header.className = 'eufy-header';
|
|
19
|
-
|
|
20
|
-
const backBtn = document.createElement('button');
|
|
21
|
-
backBtn.className = 'btn btn-link p-0';
|
|
22
|
-
backBtn.innerHTML = '← Back';
|
|
23
|
-
backBtn.style.textDecoration = 'none';
|
|
24
|
-
backBtn.addEventListener('click', () => App.navigate('dashboard'));
|
|
25
|
-
|
|
26
|
-
const titleEl = document.createElement('h4');
|
|
27
|
-
titleEl.textContent = 'Settings';
|
|
28
|
-
|
|
29
|
-
header.appendChild(backBtn);
|
|
30
|
-
header.appendChild(titleEl);
|
|
31
|
-
// Empty spacer for alignment
|
|
32
|
-
header.appendChild(document.createElement('div'));
|
|
33
|
-
container.appendChild(header);
|
|
34
|
-
|
|
35
|
-
// ── Credentials Info ──
|
|
36
|
-
const credsSection = document.createElement('div');
|
|
37
|
-
credsSection.className = 'settings-section';
|
|
38
|
-
|
|
39
|
-
const credsTitle = document.createElement('div');
|
|
40
|
-
credsTitle.className = 'detail-section__title';
|
|
41
|
-
credsTitle.textContent = 'Account';
|
|
42
|
-
credsSection.appendChild(credsTitle);
|
|
43
|
-
|
|
44
|
-
const credsInfo = document.createElement('div');
|
|
45
|
-
credsInfo.className = 'text-muted';
|
|
46
|
-
credsInfo.style.fontSize = '0.85rem';
|
|
47
|
-
const email = config.username || 'Not configured';
|
|
48
|
-
const country = config.country || '—';
|
|
49
|
-
credsInfo.innerHTML = `
|
|
50
|
-
<div class="mb-1"><strong>Email:</strong> ${this._escHtml(email)}</div>
|
|
51
|
-
<div><strong>Country:</strong> ${country}</div>
|
|
52
|
-
`;
|
|
53
|
-
credsSection.appendChild(credsInfo);
|
|
54
|
-
container.appendChild(credsSection);
|
|
55
|
-
|
|
56
|
-
// ── Advanced Settings ──
|
|
57
|
-
const advBtn = document.createElement('button');
|
|
58
|
-
advBtn.className = 'advanced-toggle';
|
|
59
|
-
advBtn.innerHTML = `
|
|
60
|
-
<span class="advanced-toggle__chevron" id="settings-adv-chevron">▶</span>
|
|
61
|
-
Advanced Settings
|
|
62
|
-
`;
|
|
63
|
-
advBtn.addEventListener('click', () => {
|
|
64
|
-
this._advancedOpen = !this._advancedOpen;
|
|
65
|
-
const advSection = container.querySelector('#settings-advanced');
|
|
66
|
-
if (advSection) advSection.style.display = this._advancedOpen ? 'block' : 'none';
|
|
67
|
-
const chevron = container.querySelector('#settings-adv-chevron');
|
|
68
|
-
if (chevron) chevron.classList.toggle('advanced-toggle__chevron--open', this._advancedOpen);
|
|
69
|
-
});
|
|
70
|
-
container.appendChild(advBtn);
|
|
71
|
-
|
|
72
|
-
const advSection = document.createElement('div');
|
|
73
|
-
advSection.id = 'settings-advanced';
|
|
74
|
-
advSection.style.display = 'none';
|
|
75
|
-
|
|
76
|
-
// ── Polling & Livestream ──
|
|
77
|
-
const perfTitle = document.createElement('div');
|
|
78
|
-
perfTitle.className = 'detail-section__title';
|
|
79
|
-
perfTitle.textContent = 'Performance';
|
|
80
|
-
advSection.appendChild(perfTitle);
|
|
81
|
-
|
|
82
|
-
NumberInput.render(advSection, {
|
|
83
|
-
id: 'num-polling',
|
|
84
|
-
label: 'Polling Interval',
|
|
85
|
-
help: 'How often (in minutes) to poll the Eufy Cloud for updates. Higher values = less API usage.',
|
|
86
|
-
value: config.pollingIntervalMinutes || 10,
|
|
87
|
-
min: 1, max: 120, step: 1,
|
|
88
|
-
suffix: 'min',
|
|
89
|
-
onChange: async (val) => {
|
|
90
|
-
await Config.updateGlobal({ pollingIntervalMinutes: val });
|
|
91
|
-
},
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
NumberInput.render(advSection, {
|
|
95
|
-
id: 'num-livestream',
|
|
96
|
-
label: 'Max Livestream Duration',
|
|
97
|
-
help: 'Maximum duration (in seconds) for a single livestream session.',
|
|
98
|
-
value: config.CameraMaxLivestreamDuration || 30,
|
|
99
|
-
min: 10, max: 86400, step: 10,
|
|
100
|
-
suffix: 'sec',
|
|
101
|
-
onChange: async (val) => {
|
|
102
|
-
await Config.updateGlobal({ CameraMaxLivestreamDuration: val });
|
|
103
|
-
},
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
// ── Default Guard Modes ──
|
|
107
|
-
const guardTitle = document.createElement('div');
|
|
108
|
-
guardTitle.className = 'detail-section__title mt-3';
|
|
109
|
-
guardTitle.textContent = 'Default Guard Modes';
|
|
110
|
-
advSection.appendChild(guardTitle);
|
|
111
|
-
|
|
112
|
-
const guardHelp = document.createElement('p');
|
|
113
|
-
guardHelp.className = 'text-muted';
|
|
114
|
-
guardHelp.style.fontSize = '0.8rem';
|
|
115
|
-
guardHelp.textContent = 'Default HomeKit-to-Eufy guard mode mapping. Can be overridden per station.';
|
|
116
|
-
advSection.appendChild(guardHelp);
|
|
117
|
-
|
|
118
|
-
GuardModes.render(advSection, {
|
|
119
|
-
hkHome: config.hkHome ?? 1,
|
|
120
|
-
hkAway: config.hkAway ?? 0,
|
|
121
|
-
hkNight: config.hkNight ?? 1,
|
|
122
|
-
hkOff: config.hkOff ?? 63,
|
|
123
|
-
onChange: async (modes) => {
|
|
124
|
-
await Config.updateGlobal(modes);
|
|
125
|
-
},
|
|
126
|
-
});
|
|
127
|
-
|
|
128
|
-
// ── Misc Toggles ──
|
|
129
|
-
const miscTitle = document.createElement('div');
|
|
130
|
-
miscTitle.className = 'detail-section__title mt-3';
|
|
131
|
-
miscTitle.textContent = 'Miscellaneous';
|
|
132
|
-
advSection.appendChild(miscTitle);
|
|
133
|
-
|
|
134
|
-
Toggle.render(advSection, {
|
|
135
|
-
id: 'toggle-auto-sync',
|
|
136
|
-
label: 'Auto Sync Station',
|
|
137
|
-
help: 'Automatically synchronize station mode with HomeKit security system.',
|
|
138
|
-
checked: !!config.autoSyncStation,
|
|
139
|
-
onChange: async (checked) => {
|
|
140
|
-
await Config.updateGlobal({ autoSyncStation: checked });
|
|
141
|
-
},
|
|
142
|
-
});
|
|
143
|
-
|
|
144
|
-
Toggle.render(advSection, {
|
|
145
|
-
id: 'toggle-clean-cache',
|
|
146
|
-
label: 'Clean Cache',
|
|
147
|
-
help: 'Remove stale cached accessories on next restart.',
|
|
148
|
-
checked: !!config.cleanCache,
|
|
149
|
-
onChange: async (checked) => {
|
|
150
|
-
await Config.updateGlobal({ cleanCache: checked });
|
|
151
|
-
},
|
|
152
|
-
});
|
|
153
|
-
|
|
154
|
-
Toggle.render(advSection, {
|
|
155
|
-
id: 'toggle-omit-logs',
|
|
156
|
-
label: 'Omit Log Files',
|
|
157
|
-
help: 'Disable writing plugin log files to disk.',
|
|
158
|
-
checked: !!config.omitLogFiles,
|
|
159
|
-
onChange: async (checked) => {
|
|
160
|
-
await Config.updateGlobal({ omitLogFiles: checked });
|
|
161
|
-
},
|
|
162
|
-
});
|
|
163
|
-
|
|
164
|
-
Toggle.render(advSection, {
|
|
165
|
-
id: 'toggle-ignore-multi-warning',
|
|
166
|
-
label: 'Ignore Multiple Devices Warning',
|
|
167
|
-
help: 'Suppress warning when multiple plugins manage the same device.',
|
|
168
|
-
checked: !!config.ignoreMultipleDevicesWarning,
|
|
169
|
-
onChange: async (checked) => {
|
|
170
|
-
await Config.updateGlobal({ ignoreMultipleDevicesWarning: checked });
|
|
171
|
-
},
|
|
172
|
-
});
|
|
173
|
-
|
|
174
|
-
// Only show PKCS1 toggle when the Node.js version is affected (native PKCS1 removed).
|
|
175
|
-
// Node.js >= 24.5.0 restores native PKCS1 padding — the workaround is not needed.
|
|
176
|
-
const warning = App.state.nodeVersionWarning;
|
|
177
|
-
if (warning && warning.affected) {
|
|
178
|
-
Toggle.render(advSection, {
|
|
179
|
-
id: 'toggle-pkcs1',
|
|
180
|
-
label: 'Embedded PKCS1 Support',
|
|
181
|
-
help: 'Enable embedded PKCS1 support for device communication. Required on Node.js versions where native RSA_PKCS1_PADDING was removed.',
|
|
182
|
-
checked: !!config.enableEmbeddedPKCS1Support,
|
|
183
|
-
onChange: async (checked) => {
|
|
184
|
-
await Config.updateGlobal({ enableEmbeddedPKCS1Support: checked });
|
|
185
|
-
},
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
container.appendChild(advSection);
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
},
|
|
193
|
-
|
|
194
|
-
_escHtml(str) {
|
|
195
|
-
return Helpers.escHtml(str);
|
|
196
|
-
},
|
|
197
|
-
};
|