yaq/traits/is-sensor


Daemons with the is-sensor trait are capable of measuring some unknown quantities. Sensor daemons may have multiple channels if a single measurement returns multiple values.

methods

Daemons with the is-sensor trait expose the following public methods:

measure ➜ number
Initiate a measurement. Returns integer, measurement ID.
Arguments:

loop, {'type': 'boolean'}

get_measured ➜ dictionary name: value
Get most recent measured value. Additional key of measurement ID.

stop_looping
Stop looping measurement.

get_channel_names ➜ list of string
Get current channel names.

get_channel_shapes ➜ dictionary name: list of int
Get current channel shapes. If list is empty, channel is scalar.

get_channel_units ➜ dictionary name: units
Get current channel units.

daemons

The following daemons implement the is-sensor trait:

ads1115
mcp3428
mcp9600
system-monitor