matter-all-in-one-addon 2.3.1 → 2.3.13
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/README.md +16 -8
- package/dist/camera/ai/camera-ai-detector.d.ts +0 -2
- package/dist/camera/ai/camera-ai-detector.js +52 -57
- package/dist/camera/ai/camera-ai-detector.js.map +1 -1
- package/dist/camera/browser-preview.d.ts +9 -0
- package/dist/camera/browser-preview.js +135 -0
- package/dist/camera/browser-preview.js.map +1 -0
- package/dist/camera/camera-source-resolver.js +5 -3
- package/dist/camera/camera-source-resolver.js.map +1 -1
- package/dist/camera/camera-types.d.ts +0 -2
- package/dist/camera/cameraui/cameraui-client.js +91 -30
- package/dist/camera/cameraui/cameraui-client.js.map +1 -1
- package/dist/camera/cameraui/cameraui-homekit-bridge.js +13 -4
- package/dist/camera/cameraui/cameraui-homekit-bridge.js.map +1 -1
- package/dist/camera/cameraui/cameraui-storage.js.map +1 -1
- package/dist/camera/cameraui/cameraui-types.d.ts +6 -2
- package/dist/camera/cameraui/ha-camera-entity.js +5 -2
- package/dist/camera/cameraui/ha-camera-entity.js.map +1 -1
- package/dist/camera/homekit/ffmpeg-helper.js +17 -35
- package/dist/camera/homekit/ffmpeg-helper.js.map +1 -1
- package/dist/camera/homekit/hevc/fmp4-hevc.js +3 -1
- package/dist/camera/homekit/hevc/fmp4-hevc.js.map +1 -1
- package/dist/camera/homekit/hevc/hevc-recording.d.ts +0 -2
- package/dist/camera/homekit/hevc/hevc-recording.js +28 -63
- package/dist/camera/homekit/hevc/hevc-recording.js.map +1 -1
- package/dist/camera/homekit/hevc/multi-tier-rtp.d.ts +1 -15
- package/dist/camera/homekit/hevc/multi-tier-rtp.js +70 -228
- package/dist/camera/homekit/hevc/multi-tier-rtp.js.map +1 -1
- package/dist/camera/homekit/hevc/sframe-rtp.d.ts +0 -2
- package/dist/camera/homekit/hevc/sframe-rtp.js +0 -25
- package/dist/camera/homekit/hevc/sframe-rtp.js.map +1 -1
- package/dist/camera/homekit/hevc/sframe.d.ts +1 -11
- package/dist/camera/homekit/hevc/sframe.js +18 -133
- package/dist/camera/homekit/hevc/sframe.js.map +1 -1
- package/dist/camera/homekit/hevc/types.js +81 -9
- package/dist/camera/homekit/hevc/types.js.map +1 -1
- package/dist/camera/homekit/hevc/webrtc-session.d.ts +3 -17
- package/dist/camera/homekit/hevc/webrtc-session.js +55 -229
- package/dist/camera/homekit/hevc/webrtc-session.js.map +1 -1
- package/dist/camera/homekit/homekit-camera-recording.delegate.d.ts +0 -1
- package/dist/camera/homekit/homekit-camera-recording.delegate.js +115 -43
- package/dist/camera/homekit/homekit-camera-recording.delegate.js.map +1 -1
- package/dist/camera/homekit/homekit-camera-stream.delegate.d.ts +4 -7
- package/dist/camera/homekit/homekit-camera-stream.delegate.js +388 -201
- package/dist/camera/homekit/homekit-camera-stream.delegate.js.map +1 -1
- package/dist/camera/homekit/homekit-camera.accessory.d.ts +7 -34
- package/dist/camera/homekit/homekit-camera.accessory.js +207 -169
- package/dist/camera/homekit/homekit-camera.accessory.js.map +1 -1
- package/dist/camera/homekit/live-view-telemetry.d.ts +0 -4
- package/dist/camera/homekit/live-view-telemetry.js.map +1 -1
- package/dist/camera/homekit/tuya-hap-talkback.d.ts +41 -0
- package/dist/camera/homekit/tuya-hap-talkback.js +326 -0
- package/dist/camera/homekit/tuya-hap-talkback.js.map +1 -0
- package/dist/camera/matter/camera-endpoint.builder.js +9 -7
- package/dist/camera/matter/camera-endpoint.builder.js.map +1 -1
- package/dist/camera/matter/camera-session-manager.d.ts +1 -0
- package/dist/camera/matter/camera-session-manager.js +2 -0
- package/dist/camera/matter/camera-session-manager.js.map +1 -1
- package/dist/camera/matter/camera-webrtc-adapter.js +32 -15
- package/dist/camera/matter/camera-webrtc-adapter.js.map +1 -1
- package/dist/camera/motion/ffmpeg-motion-detector.js +28 -14
- package/dist/camera/motion/ffmpeg-motion-detector.js.map +1 -1
- package/dist/camera/nest/nest-camera-adapter.js +9 -5
- package/dist/camera/nest/nest-camera-adapter.js.map +1 -1
- package/dist/camera/ptz/ptz-capabilities.js +3 -1
- package/dist/camera/ptz/ptz-capabilities.js.map +1 -1
- package/dist/camera/ptz/ptz-legacy-discovery.js.map +1 -1
- package/dist/camera/ptz/ptz-mqtt-publisher.js +50 -12
- package/dist/camera/ptz/ptz-mqtt-publisher.js.map +1 -1
- package/dist/camera/ptz/ptz-zones-manager.js +6 -1
- package/dist/camera/ptz/ptz-zones-manager.js.map +1 -1
- package/dist/camera/scrypted/scrypted-camera-card.js +3 -1
- package/dist/camera/scrypted/scrypted-camera-card.js.map +1 -1
- package/dist/camera/scrypted/scrypted-camera-discovery-adapter.js +7 -5
- package/dist/camera/scrypted/scrypted-camera-discovery-adapter.js.map +1 -1
- package/dist/camera/scrypted/scrypted-client-discovery-adapter.js.map +1 -1
- package/dist/camera/scrypted/scrypted-client.js +6 -5
- package/dist/camera/scrypted/scrypted-client.js.map +1 -1
- package/dist/camera/scrypted/scrypted-discovery-provider.js.map +1 -1
- package/dist/camera/scrypted/scrypted-homekit-bridge.js +6 -4
- package/dist/camera/scrypted/scrypted-homekit-bridge.js.map +1 -1
- package/dist/camera/scrypted/scrypted-reconnect-manager.js.map +1 -1
- package/dist/camera/scrypted/scrypted-runtime-facade.js +2 -2
- package/dist/camera/scrypted/scrypted-runtime-facade.js.map +1 -1
- package/dist/camera/scrypted/scrypted-runtime-ingest.js +3 -1
- package/dist/camera/scrypted/scrypted-runtime-ingest.js.map +1 -1
- package/dist/camera/scrypted/scrypted-storage.js +12 -6
- package/dist/camera/scrypted/scrypted-storage.js.map +1 -1
- package/dist/camera/scrypted/scrypted-stream-validator.js +25 -7
- package/dist/camera/scrypted/scrypted-stream-validator.js.map +1 -1
- package/dist/camera/tuya-webrtc-session.d.ts +53 -0
- package/dist/camera/tuya-webrtc-session.js +261 -0
- package/dist/camera/tuya-webrtc-session.js.map +1 -0
- package/dist/converters/sensor.converter.js +4 -1
- package/dist/converters/sensor.converter.js.map +1 -1
- package/dist/device-profiles.js +3 -1
- package/dist/device-profiles.js.map +1 -1
- package/dist/entities/air_quality.entity.js +3 -1
- package/dist/entities/air_quality.entity.js.map +1 -1
- package/dist/entities/base.entity.js +45 -17
- package/dist/entities/base.entity.js.map +1 -1
- package/dist/entities/camera.entity.d.ts +1 -0
- package/dist/entities/camera.entity.js +24 -2
- package/dist/entities/camera.entity.js.map +1 -1
- package/dist/entities/composite-device.entity.js +37 -13
- package/dist/entities/composite-device.entity.js.map +1 -1
- package/dist/entities/energy_tariff.entity.js.map +1 -1
- package/dist/entities/pet_feeder.entity.d.ts +1 -0
- package/dist/entities/pet_feeder.entity.js +12 -0
- package/dist/entities/pet_feeder.entity.js.map +1 -1
- package/dist/entities/vacuum.entity.js +16 -5
- package/dist/entities/vacuum.entity.js.map +1 -1
- package/dist/frontend/assets/index-1k-iTL-m.js +26 -0
- package/dist/frontend/assets/{index-NrzHqycm.css → index-CJdlkpIy.css} +1 -1
- package/dist/frontend/index.html +2 -2
- package/dist/hap/hap-generic-accessory.d.ts +4 -0
- package/dist/hap/hap-generic-accessory.js +512 -122
- package/dist/hap/hap-generic-accessory.js.map +1 -1
- package/dist/homeAssistant.d.ts +1 -0
- package/dist/homeAssistant.js +23 -5
- package/dist/homeAssistant.js.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/mqtt/mqtt-client.js.map +1 -1
- package/dist/mqtt/mqtt.entity.js +41 -17
- package/dist/mqtt/mqtt.entity.js.map +1 -1
- package/dist/platform.d.ts +1 -0
- package/dist/platform.js +83 -13
- package/dist/platform.js.map +1 -1
- package/dist/utils/atomic-json-store.js +5 -1
- package/dist/utils/atomic-json-store.js.map +1 -1
- package/dist/utils/ha-state.js +3 -1
- package/dist/utils/ha-state.js.map +1 -1
- package/dist/utils/light-color.js +3 -5
- package/dist/utils/light-color.js.map +1 -1
- package/dist/utils/matter-command-response.js.map +1 -1
- package/dist/utils/matter-firmware.js +1 -2
- package/dist/utils/matter-firmware.js.map +1 -1
- package/dist/utils/matter-protocol.d.ts +1 -0
- package/dist/utils/matter-protocol.js +30 -0
- package/dist/utils/matter-protocol.js.map +1 -0
- package/package.json +27 -19
- package/dist/camera/camera-entity-control.d.ts +0 -12
- package/dist/camera/camera-entity-control.js +0 -24
- package/dist/camera/camera-entity-control.js.map +0 -1
- package/dist/camera/homekit/hevc/bootstrap.d.ts +0 -9
- package/dist/camera/homekit/hevc/bootstrap.js +0 -47
- package/dist/camera/homekit/hevc/bootstrap.js.map +0 -1
- package/dist/camera/homekit/hevc/recording-output.d.ts +0 -2
- package/dist/camera/homekit/hevc/recording-output.js +0 -33
- package/dist/camera/homekit/hevc/recording-output.js.map +0 -1
- package/dist/camera/homekit/media-policy.d.ts +0 -25
- package/dist/camera/homekit/media-policy.js +0 -102
- package/dist/camera/homekit/media-policy.js.map +0 -1
- package/dist/camera/homekit/route-address.d.ts +0 -2
- package/dist/camera/homekit/route-address.js +0 -27
- package/dist/camera/homekit/route-address.js.map +0 -1
- package/dist/camera/homekit/rtp-relay.d.ts +0 -21
- package/dist/camera/homekit/rtp-relay.js +0 -112
- package/dist/camera/homekit/rtp-relay.js.map +0 -1
- package/dist/camera/homekit/startup-timing.d.ts +0 -8
- package/dist/camera/homekit/startup-timing.js +0 -14
- package/dist/camera/homekit/startup-timing.js.map +0 -1
- package/dist/camera/source-adapter.d.ts +0 -132
- package/dist/camera/source-adapter.js +0 -282
- package/dist/camera/source-adapter.js.map +0 -1
- package/dist/frontend/assets/index-Bka3TVAQ.js +0 -21
- package/vendor/hap-nodejs/LICENSE +0 -176
- package/vendor/hap-nodejs/MIAO.md +0 -5
- package/vendor/hap-nodejs/PATCH.md +0 -37
- package/vendor/hap-nodejs/README.md +0 -86
- package/vendor/hap-nodejs/dist/accessories/AirConditioner_accessory.d.ts +0 -2
- package/vendor/hap-nodejs/dist/accessories/AirConditioner_accessory.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/accessories/AirConditioner_accessory.js +0 -128
- package/vendor/hap-nodejs/dist/accessories/AirConditioner_accessory.js.map +0 -1
- package/vendor/hap-nodejs/dist/accessories/AppleTVRemote_accessory.d.ts +0 -2
- package/vendor/hap-nodejs/dist/accessories/AppleTVRemote_accessory.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/accessories/AppleTVRemote_accessory.js +0 -159
- package/vendor/hap-nodejs/dist/accessories/AppleTVRemote_accessory.js.map +0 -1
- package/vendor/hap-nodejs/dist/accessories/Camera_accessory.d.ts +0 -2
- package/vendor/hap-nodejs/dist/accessories/Camera_accessory.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/accessories/Camera_accessory.js +0 -545
- package/vendor/hap-nodejs/dist/accessories/Camera_accessory.js.map +0 -1
- package/vendor/hap-nodejs/dist/accessories/Fan_accessory.d.ts +0 -2
- package/vendor/hap-nodejs/dist/accessories/Fan_accessory.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/accessories/Fan_accessory.js +0 -74
- package/vendor/hap-nodejs/dist/accessories/Fan_accessory.js.map +0 -1
- package/vendor/hap-nodejs/dist/accessories/GarageDoorOpener_accessory.d.ts +0 -2
- package/vendor/hap-nodejs/dist/accessories/GarageDoorOpener_accessory.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/accessories/GarageDoorOpener_accessory.js +0 -78
- package/vendor/hap-nodejs/dist/accessories/GarageDoorOpener_accessory.js.map +0 -1
- package/vendor/hap-nodejs/dist/accessories/Light-AdaptiveLighting_accessory.d.ts +0 -2
- package/vendor/hap-nodejs/dist/accessories/Light-AdaptiveLighting_accessory.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/accessories/Light-AdaptiveLighting_accessory.js +0 -106
- package/vendor/hap-nodejs/dist/accessories/Light-AdaptiveLighting_accessory.js.map +0 -1
- package/vendor/hap-nodejs/dist/accessories/Light_accessory.d.ts +0 -2
- package/vendor/hap-nodejs/dist/accessories/Light_accessory.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/accessories/Light_accessory.js +0 -145
- package/vendor/hap-nodejs/dist/accessories/Light_accessory.js.map +0 -1
- package/vendor/hap-nodejs/dist/accessories/Lock_accessory.d.ts +0 -2
- package/vendor/hap-nodejs/dist/accessories/Lock_accessory.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/accessories/Lock_accessory.js +0 -76
- package/vendor/hap-nodejs/dist/accessories/Lock_accessory.js.map +0 -1
- package/vendor/hap-nodejs/dist/accessories/MotionSensor_accessory.d.ts +0 -2
- package/vendor/hap-nodejs/dist/accessories/MotionSensor_accessory.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/accessories/MotionSensor_accessory.js +0 -45
- package/vendor/hap-nodejs/dist/accessories/MotionSensor_accessory.js.map +0 -1
- package/vendor/hap-nodejs/dist/accessories/Outlet_accessory.d.ts +0 -2
- package/vendor/hap-nodejs/dist/accessories/Outlet_accessory.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/accessories/Outlet_accessory.js +0 -79
- package/vendor/hap-nodejs/dist/accessories/Outlet_accessory.js.map +0 -1
- package/vendor/hap-nodejs/dist/accessories/SmartSpeaker_accessory.d.ts +0 -2
- package/vendor/hap-nodejs/dist/accessories/SmartSpeaker_accessory.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/accessories/SmartSpeaker_accessory.js +0 -44
- package/vendor/hap-nodejs/dist/accessories/SmartSpeaker_accessory.js.map +0 -1
- package/vendor/hap-nodejs/dist/accessories/Sprinkler_accessory.d.ts +0 -2
- package/vendor/hap-nodejs/dist/accessories/Sprinkler_accessory.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/accessories/Sprinkler_accessory.js +0 -128
- package/vendor/hap-nodejs/dist/accessories/Sprinkler_accessory.js.map +0 -1
- package/vendor/hap-nodejs/dist/accessories/TV_accessory.d.ts +0 -2
- package/vendor/hap-nodejs/dist/accessories/TV_accessory.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/accessories/TV_accessory.js +0 -101
- package/vendor/hap-nodejs/dist/accessories/TV_accessory.js.map +0 -1
- package/vendor/hap-nodejs/dist/accessories/TemperatureSensor_accessory.d.ts +0 -2
- package/vendor/hap-nodejs/dist/accessories/TemperatureSensor_accessory.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/accessories/TemperatureSensor_accessory.js +0 -44
- package/vendor/hap-nodejs/dist/accessories/TemperatureSensor_accessory.js.map +0 -1
- package/vendor/hap-nodejs/dist/accessories/Wi-FiRouter_accessory.d.ts +0 -3
- package/vendor/hap-nodejs/dist/accessories/Wi-FiRouter_accessory.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/accessories/Wi-FiRouter_accessory.js +0 -17
- package/vendor/hap-nodejs/dist/accessories/Wi-FiRouter_accessory.js.map +0 -1
- package/vendor/hap-nodejs/dist/accessories/Wi-FiSatellite_accessory.d.ts +0 -3
- package/vendor/hap-nodejs/dist/accessories/Wi-FiSatellite_accessory.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/accessories/Wi-FiSatellite_accessory.js +0 -19
- package/vendor/hap-nodejs/dist/accessories/Wi-FiSatellite_accessory.js.map +0 -1
- package/vendor/hap-nodejs/dist/accessories/gstreamer-audioProducer.d.ts +0 -25
- package/vendor/hap-nodejs/dist/accessories/gstreamer-audioProducer.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/accessories/gstreamer-audioProducer.js +0 -145
- package/vendor/hap-nodejs/dist/accessories/gstreamer-audioProducer.js.map +0 -1
- package/vendor/hap-nodejs/dist/accessories/types.d.ts +0 -78
- package/vendor/hap-nodejs/dist/accessories/types.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/accessories/types.js +0 -88
- package/vendor/hap-nodejs/dist/accessories/types.js.map +0 -1
- package/vendor/hap-nodejs/dist/index.d.ts +0 -50
- package/vendor/hap-nodejs/dist/index.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/index.js +0 -54
- package/vendor/hap-nodejs/dist/index.js.map +0 -1
- package/vendor/hap-nodejs/dist/internal-types.d.ts +0 -76
- package/vendor/hap-nodejs/dist/internal-types.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/internal-types.js +0 -80
- package/vendor/hap-nodejs/dist/internal-types.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/Accessory.d.ts +0 -521
- package/vendor/hap-nodejs/dist/lib/Accessory.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/Accessory.js +0 -1762
- package/vendor/hap-nodejs/dist/lib/Accessory.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/Advertiser.d.ts +0 -190
- package/vendor/hap-nodejs/dist/lib/Advertiser.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/Advertiser.js +0 -592
- package/vendor/hap-nodejs/dist/lib/Advertiser.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/Bridge.d.ts +0 -12
- package/vendor/hap-nodejs/dist/lib/Bridge.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/Bridge.js +0 -19
- package/vendor/hap-nodejs/dist/lib/Bridge.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/Characteristic.d.ts +0 -1768
- package/vendor/hap-nodejs/dist/lib/Characteristic.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/Characteristic.js +0 -2532
- package/vendor/hap-nodejs/dist/lib/Characteristic.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/HAPServer.d.ts +0 -299
- package/vendor/hap-nodejs/dist/lib/HAPServer.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/HAPServer.js +0 -968
- package/vendor/hap-nodejs/dist/lib/HAPServer.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/Service.d.ts +0 -598
- package/vendor/hap-nodejs/dist/lib/Service.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/Service.js +0 -797
- package/vendor/hap-nodejs/dist/lib/Service.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/camera/CMAFIngest.d.ts +0 -102
- package/vendor/hap-nodejs/dist/lib/camera/CMAFIngest.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/camera/CMAFIngest.js +0 -317
- package/vendor/hap-nodejs/dist/lib/camera/CMAFIngest.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/camera/HDSSnapshotTransport.d.ts +0 -38
- package/vendor/hap-nodejs/dist/lib/camera/HDSSnapshotTransport.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/camera/HDSSnapshotTransport.js +0 -174
- package/vendor/hap-nodejs/dist/lib/camera/HDSSnapshotTransport.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/camera/RTPProxy.d.ts +0 -59
- package/vendor/hap-nodejs/dist/lib/camera/RTPProxy.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/camera/RTPProxy.js +0 -267
- package/vendor/hap-nodejs/dist/lib/camera/RTPProxy.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/camera/RTPStreamManagement.d.ts +0 -379
- package/vendor/hap-nodejs/dist/lib/camera/RTPStreamManagement.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/camera/RTPStreamManagement.js +0 -1021
- package/vendor/hap-nodejs/dist/lib/camera/RTPStreamManagement.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/camera/RecordingManagement.d.ts +0 -325
- package/vendor/hap-nodejs/dist/lib/camera/RecordingManagement.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/camera/RecordingManagement.js +0 -800
- package/vendor/hap-nodejs/dist/lib/camera/RecordingManagement.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/camera/SecureVideoCredentials.d.ts +0 -20
- package/vendor/hap-nodejs/dist/lib/camera/SecureVideoCredentials.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/camera/SecureVideoCredentials.js +0 -48
- package/vendor/hap-nodejs/dist/lib/camera/SecureVideoCredentials.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/camera/SecureVideoTypes.d.ts +0 -618
- package/vendor/hap-nodejs/dist/lib/camera/SecureVideoTypes.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/camera/SecureVideoTypes.js +0 -911
- package/vendor/hap-nodejs/dist/lib/camera/SecureVideoTypes.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/camera/index.d.ts +0 -8
- package/vendor/hap-nodejs/dist/lib/camera/index.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/camera/index.js +0 -11
- package/vendor/hap-nodejs/dist/lib/camera/index.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/controller/AdaptiveLightingController.d.ts +0 -452
- package/vendor/hap-nodejs/dist/lib/controller/AdaptiveLightingController.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/controller/AdaptiveLightingController.js +0 -868
- package/vendor/hap-nodejs/dist/lib/controller/AdaptiveLightingController.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/controller/CameraController.d.ts +0 -410
- package/vendor/hap-nodejs/dist/lib/controller/CameraController.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/controller/CameraController.js +0 -658
- package/vendor/hap-nodejs/dist/lib/controller/CameraController.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/controller/Controller.d.ts +0 -197
- package/vendor/hap-nodejs/dist/lib/controller/Controller.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/controller/Controller.js +0 -32
- package/vendor/hap-nodejs/dist/lib/controller/Controller.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/controller/DoorbellController.d.ts +0 -59
- package/vendor/hap-nodejs/dist/lib/controller/DoorbellController.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/controller/DoorbellController.js +0 -102
- package/vendor/hap-nodejs/dist/lib/controller/DoorbellController.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/controller/RemoteController.d.ts +0 -434
- package/vendor/hap-nodejs/dist/lib/controller/RemoteController.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/controller/RemoteController.js +0 -1178
- package/vendor/hap-nodejs/dist/lib/controller/RemoteController.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/controller/SecureVideoController.d.ts +0 -380
- package/vendor/hap-nodejs/dist/lib/controller/SecureVideoController.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/controller/SecureVideoController.js +0 -947
- package/vendor/hap-nodejs/dist/lib/controller/SecureVideoController.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/controller/index.d.ts +0 -7
- package/vendor/hap-nodejs/dist/lib/controller/index.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/controller/index.js +0 -10
- package/vendor/hap-nodejs/dist/lib/controller/index.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/datastream/DataStreamManagement.d.ts +0 -73
- package/vendor/hap-nodejs/dist/lib/datastream/DataStreamManagement.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/datastream/DataStreamManagement.js +0 -205
- package/vendor/hap-nodejs/dist/lib/datastream/DataStreamManagement.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/datastream/DataStreamParser.d.ts +0 -186
- package/vendor/hap-nodejs/dist/lib/datastream/DataStreamParser.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/datastream/DataStreamParser.js +0 -880
- package/vendor/hap-nodejs/dist/lib/datastream/DataStreamParser.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/datastream/DataStreamServer.d.ts +0 -351
- package/vendor/hap-nodejs/dist/lib/datastream/DataStreamServer.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/datastream/DataStreamServer.js +0 -878
- package/vendor/hap-nodejs/dist/lib/datastream/DataStreamServer.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/datastream/index.d.ts +0 -4
- package/vendor/hap-nodejs/dist/lib/datastream/index.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/datastream/index.js +0 -7
- package/vendor/hap-nodejs/dist/lib/datastream/index.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/definitions/CharacteristicDefinitions.d.ts +0 -2245
- package/vendor/hap-nodejs/dist/lib/definitions/CharacteristicDefinitions.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/definitions/CharacteristicDefinitions.js +0 -4957
- package/vendor/hap-nodejs/dist/lib/definitions/CharacteristicDefinitions.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/definitions/ServiceDefinitions.d.ts +0 -584
- package/vendor/hap-nodejs/dist/lib/definitions/ServiceDefinitions.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/definitions/ServiceDefinitions.js +0 -1518
- package/vendor/hap-nodejs/dist/lib/definitions/ServiceDefinitions.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/definitions/generate-definitions.d.ts +0 -34
- package/vendor/hap-nodejs/dist/lib/definitions/generate-definitions.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/definitions/generate-definitions.js +0 -624
- package/vendor/hap-nodejs/dist/lib/definitions/generate-definitions.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/definitions/generator-configuration.d.ts +0 -22
- package/vendor/hap-nodejs/dist/lib/definitions/generator-configuration.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/definitions/generator-configuration.js +0 -734
- package/vendor/hap-nodejs/dist/lib/definitions/generator-configuration.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/definitions/index.d.ts +0 -3
- package/vendor/hap-nodejs/dist/lib/definitions/index.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/definitions/index.js +0 -6
- package/vendor/hap-nodejs/dist/lib/definitions/index.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/gen/HomeKit.d.ts +0 -8
- package/vendor/hap-nodejs/dist/lib/gen/HomeKit.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/gen/HomeKit.js +0 -9
- package/vendor/hap-nodejs/dist/lib/gen/HomeKit.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/model/AccessoryInfo.d.ts +0 -91
- package/vendor/hap-nodejs/dist/lib/model/AccessoryInfo.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/model/AccessoryInfo.js +0 -311
- package/vendor/hap-nodejs/dist/lib/model/AccessoryInfo.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/model/ControllerStorage.d.ts +0 -46
- package/vendor/hap-nodejs/dist/lib/model/ControllerStorage.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/model/ControllerStorage.js +0 -277
- package/vendor/hap-nodejs/dist/lib/model/ControllerStorage.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/model/HAPFileStorage.d.ts +0 -75
- package/vendor/hap-nodejs/dist/lib/model/HAPFileStorage.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/model/HAPFileStorage.js +0 -190
- package/vendor/hap-nodejs/dist/lib/model/HAPFileStorage.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/model/HAPStorage.d.ts +0 -26
- package/vendor/hap-nodejs/dist/lib/model/HAPStorage.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/model/HAPStorage.js +0 -79
- package/vendor/hap-nodejs/dist/lib/model/HAPStorage.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/model/IdentifierCache.d.ts +0 -33
- package/vendor/hap-nodejs/dist/lib/model/IdentifierCache.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/model/IdentifierCache.js +0 -114
- package/vendor/hap-nodejs/dist/lib/model/IdentifierCache.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/tv/AccessControlManagement.d.ts +0 -83
- package/vendor/hap-nodejs/dist/lib/tv/AccessControlManagement.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/tv/AccessControlManagement.js +0 -127
- package/vendor/hap-nodejs/dist/lib/tv/AccessControlManagement.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/util/checkName.d.ts +0 -8
- package/vendor/hap-nodejs/dist/lib/util/checkName.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/util/checkName.js +0 -28
- package/vendor/hap-nodejs/dist/lib/util/checkName.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/util/clone.d.ts +0 -7
- package/vendor/hap-nodejs/dist/lib/util/clone.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/util/clone.js +0 -22
- package/vendor/hap-nodejs/dist/lib/util/clone.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/util/color-utils.d.ts +0 -18
- package/vendor/hap-nodejs/dist/lib/util/color-utils.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/util/color-utils.js +0 -442
- package/vendor/hap-nodejs/dist/lib/util/color-utils.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/util/eventedhttp.d.ts +0 -251
- package/vendor/hap-nodejs/dist/lib/util/eventedhttp.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/util/eventedhttp.js +0 -714
- package/vendor/hap-nodejs/dist/lib/util/eventedhttp.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/util/hapCrypto.d.ts +0 -50
- package/vendor/hap-nodejs/dist/lib/util/hapCrypto.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/util/hapCrypto.js +0 -185
- package/vendor/hap-nodejs/dist/lib/util/hapCrypto.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/util/hapStatusError.d.ts +0 -16
- package/vendor/hap-nodejs/dist/lib/util/hapStatusError.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/util/hapStatusError.js +0 -29
- package/vendor/hap-nodejs/dist/lib/util/hapStatusError.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/util/net-utils.d.ts +0 -21
- package/vendor/hap-nodejs/dist/lib/util/net-utils.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/util/net-utils.js +0 -79
- package/vendor/hap-nodejs/dist/lib/util/net-utils.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/util/once.d.ts +0 -7
- package/vendor/hap-nodejs/dist/lib/util/once.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/util/once.js +0 -22
- package/vendor/hap-nodejs/dist/lib/util/once.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/util/promise-utils.d.ts +0 -14
- package/vendor/hap-nodejs/dist/lib/util/promise-utils.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/util/promise-utils.js +0 -29
- package/vendor/hap-nodejs/dist/lib/util/promise-utils.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/util/request-util.d.ts +0 -36
- package/vendor/hap-nodejs/dist/lib/util/request-util.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/util/request-util.js +0 -108
- package/vendor/hap-nodejs/dist/lib/util/request-util.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/util/time.d.ts +0 -9
- package/vendor/hap-nodejs/dist/lib/util/time.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/util/time.js +0 -23
- package/vendor/hap-nodejs/dist/lib/util/time.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/util/tlv.d.ts +0 -90
- package/vendor/hap-nodejs/dist/lib/util/tlv.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/util/tlv.js +0 -318
- package/vendor/hap-nodejs/dist/lib/util/tlv.js.map +0 -1
- package/vendor/hap-nodejs/dist/lib/util/uuid.d.ts +0 -23
- package/vendor/hap-nodejs/dist/lib/util/uuid.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/lib/util/uuid.js +0 -78
- package/vendor/hap-nodejs/dist/lib/util/uuid.js.map +0 -1
- package/vendor/hap-nodejs/dist/types.d.ts +0 -276
- package/vendor/hap-nodejs/dist/types.d.ts.map +0 -1
- package/vendor/hap-nodejs/dist/types.js +0 -11
- package/vendor/hap-nodejs/dist/types.js.map +0 -1
- package/vendor/hap-nodejs/package.json +0 -53
- package/vendor/hap-nodejs/src/lib/util/hapCrypto.ts +0 -208
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import { verifiedH264Encoder } from "./media-policy.js";
|
|
2
|
-
import { SecureVideoController } from "@homebridge/hap-nodejs";
|
|
3
|
-
import { MultiTierRtpDelegate } from "./hevc/multi-tier-rtp.js";
|
|
4
|
-
import { WebRtcSessionManager } from "./hevc/webrtc-session.js";
|
|
5
|
-
import { CameraSourceAdapter } from "../source-adapter.js";
|
|
6
|
-
import { h264AudioPlan } from "./media-policy.js";
|
|
7
1
|
import { Accessory, AccessoryInfo, CameraController, Characteristic, Service, uuid, } from "@homebridge/hap-nodejs";
|
|
8
2
|
import { HomeKitCameraStreamingDelegate } from "./homekit-camera-stream.delegate.js";
|
|
9
3
|
import { HomeKitCameraRecordingDelegate, } from "./homekit-camera-recording.delegate.js";
|
|
@@ -13,7 +7,7 @@ import { ScryptedStorage } from "../scrypted/scrypted-storage.js";
|
|
|
13
7
|
import { getHaEntitySearchText } from "../../utils/ha-entity-names.js";
|
|
14
8
|
import { HAP_FIRMWARE_REVISION, HAP_SOFTWARE_REVISION, } from "../../utils/hap-firmware.js";
|
|
15
9
|
import { CameraUiStorage } from "../cameraui/cameraui-storage.js";
|
|
16
|
-
import { detectPrimaryNetworkInterface, } from "./ffmpeg-helper.js";
|
|
10
|
+
import { detectPrimaryNetworkInterface, probeCameraSource, supportsFdkAac, } from "./ffmpeg-helper.js";
|
|
17
11
|
import { NestCameraAdapter } from "../nest/nest-camera-adapter.js";
|
|
18
12
|
import { resolveHaCameraEntityId } from "../cameraui/ha-camera-entity.js";
|
|
19
13
|
import { FfmpegMotionDetector } from "../motion/ffmpeg-motion-detector.js";
|
|
@@ -44,8 +38,6 @@ export class HomeKitCameraAccessory {
|
|
|
44
38
|
streamSource;
|
|
45
39
|
accessory;
|
|
46
40
|
controller;
|
|
47
|
-
secureRtp;
|
|
48
|
-
secureWebRtc;
|
|
49
41
|
delegate;
|
|
50
42
|
recordingDelegate;
|
|
51
43
|
motionService;
|
|
@@ -101,6 +93,10 @@ export class HomeKitCameraAccessory {
|
|
|
101
93
|
Boolean(this.record.serialNumber?.startsWith("CUI-"));
|
|
102
94
|
const hasIntegratedCameraMotion = Boolean(this.streamSource.metadata?.hasCameraMotion);
|
|
103
95
|
const isC120 = this.isTapoC120();
|
|
96
|
+
if (isC120 &&
|
|
97
|
+
(!this.capabilities.maxFps || this.capabilities.maxFps <= 0)) {
|
|
98
|
+
this.capabilities.maxFps = 15;
|
|
99
|
+
}
|
|
104
100
|
const isC402 = this.isTapoC402();
|
|
105
101
|
if (this.linkedMotionEntityId ||
|
|
106
102
|
isScrypted ||
|
|
@@ -195,18 +191,40 @@ export class HomeKitCameraAccessory {
|
|
|
195
191
|
catch { }
|
|
196
192
|
}
|
|
197
193
|
const isStreamingUsable = Boolean(this.streamSource.url) ||
|
|
194
|
+
this.isTapoC402() ||
|
|
195
|
+
this.isTapoC120() ||
|
|
198
196
|
Boolean(this.streamSource.metadata?.isCameraUi) ||
|
|
199
197
|
Boolean(this.streamSource.metadata?.isHaProxyStream);
|
|
200
|
-
this.record.hksvEnabled
|
|
198
|
+
this.record.hksvEnabled = isStreamingUsable;
|
|
201
199
|
this.record.hksvCapable = isStreamingUsable;
|
|
202
200
|
this.record.hksvState = isStreamingUsable ? "waiting_hub" : "not_capable";
|
|
201
|
+
const isTapoC402 = this.isTapoC402();
|
|
203
202
|
const configuredMode = this.record.exportMode || "auto";
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
203
|
+
let effectiveMode = "passthrough_h264";
|
|
204
|
+
if (configuredMode === "disabled") {
|
|
205
|
+
effectiveMode = "disabled";
|
|
206
|
+
}
|
|
207
|
+
else if (isTapoC402) {
|
|
208
|
+
effectiveMode = "passthrough_h264";
|
|
209
|
+
if (configuredMode === "passthrough_hevc") {
|
|
210
|
+
this.platform?.log?.warn?.(`[HomeKitCamera][${this.entityId}] Tapo C402 cannot be configured for HEVC/HKSV3. Forcing passthrough_h264 on classic CameraController.`);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
else if (configuredMode === "passthrough_hevc") {
|
|
214
|
+
effectiveMode = "passthrough_hevc";
|
|
215
|
+
}
|
|
216
|
+
else if (configuredMode === "passthrough_h264") {
|
|
217
|
+
effectiveMode = "passthrough_h264";
|
|
218
|
+
}
|
|
219
|
+
else {
|
|
220
|
+
const rawCodec = (this.capabilities.videoCodec ||
|
|
221
|
+
this.streamSource.metadata?.videoCodec ||
|
|
222
|
+
"").toLowerCase();
|
|
223
|
+
const isHevc = rawCodec.includes("hevc") ||
|
|
224
|
+
rawCodec.includes("265") ||
|
|
225
|
+
rawCodec.includes("hvc1");
|
|
226
|
+
effectiveMode = isHevc ? "passthrough_hevc" : "passthrough_h264";
|
|
227
|
+
}
|
|
210
228
|
if (effectiveMode === "disabled") {
|
|
211
229
|
this.record.activeController = undefined;
|
|
212
230
|
this.platform?.log?.notice?.(`[HomeKitCamera][${this.entityId}] Apple Home export disabled by configuration`);
|
|
@@ -218,82 +236,7 @@ export class HomeKitCameraAccessory {
|
|
|
218
236
|
this.capabilities.requiresTranscoding = false;
|
|
219
237
|
this.capabilities.strategy = "passthrough_hevc";
|
|
220
238
|
}
|
|
221
|
-
|
|
222
|
-
this.configureSecureCameraController();
|
|
223
|
-
else
|
|
224
|
-
this.configureClassicCameraController();
|
|
225
|
-
}
|
|
226
|
-
configureSecureCameraController() {
|
|
227
|
-
const c = this.capabilities;
|
|
228
|
-
const width = c.measuredVideo?.width || c.resolution.width, height = c.measuredVideo?.height || c.resolution.height, fps = c.measuredVideo?.fps || c.maxFps;
|
|
229
|
-
if (!(width > 0 && height > 0 && fps > 0))
|
|
230
|
-
throw new Error("Secure Video needs known source dimensions and FPS");
|
|
231
|
-
const videoTiers = [
|
|
232
|
-
{
|
|
233
|
-
identifier: 1,
|
|
234
|
-
quality: 2,
|
|
235
|
-
width,
|
|
236
|
-
height,
|
|
237
|
-
frameRate: fps,
|
|
238
|
-
targetAverageBitrate: c.measuredVideo?.bitrateKbps || 1800,
|
|
239
|
-
peakBitrate: c.measuredVideo?.bitrateKbps || 2000,
|
|
240
|
-
},
|
|
241
|
-
];
|
|
242
|
-
const audioTier = {
|
|
243
|
-
identifier: 1,
|
|
244
|
-
targetAverageBitrate: 24000,
|
|
245
|
-
sampleRate: 4,
|
|
246
|
-
bitDepth: 2,
|
|
247
|
-
packetTime: 20,
|
|
248
|
-
channels: 1,
|
|
249
|
-
};
|
|
250
|
-
this.recordingDelegate = new HevcRecordingDelegate(this.platform, this.entityId, this.record, c, this.streamSource);
|
|
251
|
-
this.secureRtp = new MultiTierRtpDelegate(this.platform, this.entityId, c, this.streamSource, { videoTiers, audioTier, videoPayloadType: 99, audioPayloadType: 110 });
|
|
252
|
-
this.secureWebRtc = new WebRtcSessionManager(this.platform, this.entityId, c, this.streamSource, videoTiers);
|
|
253
|
-
const snapshotDelegate = new HomeKitCameraStreamingDelegate(this.platform, this.entityId, c, this.streamSource, this.record);
|
|
254
|
-
this.delegate = snapshotDelegate;
|
|
255
|
-
this.controller = new SecureVideoController({
|
|
256
|
-
sensor: { uuid: this.record.uuid, width, height, type: 1, intent: 1 },
|
|
257
|
-
video: { codec: 2, payloadType: 99, tiers: videoTiers },
|
|
258
|
-
...(c.hasAudio
|
|
259
|
-
? { audio: { payloadType: 110, tier: audioTier, twoWayAudio: false } }
|
|
260
|
-
: {}),
|
|
261
|
-
rtp: { delegate: this.secureRtp },
|
|
262
|
-
webrtc: { delegate: this.secureWebRtc, maxSessions: 6 },
|
|
263
|
-
recording: {
|
|
264
|
-
delegate: this.recordingDelegate,
|
|
265
|
-
options: {
|
|
266
|
-
prebufferLength: 8000,
|
|
267
|
-
mediaContainerConfiguration: { type: 0, fragmentLength: 4000 },
|
|
268
|
-
video: {
|
|
269
|
-
type: 0,
|
|
270
|
-
parameters: { profiles: [1], levels: [0, 1, 2] },
|
|
271
|
-
resolutions: [[width, height, fps]],
|
|
272
|
-
},
|
|
273
|
-
audio: { codecs: { type: 0, audioChannels: 1, samplerate: [5] } },
|
|
274
|
-
},
|
|
275
|
-
},
|
|
276
|
-
...(this.motionService ? { motionService: this.motionService } : {}),
|
|
277
|
-
snapshot: (request) => new Promise((resolve, reject) => snapshotDelegate.handleSnapshotRequest({
|
|
278
|
-
width: request?.width || width,
|
|
279
|
-
height: request?.height || height,
|
|
280
|
-
}, (error, data) => (error ? reject(error) : resolve(data)))),
|
|
281
|
-
});
|
|
282
|
-
for (const delegate of [this.secureRtp, this.secureWebRtc]) {
|
|
283
|
-
delegate.on("session-start", () => this.recordingDelegate?.pausePrebuffer());
|
|
284
|
-
delegate.on("recording-data", (chunk) => {
|
|
285
|
-
const recording = this.recordingDelegate;
|
|
286
|
-
if (recording && "ingestLiveViewRecordingChunk" in recording)
|
|
287
|
-
recording.ingestLiveViewRecordingChunk(chunk);
|
|
288
|
-
});
|
|
289
|
-
delegate.on("session-end", () => {
|
|
290
|
-
if (!this.secureRtp?.hasActiveReader &&
|
|
291
|
-
!this.secureWebRtc?.hasActiveReader)
|
|
292
|
-
this.recordingDelegate?.resumePrebuffer();
|
|
293
|
-
});
|
|
294
|
-
}
|
|
295
|
-
this.accessory.configureController(this.controller);
|
|
296
|
-
this.record.activeController = "SecureVideoController";
|
|
239
|
+
this.configureClassicCameraController();
|
|
297
240
|
}
|
|
298
241
|
configureClassicCameraController() {
|
|
299
242
|
this.record.activeController = "CameraController";
|
|
@@ -334,6 +277,45 @@ export class HomeKitCameraAccessory {
|
|
|
334
277
|
this.accessory.configureController(this.controller);
|
|
335
278
|
this.platform?.log?.notice?.(`[HomeKitCamera][${this.entityId}] Configured classic CameraController (${isHevc ? "HEVC/HKSV3 passthrough" : "H.264 passthrough"})`);
|
|
336
279
|
}
|
|
280
|
+
previewBusy = false;
|
|
281
|
+
async acquireBrowserPreview(stop) {
|
|
282
|
+
if (this.previewBusy || this.delegate?.hasActiveSessions())
|
|
283
|
+
throw new Error("Casa está usando la cámara");
|
|
284
|
+
this.previewBusy = true;
|
|
285
|
+
let released = false;
|
|
286
|
+
const release = () => {
|
|
287
|
+
if (released)
|
|
288
|
+
return;
|
|
289
|
+
released = true;
|
|
290
|
+
this.previewBusy = false;
|
|
291
|
+
this.delegate?.off("session-start", stop);
|
|
292
|
+
if (!this.delegate?.hasActiveSessions()) {
|
|
293
|
+
this.recordingDelegate?.resumePrebuffer();
|
|
294
|
+
this.localMotionDetector?.resume(this.platform?.log, "Preview terminada");
|
|
295
|
+
}
|
|
296
|
+
};
|
|
297
|
+
this.delegate?.once("session-start", stop);
|
|
298
|
+
this.recordingDelegate?.pausePrebuffer();
|
|
299
|
+
this.localMotionDetector?.pause(this.platform?.log, "Preview temporal");
|
|
300
|
+
try {
|
|
301
|
+
await new Promise((resolve) => setImmediate(resolve));
|
|
302
|
+
const sourceId = this.streamSource.metadata?.sourceCameraEntityId || this.entityId;
|
|
303
|
+
const url = this.streamSource.metadata?.isOmniTuyaDirect
|
|
304
|
+
? await this.platform?.ha?.requestOmniTuyaCameraStream?.(sourceId)
|
|
305
|
+
: this.streamSource.url;
|
|
306
|
+
this.recordingDelegate?.pausePrebuffer();
|
|
307
|
+
this.localMotionDetector?.pause(this.platform?.log, "Preview temporal");
|
|
308
|
+
if (!url ||
|
|
309
|
+
!/^rtsps?:\/\//i.test(url) ||
|
|
310
|
+
this.delegate?.hasActiveSessions())
|
|
311
|
+
throw new Error("Fuente ocupada o no compatible");
|
|
312
|
+
return { url, release };
|
|
313
|
+
}
|
|
314
|
+
catch (error) {
|
|
315
|
+
release();
|
|
316
|
+
throw error;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
337
319
|
configureAccessoryInformation() {
|
|
338
320
|
const mfr = "Matter All-In-One Chrisalvir";
|
|
339
321
|
const model = (this.record.model || "Network Camera")
|
|
@@ -349,21 +331,35 @@ export class HomeKitCameraAccessory {
|
|
|
349
331
|
}
|
|
350
332
|
buildControllerOptions() {
|
|
351
333
|
const isStreamingUsable = Boolean(this.streamSource.url) ||
|
|
334
|
+
this.isTapoC402() ||
|
|
335
|
+
this.isTapoC120() ||
|
|
352
336
|
Boolean(this.streamSource.metadata?.isCameraUi) ||
|
|
353
337
|
Boolean(this.streamSource.metadata?.isHaProxyStream);
|
|
354
338
|
// Do not negotiate AAC-ELD unless this exact FFmpeg binary can encode it.
|
|
355
339
|
// The native FFmpeg `aac` encoder only emits AAC-LC; advertising AAC-ELD
|
|
356
340
|
// and then sending AAC-LC makes HomeKit reject the audio RTP stream.
|
|
357
|
-
const
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
341
|
+
const audioCodecs = [
|
|
342
|
+
...(supportsFdkAac()
|
|
343
|
+
? [
|
|
344
|
+
{
|
|
345
|
+
type: "AAC-eld" /* AudioStreamingCodecType.AAC_ELD */,
|
|
346
|
+
samplerate: 16 /* AudioStreamingSamplerate.KHZ_16 */,
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
type: "AAC-eld" /* AudioStreamingCodecType.AAC_ELD */,
|
|
350
|
+
samplerate: 24 /* AudioStreamingSamplerate.KHZ_24 */,
|
|
351
|
+
},
|
|
352
|
+
]
|
|
353
|
+
: []),
|
|
354
|
+
{
|
|
355
|
+
type: "OPUS" /* AudioStreamingCodecType.OPUS */,
|
|
356
|
+
samplerate: 16 /* AudioStreamingSamplerate.KHZ_16 */,
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
type: "OPUS" /* AudioStreamingCodecType.OPUS */,
|
|
360
|
+
samplerate: 24 /* AudioStreamingSamplerate.KHZ_24 */,
|
|
361
|
+
},
|
|
362
|
+
];
|
|
367
363
|
const options = {
|
|
368
364
|
cameraStreamCount: 2,
|
|
369
365
|
delegate: this.delegate,
|
|
@@ -384,9 +380,13 @@ export class HomeKitCameraAccessory {
|
|
|
384
380
|
// startup URL may have expired before its audio SDP can be measured.
|
|
385
381
|
// Offer the standard audio codecs for Omni and validate the fresh URL
|
|
386
382
|
// immediately before spawning FFmpeg in the streaming delegate.
|
|
387
|
-
audio:
|
|
383
|
+
audio: this.capabilities.hasAudio ||
|
|
384
|
+
this.streamSource.metadata?.isOmniTuyaDirect
|
|
388
385
|
? {
|
|
389
386
|
codecs: audioCodecs,
|
|
387
|
+
twoWayAudio: this.streamSource.metadata?.omniTwoWayAudio === true ||
|
|
388
|
+
this.streamSource.metadata?.isOmniTuyaDirect === true ||
|
|
389
|
+
/(?:\bomni\b|\btuya\b|comedero|feeder|acf100)/i.test(`${this.entityId} ${String(this.record?.name || "")} ${String(this.record?.model || "")}`),
|
|
390
390
|
}
|
|
391
391
|
: undefined,
|
|
392
392
|
},
|
|
@@ -395,7 +395,7 @@ export class HomeKitCameraAccessory {
|
|
|
395
395
|
if (isStreamingUsable && this.recordingDelegate) {
|
|
396
396
|
options.recording = {
|
|
397
397
|
options: {
|
|
398
|
-
prebufferLength:
|
|
398
|
+
prebufferLength: 4000,
|
|
399
399
|
overrideEventTriggerOptions: [1 /* EventTriggerOption.MOTION */],
|
|
400
400
|
mediaContainerConfiguration: {
|
|
401
401
|
type: 0 /* MediaContainerType.FRAGMENTED_MP4 */,
|
|
@@ -421,7 +421,10 @@ export class HomeKitCameraAccessory {
|
|
|
421
421
|
codecs: {
|
|
422
422
|
type: 0 /* AudioRecordingCodecType.AAC_LC */,
|
|
423
423
|
audioChannels: 1,
|
|
424
|
-
samplerate: [
|
|
424
|
+
samplerate: [
|
|
425
|
+
1 /* AudioRecordingSamplerate.KHZ_16 */,
|
|
426
|
+
3 /* AudioRecordingSamplerate.KHZ_32 */,
|
|
427
|
+
],
|
|
425
428
|
},
|
|
426
429
|
},
|
|
427
430
|
},
|
|
@@ -431,7 +434,41 @@ export class HomeKitCameraAccessory {
|
|
|
431
434
|
return options;
|
|
432
435
|
}
|
|
433
436
|
buildRecordingResolutions() {
|
|
434
|
-
|
|
437
|
+
const isC120 = this.isTapoC120();
|
|
438
|
+
const source = this.capabilities.resolution || {
|
|
439
|
+
width: 1920,
|
|
440
|
+
height: 1080,
|
|
441
|
+
};
|
|
442
|
+
const width = isC120 ? 1920 : source.width || 1920;
|
|
443
|
+
const height = isC120 ? 1080 : source.height || 1080;
|
|
444
|
+
const measured = this.capabilities.measuredVideo?.fps;
|
|
445
|
+
const detectedFps = (measured && measured > 0 ? Math.round(measured) : undefined) ??
|
|
446
|
+
this.capabilities.maxFps ??
|
|
447
|
+
this.record?.fps ??
|
|
448
|
+
(isC120 ? 15 : 30);
|
|
449
|
+
const cameraMax = Math.max(10, Math.min(detectedFps, 60));
|
|
450
|
+
const dynamicFps = cameraMax;
|
|
451
|
+
const candidates = [
|
|
452
|
+
[width, height, dynamicFps],
|
|
453
|
+
...(width >= 3840
|
|
454
|
+
? [[2560, 1440, dynamicFps]]
|
|
455
|
+
: []),
|
|
456
|
+
...(width > 1920 && width < 3840
|
|
457
|
+
? [[2560, 1440, dynamicFps]]
|
|
458
|
+
: []),
|
|
459
|
+
[1920, 1080, dynamicFps],
|
|
460
|
+
[1280, 720, dynamicFps],
|
|
461
|
+
];
|
|
462
|
+
const seen = new Set();
|
|
463
|
+
const res = [];
|
|
464
|
+
for (const [w, h, f] of candidates) {
|
|
465
|
+
const key = `${w}x${h}`;
|
|
466
|
+
if (!seen.has(key)) {
|
|
467
|
+
seen.add(key);
|
|
468
|
+
res.push([w, h, f]);
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
return res;
|
|
435
472
|
}
|
|
436
473
|
nativeH264Profile() {
|
|
437
474
|
const profile = (this.capabilities.videoProfile || "").toLowerCase();
|
|
@@ -444,22 +481,53 @@ export class HomeKitCameraAccessory {
|
|
|
444
481
|
return 2 /* H264Profile.HIGH */;
|
|
445
482
|
}
|
|
446
483
|
buildDeclaredResolutions() {
|
|
447
|
-
const
|
|
448
|
-
const
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
484
|
+
const isC120 = this.isTapoC120();
|
|
485
|
+
const source = this.capabilities.resolution || {
|
|
486
|
+
width: 1920,
|
|
487
|
+
height: 1080,
|
|
488
|
+
};
|
|
489
|
+
const width = source.width || 1920;
|
|
490
|
+
const height = source.height || 1080;
|
|
491
|
+
const cameraMax = isC120 ? 20 : this.capabilities.maxFps || 30;
|
|
492
|
+
const sourceFps = Math.max(15, Math.min(this.capabilities.maxFps || cameraMax, isC120 ? 20 : 60));
|
|
493
|
+
const dynamicFps = Math.min(sourceFps, cameraMax);
|
|
494
|
+
// Tapo C120: Advertises native ladder matching stream capabilities.
|
|
495
|
+
// Uses real measured/configured FPS dynamically (typically 15-20fps).
|
|
496
|
+
if (isC120) {
|
|
497
|
+
const measured = this.capabilities.measuredVideo?.fps;
|
|
498
|
+
const detectedFps = (measured && measured > 0 ? Math.round(measured) : undefined) ??
|
|
499
|
+
this.capabilities.maxFps ??
|
|
500
|
+
this.record?.fps ??
|
|
501
|
+
15;
|
|
502
|
+
const dynamicC120Fps = Math.max(10, Math.min(detectedFps, 30));
|
|
503
|
+
const resList = [];
|
|
504
|
+
if (width > 1920) {
|
|
505
|
+
resList.push([2560, 1440, dynamicC120Fps]);
|
|
506
|
+
}
|
|
507
|
+
resList.push([1920, 1080, dynamicC120Fps], [1280, 720, dynamicC120Fps], [640, 360, dynamicC120Fps], [480, 270, dynamicC120Fps], [320, 180, dynamicC120Fps]);
|
|
508
|
+
return resList;
|
|
509
|
+
}
|
|
510
|
+
const ladder = [
|
|
511
|
+
[width, height, dynamicFps],
|
|
512
|
+
...(width > 1920
|
|
513
|
+
? [[2560, 1440, dynamicFps]]
|
|
514
|
+
: []),
|
|
515
|
+
[1920, 1080, dynamicFps],
|
|
516
|
+
[1280, 720, dynamicFps],
|
|
517
|
+
[640, 360, Math.min(dynamicFps, 30)],
|
|
518
|
+
[480, 270, Math.min(dynamicFps, 30)],
|
|
519
|
+
[320, 180, Math.min(dynamicFps, 30)],
|
|
520
|
+
];
|
|
521
|
+
const seen = new Set();
|
|
522
|
+
const unique = [];
|
|
523
|
+
for (const res of ladder) {
|
|
524
|
+
const key = `${res[0]}x${res[1]}`;
|
|
525
|
+
if (!seen.has(key)) {
|
|
526
|
+
seen.add(key);
|
|
527
|
+
unique.push(res);
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
return unique;
|
|
463
531
|
}
|
|
464
532
|
/**
|
|
465
533
|
* Construye los niveles H.264 declarados en SupportedVideoStreamConfiguration.
|
|
@@ -470,23 +538,6 @@ export class HomeKitCameraAccessory {
|
|
|
470
538
|
}
|
|
471
539
|
/** Read-only description of Live View capabilities advertised by this accessory. */
|
|
472
540
|
getLiveViewCapabilitiesDiagnostic() {
|
|
473
|
-
if (this.record.activeController === "SecureVideoController")
|
|
474
|
-
return {
|
|
475
|
-
codec: "hevc",
|
|
476
|
-
profiles: this.capabilities.videoProfile
|
|
477
|
-
? [this.capabilities.videoProfile]
|
|
478
|
-
: [],
|
|
479
|
-
levels: this.capabilities.measuredVideo?.level
|
|
480
|
-
? [this.capabilities.measuredVideo.level]
|
|
481
|
-
: [],
|
|
482
|
-
resolutions: [
|
|
483
|
-
[
|
|
484
|
-
this.capabilities.resolution.width,
|
|
485
|
-
this.capabilities.resolution.height,
|
|
486
|
-
this.capabilities.maxFps,
|
|
487
|
-
],
|
|
488
|
-
],
|
|
489
|
-
};
|
|
490
541
|
return {
|
|
491
542
|
codec: "h264",
|
|
492
543
|
profiles: ["baseline", "main", "high"],
|
|
@@ -865,8 +916,6 @@ export class HomeKitCameraAccessory {
|
|
|
865
916
|
this.platform?.log?.notice?.(`[HomeKitCamera][${this.entityId}] Camera un-paired from Apple Home`);
|
|
866
917
|
this.recordingDelegate?.updateRecordingActive(false);
|
|
867
918
|
this.delegate?.cleanupAllSessions();
|
|
868
|
-
void this.secureRtp?.stopAll();
|
|
869
|
-
void this.secureWebRtc?.closeAll();
|
|
870
919
|
void this.platform?.saveHomeKitCameraRecords?.();
|
|
871
920
|
this.notifyPairingStateChanged(false);
|
|
872
921
|
});
|
|
@@ -890,6 +939,9 @@ export class HomeKitCameraAccessory {
|
|
|
890
939
|
if (!this.streamSource.metadata?.isCameraUi &&
|
|
891
940
|
!this.streamSource.metadata?.capabilitiesProbedBeforePublish) {
|
|
892
941
|
void this.probeAndAdaptCapabilities();
|
|
942
|
+
setTimeout(() => {
|
|
943
|
+
void this.delegate?.handleSnapshotRequest({ width: 1280, height: 720 }, () => { });
|
|
944
|
+
}, 1500);
|
|
893
945
|
}
|
|
894
946
|
}
|
|
895
947
|
/**
|
|
@@ -909,7 +961,10 @@ export class HomeKitCameraAccessory {
|
|
|
909
961
|
cameraId: this.entityId,
|
|
910
962
|
cameraName: this.record.name || this.entityId,
|
|
911
963
|
rtspUrl: this.streamSource.url || "",
|
|
912
|
-
|
|
964
|
+
// A feeder animal can cross this close, narrow frame between 1 FPS
|
|
965
|
+
// samples. Two frames per second improves trigger coverage at the same
|
|
966
|
+
// small 160x90 analysis size without opening another RTSP reader.
|
|
967
|
+
fps: 2,
|
|
913
968
|
reportAllFrameChanges: true,
|
|
914
969
|
resolveRtspUrl: async () => await this.platform.ha.requestOmniTuyaCameraStream(sourceCameraEntityId),
|
|
915
970
|
});
|
|
@@ -920,9 +975,7 @@ export class HomeKitCameraAccessory {
|
|
|
920
975
|
this.localMotionDetector.start(this.platform?.log);
|
|
921
976
|
}
|
|
922
977
|
async probeAndAdaptCapabilities() {
|
|
923
|
-
if (!this.streamSource.url
|
|
924
|
-
this.isStreaming ||
|
|
925
|
-
this.streamSource.metadata?.isOmniTuyaDirect)
|
|
978
|
+
if (!this.streamSource.url)
|
|
926
979
|
return;
|
|
927
980
|
try {
|
|
928
981
|
// Omni Tuya URLs are single-session signed RTSP credentials. Probe a
|
|
@@ -933,15 +986,11 @@ export class HomeKitCameraAccessory {
|
|
|
933
986
|
: this.streamSource.url;
|
|
934
987
|
if (!probeUrl)
|
|
935
988
|
return;
|
|
936
|
-
const
|
|
937
|
-
|
|
989
|
+
const probe = await probeCameraSource(probeUrl, {
|
|
990
|
+
timeoutMs: 4000,
|
|
991
|
+
});
|
|
938
992
|
if (probe.valid && probe.videoCodec) {
|
|
939
|
-
this.capabilities.audioProvenance = "PROBED";
|
|
940
993
|
const codec = probe.videoCodec.toLowerCase();
|
|
941
|
-
if (!["hevc", "h265", "h264"].includes(codec)) {
|
|
942
|
-
this.capabilities.hasLiveStream = false;
|
|
943
|
-
return;
|
|
944
|
-
}
|
|
945
994
|
const isHevc = codec.includes("hevc") || codec.includes("265");
|
|
946
995
|
this.capabilities.videoCodec = isHevc ? "hevc" : "h264";
|
|
947
996
|
this.capabilities.requiresTranscoding = false;
|
|
@@ -953,8 +1002,11 @@ export class HomeKitCameraAccessory {
|
|
|
953
1002
|
}
|
|
954
1003
|
if (probe.hasAudio && probe.audioCodec) {
|
|
955
1004
|
const audioCodec = probe.audioCodec.toLowerCase();
|
|
956
|
-
this.capabilities.audioCodec =
|
|
957
|
-
|
|
1005
|
+
this.capabilities.audioCodec = audioCodec.includes("aac")
|
|
1006
|
+
? "aac_lc"
|
|
1007
|
+
: audioCodec.includes("opus")
|
|
1008
|
+
? "opus"
|
|
1009
|
+
: "pcm";
|
|
958
1010
|
this.capabilities.audioSampleRate = probe.audioSampleRate;
|
|
959
1011
|
this.capabilities.audioChannels = probe.audioChannels;
|
|
960
1012
|
}
|
|
@@ -983,7 +1035,6 @@ export class HomeKitCameraAccessory {
|
|
|
983
1035
|
fps: probe.fps,
|
|
984
1036
|
bitrateKbps: probe.bitrateKbps,
|
|
985
1037
|
pixFmt: probe.pixFmt,
|
|
986
|
-
metadataSource: "ffprobe",
|
|
987
1038
|
};
|
|
988
1039
|
this.platform?.log?.notice?.(`[HomeKitCamera][${this.entityId}] Probed capabilities: codec=${probe.videoCodec} ${probe.width}x${probe.height}@${probe.fps}fps hasAudio=${probe.hasAudio} -> strategy=${this.capabilities.strategy}`);
|
|
989
1040
|
if (this.entityId.includes("cameraui")) {
|
|
@@ -1087,23 +1138,10 @@ export class HomeKitCameraAccessory {
|
|
|
1087
1138
|
isPaired() {
|
|
1088
1139
|
return this.getPairingState() === "paired";
|
|
1089
1140
|
}
|
|
1090
|
-
getLiveViewTelemetry() {
|
|
1091
|
-
return {
|
|
1092
|
-
...(this.delegate?.getLiveViewTelemetry() || { active: [], recent: [] }),
|
|
1093
|
-
secure: {
|
|
1094
|
-
rtp: this.secureRtp?.getStartupDiagnostics(),
|
|
1095
|
-
webRTC: this.secureWebRtc?.getStartupDiagnostics(),
|
|
1096
|
-
},
|
|
1097
|
-
};
|
|
1098
|
-
}
|
|
1099
1141
|
get isStreaming() {
|
|
1100
|
-
return
|
|
1101
|
-
this.secureRtp?.isStreaming ||
|
|
1102
|
-
this.secureWebRtc?.isStreaming);
|
|
1142
|
+
return this.delegate?.isStreaming ?? false;
|
|
1103
1143
|
}
|
|
1104
1144
|
async unpublish() {
|
|
1105
|
-
await this.secureRtp?.stopAll();
|
|
1106
|
-
await this.secureWebRtc?.closeAll();
|
|
1107
1145
|
this.delegate?.cleanupAllSessions();
|
|
1108
1146
|
this.recordingDelegate?.updateRecordingActive(false);
|
|
1109
1147
|
this.localMotionDetector?.stop(this.platform?.log);
|