sensor.distance
Platypush documentation
sensor.distance
- class platypush.backend.sensor.distance.SensorDistanceBackend(plugin=None, plugin_args=None, thresholds=None, tolerance=1e-07, poll_seconds=None, enabled_sensors=None, **kwargs)[source]
Bases:
SensorBackend
Backend to poll a distance sensor.
Requires:
RPi.GPIO
(pip install RPi.GPIO
)The
platypush.plugins.gpio.sensor.distance
plugin configured
Triggers:
platypush.message.event.sensor.SensorDataChangeEvent
if the measurements of a sensor have changedplatypush.message.event.sensor.SensorDataAboveThresholdEvent
if the measurements of a sensor havegone above a configured threshold
platypush.message.event.sensor.SensorDataBelowThresholdEvent
if the measurements of a sensor havegone below a configured threshold