.. _local-aio:

********************
Local Analog
********************

.. index:: devices;xbee;analog adapter

.. warning:: 
    This driver is deprecated in favor of the :ref:`local-io`
    driver and will be removed in a future version of Dia.

Overview
====================
A Dia driver for the analog functionality present locally on the
gateway on some devices.  This driver presents a subset of the
:ref:`xbee-aio` driver options.

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

A typical local analog configuration block looks like this::

    - name: local_aio0
      driver: devices.xbee.xbee_devices.xbee_local_aio:XBeeLocalAIO
      settings:
        xbee_device_manager: <instance name>
        sample_rate_ms: 60000

Settings
--------------------

xbee_device_manager (required)
    The name of an XBeeDeviceManager instance to manage this device.

sample_rate_ms (required)
    The sample rate of the XBee adapter in milliseconds.

channel(1-4)_mode (optional, default: TenV)
    Operating input mode for pin 1 of the adapter.

    Must be a string value comprised of one of the following:

     ``TenV``
         0-10v input available on any channel.

     ``CurrentLoop``
         0-20 mA current loop available on any channel.

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

channel(1-4)_value (Get, type: float, units: V(TenV) or mA(CurrentLoop))
    The value measured by the device.  The units will depend on the
    configuration of the appropriate ``mode`` setting.
