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.
Is your feature request related to a problem? Please describe.
The
Camera.serialproperty returns the camera's UUID, which is the key insystem.camera_data. However, the SimpliSafe websocket API sends the actual serial insensor_serialfor 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 theCameraclass.This makes it impossible to reliably match incoming websocket events to their corresponding
Cameraobjects without reaching intosystem.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_serialor a better name that indicates it's the serial used for event matching, or rename the currentserialproperty touuidand add aserialproperty that returns the truncated value, though this would be a breaking change.The variable naming in
generate_device_objectscould also be clarified (for serial in self.camera_dataiterates over UUID keys, not serials).Additional context
The serial number seems to be the last 7 characters of the UUID.