Skip to content

Add SVM / Find My Car support for Hyundai BlueLink USA #1201

Description

@blka

Summary

Add support for the Hyundai USA BlueLink 360 Surround View Monitor (SVM) / Find My Car camera feature.

Background

Upstream discussion #1194 captured the native iOS MyHyundai endpoints and confirmed the full flow works. This issue tracks library implementation; HA integration follow-up will be handled separately.

Endpoints

  • GET https://api.telematics.hyundaiusa.com/ac/v2/svm/getSVMDetails — retrieve latest SVM image and metadata
  • POST https://api.telematics.hyundaiusa.com/ac/v2/svm/findMyCarSVM — trigger a fresh capture

Proposed API surface

Add the following public methods to HyundaiBlueLinkApiUSA:

def get_svm_details(self, token: Token, vehicle: Vehicle) -> SVMDetailsResponse:
    ...

def request_svm_capture(
    self,
    token: Token,
    vehicle: Vehicle,
    acknowledged_warning: bool = False,
) -> SVMDetailsResponse:
    ...

Base class (ApiImpl) will define the same methods raising NotImplementedError so other regions fail clearly.

Key behavior

  • request_svm_capture must require acknowledged_warning=True; otherwise raise an exception.
  • Send blueLinkServicePin in both headers and JSON body, matching the working PoC in 360 Surround View Camera #1194.
  • Decode svmImage base64 inside the library and return raw JPG bytes.
  • Poll getSVMDetails every 10–15 s after triggering capture, comparing gpsDetail.time to detect a fresh image; timeout after 90–120 s.
  • Map pending/cooldown error (errorSubCode: HT_533, HTTP 502) to existing DuplicateRequestError.
  • Redact svmImage and gpsDetail coordinates from debug logs.
  • V1 exposes only the full composite JPG. Panel splitting is out of scope until imageSize/boundaryArea geometry is understood.

Test plan

  • Mock successful getSVMDetails response and verify decoded bytes + metadata.
  • Mock findMyCarSVMgetSVMDetails polling flow with timestamp change.
  • Mock HT_533 response and assert DuplicateRequestError.
  • Mock missing acknowledged_warning and assert exception.
  • Verify debug logs do not contain base64 image data or GPS coordinates.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions