Skip to content

Camera serials should actually be serials #1146

@KTibow

Description

@KTibow

Is your feature request related to a problem? Please describe.

The Camera.serial property returns the camera's UUID, which is the key in system.camera_data. However, the SimpliSafe websocket API sends the actual serial in sensor_serial for camera motion and doorbell events. This serial exists in the raw subscription data as the "serial" field inside each camera object, but is not exposed by the Camera class.

This makes it impossible to reliably match incoming websocket events to their corresponding Camera objects without reaching into system.camera_data[uuid]["serial"] or guessing at truncation.

Describe the solution you'd like

Expose the truncated serial from the subscription data as a property on Camera, e.g. camera.ws_serial or a better name that indicates it's the serial used for event matching, or rename the current serial property to uuid and add a serial property that returns the truncated value, though this would be a breaking change.

The variable naming in generate_device_objects could also be clarified (for serial in self.camera_data iterates over UUID keys, not serials).

Additional context

The serial number seems to be the last 7 characters of the UUID.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions