Skip to content

feat: Levoit Vital Pet Pro & _packFileSignature header support#532

Open
rocord01 wants to merge 4 commits into
webdjoe:devfrom
rocord01:feature/vital-pet-pro-support
Open

feat: Levoit Vital Pet Pro & _packFileSignature header support#532
rocord01 wants to merge 4 commits into
webdjoe:devfrom
rocord01:feature/vital-pet-pro-support

Conversation

@rocord01

Copy link
Copy Markdown

Description

This PR adds native read and control support for the Levoit Vital Pet Pro (Models: LAP-P501S-WUSR and LAP-P501S-AUSR).

It implements pure-Python generation of the server-side _packFileSignature HTTP header, bypassing the restriction on write commands for newer Levoit devices.

Summary of Changes

  • Added a signature generator function using the hardcoded AOSP test key SHA-1 fingerprint. Modified async_call_api() to dynamically inject _packFileSignature and _signOsInfo headers into any outbound Bypass V2 request containing a traceId.
  • Mapped the new model strings to VeSyncAirBaseV2 and restricted the fan_max_level property to 3 to match the Pet Pro.
  • Adjusted fields within PurifierVitalDetailsResult to be optional (| None = None) to handle payloads missing light sensor keys without throwing deserialization errors.

Testing

Tested locally against real Vital Pet Pro (LAP-P501S-WUSR). All read operations (including PM2.5 tracking) and write controls function successfully. Ran the core test suite with all 380 tests passing.

Fixes #529

@rocord01

Copy link
Copy Markdown
Author

Fixed pre-commit CI docstyle and type errors

@rocord01 rocord01 changed the title feat: Vital Pet Pro support feat: Levoit Vital Pet Pro & _packFileSignature header support Jul 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Request for Supporting Device Levoit Vital Pet Pro

1 participant