# PC based Python control of a SmartPlug...

**URL:** <https://forums.digi.com/t/pc-based-python-control-of-a-smartplug/2930>\
**Category:** Python\
**Created:** [June 22, 2011, 8:22pm UTC](https://forums.digi.com/t/pc-based-python-control-of-a-smartplug/2930 "2011-06-22T20:22:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![verohomie](https://avatars.discourse-cdn.com/v4/letter/v/85e7bf/32.png) [@verohomie](https://forums.digi.com/u/verohomie)\
**Post date:** [June 22, 2011, 8:22pm UTC](https://forums.digi.com/t/pc-based-python-control-of-a-smartplug/2930/1 "2011-06-22T20:22:05Z")

</div>

Hi All -

After much tweeking of Digi’s example SmartPlug Python code, I have basic PC control of a SmartPlug.

The setup is an XBee Adapter with a S2 XBee and a FTDI cable from Adafruit.  
[http://www.adafruit.com/products/126](http://www.adafruit.com/products/126)

The modified Python files are attached below.

Make sure NO setting = 0x01 and DD = 0x0003000F on the SmartPlug. Also, NO = 0x01 and AO= 0x01 on the coordinator.

I can be reached at 772-257-one thousand for limited support.

Hope this helps,

Brad Norman  
brad )at( green home gear ).( com
