Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
2e12ebc
Add HKSV 17.99 camera services and characteristics to the catalog
RaHehl Nov 8, 2026
207041c
Fix the camera operating mode characteristic permissions
RaHehl Nov 8, 2026
f83c74c
Add TLV8 codecs for the HKSV 17.99 camera values
RaHehl Nov 8, 2026
576f6e7
Add HKSV 17.99 camera capabilities and motion zones
RaHehl Nov 8, 2026
3dea2d5
Add the HKSV 17.99 camera global operating mode
RaHehl Nov 8, 2026
787a525
Return -70405 when reading a characteristic without paired read
RaHehl Nov 8, 2026
071f96d
Answer -70406 for event subscriptions without notify permission
RaHehl Nov 8, 2026
3fd5a1b
Return -70404 when writing a characteristic without paired write
RaHehl Nov 8, 2026
93d17d3
Ignore timed writes with an unknown or expired pid
RaHehl Nov 8, 2026
e09ecbd
Split building the characteristics write response into helpers
RaHehl Nov 8, 2026
1ef0721
Only send write responses for characteristics with wr permission
RaHehl Nov 8, 2026
9ef52f7
Check the timed write permission on writes
RaHehl Nov 8, 2026
3082bba
Await async characteristic setters before answering the write
RaHehl Nov 8, 2026
f946d1f
Only let the writing connection read back a write response
RaHehl Nov 8, 2026
aeaafaf
Merge branch 'enforce-permissions' into enforce-timed-write
RaHehl Nov 8, 2026
9b2c4d0
Merge branch 'enforce-timed-write' into async-setters
RaHehl Nov 8, 2026
c4c842b
Test write response privacy with async setters
RaHehl Nov 8, 2026
ab604de
Merge remote-tracking branch 'upstream/dev' into enforce-permissions
RaHehl Nov 10, 2026
8f298c6
Drop the redundant bool() around the write response check
RaHehl Nov 10, 2026
ff12fb6
Type the write response helpers with the HAP JSON value types
RaHehl Nov 10, 2026
c9ed715
Explain why a private write puts the former value back
RaHehl Nov 10, 2026
93abcd8
Merge branch 'enforce-permissions' into enforce-timed-write
RaHehl Nov 10, 2026
f76d810
Merge branch 'enforce-timed-write' into async-setters
RaHehl Nov 10, 2026
f3b5ce5
Merge remote-tracking branch 'upstream/dev' into hksv3-operating-mode
RaHehl Nov 10, 2026
3bc3d7a
Tell accessories when a controller's connection closes
RaHehl Nov 9, 2026
c7e554d
Accept only a canonical IP address in Setup Endpoints
RaHehl Nov 9, 2026
af8d2c0
Keep the Setup Endpoints answer per connection
RaHehl Nov 9, 2026
9b47781
Merge branch 'hksv3-operating-mode' into hksv3-stream-services
RaHehl Nov 10, 2026
64a1d86
Merge branch 'camera-connection-hooks' into hksv3-stream-services
RaHehl Nov 10, 2026
3def9b4
Add TLV8 codecs for the HKSV 17.99 multi-tier RTP stream management
RaHehl Nov 8, 2026
e7e0de4
Add TLV8 codecs for the HKSV 17.99 WebRTC stream management
RaHehl Nov 8, 2026
e445c4a
Add the session state machine of the HKSV 17.99 stream services
RaHehl Nov 9, 2026
4e2f705
Add the HKSV 17.99 multi-tier RTP and WebRTC stream services
RaHehl Nov 9, 2026
f46b75f
Set up, start and end HKSV 17.99 multi-tier RTP sessions
RaHehl Nov 9, 2026
42d549f
Stream HKSV 17.99 multi-tier sessions with ffmpeg
RaHehl Nov 9, 2026
d2190a9
Solicit, answer and end HKSV 17.99 WebRTC sessions
RaHehl Nov 9, 2026
c8e3fc4
Renegotiate HKSV 17.99 WebRTC sessions and update their keys
RaHehl Nov 9, 2026
dd42ed5
Keep reading ffmpeg's output in chunks so status lines can't block it
RaHehl Nov 10, 2026
2e00188
Don't tell subscribers the request of a write with r
RaHehl Nov 10, 2026
0aa3907
Merge branch 'enforce-permissions' into enforce-timed-write
RaHehl Nov 10, 2026
d130cfb
Type the timed write pid and ignore a pid that is not an int
RaHehl Nov 10, 2026
4fcf261
Bound the SFrame keys and SDP m-line indexes controllers send
RaHehl Nov 10, 2026
2374093
Tighten multi-tier and WebRTC session handling
RaHehl Nov 10, 2026
81746e4
Merge branch 'enforce-timed-write' into async-setters
RaHehl Nov 10, 2026
3a593d7
Name the fields of a pending async write and keep write_response a bool
RaHehl Nov 10, 2026
08b3f51
Merge branch 'async-setters' into setup-endpoints-per-connection
RaHehl Nov 10, 2026
1b10be9
Keep read back answers private, also when the setter sets them
RaHehl Nov 10, 2026
58a0356
Test a closed connection without an accessory
RaHehl Nov 10, 2026
8a0c11e
Normalize Setup Endpoints addresses and keep set_endpoints returning …
RaHehl Nov 10, 2026
770db17
Run test_start_from_sync on the driver's own loop
RaHehl Nov 10, 2026
83b3e66
Merge branch 'enforce-timed-write' into async-setters
RaHehl Nov 10, 2026
3bb7ca1
Merge branch 'async-setters' into setup-endpoints-per-connection
RaHehl Nov 10, 2026
142ce33
Merge remote-tracking branch 'upstream/dev' into enforce-timed-write
RaHehl Nov 10, 2026
312dd18
Merge branch 'enforce-timed-write' into async-setters
RaHehl Nov 10, 2026
4bec70d
Merge branch 'async-setters' into setup-endpoints-per-connection
RaHehl Nov 10, 2026
f16828d
Merge remote-tracking branch 'upstream/dev' into camera-connection-hooks
RaHehl Nov 10, 2026
18cbcbb
Answer a Setup Endpoints refused while streaming is off only to the w…
RaHehl Nov 10, 2026
82f878a
Merge branch 'setup-endpoints-per-connection' into hksv3-stream-services
RaHehl Nov 10, 2026
2579461
Merge branch 'camera-connection-hooks' into hksv3-stream-services
RaHehl Nov 10, 2026
c2e659a
Test that a refused Setup Endpoints reaches only the writer
RaHehl Nov 10, 2026
874e697
Decode the stream service UUIDs with UUID(bytes=...) like the zones
RaHehl Nov 10, 2026
d1a82f9
Merge remote-tracking branch 'upstream/dev' into setup-endpoints-per-…
RaHehl Nov 10, 2026
54d0a0d
Merge remote-tracking branch 'upstream/dev' into setup-endpoints-per-…
RaHehl Nov 10, 2026
29cc0eb
Merge branch 'setup-endpoints-per-connection' into hksv3-stream-services
RaHehl Nov 10, 2026
b28c8c8
Keep setting the Setup Endpoints answer as the value
RaHehl Nov 10, 2026
a9af038
Merge branch 'setup-endpoints-per-connection' into hksv3-stream-services
RaHehl Nov 10, 2026
547520e
Add TLV8 codecs for the HKSV 17.99 multi-tier RTP stream management
RaHehl Nov 8, 2026
fb85384
Add TLV8 codecs for the HKSV 17.99 WebRTC stream management
RaHehl Nov 8, 2026
bac70f6
Bound the SFrame keys and SDP m-line indexes controllers send
RaHehl Nov 10, 2026
159abfc
Decode the stream service UUIDs with UUID(bytes=...) like the zones
RaHehl Nov 10, 2026
bc13fe7
Merge branch 'hksv3-stream-codecs' into hksv3-stream-services
RaHehl Nov 10, 2026
74b2ebc
Leave the ffmpeg reference delegate out of the stream services
RaHehl Nov 10, 2026
b9c04fd
Keep the public API of the stream services small
RaHehl Nov 10, 2026
0ea5491
Keep sessions counted until released and stream requests private
RaHehl Nov 10, 2026
3f4d39c
Reject SSRCs above 32 bits and match guide bit rates by pixel count
RaHehl Nov 10, 2026
d1d1263
Merge branch 'hksv3-stream-codecs' into hksv3-stream-services
RaHehl Nov 10, 2026
e1213e9
Answer End once a failed release finished and check delegate results
RaHehl Nov 10, 2026
2b2c3b0
Hold frames above 4K to the guide's 4K bit rates and test the largest…
RaHehl Nov 10, 2026
999c170
Merge branch 'hksv3-stream-codecs' into hksv3-stream-services
RaHehl Nov 10, 2026
6946b24
Check the address a prepare hook sets against the session's family
RaHehl Nov 10, 2026
6053c53
Answer Error when the reoffer hook returns no WebRTCReofferAnswer
RaHehl Nov 10, 2026
ca12437
Warn about release errors raised after the release timed out
RaHehl Nov 10, 2026
7322943
Reject scoped and IPv4-mapped accessory addresses
RaHehl Nov 10, 2026
e2caa86
Merge branch 'dev' into hksv3-stream-services
RaHehl Nov 10, 2026
6493ae0
Merge branch 'dev' into hksv3-stream-followup
RaHehl Nov 10, 2026
c06152f
Merge branch 'dev' into hksv3-stream-followup
RaHehl Nov 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyhap/accessory_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -1124,7 +1124,7 @@ def derive_session_key(
return None
return connection.derive_key(salt, info)

def local_address(
def _local_address(
self, client_addr: tuple[str, int] | None, ipv6: bool
) -> str | None:
"""The accessory's address on a controller's connection.
Expand Down
30 changes: 3 additions & 27 deletions pyhap/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ def __init__(self, options: dict[str, Any], *args: Any, **kwargs: Any) -> None:
``audio``: iOS 27 shows a camera without the classic RTP stream
management service as not responding. Its services come before
the RTP stream management services, which then get a new
``unique_id``; for a paired camera this changes instance IDs.
``unique_id``. For a paired camera this changes instance IDs.
- webrtc - :class:`pyhap.camera_webrtc.WebRTCConfig`, or a dict of
its fields. Developer Preview of HomeKit Secure Video 17.99,
experimental. Adds a Camera WebRTC Stream Management service per
Expand Down Expand Up @@ -875,45 +875,21 @@ def _update_stream_status(self) -> None:
for controller in self._stream_controllers():
controller.update_status()

def stream_address_for(
def _stream_address_for(
self, client_addr: tuple[str, int] | None, is_ipv6: bool
) -> str | None:
"""The address to stream from to a controller, in the given IP version.

The accessory's address on the controller's connection, else the
``address`` option if it has that version.
"""
address = self.driver.local_address(client_addr, is_ipv6)
address = self.driver._local_address(client_addr, is_ipv6)
if address is not None:
return address
if (self.stream_address_isv6 == b"\x01") == is_ipv6:
return str(self.stream_address)
return None

async def end_session(self, session_id: UUID) -> bool:
"""End a multi-tier or WebRTC session (17.99) on the camera's side.

E.g. when its media source stopped. Ends the sessions with that ID of
every sensor and service and waits until their delegates released
them. Returns False if there is no such session.
"""
ended = await asyncio.gather(
*(
controller.end_session(session_id)
for controller in self._stream_controllers()
)
)
return any(ended)

async def end_all_sessions(self) -> None:
"""End every multi-tier and WebRTC session (17.99) and wait for them."""
await asyncio.gather(
*(
controller.end_all_sessions()
for controller in self._stream_controllers()
)
)

def client_disconnected(self, client_addr: tuple[str, int]) -> None:
"""End the multi-tier and WebRTC sessions of the connection."""
for controller in self._stream_controllers():
Expand Down
Loading
Loading