x

Example DIA Using Timers With XBee Smart Plug and XBee LTH Readings

Example DIA Using Timers With XBee Smart Plug and XBee LTH Readings

http://(IP_address_of_gateway)/idigi_dia
 
##Device Integration Application Framework Configuration dia.yml File Example## 




devices:
  
  - name: lights
    driver: devices.alarm_clock_device:AlarmClockDevice
    settings:
        tick_rate: 60
        printf: minute
        action_list:
            - event: { 'nam':'lights', 'per':'daily', 'on':'19:00', 'off':'22:00' }

  - name: computer
    driver: devices.alarm_clock_device:AlarmClockDevice
    settings:
        tick_rate: 60
        printf: minute
        action_list:
            - event: { 'nam':'computer', 'per':'daily', 'on':'06:00', 'off':'18:00' }

  - name: xbee_device_manager
    driver: devices.xbee.xbee_device_manager.xbee_device_manager:XBeeDeviceManager
 
    
###Configure XBee LTH Sensor####
   
  - name: lth_sensor
    driver: devices.xbee.xbee_devices.xbee_sensor:XBeeSensor
    settings:
        xbee_device_manager: "xbee_device_manager"
        extended_address: "00:00:00:00:00:00:00:00!"
        sleep: True
        sample_rate_ms: 50000

###Convert LTH Sensor temperature to fahrenheit#####
    
  - name: fahr_sensor
    driver: devices.transforms_device:TransformsDevice
    settings:
       - name: temperature_f
         unit: F
         channels:
             - lth_sensor.temperature
         expr: (9.0/5.0) * c[0] + 32


  # Add Smart Plug Device (computer):
  - name: computer_office
    driver: devices.xbee.xbee_devices.xbee_rpm:XBeeRPM
    settings:
        xbee_device_manager: "xbee_device_manager"
        extended_address: "00:00:00:00:00:00:00:00!"
        sample_rate_ms: 5000
        default_state: "On"
        power_on_source: computer.computer

###Convert Smart Plug Temperature###
  
  - name: fahr_computer_office
    driver: devices.transforms_device:TransformsDevice
    settings:
       - name: temperature_f
         unit: F
         channels:
             - computer_office.temperature
         expr: (9.0/5.0) * c[0] + 32

# Add our Smart Plug Device (lights):
  - name: light_control
    driver: devices.xbee.xbee_devices.xbee_rpm:XBeeRPM
    settings:
        xbee_device_manager: "xbee_device_manager"
        extended_address: "00:00:00:00:00:00:00:00!"
        default_state: "Off"
        power_on_source: lights.lights


###Convert Smart Plug Temperature###

  - name: fahr_light_control
    driver: devices.transforms_device:TransformsDevice
    settings:
       - name: temperature_f
         unit: F
         channels:
             - light_control.temperature
         expr: (9.0/5.0) * c[0] + 32

presentations:
  

  - name: embedded_web
    driver: presentations.embedded_web.web:Web
 
Last updated: Aug 08, 2017

Recently Viewed Articles

No recently viewed articles