Sensors¶
Typed detection sensors (motion, object, face, license-plate, audio, classifier, clip) and smart-home sensors (contact, doorbell, lock, garage, light, switch, ptz, security system, environmental).
camera_ui_sdk.sensor ¶
AudioDetectorSensor ¶
Bases: AudioSensor[TStorage], Generic[TStorage]
Audio detector that receives audio frames from the backend pipeline.
Extend this class and implement detectAudio and modelSpec. The
backend resamples and buffers audio to match modelSpec before each
call.
detectAudio
abstractmethod
async
¶
Analyze a single audio frame for events. Called by the backend at the configured cadence.
AudioFrameData ¶
Bases: TypedDict
Audio frame data delivered to audio detector sensors by the backend pipeline.
AudioResult ¶
Bases: TypedDict
Return type for AudioDetectorSensor.detectAudio().
AudioSensor ¶
Bases: Sensor[AudioSensorProperties, TStorage, str], Generic[TStorage]
Audio sensor that reports audio events and decibel levels.
Plugin authors call reportDetections(list) to push detected audio events
(auto-derives detected) and setDecibels(value) to update the audio level.
reportDetections ¶
Report detected audio events.
reportDetections(True): audio detected without specifics. The SDK synthesizes a single full-frame'audio'detection.reportDetections(True, [...]): audio detected with explicit detections.reportDetections(False): clear.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
detected
|
bool
|
Whether an audio event is currently detected. |
required |
detections
|
list[Detection] | None
|
Optional explicit detections produced for this event. |
None
|
clearDetections ¶
Explicitly clear audio detection state (detected = False, detections = []).
setDecibels ¶
updateValue
async
¶
Read-only sensor: external writes are ignored.
Sensor ¶
Sensor(name: str, *, native_id: str | None = None, origin: str | None = None, exposed: bool | None = None, hidden: bool | None = None)
Bases: ABC, Generic[TProperties, TStorage, TCapability]
Abstract base class for all sensors. Plugins extend this (or use specialized subclasses like MotionSensor, LightControl, etc.) to implement sensor logic.
Sensors are standalone entities: the plugin supplies the durable identity
(native_id), everything else belongs to the user: camera assignments,
display name and whether the sensor is exported or not. A plugin
never decides where its sensor is used and never handles the export itself.
The id is provisional until registration, when the host swaps in the
persistent entity id. Reading storage before registration raises.
Override storage_schema to return a JSON schema and get a per-sensor
settings UI.
on_start ¶
Lifecycle hook, called once the sensor is registered and live.
Storage and RPC are wired up by then. Override it to start work whose lifetime matches the sensor's: polling loops, event subscriptions, timers.
May be either a plain def or an async def. If async, the SDK
schedules it on the running event loop (fire-and-forget). Errors are
swallowed, not logged, so handle failures inside the override. Paired
1:1 with on_stop, which runs on removal, plugin shutdown or cleanup.
on_stop ¶
getValues ¶
updateValue
abstractmethod
async
¶
Generic property write coming from a consumer.
Read-only sensors implement it as a no-op, control sensors dispatch known
properties to their semantic methods (setOn, setActive,
setTargetState) so plugin overrides drive hardware. Unknown or
non-writable properties are ignored.
Plugin authors call the semantic methods on the concrete class instead.
hasCapability ¶
updateModelSpec ¶
Re-announce the model spec, e.g. once the models finished loading.
The spec a detector reports at registration is what it knows at that moment: models that load in the background are missing from it. Call this after loading, the server replaces its copy.
SensorCategory ¶
Bases: StrEnum
Categorizes a sensor's role in the system.
Determines how the backend treats the sensor (read-only vs. controllable).
SensorLike ¶
Bases: Protocol
Read-only view of a sensor, as other plugins and the backend see it.
Use this type when consuming sensors, not when creating them. All
state-modifying methods (setOn, reportDetections, etc.) live on the
concrete sensor classes, not on SensorLike. Code that holds a SensorLike
reference can only read state and observe changes.
updateValue
async
¶
Generic property write used by cross-process bridges.
The owning sensor dispatches it to the matching semantic method, so plugin-side hardware overrides still run. Plugin authors call the semantic methods instead.
hasCapability ¶
Whether the sensor advertises the given capability.
SensorPropertyChangeData ¶
SensorType ¶
Bases: StrEnum
Type of sensor. "Sensor" is camera.ui's umbrella term for the smallest
smart-home unit. It covers measuring devices and controllable ones alike. The concrete
classes carry the real meaning (LightControl, MotionSensor, ...).
Plugins create sensors of these types, either standalone via the sensor
manager or attached to a camera via camera.addSensor().
Object
class-attribute
instance-attribute
¶
Object detection (person, vehicle, animal, etc.).
Audio
class-attribute
instance-attribute
¶
Audio event detection (glass break, scream, etc.).
LicensePlate
class-attribute
instance-attribute
¶
License plate detection and OCR.
Classifier
class-attribute
instance-attribute
¶
General-purpose image classifier.
Clip
class-attribute
instance-attribute
¶
CLIP embedding generation for semantic search.
ObjectAssist
class-attribute
instance-attribute
¶
Locates objects in a frame so secondary detectors get real crops from camera-side detections.
CarbonDioxide
class-attribute
instance-attribute
¶
Carbon dioxide sensor (ppm).
CarbonMonoxide
class-attribute
instance-attribute
¶
Carbon monoxide detector.
Contact
class-attribute
instance-attribute
¶
Contact/open-close sensor (door, window).
Illuminance
class-attribute
instance-attribute
¶
Illuminance sensor (lx).
Temperature
class-attribute
instance-attribute
¶
Temperature sensor (°C).
SecuritySystem
class-attribute
instance-attribute
¶
Security system arm/disarm control.
BatteryCapability ¶
BatteryInfo ¶
Bases: Sensor[BatteryInfoProperties, TStorage, BatteryCapability], Generic[TStorage]
Battery info sensor. Reports battery level, charging state, and low-battery alerts.
Plugin authors call setLevel(value), setCharging(state), and setLow(value)
to push updates from the device.
setLevel ¶
setCharging ¶
Report the current charging state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
ChargingState
|
Current charging state from the |
required |
setLow ¶
updateValue
async
¶
Read-only sensor: external writes are ignored.
ChargingState ¶
CarbonDioxideInfo ¶
CarbonMonoxideSensor ¶
ClassifierDetection ¶
Bases: Detection
A classifier detection result with an open attribute for classifier categories.
ClassifierDetectorSensor ¶
Bases: ClassifierSensor[TStorage], Generic[TStorage]
Classifier detector that receives video frames from the backend pipeline.
Extend this class and implement detectClassifications to run image
classification models against trigger regions. The backend scales frames
to match modelSpec.input dimensions before each call.
detectClassifications
abstractmethod
async
¶
Classify frames in batch. Each frame is pre-scaled to modelSpec['input']:
normally a trigger region cropped by the upstream object detector, but the whole
scene when no decoded frame is available. Must return exactly one ClassifierResult
per input frame, in the same order.
ClassifierResult ¶
ClassifierSensor ¶
Bases: Sensor[ClassifierSensorProperties, TStorage, str], Generic[TStorage]
General-purpose image classifier sensor.
Plugin authors call reportDetections(list) to push classification results.
detected and labels are auto-derived from the detection list.
reportDetections ¶
Report classification results. Auto-derives detected and
labels from the list.
reportDetections(True): generic classification trigger. The SDK synthesizes a single full-frame detection with empty attribute and sub-attribute.reportDetections(True, [...]): explicit classifier detections.reportDetections(False): clear.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
detected
|
bool
|
Whether any classification result is active. |
required |
detections
|
list[ClassifierDetection] | None
|
Optional explicit classifier detections to publish. |
None
|
clearDetections ¶
Explicitly clear classifier state (detected = False, detections = [], labels = []).
updateValue
async
¶
Read-only sensor: external writes are ignored.
ClipDetectorSensor ¶
Bases: Sensor[dict[str, Any], TStorage, str], Generic[TStorage]
CLIP detector sensor that receives video frames and generates semantic embeddings.
Extend this class and implement detectEmbeddings to produce CLIP
embeddings for downstream semantic search.
detectEmbeddings
abstractmethod
async
¶
Generate CLIP embeddings in batch. Each frame is pre-scaled to modelSpec['input']:
normally a trigger region cropped by the upstream object detector, but the whole scene
when no decoded frame is available. Must return exactly one ClipResult per input frame,
in the same order. Use frame['label'] to tag the emitted embedding.
updateValue
async
¶
Read-only sensor: external writes are ignored.
ClipEmbedding ¶
Bases: TypedDict
A CLIP embedding result for a detected region.
ClipResult ¶
ColdSensor ¶
ContactSensor ¶
BoundingBox ¶
Bases: TypedDict
Bounding box of a detection.
All coordinates are normalized to 0-1 (fraction of frame dimensions), so they are independent of resolution.
Detection ¶
Bases: TypedDict
A single detection result emitted by any detection sensor.
attribute
instance-attribute
¶
Optional sub-detection attribute (DetectionAttribute or classifier-specific).
VideoFrameData ¶
Bases: TypedDict
Video frame data delivered to detector sensors by the backend pipeline.
The backend handles capture, decoding and scaling. Detectors only process the pixel payload.
id
instance-attribute
¶
Unique frame or crop identifier used to map batch results back to inputs.
format
instance-attribute
¶
Pixel format: rgb=3 bytes/pixel, rgba=4 bytes/pixel, gray=1 byte/pixel, nv12=YUV semi-planar.
timestamp
instance-attribute
¶
Capture timestamp in milliseconds since epoch.
label
instance-attribute
¶
Trigger label propagated by the coordinator for secondary detectors.
DoorbellTrigger ¶
Bases: Sensor[DoorbellTriggerProperties, TStorage, str], Generic[TStorage]
Doorbell trigger sensor.
Plugin authors call trigger() to fire a doorbell event. The ring
property is set to True and automatically reset to False after a short
delay (RING_AUTO_RESET_MS). Calling trigger() again while still
ringing resets the timer (extends the ring phase).
FaceDetection ¶
Bases: Detection
A face detection result, extending Detection with face-specific fields.
FaceDetectorSensor ¶
Bases: FaceSensor[TStorage], Generic[TStorage]
Face detector that receives video frames from the backend pipeline.
Extend this class and implement detectFaces for face detection and
recognition. The backend scales frames to match modelSpec.input
dimensions before each call.
detectFaces
abstractmethod
async
¶
Detect faces in batch. Each frame is pre-scaled to modelSpec['input']:
normally a person region cropped by the upstream object detector, but the whole
scene when no decoded frame is available. Must return exactly one FaceResult per
input frame, in the same order.
FaceResult ¶
FaceSensor ¶
Bases: Sensor[FaceSensorProperties, TStorage, str], Generic[TStorage]
Face sensor that reports detected faces and optional identity matches.
Plugin authors call reportDetections(list) to push detected faces.
detected is auto-derived from the detection list.
reportDetections ¶
Report detected faces.
reportDetections(True): face detected without specifics (e.g. a bare face-event from a discovery provider). The SDK synthesizes a single full-frame face detection without identity.reportDetections(True, [...]): explicit face detections with identity, embedding, and/or thumbnail.reportDetections(False): clear.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
detected
|
bool
|
Whether any face is currently detected. |
required |
detections
|
list[FaceDetection] | None
|
Optional explicit face detections to publish. |
None
|
clearDetections ¶
Explicitly clear face detection state (detected = False, detections = []).
updateValue
async
¶
Read-only sensor: external writes are ignored.
GarageControl ¶
Bases: Sensor[GarageControlProperties, TStorage, str], Generic[TStorage]
Garage door control.
Override setTargetState() to drive hardware and call
await super().setTargetState(value) once the hardware confirms: the base
implementation updates both targetState and currentState.
For long-running transitions (Opening/Closing intermediate states) override
setTargetState and write currentState separately as the door moves.
setTargetState
async
¶
Set the target state. Override to drive hardware and call
await super().setTargetState(value) after success: the base implementation
syncs both targetState and currentState to the new value.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
GarageState
|
Desired target state from the |
required |
setCurrentState ¶
Publish the actual door state. Use this to drive long-running
transitions (Open, then Closing, then Closed) independently of the
user-requested target state. Read-only from cross-process consumers
(updateValue ignores it).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
GarageState
|
Current physical door state from the |
required |
setObstructionDetected ¶
Publish the obstruction-detected state. Read-only from the consumer
side (updateValue ignores it), plugin code calls this when its
hardware reports an obstruction sensor change.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
bool
|
True when an obstruction is currently detected. |
required |
updateValue
async
¶
Routes generic property writes to the semantic setters.
Only targetState is externally writable.
GarageState ¶
Bases: IntEnum
Garage door states.
GasSensor ¶
HeatSensor ¶
HumidityInfo ¶
IlluminanceInfo ¶
LeakSensor ¶
LicensePlateDetection ¶
LicensePlateDetectorSensor ¶
Bases: LicensePlateSensor[TStorage], Generic[TStorage]
License plate detector that receives video frames from the backend pipeline.
Extend this class and implement detectLicensePlates for plate detection
and OCR. The backend scales frames to match modelSpec.input dimensions
before each call.
detectLicensePlates
abstractmethod
async
¶
Detect license plates in batch. Each frame is pre-scaled to modelSpec['input']:
normally a vehicle region cropped by the upstream object detector, but the whole
scene when no decoded frame is available. Must return exactly one result per input
frame, in the same order.
LicensePlateResult ¶
LicensePlateSensor ¶
Bases: Sensor[LicensePlateSensorProperties, TStorage, str], Generic[TStorage]
License plate sensor that reports detected plates with OCR text.
Plugin authors call reportDetections(list) to push detected plates.
detected is auto-derived from the detection list.
reportDetections ¶
Report detected license plates.
reportDetections(True): plate detected without specifics. The SDK synthesizes a single full-frame detection with empty plateText.reportDetections(True, [...]): explicit plate detections with OCR text.reportDetections(False): clear.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
detected
|
bool
|
Whether any license plate is currently detected. |
required |
detections
|
list[LicensePlateDetection] | None
|
Optional explicit plate detections to publish. |
None
|
clearDetections ¶
Explicitly clear license plate state (detected = False, detections = []).
updateValue
async
¶
Read-only sensor: external writes are ignored.
LightCapability ¶
Bases: StrEnum
Optional capabilities of a light control.
Brightness
class-attribute
instance-attribute
¶
Light supports brightness adjustment (0-100).
LightControl ¶
Bases: Sensor[LightControlProperties, TStorage, LightCapability], Generic[TStorage]
Light control sensor. Override setOn()/setOff() to drive your
hardware, then await super().setOn() / await super().setOff() to
sync the SDK state.
Plugins with no hardware-action use case can leave the methods unoverridden, the base implementation just updates the state.
For hardware-pushed updates (someone manually flipped the switch), call
super().setOn() / super().setOff() from your event handler. That
bypasses any plugin override and only syncs state.
setOn
async
¶
setOff
async
¶
setBrightness
async
¶
Set brightness. Override to drive hardware and call
await super().setBrightness(value) after the hardware call
succeeds. The default implementation clamps the value to [0, 100].
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
int
|
Brightness level in the range 0-100. |
required |
updateValue
async
¶
Routes generic property writes to the semantic setters.
Only on and brightness are externally writable.
LockControl ¶
Bases: Sensor[LockControlProperties, TStorage, str], Generic[TStorage]
Lock control.
Override setTargetState() to drive hardware and call
await super().setTargetState(value) once the hardware confirms. The base
implementation updates both targetState and currentState to the new value.
For asymmetric flows (long-running unlock with intermediate state) override
setTargetState and write currentState separately when transitions complete.
setTargetState
async
¶
Set the target state. Override to drive hardware and call
await super().setTargetState(value) after success. The base implementation
syncs both targetState and currentState to the new value.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
LockState
|
Desired lock state from the |
required |
setCurrentState ¶
Publish the actual lock state. Use it when the physical state diverges
from the requested target: motorized locks that take time to rotate
(publish Unknown while moving), or hardware reporting an out-of-band
state change. Read-only from cross-process consumers (updateValue
ignores it).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
LockState
|
Current physical lock state from the |
required |
updateValue
async
¶
Routes generic property writes to the semantic setters.
Only targetState is externally writable, currentState is observed-only.
LockState ¶
MotionDetectorSensor ¶
Bases: MotionSensor[TStorage], Generic[TStorage]
Motion detector that receives video frames from the backend pipeline.
Extend this class and implement detectMotion to analyze frames for
motion. The backend calls detectMotion at the configured frame
interval, zone-filters the returned detections and applies them.
detected is re-derived from the surviving detections, so a result with
no detections reports no motion.
detectMotion
abstractmethod
async
¶
Analyze a single video frame for motion. Called by the backend at the configured interval.
MotionResult ¶
Bases: TypedDict
Return type for MotionDetectorSensor.detectMotion().
MotionSensor ¶
Bases: Sensor[MotionSensorProperties, TStorage, str], Generic[TStorage]
Motion sensor that reports motion state and detection results.
Plugin authors call reportDetections(list) to push detection results.
detected is auto-derived from the detection list. blocked is read-only and
set by the backend dwell logic, reportDetections() is a no-op while it is set.
reportDetections ¶
Report a motion detection result.
reportDetections(True): motion detected without bbox (e.g. Ring camera). The SDK synthesizes a single full-frame'motion'detection.reportDetections(True, [...]): motion detected with explicit detections.reportDetections(False): no motion (clears detections).
No-op while the sensor is blocked by backend dwell logic.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
detected
|
bool
|
Whether motion is currently detected. |
required |
detections
|
list[Detection] | None
|
Optional explicit detections produced for this frame. |
None
|
clearDetections ¶
Explicitly clear motion state (detected = False, detections = []).
updateValue
async
¶
Read-only sensor: external writes are ignored.
ObjectDetectorSensor ¶
Bases: ObjectSensor[TStorage], Generic[TStorage]
Object detector that receives video frames from the backend pipeline.
Extend this class and implement detectObjects and modelSpec. The
backend scales frames to match modelSpec.input dimensions before each
call.
detectObjects
abstractmethod
async
¶
Analyze a single video frame for objects. Called by the backend at the configured interval.
ObjectResult ¶
ObjectSensor ¶
Bases: Sensor[ObjectSensorProperties, TStorage, str], Generic[TStorage]
Object detection sensor that reports detected objects (person, vehicle, animal, etc.).
Plugin authors call reportDetections(list) to push detection results.
detected and labels are auto-derived from the detection list.
reportDetections ¶
Report detected objects. Auto-derives detected and labels
from the list.
reportDetections(True): something detected without specific data. The SDK synthesizes a single full-frame'motion'detection as a generic fallback.reportDetections(True, [...]): explicit detections (typical case).reportDetections(False): clear.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
detected
|
bool
|
Whether any object is currently detected. |
required |
detections
|
list[TrackedDetection] | None
|
Optional explicit object detections (with optional tracking metadata). |
None
|
clearDetections ¶
Explicitly clear detection state (detected = False, detections = [], labels = []).
updateValue
async
¶
Read-only sensor: external writes are ignored.
TrackedDetection ¶
Bases: Detection
Detection enriched with tracking metadata (stable IDs, velocity).
trackAge
instance-attribute
¶
Number of frames this object has been continuously tracked.
trackSpeed
instance-attribute
¶
Velocity magnitude in normalized units per frame. 0 = stationary.
trackVelocity
instance-attribute
¶
Signed centroid velocity in normalized units per frame.
trackLost
instance-attribute
¶
True if the object was not matched in the current frame.
stationarySince
instance-attribute
¶
Epoch ms since the object has been still. Only present while it is settled.
OccupancySensor ¶
PowerSensor ¶
ProblemSensor ¶
PTZCapability ¶
Bases: StrEnum
Optional capabilities of a PTZ control.
Tilt
class-attribute
instance-attribute
¶
Camera supports tilting (vertical movement).
Presets
class-attribute
instance-attribute
¶
Camera supports named position presets.
RelativeMove
class-attribute
instance-attribute
¶
Camera executes relative displacement moves.
AbsolutePosition
class-attribute
instance-attribute
¶
Camera accepts absolute position writes via setPosition().
VelocityControl
class-attribute
instance-attribute
¶
Camera accepts continuous-move commands via setVelocity().
PTZControl ¶
Bases: Sensor[PTZControlProperties, TStorage, PTZCapability], Generic[TStorage]
Pan-tilt-zoom camera control.
Override setPosition() / setVelocity() / setTargetPreset() to drive
hardware, then call the corresponding super().X() method after success to
sync the SDK state. For hardware-pushed state updates (e.g. PTZ position
change events), call the super methods from your event handler. That
bypasses any plugin override and only syncs state.
Set capabilities to advertise supported axes and features. Use
setPresets() to publish the discovered preset list and setMoving() to
publish movement state.
setPosition
async
¶
Move to an absolute pan/tilt/zoom position. Override to drive hardware
and call await super().setPosition(value) after success to sync the SDK state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
PTZPosition
|
Absolute pan/tilt/zoom target position. |
required |
setVelocity
async
¶
Continuous-move command. Override to drive hardware and call
await super().setVelocity(value) after success to sync the SDK state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
PTZDirection | None
|
Per-axis speeds in |
required |
setRelativeMove
async
¶
Relative displacement move. Override to drive hardware (e.g. ONVIF
RelativeMove in a translation space) and call
await super().setRelativeMove(value) after success to sync the SDK state.
Advertise PTZCapability.RelativeMove when the camera supports it.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
PTZRelativeMove
|
Per-axis displacement, normalized to the field of view. |
required |
setTargetPreset
async
¶
Preset-move command. Override to drive hardware and call
await super().setTargetPreset(value) after success to sync the SDK state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
str | None
|
Preset name to move to. |
required |
setPresets ¶
setMoving ¶
goHome
async
¶
updateValue
async
¶
Routes generic property writes to the semantic setters.
PTZDirection ¶
Bases: TypedDict
PTZ movement speed for continuous move commands.
Speeds are in normalized range [-1, 1] where:
-1= maximum speed in negative direction0= stop movement1= maximum speed in positive direction
Conventions: positive panSpeed = right, positive tiltSpeed = up,
positive zoomSpeed = zoom in. Plugins should clamp values to [-1, 1]
and map them to hardware-specific speeds.
PTZPosition ¶
Bases: TypedDict
Absolute PTZ position.
PTZRelativeMove ¶
Bases: TypedDict
Relative displacement for a single PTZ move.
Deltas are normalized to the camera's field of view: panDelta: 1 moves
the view by one full frame width, tiltDelta: 1 by one full frame height.
Conventions match :class:PTZDirection: positive panDelta = right,
positive tiltDelta = up, positive zoomDelta = zoom in. Plugins map
the deltas to hardware-specific translation spaces (e.g. ONVIF RelativeMove).
SecuritySystem ¶
Bases: Sensor[SecuritySystemProperties, TStorage, str], Generic[TStorage]
Security system control.
Override setTargetState() to drive hardware and call
await super().setTargetState(value) once the hardware confirms. The base
implementation updates both targetState and currentState.
setTargetState
async
¶
Set the target state. Override to drive hardware and call
await super().setTargetState(value) after success. The base implementation
syncs both targetState and currentState to the new value.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
SecuritySystemState
|
Desired armed/disarmed state from |
required |
setCurrentState ¶
Publish the actual security system state. Use this for transitions
that diverge from the user-requested target: AlarmTriggered when an
intruder is detected, or arming-delay intermediate states. Read-only
from cross-process consumers (updateValue ignores it).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
SecuritySystemState
|
Current security system state from |
required |
updateValue
async
¶
Routes generic property writes to the semantic setters.
SecuritySystemState ¶
Bases: IntEnum
Security system arm/disarm states.
SirenCapability ¶
Bases: StrEnum
Optional capabilities of a siren control.
Volume
class-attribute
instance-attribute
¶
Siren supports volume adjustment (0-100).
SirenControl ¶
Bases: Sensor[SirenControlProperties, TStorage, SirenCapability], Generic[TStorage]
Siren control sensor. Override setActive()/setInactive() to drive
your hardware, then await super().setActive() / await super().setInactive()
to sync the SDK state. For hardware-pushed updates, call the super methods
from your event handler. That bypasses any plugin override and only syncs
state.
SmokeSensor ¶
AudioInputSpec ¶
Bases: TypedDict
Expected audio input format for an audio detector model.
AudioModelSpec ¶
LoadedModel ¶
Bases: TypedDict
One model a sensor has loaded. Reported for the metrics view and for debugging.
name
instance-attribute
¶
Resolved model name, after any "default" placeholder (e.g. "yolo-v9-s-320").
role
instance-attribute
¶
What this model does inside a sensor that loads several: "detect", "embed", "ocr", "text".
device
instance-attribute
¶
Where inference runs, resolved to the real device (e.g. "GPU.0", "ANE", "TPU:0", "CPU").
precision
instance-attribute
¶
Weight precision: "fp32", "fp16", "int8".
loadMs
instance-attribute
¶
How long loading this model took, in milliseconds.
ModelRuntime ¶
Bases: TypedDict
What a sensor runs on. Optional throughout: a plugin that reports nothing simply shows nothing.
ModelSpec ¶
Bases: ModelRuntime
Model spec for detectors with fixed output labels (face, classifier, license plate).
Declares the input shape the backend should produce and the trigger labels that should activate this detector.
ObjectModelSpec ¶
Bases: ModelRuntime
Model spec for object detectors.
Only declares input dimensions, the output label set is dynamic and comes from the model itself.
VideoInputSpec ¶
Bases: TypedDict
Expected video input dimensions and pixel format for a detector model.
SwitchControl ¶
Bases: Sensor[SwitchControlProperties, TStorage, str], Generic[TStorage]
Generic on/off switch control. Override setOn() / setOff() to drive
hardware and call await super().setOn() / await super().setOff() after
success to sync the SDK state. For hardware-pushed updates, call the super
methods from your event handler. That bypasses any plugin override and only
syncs state.