snsary.contrib.pypms

An adapter for the PyPMS library.

Example of creating an instance:

PyPMSSensor(sensor_name='PMSx003')

Module Contents

class snsary.contrib.pypms.PyPMSSensor(*, sensor_name, port='/dev/ttyS0', timeout=5)

Bases: snsary.sources.PollingSensor

warm_up_seconds is necessary for some sensors e.g. for the PMSA003 the first two samples always raise an InconsistentObservation exception.

class SnsaryReader

Bases: pms.core.reader.SensorReader

PyPMS SensorReader customisations.

property name
start()
stop()
sample(timestamp, elapsed_seconds, **kwargs)