# Control smartplug by DIA transforms

**URL:** <https://forums.digi.com/t/control-smartplug-by-dia-transforms/14884>\
**Category:** Python\
**Tags:** dia, smartplug\
**Created:** [May 26, 2015, 11:36am UTC](https://forums.digi.com/t/control-smartplug-by-dia-transforms/14884 "2015-05-26T11:36:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhen](https://avatars.discourse-cdn.com/v4/letter/z/a88e57/32.png) [@zhen](https://forums.digi.com/u/zhen)\
**Post date:** [May 26, 2015, 11:36am UTC](https://forums.digi.com/t/control-smartplug-by-dia-transforms/14884/1 "2015-05-26T11:36:48Z")

</div>

Hello,  
I set a DIA transforms, and the channel unit is boolean, expression is c[0] \> 25.  
I want to realise that control the smart plug depend on the true/false of the expression.  
When I run the programme, the value of the channel is changed, but the smartplug not.  
Here is the dia.yml:

```auto
devices: 
  - name: xbee_device_manager
    driver: devices.xbee.xbee_device_manager.xbee_device_manager:XBeeDeviceManager

  - name: edp_upload0
    driver: devices.edp_upload:EDPUpload
    settings: 
        interval: 5
        sample_threshold: 20
        collection: "collection_name"
        filename: "file_name"

  - name: transform0
    driver: devices.transforms_device:TransformsDevice
    settings: 
      - name: "fan_on"
        unit: "boolean"
        channels: 
          - "rpm0.temperature"
        expr: "c[0]&gt;25"

  - name: rpm0
    driver: devices.xbee.xbee_devices.xbee_rpm:XBeeRPM
    settings: 
        xbee_device_manager: "xbee_device_manager"
        extended_address: "00:13:a2:00:40:6e:3f:49!"
        power_on_source: "true"

presentations: 
  - name: rci_handler
    driver: presentations.rci.rci_handler:RCIHandler
    settings: 
        target_name: "digi_dia"

  - name: console0
    driver: presentations.console.console:Console

  - name: web0
    driver: presentations.web.web:Web
    settings: 
        page: "idigi_dia.html"

tracing: 
    default_level: "debug"
    default_handlers: 
      - "stderr"

```

thank you~
