Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements PR 2 of the decoupled Roborock vacuum live camera streaming series (following #980, #764, #738).
This PR introduces pure Python data structures, RFC-compliant ICE candidate parsing/formatting utilities, password hashing, and WebRTC signaling serializers for Roborock camera live streaming. It adds zero external runtime dependencies (
aiortcis deferred to PR 4).Scope & Components
Camera Signaling Models:
CameraQuality(StrEnum:HD,SD).CameraTurnServerdataclass (urls,username,credentialwithrepr=Falsefor security; includesfrom_dicthelper validating TURN/STUN schemes).CameraIceCandidatedataclass (encapsulates foundation, component, protocol, priority, ip, port, candidate_type, related_address, related_port, tcp_type, sdp_mid, sdp_mline_index, and arbitrary SDP extensions).RFC-Compliant ICE Candidate Parser & Formatter:
parse_ice_candidate: RFC 5245 / 8839 / 8445 compliant parser for SDP candidate attribute lines (candidate:...)..local) addresses.active,passive,so).ufrag,generation,network-id).CameraIceCandidate.to_sdp()andto_signaling_dict().Security & Password Hashing:
hash_camera_password: Derives the lowercase hexadecimal MD5 digest of numeric camera PIN/pattern digits with strict ASCII validation and FIPS-compliantusedforsecurity=False.WebRTC Payload Serialization:
encode_sdp_offer&decode_sdp_answer: Compact base64-encoded UTF-8 JSON packaging forsend_sdp_to_robot/get_device_sdp, handling"retry"pending states while preserving SDP CRLF line integrity.encode_ice_candidate&decode_ice_candidates: Base64-encoded UTF-8 JSON packaging forsend_ice_to_robot/get_device_ice, with schema validation and optionalignore_invalidresilience for remote candidate streams.Re-exports & Packaging:
roborock.camera_signaling,roborock.data.camera, androborock.data.Validation
uv run pytest tests/test_camera_signaling.py).uv run ruff checkanduv run ruff format --check.uv run mypy.sol 6.1and Claudeopus 5.5).