@homebridge-plugins/homebridge-eufy-security 4.7.1 → 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 -769
- 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 -431
- 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/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 -207
- package/dist/utils/accessoriesStore.js.map +0 -1
- package/dist/utils/configTypes.js +0 -36
- 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 -626
- 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,142 +0,0 @@
|
|
|
1
|
-
import { DeviceAccessory } from './Device.js';
|
|
2
|
-
import { PropertyName } from 'eufy-security-client';
|
|
3
|
-
import { CHAR, SERV } from '../utils/utils.js';
|
|
4
|
-
/**
|
|
5
|
-
* LockAccessory Class
|
|
6
|
-
*
|
|
7
|
-
* This class represents a lock accessory within a home automation system. It is designed to
|
|
8
|
-
* integrate smart locks into the system, register appropriate HomeKit characteristics, and provide
|
|
9
|
-
* functionality for controlling and monitoring the lock's status.
|
|
10
|
-
*
|
|
11
|
-
* @class LockAccessory
|
|
12
|
-
* @extends DeviceAccessory
|
|
13
|
-
*/
|
|
14
|
-
export class LockAccessory extends DeviceAccessory {
|
|
15
|
-
/**
|
|
16
|
-
* Constructor for LockAccessory.
|
|
17
|
-
*
|
|
18
|
-
* @param {EufySecurityPlatform} platform - The platform instance managing accessories.
|
|
19
|
-
* @param {PlatformAccessory} accessory - The platform-specific accessory.
|
|
20
|
-
* @param {Lock} device - The lock device being represented.
|
|
21
|
-
*/
|
|
22
|
-
constructor(platform, accessory, device) {
|
|
23
|
-
// Call the constructor of the parent class DeviceAccessory.
|
|
24
|
-
super(platform, accessory, device);
|
|
25
|
-
// Log that the LockAccessory is constructed.
|
|
26
|
-
this.log.debug(`Constructed Lock`);
|
|
27
|
-
// Check if the device has the 'locked' property.
|
|
28
|
-
if (this.device.hasProperty('locked')) {
|
|
29
|
-
// Initialize Lock Management Service characteristics.
|
|
30
|
-
this.initLockManagementService();
|
|
31
|
-
// Initialize Lock Mechanism Service characteristics.
|
|
32
|
-
this.initLockMechanismService();
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
// Log an error if the device has no lock.
|
|
36
|
-
this.log.error(`has no lock`);
|
|
37
|
-
}
|
|
38
|
-
// Prune any unused services.
|
|
39
|
-
this.pruneUnusedServices();
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Initializes characteristics for the Lock Management Service.
|
|
43
|
-
*/
|
|
44
|
-
initLockManagementService() {
|
|
45
|
-
// Register Lock Management Service characteristics.
|
|
46
|
-
// Version characteristic (always returns '1.0').
|
|
47
|
-
this.registerCharacteristic({
|
|
48
|
-
serviceType: SERV.LockManagement,
|
|
49
|
-
characteristicType: CHAR.Version,
|
|
50
|
-
getValue: () => '1.0',
|
|
51
|
-
});
|
|
52
|
-
// LockManagementAutoSecurityTimeout characteristic (always returns 3 seconds).
|
|
53
|
-
this.registerCharacteristic({
|
|
54
|
-
serviceType: SERV.LockManagement,
|
|
55
|
-
characteristicType: CHAR.LockManagementAutoSecurityTimeout,
|
|
56
|
-
getValue: () => 3,
|
|
57
|
-
});
|
|
58
|
-
// AdministratorOnlyAccess characteristic (always returns true).
|
|
59
|
-
this.registerCharacteristic({
|
|
60
|
-
serviceType: SERV.LockManagement,
|
|
61
|
-
characteristicType: CHAR.AdministratorOnlyAccess,
|
|
62
|
-
getValue: () => true,
|
|
63
|
-
});
|
|
64
|
-
// LockControlPoint characteristic (no initial value).
|
|
65
|
-
this.registerCharacteristic({
|
|
66
|
-
serviceType: SERV.LockManagement,
|
|
67
|
-
characteristicType: CHAR.LockControlPoint,
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Initializes characteristics for the Lock Mechanism Service.
|
|
72
|
-
*/
|
|
73
|
-
initLockMechanismService() {
|
|
74
|
-
// Register Lock Mechanism Service characteristics.
|
|
75
|
-
// LockCurrentState and LockTargetState characteristics.
|
|
76
|
-
this.registerCharacteristic({
|
|
77
|
-
serviceType: SERV.LockMechanism,
|
|
78
|
-
characteristicType: CHAR.LockCurrentState,
|
|
79
|
-
getValue: () => this.getLockStatus(),
|
|
80
|
-
onValue: (service, characteristic) => {
|
|
81
|
-
this.device.on('locked', () => {
|
|
82
|
-
characteristic.updateValue(this.getLockStatus());
|
|
83
|
-
});
|
|
84
|
-
this.device.on('jammed', () => {
|
|
85
|
-
characteristic.updateValue(CHAR.LockCurrentState.JAMMED);
|
|
86
|
-
});
|
|
87
|
-
},
|
|
88
|
-
});
|
|
89
|
-
this.registerCharacteristic({
|
|
90
|
-
serviceType: SERV.LockMechanism,
|
|
91
|
-
characteristicType: CHAR.LockTargetState,
|
|
92
|
-
getValue: () => this.getLockStatus(),
|
|
93
|
-
setValue: async (value) => {
|
|
94
|
-
try {
|
|
95
|
-
await this.setLockTargetState(value);
|
|
96
|
-
}
|
|
97
|
-
catch (error) {
|
|
98
|
-
this.log.error(`Lock target state could not be set: ${error}`);
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
onValue: (service, characteristic) => {
|
|
102
|
-
this.device.on('locked', () => {
|
|
103
|
-
characteristic.updateValue(this.getLockStatus());
|
|
104
|
-
});
|
|
105
|
-
},
|
|
106
|
-
});
|
|
107
|
-
// Initialize the sensor service.
|
|
108
|
-
this.initSensorService();
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* Gets the lock status and maps it to HomeKit lock states.
|
|
112
|
-
*/
|
|
113
|
-
getLockStatus() {
|
|
114
|
-
const lockStatus = this.device.isLocked();
|
|
115
|
-
this.log.debug(`getLockStatus: ${lockStatus}`);
|
|
116
|
-
return this.convertLockStatusCode(lockStatus);
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* Sets the lock target state asynchronously.
|
|
120
|
-
*/
|
|
121
|
-
async setLockTargetState(state) {
|
|
122
|
-
try {
|
|
123
|
-
await this.setPropertyValue(PropertyName.DeviceLocked, !!state);
|
|
124
|
-
this.log.info(`Lock target state set to: ${state}`);
|
|
125
|
-
}
|
|
126
|
-
catch (error) {
|
|
127
|
-
this.log.error(`Error setting lock target state: ${error}`);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* Converts lock status codes to corresponding HomeKit lock states.
|
|
132
|
-
*/
|
|
133
|
-
convertLockStatusCode(lockStatus) {
|
|
134
|
-
if (lockStatus) {
|
|
135
|
-
return CHAR.LockCurrentState.SECURED;
|
|
136
|
-
}
|
|
137
|
-
else {
|
|
138
|
-
return CHAR.LockCurrentState.UNSECURED;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
//# sourceMappingURL=LockAccessory.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LockAccessory.js","sourceRoot":"","sources":["../../src/accessories/LockAccessory.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAQ,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAE/C;;;;;;;;;GASG;AACH,MAAM,OAAO,aAAc,SAAQ,eAAe;IAChD;;;;;;OAMG;IACH,YAAY,QAA8B,EAAE,SAA4B,EAAE,MAAY;QACpF,4DAA4D;QAC5D,KAAK,CAAC,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;QAEnC,6CAA6C;QAC7C,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;QAEnC,iDAAiD;QACjD,IAAI,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,EAAE,CAAC;YACtC,sDAAsD;YACtD,IAAI,CAAC,yBAAyB,EAAE,CAAC;YAEjC,qDAAqD;YACrD,IAAI,CAAC,wBAAwB,EAAE,CAAC;QAClC,CAAC;aAAM,CAAC;YACN,0CAA0C;YAC1C,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;QAChC,CAAC;QAED,6BAA6B;QAC7B,IAAI,CAAC,mBAAmB,EAAE,CAAC;IAC7B,CAAC;IAED;;OAEG;IACK,yBAAyB;QAC/B,oDAAoD;QACpD,iDAAiD;QACjD,IAAI,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CAAC,CAAC;YAChE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,6BAA6B,KAAK,EAAE,CAAC,CAAC;QACtD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,oCAAoC,KAAK,EAAE,CAAC,CAAC;QAC9D,CAAC;IACH,CAAC;IAED;;OAEG;IACK,qBAAqB,CAAC,UAAmB;QAC/C,IAAI,UAAU,EAAE,CAAC;YACf,OAAO,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC;QACvC,CAAC;aAAM,CAAC;YACN,OAAO,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAC;QACzC,CAAC;IACH,CAAC;CACF"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { DeviceAccessory } from './Device.js';
|
|
2
|
-
// @ts-ignore
|
|
3
|
-
import { PropertyName } from 'eufy-security-client';
|
|
4
|
-
import { CHAR, SERV } from '../utils/utils.js';
|
|
5
|
-
/**
|
|
6
|
-
* MotionSensorAccessory Class
|
|
7
|
-
*
|
|
8
|
-
* This class represents a motion sensor accessory within a home automation system. It is designed
|
|
9
|
-
* to integrate motion sensors into the system, register appropriate characteristics, and provide
|
|
10
|
-
* necessary functionality for motion detection.
|
|
11
|
-
*
|
|
12
|
-
* @class MotionSensorAccessory
|
|
13
|
-
* @extends DeviceAccessory
|
|
14
|
-
*/
|
|
15
|
-
export class MotionSensorAccessory extends DeviceAccessory {
|
|
16
|
-
/**
|
|
17
|
-
* Constructor for MotionSensorAccessory.
|
|
18
|
-
*
|
|
19
|
-
* @param {EufySecurityPlatform} platform - The platform instance managing accessories.
|
|
20
|
-
* @param {PlatformAccessory} accessory - The platform-specific accessory.
|
|
21
|
-
* @param {MotionSensor} device - The motion sensor device being represented.
|
|
22
|
-
*/
|
|
23
|
-
constructor(platform, accessory, device) {
|
|
24
|
-
// Call the constructor of the parent class DeviceAccessory.
|
|
25
|
-
super(platform, accessory, device);
|
|
26
|
-
// Log a debug message indicating the construction of the Motion Sensor.
|
|
27
|
-
this.log.debug(`Constructed Motion Sensor`);
|
|
28
|
-
// Check if the device has the 'motionDetected' property.
|
|
29
|
-
if (this.device.hasProperty('motionDetected')) {
|
|
30
|
-
// Register the Motion Detected characteristic.
|
|
31
|
-
this.registerCharacteristic({
|
|
32
|
-
serviceType: SERV.MotionSensor,
|
|
33
|
-
characteristicType: CHAR.MotionDetected,
|
|
34
|
-
getValue: () => this.device.getPropertyValue(PropertyName.DeviceMotionDetected),
|
|
35
|
-
onSimpleValue: 'motion detected',
|
|
36
|
-
});
|
|
37
|
-
// Initialize the sensor service.
|
|
38
|
-
this.initSensorService();
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
// Log an error if the 'motionDetected' property is not available for this device.
|
|
42
|
-
this.log.error(`has no motionDetected`);
|
|
43
|
-
}
|
|
44
|
-
// Remove any unused services.
|
|
45
|
-
this.pruneUnusedServices();
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
//# sourceMappingURL=MotionSensorAccessory.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MotionSensorAccessory.js","sourceRoot":"","sources":["../../src/accessories/MotionSensorAccessory.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,aAAa;AACb,OAAO,EAAgB,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAE/C;;;;;;;;;GASG;AACH,MAAM,OAAO,qBAAsB,SAAQ,eAAe;IACxD;;;;;;OAMG;IACH,YAAY,QAA8B,EAAE,SAA4B,EAAE,MAAoB;QAC5F,4DAA4D;QAC5D,KAAK,CAAC,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;QAEnC,wEAAwE;QACxE,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAE5C,yDAAyD;QACzD,IAAI,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,gBAAgB,CAAC,EAAE,CAAC;YAC9C,+CAA+C;YAC/C,IAAI,CAAC,sBAAsB,CAAC;gBAC1B,WAAW,EAAE,IAAI,CAAC,YAAY;gBAC9B,kBAAkB,EAAE,IAAI,CAAC,cAAc;gBACvC,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,YAAY,CAAC,oBAAoB,CAAC;gBAC/E,aAAa,EAAE,iBAAiB;aACjC,CAAC,CAAC;YAEH,iCAAiC;YACjC,IAAI,CAAC,iBAAiB,EAAE,CAAC;QAC3B,CAAC;aAAM,CAAC;YACN,kFAAkF;YAClF,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC;QAC1C,CAAC;QAED,8BAA8B;QAC9B,IAAI,CAAC,mBAAmB,EAAE,CAAC;IAC7B,CAAC;CACF"}
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
import { DeviceAccessory } from './Device.js';
|
|
2
|
-
import { PropertyName } from 'eufy-security-client';
|
|
3
|
-
import { CHAR, SERV } from '../utils/utils.js';
|
|
4
|
-
/**
|
|
5
|
-
* SmartDropAccessory Class
|
|
6
|
-
*
|
|
7
|
-
* This class represents a SmartDrop accessory within a home automation system.
|
|
8
|
-
* The SmartDrop is a smart package delivery box that can be remotely opened.
|
|
9
|
-
* It is exposed as a LockMechanism service in HomeKit, allowing users to
|
|
10
|
-
* open the SmartDrop lid from the Home app or via automation.
|
|
11
|
-
*
|
|
12
|
-
* Since the SmartDrop is a one-way latch (open only, closing is physical),
|
|
13
|
-
* the lock mechanism is used to trigger the open command, and the current
|
|
14
|
-
* state reflects whether the lid is currently open or closed.
|
|
15
|
-
*
|
|
16
|
-
* @class SmartDropAccessory
|
|
17
|
-
* @extends DeviceAccessory
|
|
18
|
-
* @see https://github.com/homebridge-plugins/homebridge-eufy-security/issues/770
|
|
19
|
-
*/
|
|
20
|
-
export class SmartDropAccessory extends DeviceAccessory {
|
|
21
|
-
/**
|
|
22
|
-
* Constructor for SmartDropAccessory.
|
|
23
|
-
*
|
|
24
|
-
* @param {EufySecurityPlatform} platform - The platform instance managing accessories.
|
|
25
|
-
* @param {PlatformAccessory} accessory - The platform-specific accessory.
|
|
26
|
-
* @param {SmartDrop} device - The SmartDrop device being represented.
|
|
27
|
-
*/
|
|
28
|
-
constructor(platform, accessory, device) {
|
|
29
|
-
super(platform, accessory, device);
|
|
30
|
-
this.log.debug(`Constructed SmartDrop`);
|
|
31
|
-
// Initialize the Lock Mechanism service for open/close control.
|
|
32
|
-
this.initLockMechanismService();
|
|
33
|
-
// Initialize the Contact Sensor service for package delivery detection.
|
|
34
|
-
this.initContactSensorService();
|
|
35
|
-
// Initialize the battery service.
|
|
36
|
-
this.initSensorService();
|
|
37
|
-
// Prune any unused services.
|
|
38
|
-
this.pruneUnusedServices();
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Initializes the Lock Mechanism Service.
|
|
42
|
-
*
|
|
43
|
-
* The SmartDrop lid is modeled as a lock:
|
|
44
|
-
* - SECURED = lid closed
|
|
45
|
-
* - UNSECURED = lid open
|
|
46
|
-
* Setting the target state to UNSECURED triggers the open command.
|
|
47
|
-
*/
|
|
48
|
-
initLockMechanismService() {
|
|
49
|
-
// LockCurrentState reflects the actual open/closed state of the lid.
|
|
50
|
-
this.registerCharacteristic({
|
|
51
|
-
serviceType: SERV.LockMechanism,
|
|
52
|
-
characteristicType: CHAR.LockCurrentState,
|
|
53
|
-
getValue: () => this.getLidStatus(),
|
|
54
|
-
onValue: (service, characteristic) => {
|
|
55
|
-
this.device.on('open', () => {
|
|
56
|
-
characteristic.updateValue(this.getLidStatus());
|
|
57
|
-
});
|
|
58
|
-
},
|
|
59
|
-
});
|
|
60
|
-
// LockTargetState allows triggering the open command.
|
|
61
|
-
this.registerCharacteristic({
|
|
62
|
-
serviceType: SERV.LockMechanism,
|
|
63
|
-
characteristicType: CHAR.LockTargetState,
|
|
64
|
-
getValue: () => this.getLidStatus(),
|
|
65
|
-
setValue: async (value) => {
|
|
66
|
-
await this.setLidTargetState(value);
|
|
67
|
-
},
|
|
68
|
-
onValue: (service, characteristic) => {
|
|
69
|
-
this.device.on('open', () => {
|
|
70
|
-
characteristic.updateValue(this.getLidStatus());
|
|
71
|
-
});
|
|
72
|
-
},
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Initializes the Contact Sensor Service.
|
|
77
|
-
*
|
|
78
|
-
* Exposes a contact sensor that indicates whether a package has been delivered.
|
|
79
|
-
* - CONTACT_DETECTED = no package delivered (normal state)
|
|
80
|
-
* - CONTACT_NOT_DETECTED = package delivered (alert state)
|
|
81
|
-
*/
|
|
82
|
-
initContactSensorService() {
|
|
83
|
-
if (!this.device.hasProperty('packageDelivered')) {
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
this.registerCharacteristic({
|
|
87
|
-
serviceType: SERV.ContactSensor,
|
|
88
|
-
characteristicType: CHAR.ContactSensorState,
|
|
89
|
-
name: 'Package Delivered',
|
|
90
|
-
getValue: () => this.getPackageDeliveredStatus(),
|
|
91
|
-
onSimpleValue: 'package delivered',
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* Gets the lid status and maps it to HomeKit lock states.
|
|
96
|
-
*
|
|
97
|
-
* @returns {CharacteristicValue} UNSECURED if open, SECURED if closed.
|
|
98
|
-
*/
|
|
99
|
-
getLidStatus() {
|
|
100
|
-
if (this.device.hasProperty('open')) {
|
|
101
|
-
const isOpen = this.device.getPropertyValue(PropertyName.DeviceOpen);
|
|
102
|
-
this.log.debug(`getLidStatus: ${isOpen}`);
|
|
103
|
-
return isOpen ? CHAR.LockCurrentState.UNSECURED : CHAR.LockCurrentState.SECURED;
|
|
104
|
-
}
|
|
105
|
-
return CHAR.LockCurrentState.SECURED;
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* Sets the lid target state.
|
|
109
|
-
* Only the UNSECURED (open) action is meaningful for SmartDrop.
|
|
110
|
-
* When set to UNSECURED, it sends the open command to the station.
|
|
111
|
-
* Setting to SECURED is ignored as closing is a physical action.
|
|
112
|
-
*
|
|
113
|
-
* @param {CharacteristicValue} state - The target lock state.
|
|
114
|
-
*/
|
|
115
|
-
async setLidTargetState(state) {
|
|
116
|
-
if (state === CHAR.LockTargetState.UNSECURED) {
|
|
117
|
-
try {
|
|
118
|
-
this.log.info(`Opening SmartDrop lid...`);
|
|
119
|
-
const station = await this.platform.eufyClient.getStation(this.device.getStationSerial());
|
|
120
|
-
station.open(this.device);
|
|
121
|
-
}
|
|
122
|
-
catch (error) {
|
|
123
|
-
this.log.error(`SmartDrop lid could not be opened: ${error}`);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
else {
|
|
127
|
-
this.log.debug(`SmartDrop lid closing is a physical action, ignoring SECURED command.`);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* Gets the package delivered status for the contact sensor.
|
|
132
|
-
*
|
|
133
|
-
* @returns {CharacteristicValue} CONTACT_NOT_DETECTED if package delivered, CONTACT_DETECTED otherwise.
|
|
134
|
-
*/
|
|
135
|
-
getPackageDeliveredStatus() {
|
|
136
|
-
const delivered = this.device.getPropertyValue(PropertyName.DevicePackageDelivered);
|
|
137
|
-
this.log.debug(`getPackageDeliveredStatus: ${delivered}`);
|
|
138
|
-
return delivered ? CHAR.ContactSensorState.CONTACT_NOT_DETECTED : CHAR.ContactSensorState.CONTACT_DETECTED;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
//# sourceMappingURL=SmartDropAccessory.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SmartDropAccessory.js","sourceRoot":"","sources":["../../src/accessories/SmartDropAccessory.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EA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