jacdac.motion

Submodules

Package Contents

Classes

MotionClient

A sensor, typically PIR, that detects object motion within a certain range

class jacdac.motion.MotionClient(bus: jacdac.bus.Bus, role: str, *, missing_moving_value: bool | None = None)

Bases: jacdac.bus.SensorClient

A sensor, typically PIR, that detects object motion within a certain range Implements a client for the Motion service.

property moving: bool | None

Reports is movement is currently detected by the sensor.,

property max_distance: float | None

(Optional) Maximum distance where objects can be detected., _: m

property angle: int | None

(Optional) Opening of the field of view, _: °

property variant: jacdac.motion.constants.MotionVariant | None

(Optional) Type of physical sensor,

on_movement(handler: jacdac.bus.EventHandlerFn) jacdac.bus.UnsubscribeFn

A movement was detected.