********************
Massa m3
********************

.. index:: Massa m3, devices; vendors; Massa; Massa m3

Overview
====================
Massa Model M3 Wireless Ultrasonic Level Sensor.

The following Massa M3 devices are supported:
    * **Model M3/150:** 150kHz
    * **Model M3/95:** 95kHz


Configuration
====================

A typical Massa M3 device configuration block looks like this::

    - name: massa_m3_0
      driver: devices.vendors.massa.m3:MassaM3
      settings:
          xbee_device_manager: <instance name>
          extended_address: <XBee module address>
          sample_rate_sec: 3600
          sleep_rate_sec: 14400
          awake_time_sec: 30

Settings
--------------------
xbee_device_manager (required)
    The name of a XBeeDeviceManager instance to manage this device.

extended_address (required)
    The extended address of the Massa M3 device you would like to
    monitor.

sample_rate_sec (optional, default: 3600)
    The rate, in seconds, in which the device should take a sample.

sleep_rate_sec (optional, default: 14400)
    The rate, in seconds, for how long the device should sleep before sending
    the Dia driver its stored samples.

awake_time_sec (optional, default: 30)
    The rate, in seconds, for how long the device should remain awake after it
    awakes and sends Dia its samples.


Channels
====================

distance (Get, type: float, unit: in)
    Distance as measured by the sensor.

    This sensor can report the following distance range:
        * **Model M3/150:** as low as 4" to 8'
        * **Model M3/95:** as low as 12" to 13'

temperature (Get, type: float, unit: C)
    Temperature as measured by the sensor.

target_strength (Get, type: integer, unit: %)
    Signal strength, in percentage, as reported by the sensor.

strength (Get, type: string)
    Signal strength as reported by the sensor.

    It is a string value comprised of one of the following:

     ``Very Strong``
         Signal strength: 100%

     ``Strong``
         Signal strength: 75%

     ``Moderate``
         Signal strength: 50%

     ``Weak``
         Signal strength: 0%

battery (Get, type: float, unit: V)
    Battery level as reported by the sensor.

gain (Get, type: string)
    Gain applied signal as reported by the sensor.

    It is a string value comprised of one of the following:

     ``Hi``
         Gain applied signal: High.

         It will be applied if signal strength is moderate.

     ``Low``
         Gain applied signal: Low.

         It will be applied if signal strength is weak.

event (Get, type: integer)
    Number of events as reported by the sensor. This counter is increased every
    time the sensor sends Dia it's samples.

serial_number (Get, type: string)
    Serial number as reported by the sensor.

sensor_model (Get, type: string)
    Sensor model as reported by the sensor.

FWa_version (Get, type: string)
    Most significant firmware version as reported by the sensor.

FWb_version (Get, type: string)
    Least significant firmware version as reported by the sensor.