XBee Analog I/O DIA Example

From Digi Developer

(Redirected from XBee Analog I/O Dia Example)
Jump to: navigation, search

Below is an example configuration file that includes a XBee Analog Adapter. NOTE: The extended address field will have to be edited for customer use.

devices:
  - name: xbee_device_manager
    driver: devices.xbee.xbee_device_manager.xbee_device_manager:XBeeDeviceManager
 
  - name: aio_voltage
    driver: devices.xbee.xbee_devices.xbee_aio:XBeeAIO
    settings:
        xbee_device_manager: xbee_device_manager
        extended_address: "00:13:a2:00:40:0a:12:ab!"
        sample_rate_ms: 1000
        power: "On"
        channel1_mode: "TenV"
        channel2_mode: "TenV"
        channel3_mode: "TenV"
        channel4_mode: "TenV"
 
presentations:
  - name: console0
    driver: presentations.console.console:Console
    settings:
        type: tcp
        port: 4146

Adding Sleeping Behavior

Here is the AIO portion of a YML which sleeps, waking every 5 minutes and sending a sample. New settings you'll see here include:

  • sleep = True/False (default = False)
  • awake_time_ms = how many msec to remain awake AFTER sending the first sample. Note that the Power output will remain on during this time.
  • sample_predelay = how many msec to delay after power output is enabled, before the sample is taken. Default is 1000 msec. The value requires depends on the sensor. Some output valid signals instantly, while others require from 2 to 15 seconds for the sensor controller to boot, and/or for it to take several readings before outputing a stable voltage or mA signal.
  - name: itank01
    driver: devices.xbee.xbee_devices.xbee_aio:XBeeAIO
    settings:
        xbee_device_manager: xbee_device_manager
        extended_address: "00:13:a2:00:40:52:94:D4!"
        sleep: True
        sample_rate_ms: 300000
        awake_time_ms: 5000
        sample_predelay: 25
        power: "On"
        channel1_mode: "TenV"

For more information regarding configuration and use of the Analog Adapter with the DIA, look here: Device_Cloud_Wiki

Personal tools
Wiki Editing