<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;C0MNQnc5fip7ImA9WhBVEkg.&quot;"><id>tag:blogger.com,1999:blog-136957934485772232</id><updated>2013-04-18T12:18:13.926+10:00</updated><category term="Raspberry Pi" /><category term="AudioVisual" /><category term="GC-100" /><category term="X10" /><category term="Ubuntu" /><category term="Install Script" /><category term="CM19a" /><category term="Home Automation" /><category term="SR7400" /><category term="Linux" /><category term="Python Programming" /><title>www.cuddon.net</title><subtitle type="html">By Andrew</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://www.cuddon.net/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://www.cuddon.net/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Andrew Cuddon</name><uri>https://plus.google.com/100115418396733096968</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-y752K0UgEBg/AAAAAAAAAAI/AAAAAAAAAAA/5rWaNrryakc/s512-c/photo.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>28</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/Cuddonnet" /><feedburner:info uri="cuddonnet" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;AkMHSXkyeSp7ImA9WhBTFkQ.&quot;"><id>tag:blogger.com,1999:blog-136957934485772232.post-3147408464392172343</id><published>2013-02-12T07:27:00.001+11:00</published><updated>2013-02-13T06:47:18.791+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-13T06:47:18.791+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="X10" /><category scheme="http://www.blogger.com/atom/ns#" term="CM19a" /><category scheme="http://www.blogger.com/atom/ns#" term="Ubuntu" /><title>How to disable interfering kernel drivers</title><content type="html">&lt;i&gt;This post has moved to &lt;a href="http://www.cm19a.com/2013/02/how-to-disable-linux-kernel-drivers.html"&gt;CM19a Software&lt;/a&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;www.cuddon.net&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Cuddonnet/~4/YwcLrWUW9Ak" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cuddon.net/feeds/3147408464392172343/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.cuddon.net/2013/02/how-to-disable-interfering-kernel.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/3147408464392172343?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/3147408464392172343?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Cuddonnet/~3/YwcLrWUW9Ak/how-to-disable-interfering-kernel.html" title="How to disable interfering kernel drivers" /><author><name>Andrew Cuddon</name><uri>https://plus.google.com/100115418396733096968</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-y752K0UgEBg/AAAAAAAAAAI/AAAAAAAAAAA/5rWaNrryakc/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.cuddon.net/2013/02/how-to-disable-interfering-kernel.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0QASX4-cCp7ImA9WhBTF00.&quot;"><id>tag:blogger.com,1999:blog-136957934485772232.post-1547930315969393951</id><published>2013-02-11T21:09:00.002+11:00</published><updated>2013-02-13T07:35:48.058+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-13T07:35:48.058+11:00</app:edited><title>How to set permissions for a USB device in Linux</title><content type="html">&lt;i&gt;This post has moved to my&amp;nbsp;&lt;a href="http://www.cm19a.com/2013/02/how-to-set-linux-permissions-usb-device.html" target="_blank"&gt;CM19a Resources Site&lt;/a&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Links&lt;/h2&gt;
&lt;div&gt;
&lt;a href="http://www.cuddon.net/"&gt;Home Page&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;www.cuddon.net&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Cuddonnet/~4/xbfIaoXC_J4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cuddon.net/feeds/1547930315969393951/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.cuddon.net/2013/02/how-to-set-permissions-for-usb-device.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/1547930315969393951?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/1547930315969393951?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Cuddonnet/~3/xbfIaoXC_J4/how-to-set-permissions-for-usb-device.html" title="How to set permissions for a USB device in Linux" /><author><name>Andrew Cuddon</name><uri>https://plus.google.com/100115418396733096968</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-y752K0UgEBg/AAAAAAAAAAI/AAAAAAAAAAA/5rWaNrryakc/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.cuddon.net/2013/02/how-to-set-permissions-for-usb-device.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkMDR305cCp7ImA9WhBSGEo.&quot;"><id>tag:blogger.com,1999:blog-136957934485772232.post-7122690334021030757</id><published>2013-02-04T07:07:00.001+11:00</published><updated>2013-02-26T20:21:16.328+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-26T20:21:16.328+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Home Automation" /><category scheme="http://www.blogger.com/atom/ns#" term="Python Programming" /><category scheme="http://www.blogger.com/atom/ns#" term="Linux" /><category scheme="http://www.blogger.com/atom/ns#" term="X10" /><category scheme="http://www.blogger.com/atom/ns#" term="CM19a" /><title>X10 CM19a Downloads</title><content type="html">Here are all the downloads relating to my Python CM19a driver for Linux.&lt;br /&gt;
&lt;br /&gt;
The latest version of this software can be found at my &lt;a href="http://www.cm19a.com/2013/02/python-x10-cm19a-usb-software-linux.html" target="_blank"&gt;X10 CM19a driver&lt;/a&gt; site&lt;br /&gt;
&lt;h3&gt;
Latest Release&lt;/h3&gt;
Version: 3.0&lt;br /&gt;
Released: 9 September 2011
&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://ubuntuone.com/0O4fjPSt2QFAY8yNcdxZVz"&gt;Download the Python CM19a driver for Linux&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;textarea cols="100" readonly="readonly" rows="23" style="border-style: none; color: darkslategrey; font-size: 80%;"&gt;Changelog 0.20 - 3.0
- Added basic command line argument functionality
    * e.g. ./CM19aDriver.py A1 ON
    * Send only, you cannot receive commands via this approach becuase the device does not maintain a queue of commands received.
    * Relatively slow because the driver must initialise the device each time and then exit.
    * This is the default mode of operation: MODE = 'Command Line'
- Added an in-built HTTP server
    * Send and receive commands via a web browser, any app that supports http get calls, or even the command line (using cURL)
    * e.g. http://192.168.1.3:8008/?house=A&amp;unit=1&amp;command=ON
    * The driver starts and remains running so it can monitor and respond to http requests and capture inbound RF commands received by the CM19a
    * Faster than the basic command line interface becuase the device needs to be initilaised only once (at startup)
    * You need to set MODE = 'HTTP Server' to use the driver this way. You also need to set the IP address and port you wish to use.
- Fixed several bugs relating to bright/dim functionality
    * Added in missing bright/dim commands to the protocol file
    * Modified approach to decode bright/dim button presses from a X10 RF remote
    * Now identifies the house code as well as the button pressed (bright or dim) on the RF keychain remote
&lt;/textarea&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;hr /&gt;
&lt;div style="text-align: center;"&gt;
&lt;iframe frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm.amazon.com/e/cm?lt1=_blank&amp;amp;bc1=FFFFFF&amp;amp;IS2=1&amp;amp;bg1=FFFFFF&amp;amp;fc1=000000&amp;amp;lc1=0000FF&amp;amp;t=cuddonet-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=as1&amp;amp;m=amazon&amp;amp;f=ifr&amp;amp;ref=tf_til&amp;amp;asins=B0027RMIAO" style="height: 240px; width: 120px;"&gt;&lt;/iframe&gt;&amp;nbsp; &amp;nbsp;
&lt;iframe frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm.amazon.com/e/cm?t=cuddonet-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=as1&amp;amp;asins=1430227788&amp;amp;ref=tf_til&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=FFFFFF&amp;amp;bg1=FFFFFF&amp;amp;f=ifr" style="height: 240px; width: 120px;"&gt;&lt;/iframe&gt;&amp;nbsp; &amp;nbsp;
&lt;iframe frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm.amazon.com/e/cm?t=cuddonet-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=as1&amp;amp;asins=B000BT7XUK&amp;amp;ref=tf_til&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=FFFFFF&amp;amp;bg1=FFFFFF&amp;amp;f=ifr" style="height: 240px; width: 120px;"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;hr /&gt;
&lt;br /&gt;
&lt;h3&gt;
Previous releases&lt;/h3&gt;
&lt;h4&gt;
Release v0.2&lt;/h4&gt;
&lt;a href="http://ubuntuone.com/p/19qk/"&gt;Download v0.2 CM19a driver&lt;/a&gt;
&lt;br /&gt;
&lt;textarea cols="100" readonly="readonly" rows="8" style="border-style: none; color: darkslategrey; font-size: 80%;"&gt;Change log 0.11 - 0.20
- Added Bright/Dim functionality
- Added Python Logging
- General bug fixes
- When searching for a CM19a exits the search when it finds the first matching device
- Added flag to control whether to start the receiving thread automatically (default is to start)
- Some methods renamed so they are not exposed as an XML-RPC call (via a separate programme)
&lt;/textarea&gt;
&lt;br /&gt;
&lt;h4&gt;
Release v0.12&lt;/h4&gt;
Released: 3 September 2011&lt;br /&gt;
&lt;a href="http://ubuntuone.com/0MKk8sY39CBRONepB9atc1"&gt;Download v0.12 CM19a Driver&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
Release v0.11&lt;/h4&gt;
&lt;a href="http://ubuntuone.com/p/19qj/"&gt;Download v0.11 CM19a Driver&lt;/a&gt;&lt;br /&gt;
&lt;textarea cols="100" readonly="readonly" rows="4" style="border-style: none; color: darkslategrey; font-size: 80%;"&gt;Change log 0.1 - 0.11
- Add saving error messages to an object attribute so they can be utilised by a separate UI app
- Fixed a couple of coding errors
&lt;/textarea&gt;
&lt;br /&gt;
&lt;h4&gt;
Original Release v0.1&lt;/h4&gt;
&lt;a href="http://ubuntuone.com/p/19qb/"&gt;Download v0.1 CM19a Driver&lt;/a&gt;&lt;br /&gt;
&lt;textarea cols="100" readonly="readonly" rows="6" style="border-style: none; color: darkslategrey; font-size: 80%;"&gt;Functionality
- Use the CM19a to send any X10 on/off command (eg A1OFF, C16ON) wirelessly to a lamp or appliance module (requires an X10 receiver module)
- Use the CM19a to automatically receive and log to a queue any command received from an X10 remote control.
&lt;/textarea&gt;
&lt;br /&gt;
&lt;h3&gt;
Related Links
&lt;/h3&gt;
&lt;a href="http://www.cuddon.net/p/cm19a-page.html"&gt;CM19a Page&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://www.cuddon.net/search/label/CM19a"&gt;All CM19a Posts&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://www.cuddon.net/"&gt;Home Page&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;www.cuddon.net&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Cuddonnet/~4/9Gcmn8kBs38" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cuddon.net/feeds/7122690334021030757/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.cuddon.net/2013/02/x10-cm19a-downloads.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/7122690334021030757?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/7122690334021030757?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Cuddonnet/~3/9Gcmn8kBs38/x10-cm19a-downloads.html" title="X10 CM19a Downloads" /><author><name>Andrew Cuddon</name><uri>https://plus.google.com/100115418396733096968</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-y752K0UgEBg/AAAAAAAAAAI/AAAAAAAAAAA/5rWaNrryakc/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.cuddon.net/2013/02/x10-cm19a-downloads.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU4ESHozfSp7ImA9WhNaGEs.&quot;"><id>tag:blogger.com,1999:blog-136957934485772232.post-5267500505712497264</id><published>2013-02-03T14:53:00.001+11:00</published><updated>2013-02-03T14:58:29.485+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-03T14:58:29.485+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Python Programming" /><title>Python Daemon Downloads</title><content type="html">These are the downloads relating to my &lt;a href="http://www.cuddon.net/2013/01/a-simple-linux-daemon-written-in-python.html"&gt;Python Daemon Article&lt;/a&gt;.
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Downloads&lt;/h3&gt;
&lt;a href="https://www.dropbox.com/s/szx5a25yqd50bqs/python_daemon.zip"&gt;Python daemon module/class&lt;/a&gt;
&lt;br /&gt;
&lt;a href="https://www.dropbox.com/s/ixv53hak4u9ikey/python_daemon_example.zip"&gt;Example - Simple daemonized web server&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;hr /&gt;
&lt;div style="text-align: center;"&gt;
&lt;a href="http://www.amazon.com/gp/product/0451228731/ref=as_li_tf_il?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0451228731&amp;amp;linkCode=as2&amp;amp;tag=cuddonet-20"&gt;&lt;img border="0" src="http://ws.assoc-amazon.com/widgets/q?_encoding=UTF8&amp;amp;ASIN=0451228731&amp;amp;Format=_SL160_&amp;amp;ID=AsinImage&amp;amp;MarketPlace=US&amp;amp;ServiceVersion=20070822&amp;amp;WS=1&amp;amp;tag=cuddonet-20" /&gt;&lt;/a&gt;&lt;img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=cuddonet-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=0451228731" style="border: none !important; margin: 0px !important;" width="1" /&gt;
&amp;nbsp; &amp;nbsp;
&lt;a href="http://www.amazon.com/gp/product/0596158106/ref=as_li_tf_il?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0596158106&amp;amp;linkCode=as2&amp;amp;tag=cuddonet-20"&gt;&lt;img border="0" src="http://ws.assoc-amazon.com/widgets/q?_encoding=UTF8&amp;amp;ASIN=0596158106&amp;amp;Format=_SL160_&amp;amp;ID=AsinImage&amp;amp;MarketPlace=US&amp;amp;ServiceVersion=20070822&amp;amp;WS=1&amp;amp;tag=cuddonet-20" /&gt;&lt;/a&gt;&lt;img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=cuddonet-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=0596158106" style="border: none !important; margin: 0px !important;" width="1" /&gt;
&amp;nbsp; &amp;nbsp;
&lt;a href="http://www.amazon.com/gp/product/0321637739/ref=as_li_tf_il?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0321637739&amp;amp;linkCode=as2&amp;amp;tag=cuddonet-20"&gt;&lt;img border="0" src="http://ws.assoc-amazon.com/widgets/q?_encoding=UTF8&amp;amp;ASIN=0321637739&amp;amp;Format=_SL160_&amp;amp;ID=AsinImage&amp;amp;MarketPlace=US&amp;amp;ServiceVersion=20070822&amp;amp;WS=1&amp;amp;tag=cuddonet-20" /&gt;&lt;/a&gt;&lt;img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=cuddonet-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=0321637739" style="border: none !important; margin: 0px !important;" width="1" /&gt;
&lt;/div&gt;
&lt;hr /&gt;
&lt;br /&gt;
&lt;h3&gt;
Links
&lt;/h3&gt;
&lt;a href="http://www.cuddon.net/search/label/Python%20Programming"&gt;All Python Programming topics&lt;/a&gt;
&lt;br /&gt;
&lt;a href="http://www.cuddon.net/"&gt;Home Page&lt;/a&gt;
&lt;br /&gt;

&lt;div class="blogger-post-footer"&gt;www.cuddon.net&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Cuddonnet/~4/NPoyXw2WHmc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cuddon.net/feeds/5267500505712497264/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.cuddon.net/2013/02/python-daemon-downloads.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/5267500505712497264?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/5267500505712497264?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Cuddonnet/~3/NPoyXw2WHmc/python-daemon-downloads.html" title="Python Daemon Downloads" /><author><name>Andrew Cuddon</name><uri>https://plus.google.com/100115418396733096968</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-y752K0UgEBg/AAAAAAAAAAI/AAAAAAAAAAA/5rWaNrryakc/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.cuddon.net/2013/02/python-daemon-downloads.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEYCQnk5fSp7ImA9WhNaGEU.&quot;"><id>tag:blogger.com,1999:blog-136957934485772232.post-5127282104077546559</id><published>2013-01-28T20:46:00.003+11:00</published><updated>2013-02-03T21:09:23.725+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-03T21:09:23.725+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Python Programming" /><title>A Simple Linux Daemon written in Python</title><content type="html">&lt;i&gt;A simple python daemon module/class demonstrates the requirements and functionality for a well-behaved Linux daemon (background process).&lt;/i&gt;
&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;
&lt;br /&gt;
&lt;h3&gt;
Background&lt;/h3&gt;
&lt;div&gt;
With the &lt;a href="http://www.python.org/" target="_blank"&gt;Python Programming Language&lt;/a&gt; it's easy to create applications that run from the command line (terminal) in Linux. However, anything more than a simple interactive run-once and exit app will block your terminal while it executes - so you must wait for processing to complete before you can type another terminal command. &lt;i&gt;What if your programme needs to run continuously and you don't want to tie up the command line terminal?&lt;/i&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
That's where a Linux &lt;a href="http://en.wikipedia.org/wiki/Daemon_(computing)" target="_blank"&gt;Daemon &lt;/a&gt;comes in useful. If your application is configured as a Linux Daemon it executes as a background process, so it doesn't block the terminal. Most servers (e.g. Apache web sever, Music Player Daemon) and many other applications run as daemon.&lt;br /&gt;
&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-lstM9fvHmZU/UQZIsIDItTI/AAAAAAAAAYs/HZD0b82AxUk/s1600/Python+Daemon.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img alt="Daemonized Python Application (terminal is available)" border="0" height="113" src="http://2.bp.blogspot.com/-lstM9fvHmZU/UQZIsIDItTI/AAAAAAAAAYs/HZD0b82AxUk/s400/Python+Daemon.png" title="Daemonized Python Application" width="400" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;A daemonized Python application (the terminal is available)&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
Note: Python apps are often cross-platform, running on any OS that supports the Python interpreter. Daemonizing, however, is a *nix feature, meaning that it will function on Linux/Unix etc. This daemon module shown below is designed to run on Linux. Your app will also run on Microsoft Windows but at present it will not run in the background (I need to implement a Windows service to do this).&lt;/div&gt;
&lt;br /&gt;
&lt;h3&gt;
Key requirements for a well-behaved daemon&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;The daemon must run in the background and not tie up a terminal.&lt;/li&gt;
&lt;li&gt;A user must be able to start, stop, restart, and check the status of the daemon process.&lt;/li&gt;
&lt;li&gt;All standard and error output must be logged to a file rather than the terminal.&lt;/li&gt;
&lt;li&gt;The daemon must relinquish any elevated file permissions, file create mask, and default folder/directory.&lt;/li&gt;
&lt;li&gt;If required, it must be able to interact with the outside world (e.g. via network sockets, message queue, files etc.).&lt;/li&gt;
&lt;li&gt;The daemon must exit cleanly when the host system shuts down.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;h3&gt;
Python Daemon Module&lt;/h3&gt;
A quick Google search shows a number of variants on how to daemonize a Python app. I decided to write my own - purely for the challenge (especially since I am not a professional programmer or Computer Science graduate). Here's my daemon module, which is a simple class to start, stop, restart, and gets status for a Linux Daemon.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;a href="http://www.cuddon.net/2013/02/python-daemon-downloads.html" target="_blank"&gt;Python Daemon module&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
Dependencies&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Python 2.x&lt;/li&gt;
&lt;li&gt;No other dependencies&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
OS Support&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Linux (tested on Ubuntu 12.10)&lt;/li&gt;
&lt;li&gt;Windows 7 (will run in the foreground, not as a Windows service - to be implemented in the future)&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;h3&gt;
Basic Usage&lt;/h3&gt;
1. Subclass DaemonClass&lt;br /&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;class MainLoop(DaemonClass):&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
2. Override methods as required, typically:&lt;br /&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;run() &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;# Place your functionality in this method. It must contain a continuous loop or blacking function call&lt;br /&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;on_exit() &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;#&amp;nbsp;Additional&amp;nbsp;Clean up tasks just before the daemon exits&lt;br /&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;on_interrupt() &amp;nbsp; &lt;/span&gt;#&amp;nbsp;Additional&amp;nbsp;tasks when a terminate or interrupt signal is received&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
3. You may also want to override the following methods for any processing required before the event is triggered:&lt;br /&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;before_start()&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;before_stop()&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;before_restart()&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;
4. Run from the command line:&lt;br /&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;python daemon.py start|stop|restart|status&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
5. Think about security. The daemon will run as the user who initiated it. Do not run your daemon as a user with root or admin privileges.&lt;br /&gt;
&lt;br /&gt;
6. If required, create:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;An init script so the daemon starts when the server boots&lt;/li&gt;
&lt;li&gt;Or a cron job to start at boot or start/stop/restart at specific times/days&lt;/li&gt;
&lt;/ul&gt;
7. Your script will look something like this:&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: Courier New, Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp; # Import the module&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: Courier New, Courier, monospace; font-size: x-small;"&gt;from daemon import DaemonClass&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Courier New, Courier, monospace; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: Courier New, Courier, monospace; font-size: x-small;"&gt;# Subclass the daemon class&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: Courier New, Courier, monospace; font-size: x-small;"&gt;class MyApp(DaemonClass):&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;def __init__(self):&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;# Ensure the parent class is initialised&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;DaemonClass.__init(self)&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Courier New, Courier, monospace; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;# Override the run() method&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;# This must contain the continuous loop or blocking command&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;def run(self):&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;# Main loop and processing code for managing the functionality of your application&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;alive = True&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;while alive:&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;#&amp;nbsp;Continuous&amp;nbsp;loop until an interrupt is received&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;do_stuff()&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;# Exit cleanly&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;self.on_exit()&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Courier New, Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;self.cleanup()&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;# The daemon will close down now&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;def before_start(self):&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;sys.tdout.write("Config tasks could go here")&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;def on_exit(self):&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;sys.tdout.write("Cleanup tasks go here")&lt;/span&gt;&lt;br /&gt;
&lt;div style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;h3&gt;
How it Works&lt;/h3&gt;
&lt;h4&gt;
Daemon Start&lt;/h4&gt;
&lt;div&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;python daemon.py start&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;Signal handlers are&amp;nbsp;registered&amp;nbsp;so the&amp;nbsp;application&amp;nbsp;can exit gracefully when a terminate or interrupt signal is received.&lt;/li&gt;
&lt;li&gt;The process is forked, creating an exact copy of the original so there are two instances running.&lt;/li&gt;
&lt;li&gt;The initial process (the parent process) exits gracefully and only the child process continues execution.&lt;/li&gt;
&lt;li&gt;The current/default directory/folder is set to&amp;nbsp;something&amp;nbsp;innocuous (e.g. /tmp).&lt;/li&gt;
&lt;li&gt;A new process group is created, for the distribution/receiving of external signals (e.g. terminate signal or interrupt signal).&lt;/li&gt;
&lt;li&gt;Revoke any elevated file creating permissions.&lt;/li&gt;
&lt;li&gt;For the process again to really distance us from the original process.&lt;/li&gt;
&lt;li&gt;The child process exits gracefully and only the &lt;i&gt;grandchild&lt;/i&gt; process continues execution.&lt;/li&gt;
&lt;li&gt;Terminal output (stdout and stderr) are redirected to a log file so the application does not write to the terminal.&lt;/li&gt;
&lt;li&gt;The process ID (PID) is saved to a file. This PID file is used to check whether a process is already running and could be used for interprocess communication.&lt;/li&gt;
&lt;li&gt;The application is daemonized and fully detached from the terminal that was used to start it.&lt;/li&gt;
&lt;li&gt;The application's functionality executes in the&amp;nbsp;background&amp;nbsp;until the application completes execution or is terminated by a user or the host system.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;h4&gt;
Daemon Stop&lt;/h4&gt;
&lt;div&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;python daemon.py stop&lt;/span&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;The current process check whether the daemon is running. If not, it exits.&lt;/li&gt;
&lt;li&gt;If the daemon is running, it's process ID is&amp;nbsp;retrieved&amp;nbsp;from the PID file.&lt;/li&gt;
&lt;li&gt;A terminate signal (SIGTERM) is sent to the runing daemon.&lt;/li&gt;
&lt;li&gt;The current process closes.&lt;/li&gt;
&lt;li&gt;The running daemon traps the terminate signal and completes execution.&lt;/li&gt;
&lt;li&gt;The daemon deletes the PID file and resets stdout and stderr to the terminal.&lt;/li&gt;
&lt;li&gt;The running daemon closes gracefully.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
Daemon Restart&lt;/h4&gt;
&lt;div&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;python daemon.py restart&lt;/span&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;A restart is simply a stop followed by a start.&lt;/li&gt;
&lt;li&gt;The original daemon is stopped via a terminate command and the current process is then daemonized (so the resulting daemon will have a new process ID).&lt;/li&gt;
&lt;li&gt;This ensures that any configuration changes are loaded when the daemon is restarted.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
Daemon Status&lt;/h4&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;python daemon.py status&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;The current process checks for a PID file for the running daemon.&lt;/li&gt;
&lt;li&gt;If there is not pID file then the daemon is not running.&lt;/li&gt;
&lt;li&gt;If there is a PID file then the daemon's process ID will be reported.&lt;/li&gt;
&lt;li&gt;The current process then closes.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;h3&gt;
Example&lt;/h3&gt;
The example creates a simple daemonized web server using nothing but the Python standard library, so there are no external dependencies.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.cuddon.net/2013/02/python-daemon-downloads.html"&gt;Download the example - a daemonized web server&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
How to use the example&lt;/h4&gt;
1. From a terminal run:&lt;br /&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; python example.py start&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
2. Notice that the terminal is available immediately after the application has been daemonized.&lt;br /&gt;
3. From the terminal run:&lt;br /&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; python example.py status&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
4. The PID of the daemonized process should be displayed.&lt;br /&gt;
&lt;br /&gt;
5. Open a browser (on the same computer if the IP is set to &lt;i&gt;localhost&lt;/i&gt;) and go to http://127.0.0.1:8001 (or your configured IP&amp;nbsp;address&amp;nbsp;and Port).&lt;br /&gt;
&lt;br /&gt;
6. The simple website should be displayed.&lt;br /&gt;
&lt;br /&gt;
7. Answer the important question posed on the website.&lt;br /&gt;
&lt;br /&gt;
8. From the terminal run:&lt;br /&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; python example.py stop&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
9. The daemon should now be stopped.&lt;br /&gt;
&lt;br /&gt;
10. From the terminal run:&lt;br /&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; python example.py status&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
11. The status should show that the daemon is not running.&lt;br /&gt;
&lt;br /&gt;
&lt;hr /&gt;
&lt;div style="text-align: center;"&gt;
&lt;a href="http://www.amazon.com/gp/product/0451228731/ref=as_li_tf_il?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0451228731&amp;amp;linkCode=as2&amp;amp;tag=cuddonet-20"&gt;&lt;img border="0" src="http://ws.assoc-amazon.com/widgets/q?_encoding=UTF8&amp;amp;ASIN=0451228731&amp;amp;Format=_SL160_&amp;amp;ID=AsinImage&amp;amp;MarketPlace=US&amp;amp;ServiceVersion=20070822&amp;amp;WS=1&amp;amp;tag=cuddonet-20" /&gt;&lt;/a&gt;&lt;img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=cuddonet-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=0451228731" style="border: none !important; margin: 0px !important;" width="1" /&gt;
&amp;nbsp; &amp;nbsp;
&lt;a href="http://www.amazon.com/gp/product/0596158106/ref=as_li_tf_il?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0596158106&amp;amp;linkCode=as2&amp;amp;tag=cuddonet-20"&gt;&lt;img border="0" src="http://ws.assoc-amazon.com/widgets/q?_encoding=UTF8&amp;amp;ASIN=0596158106&amp;amp;Format=_SL160_&amp;amp;ID=AsinImage&amp;amp;MarketPlace=US&amp;amp;ServiceVersion=20070822&amp;amp;WS=1&amp;amp;tag=cuddonet-20" /&gt;&lt;/a&gt;&lt;img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=cuddonet-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=0596158106" style="border: none !important; margin: 0px !important;" width="1" /&gt;
&amp;nbsp; &amp;nbsp;
&lt;a href="http://www.amazon.com/gp/product/0321637739/ref=as_li_tf_il?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0321637739&amp;amp;linkCode=as2&amp;amp;tag=cuddonet-20"&gt;&lt;img border="0" src="http://ws.assoc-amazon.com/widgets/q?_encoding=UTF8&amp;amp;ASIN=0321637739&amp;amp;Format=_SL160_&amp;amp;ID=AsinImage&amp;amp;MarketPlace=US&amp;amp;ServiceVersion=20070822&amp;amp;WS=1&amp;amp;tag=cuddonet-20" /&gt;&lt;/a&gt;&lt;img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=cuddonet-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=0321637739" style="border: none !important; margin: 0px !important;" width="1" /&gt;
&lt;/div&gt;
&lt;hr /&gt;
&lt;h3&gt;
References&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;This script is was originally based on an excellent post and comments at &lt;a href="http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/" target="_blank"&gt;www.jejik.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://wwwtheorie.physik.unizh.ch/~dpotter/howto/daemonize" target="_blank"&gt;How to Daemonize in Linux&lt;/a&gt; by Doug Potter&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.blogger.com/%3Ca%20href=%22http://www.amazon.com/gp/product/0321637739/ref=as_li_qf_sp_asin_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0321637739&amp;amp;linkCode=as2&amp;amp;tag=cuddonet-20%22%3EAdvanced%20Programming%20in%20the%20UNIX%20Environment%20(3rd%20Edition)%20(Addison-Wesley%20Professional%20Computing%20Series)%3C/a%3E%3Cimg%20src=%22http://www.assoc-amazon.com/e/ir?t=cuddonet-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=0321637739%22%20width=%221%22%20height=%221%22%20border=%220%22%20alt=%22%22%20style=%22border:none%20!important;%20margin:0px%20!important;%22%20/%3E" target="_blank"&gt;Advanced Programming in the Unix Environment by W. Richard Stevens&lt;/a&gt;, ISBN 9780201563177&lt;/li&gt;
&lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Umask"&gt;http://en.wikipedia.org/wiki/Umask&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Process_group"&gt;http://en.wikipedia.org/wiki/Process_group&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;h3&gt;
Relevant Links&lt;/h3&gt;
&lt;a href="http://www.cuddon.net/2013/02/python-daemon-downloads.html" target="_blank"&gt;Downloads in this post&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://www.cuddon.net/search/label/Python%20Programming" target="_blank"&gt;All Python Programming Posts&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://www.cuddon.net/" target=""&gt;Home Page&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;www.cuddon.net&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Cuddonnet/~4/cljZCo9NzIc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cuddon.net/feeds/5127282104077546559/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.cuddon.net/2013/01/a-simple-linux-daemon-written-in-python.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/5127282104077546559?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/5127282104077546559?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Cuddonnet/~3/cljZCo9NzIc/a-simple-linux-daemon-written-in-python.html" title="A Simple Linux Daemon written in Python" /><author><name>Andrew Cuddon</name><uri>https://plus.google.com/100115418396733096968</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-y752K0UgEBg/AAAAAAAAAAI/AAAAAAAAAAA/5rWaNrryakc/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-lstM9fvHmZU/UQZIsIDItTI/AAAAAAAAAYs/HZD0b82AxUk/s72-c/Python+Daemon.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://www.cuddon.net/2013/01/a-simple-linux-daemon-written-in-python.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkANR3g8eCp7ImA9WhBSGEo.&quot;"><id>tag:blogger.com,1999:blog-136957934485772232.post-7420589112954943900</id><published>2012-09-20T21:26:00.001+10:00</published><updated>2013-02-26T20:26:36.670+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-26T20:26:36.670+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Home Automation" /><category scheme="http://www.blogger.com/atom/ns#" term="Python Programming" /><category scheme="http://www.blogger.com/atom/ns#" term="CM19a" /><title>CM19a links fixed</title><content type="html">&lt;div style="text-align: center;"&gt;
&lt;b&gt;For the latest version see my &lt;a href="http://www.cm19a.com/" target="_blank"&gt;CM19a Python Driver&lt;/a&gt; site&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
A couple of the links on my CM19a page were broken. &amp;nbsp;They should now work.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://ubuntuone.com/0O4fjPSt2QFAY8yNcdxZVz"&gt;Version 3.0 CM19a driver&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://ubuntuone.com/0MKk8sY39CBRONepB9atc1"&gt;Previous stable Version 0.12 Cm19a Driver&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;hr /&gt;
&lt;h4&gt;
Related Links&lt;/h4&gt;
&lt;a href="http://www.cm19a.com/"&gt;CM19a Site&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;www.cuddon.net&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Cuddonnet/~4/2Cc2JojTRW8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cuddon.net/feeds/7420589112954943900/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.cuddon.net/2012/09/cm19a-links-fixed.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/7420589112954943900?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/7420589112954943900?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Cuddonnet/~3/2Cc2JojTRW8/cm19a-links-fixed.html" title="CM19a links fixed" /><author><name>Andrew Cuddon</name><uri>https://plus.google.com/100115418396733096968</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-y752K0UgEBg/AAAAAAAAAAI/AAAAAAAAAAA/5rWaNrryakc/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.cuddon.net/2012/09/cm19a-links-fixed.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkYDQXg6fyp7ImA9WhBTEUU.&quot;"><id>tag:blogger.com,1999:blog-136957934485772232.post-3233896766208851342</id><published>2012-08-05T14:17:00.001+10:00</published><updated>2013-02-07T06:49:30.617+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-07T06:49:30.617+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Install Script" /><category scheme="http://www.blogger.com/atom/ns#" term="Home Automation" /><category scheme="http://www.blogger.com/atom/ns#" term="Raspberry Pi" /><title>Auto install and configure MPD on a Raspberry Pi</title><content type="html">&lt;h2&gt;
A script to auto install and configure Music Player Daemon (MPD) on a Raspberry Pi.&lt;/h2&gt;
&lt;i&gt;Connect your Raspberry Pi to your hi-fi, install Music Player Daemon on your Pi and a client on your phone, and you have a $35 network music player. Way cool, but it took me a while to work out how to configure it all. So here's a script that does it for you...&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Please test and leave a comment for defects or enhancement requests.&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;WHAT THIS SCRIPT DOES&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
MPD is designed for remote access playing and streaming of audio files and for managing playlists. It's a music server, not a GUI Music player. But it's core feature is remote control of your music from other devices including computers, tablets, and phones (and other Raspberry Pis of course).&lt;br /&gt;
&lt;br /&gt;
This script:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Installs MPD;&lt;/li&gt;
&lt;li&gt;Configures it for control via another device such as a smartphone, tablet or PC;&lt;/li&gt;
&lt;li&gt;Configures MPD to output to the Raspberry Pi's analog stereo connector; and&lt;/li&gt;
&lt;li&gt;Sets permissions to ensure MPD has read access to your music.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-vgzpMDqmmok/UB3yfw8V15I/AAAAAAAAAL8/27UDwwsa8Bw/s1600/GMPC.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="210" src="http://1.bp.blogspot.com/-vgzpMDqmmok/UB3yfw8V15I/AAAAAAAAAL8/27UDwwsa8Bw/s320/GMPC.png" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Gnome Music Player Client connect to the Pi&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;u&gt;HOW TO USE THIS SCRIPT&lt;/u&gt;&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Log in to your Raspberry Pi.&lt;/li&gt;
&lt;li&gt;Open a terminal if you are in GUI mode.&lt;/li&gt;
&lt;li&gt;Download this script form &lt;a href="http://ubuntuone.com/6WnWGdcYg7bzLKI0WWxd8b" target="_blank"&gt;here &lt;/a&gt;or:&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;i&gt;&lt;span style="font-family: Courier New, Courier, monospace;"&gt;wget -O mpd.sh http://ubuntuone.com/5EduYu3UDn3LPtqi7Iubo9&lt;/span&gt;&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Edit any BASIC SETTINGS such as the music directory:&amp;nbsp;e.g.&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;i&gt;nano mpd_pi.sh&lt;/i&gt; (Ctrl-o to save and Ctrl-x to exit).&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Set execute permissions so the script can run:&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;i&gt;&lt;span style="font-family: Courier New, Courier, monospace;"&gt;chmod u+x mpd_pi.sh&lt;/span&gt;&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Run the script:&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;i&gt;&lt;span style="font-family: Courier New, Courier, monospace;"&gt;./mpd_pi.sh&lt;/span&gt;&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;If you haven't done so already, copy some music across or point the music directory to a network or USB drive.&lt;/li&gt;
&lt;li&gt;You can install a client (such as Gnome Music Player) on the Pi but MPD is designed to be controlled from a separate device. So, install a client such as&amp;nbsp;Droid MPD from the Android Market or the command line client mpc can be used.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/--qZcytCwvLg/UB3yN_wgO8I/AAAAAAAAAL0/dMkJEnPm8o0/s1600/Install+screen.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/--qZcytCwvLg/UB3yN_wgO8I/AAAAAAAAAL0/dMkJEnPm8o0/s1600/Install+screen.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;div&gt;
&lt;u&gt;PREREQUISITES&lt;/u&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt; Raspberry Pi Model B (with Ethernet)&lt;/li&gt;
&lt;li&gt;Raspian distribution installed (This script may work on other Debian based distributions an on other devices).&lt;/li&gt;
&lt;li&gt;The user who runs this script must have sudo rights. A password is required.&lt;/li&gt;
&lt;li&gt;The user who runs this script must have write access to the current directory.&lt;/li&gt;
&lt;li&gt;The RPi must be connected to the internet using the Ethernet connection.&lt;/li&gt;
&lt;li&gt;An MPD client to control playback.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;u&gt;BEWARE&lt;/u&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;By default this script sets read access to all files in the nominated music folder. You can change this by setting SET_READ_ACCESS_PERMISSIONS='n' in the Advanced Permissions section.&lt;/li&gt;
&lt;li&gt;This script may need to reboot your Pi. Ensure all documents are saved before you run this script.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;u&gt;REFERENCES&lt;/u&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;Raspberry Pi wbsite:&amp;nbsp;&lt;a href="http://www.raspberrypi.org/" target="_blank"&gt;http://www.raspberrypi.org/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;MPD Website: &lt;a href="http://www.blogger.com/%C2%A0http://mpd.wikia.com/wiki/Music_Player_Daemon_Wiki" target="_blank"&gt;&amp;nbsp;http://mpd.wikia.com/wiki/Music_Player_Daemon_Wiki&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Details of the Debian Wheezy MPD packages: &amp;nbsp;&lt;a href="http://packages.debian.org/wheezy/mpd" target="_blank"&gt;http://packages.debian.org/wheezy/mpd&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;MPD on the Raspberry Pi Wiki: &amp;nbsp;&lt;a href="http://elinux.org/Rpi_Music_Player_Daemon" target="_blank"&gt;http://elinux.org/Rpi_Music_Player_Daemon&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;u&gt;DOWNLOAD FROM HERE:&lt;/u&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href="http://ubuntuone.com/6WnWGdcYg7bzLKI0WWxd8b" target="_blank"&gt;Download the MPD auto install script for Raspberry Pi&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;hr /&gt;
&lt;iframe border="0" frameborder="0" height="90" marginwidth="0" scrolling="no" src="http://rcm.amazon.com/e/cm?t=cuddonet-20&amp;amp;o=1&amp;amp;p=48&amp;amp;l=ur1&amp;amp;category=electronics&amp;amp;f=ifr" style="border: none;" width="728"&gt;&lt;/iframe&gt;

&lt;hr /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;www.cuddon.net&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Cuddonnet/~4/1rw1JPwUjaA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cuddon.net/feeds/3233896766208851342/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.cuddon.net/2012/08/auto-install-and-configure-mpd-on.html#comment-form" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/3233896766208851342?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/3233896766208851342?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Cuddonnet/~3/1rw1JPwUjaA/auto-install-and-configure-mpd-on.html" title="Auto install and configure MPD on a Raspberry Pi" /><author><name>Andrew Cuddon</name><uri>https://plus.google.com/100115418396733096968</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-y752K0UgEBg/AAAAAAAAAAI/AAAAAAAAAAA/5rWaNrryakc/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-vgzpMDqmmok/UB3yfw8V15I/AAAAAAAAAL8/27UDwwsa8Bw/s72-c/GMPC.png" height="72" width="72" /><thr:total>5</thr:total><feedburner:origLink>http://www.cuddon.net/2012/08/auto-install-and-configure-mpd-on.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ck4MSXY6eip7ImA9WhBSGEo.&quot;"><id>tag:blogger.com,1999:blog-136957934485772232.post-441142863713775080</id><published>2011-09-13T19:55:00.000+10:00</published><updated>2013-02-26T20:29:48.812+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-26T20:29:48.812+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Home Automation" /><category scheme="http://www.blogger.com/atom/ns#" term="Python Programming" /><category scheme="http://www.blogger.com/atom/ns#" term="Linux" /><category scheme="http://www.blogger.com/atom/ns#" term="X10" /><category scheme="http://www.blogger.com/atom/ns#" term="CM19a" /><category scheme="http://www.blogger.com/atom/ns#" term="Ubuntu" /><title>Python X10 CM19A USB Driver - Version 3.0</title><content type="html">&lt;div style="text-align: center;"&gt;
&lt;span class="Apple-style-span" style="color: grey; font-family: Verdana, sans-serif;"&gt;&lt;/span&gt;See my new site for the latest version of my &lt;a href="http://www.cm19a.com/2013/02/python-x10-cm19a-usb-software-linux.html"&gt;Python CM19a driver&lt;/a&gt;.&lt;/div&gt;
&lt;h1&gt;



&lt;span class="Apple-style-span" style="color: grey; font-family: Verdana, sans-serif;"&gt;&lt;b&gt;Python X10 CM19A USB Driver version 3.0 is here&lt;/b&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;span class="Apple-style-span" style="color: grey; font-family: Verdana, sans-serif;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;a href="http://ubuntuone.com/0O4fjPSt2QFAY8yNcdxZVz"&gt;Download&lt;/a&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: grey; font-family: Verdana, sans-serif;"&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;h2&gt;
&lt;span class="Apple-style-span" style="color: grey; font-family: Verdana, sans-serif;"&gt;&lt;b&gt;&lt;u&gt;New features&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;span class="Apple-style-span" style="color: grey; font-family: Verdana, sans-serif;"&gt;
&lt;/span&gt;

&lt;span class="Apple-style-span" style="color: grey; font-family: Verdana, sans-serif;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h3&gt;

&lt;span class="Apple-style-span" style="color: grey; font-family: Verdana, sans-serif;"&gt;

&lt;b&gt;Basic command line argument functionality&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;span class="Apple-style-span" style="color: grey; font-family: Verdana, sans-serif;"&gt;
&lt;/span&gt;

&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-4g6lxffS0zo/Tm8pThhBNlI/AAAAAAAAAHA/NeLk-HAlEzg/s1600/CM19a%2Bcommand%2Bline.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="156" src="http://1.bp.blogspot.com/-4g6lxffS0zo/Tm8pThhBNlI/AAAAAAAAAHA/NeLk-HAlEzg/s320/CM19a%2Bcommand%2Bline.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;e.g. &lt;span style="font-family: Courier New, Courier, monospace;"&gt;./CM19aDriver.py A 1 ON&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Send only, you cannot receive commands via this approach becuase the device does not maintain a queue of commands received.
&lt;/li&gt;
&lt;li&gt;Relatively slow because the driver must initialise the device each time and then exit.
&lt;/li&gt;
&lt;li&gt;This is the default mode of operation: &lt;span style="font-family: Courier New, Courier, monospace;"&gt;MODE = 'Command Line'
&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;span class="Apple-style-span" style="color: grey; font-family: Verdana, sans-serif;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h3&gt;



&lt;span class="Apple-style-span" style="color: grey; font-family: Verdana, sans-serif;"&gt;&lt;b&gt;Built-in HTTP server&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-0MGC8rqJv24/Tm8p0_goC6I/AAAAAAAAAHI/lCCYW5g4gjM/s1600/Browser1.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="97" src="http://1.bp.blogspot.com/-0MGC8rqJv24/Tm8p0_goC6I/AAAAAAAAAHI/lCCYW5g4gjM/s320/Browser1.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Send and receive commands via a web browser, any app that supports http get calls, or even the command line (using cURL)
&lt;/li&gt;
&lt;li&gt;e.g. &lt;span style="font-family: Courier New, Courier, monospace;"&gt;http://192.168.1.3:8008/?house=A&amp;amp;unit=1&amp;amp;command=ON
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;The driver starts and remains running so it can monitor and respond to http requests and capture inbound RF commands received by the CM19a
&lt;/li&gt;
&lt;li&gt;Faster than the basic command line interface becuase the device needs to be initilaised only once (at startup)
&lt;/li&gt;
&lt;li&gt;You need to set &lt;span style="font-family: Courier New, Courier, monospace;"&gt;MODE = 'HTTP Server'&lt;/span&gt; to use the driver this way. You also need to set the IP address and port you wish to use.
&lt;/li&gt;
&lt;/ul&gt;
&lt;span class="Apple-style-span" style="color: grey; font-family: Verdana, sans-serif;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h2&gt;



&lt;span class="Apple-style-span" style="color: grey; font-family: Verdana, sans-serif;"&gt;&lt;b&gt;&lt;u&gt;Bug Fixes&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;b style="color: grey; font-family: Verdana, sans-serif;"&gt;Fixed several bugs relating to bright/dim functionality&lt;/b&gt;&lt;span class="Apple-style-span" style="color: grey; font-family: Verdana, sans-serif;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: grey; font-family: Verdana, sans-serif;"&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Added in missing bright/dim commands to the protocol file
&lt;/li&gt;
&lt;li&gt;Modified approach to decode bright/dim button presses from a X10 RF remote
&lt;/li&gt;
&lt;li&gt;Now identifies the house code as well as the button pressed (bright or dim) on the RF keychain remote
&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Enjoy... Feedback and bug fixes welcome.&lt;br /&gt;
&lt;i&gt;Andrew&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
Related Links&lt;/h4&gt;
&lt;a href="http://www.cm19a.com/"&gt;CM19a Site&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;www.cuddon.net&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Cuddonnet/~4/owBGKoLtEGI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cuddon.net/feeds/441142863713775080/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.cuddon.net/2011/09/python-x10-cm19a-usb-driver-version-30.html#comment-form" title="17 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/441142863713775080?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/441142863713775080?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Cuddonnet/~3/owBGKoLtEGI/python-x10-cm19a-usb-driver-version-30.html" title="Python X10 CM19A USB Driver - Version 3.0" /><author><name>Andrew Cuddon</name><uri>https://plus.google.com/100115418396733096968</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-y752K0UgEBg/AAAAAAAAAAI/AAAAAAAAAAA/5rWaNrryakc/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-4g6lxffS0zo/Tm8pThhBNlI/AAAAAAAAAHA/NeLk-HAlEzg/s72-c/CM19a%2Bcommand%2Bline.png" height="72" width="72" /><thr:total>17</thr:total><feedburner:origLink>http://www.cuddon.net/2011/09/python-x10-cm19a-usb-driver-version-30.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0cMQ34-cCp7ImA9WhBSGEo.&quot;"><id>tag:blogger.com,1999:blog-136957934485772232.post-1677657079585785465</id><published>2011-09-03T15:27:00.000+10:00</published><updated>2013-02-26T20:31:22.058+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-26T20:31:22.058+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Home Automation" /><category scheme="http://www.blogger.com/atom/ns#" term="Python Programming" /><category scheme="http://www.blogger.com/atom/ns#" term="X10" /><category scheme="http://www.blogger.com/atom/ns#" term="CM19a" /><title>How to import the CM19a driver into another module</title><content type="html">&lt;i&gt;This question has come up many times.  Here is an example of how to import the CM19a driver (v0.12) into another Python module so you can create your own macros.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-ocHkNlKpj9U/TmG6i7_qUFI/AAAAAAAAAGY/oS7ClscRYjc/s1600/Screenshot.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="261" src="http://2.bp.blogspot.com/-ocHkNlKpj9U/TmG6i7_qUFI/AAAAAAAAAGY/oS7ClscRYjc/s320/Screenshot.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
It's relatively painless:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Use the import statement to import the driver module (import cm19aDriver)&lt;/li&gt;
&lt;li&gt;Configure/initialise the CM19a (cm19aDriver.configure(start=True))&lt;/li&gt;
&lt;li&gt;Send and receive commands (result = cm19aDriver.cm19a.send("A", "1", "ON") and cm19aDriver.cm19a.getReceiveQueue())&lt;/li&gt;
&lt;li&gt;Tidy up and exit (cm19aDriver.tidyUp())&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;a href="http://ubuntuone.com/0MKk8sY39CBRONepB9atc1"&gt;Download the example&lt;/a&gt;

&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
Related Links&lt;/h4&gt;
&lt;a href="http://www.cm19a.com/" target="_blank"&gt;CM19a Site Home Page&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;www.cuddon.net&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Cuddonnet/~4/BeuNRFME9RI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cuddon.net/feeds/1677657079585785465/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.cuddon.net/2011/09/how-to-import-cm19a-driver-into-another.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/1677657079585785465?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/1677657079585785465?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Cuddonnet/~3/BeuNRFME9RI/how-to-import-cm19a-driver-into-another.html" title="How to import the CM19a driver into another module" /><author><name>Andrew Cuddon</name><uri>https://plus.google.com/100115418396733096968</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-y752K0UgEBg/AAAAAAAAAAI/AAAAAAAAAAA/5rWaNrryakc/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-ocHkNlKpj9U/TmG6i7_qUFI/AAAAAAAAAGY/oS7ClscRYjc/s72-c/Screenshot.png" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://www.cuddon.net/2011/09/how-to-import-cm19a-driver-into-another.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0cDRHg_eyp7ImA9WhBTEUU.&quot;"><id>tag:blogger.com,1999:blog-136957934485772232.post-2398919669358177574</id><published>2011-09-03T15:07:00.000+10:00</published><updated>2013-02-07T07:04:35.643+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-07T07:04:35.643+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Home Automation" /><category scheme="http://www.blogger.com/atom/ns#" term="Python Programming" /><category scheme="http://www.blogger.com/atom/ns#" term="X10" /><category scheme="http://www.blogger.com/atom/ns#" term="CM19a" /><title>CM19a Driver - new version 0.12</title><content type="html">Here is the latest version of the original (0.1 series) driver. This seems to be the version most people currently use.The following updates have been made:&lt;br /&gt;
1. Added functionality to accept command line arguments for sending an x10 command&lt;br /&gt;
e.g.&lt;br /&gt;
sudo ./cm19aDriver.py A1 ON&lt;br /&gt;
echo "Result: $?"&lt;br /&gt;
&lt;br /&gt;
Note that this is relatively slow since the device needs to be reinitialised for each command line request. (I am working on ways of changing this).&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-FqedhN8RMbY/TmG1oIRpH8I/AAAAAAAAAGU/vl2tJwl2gyE/s1600/Screenshot-andrew%2540ubuntu-desktop%253A%2B%257E-v0.12.png" imageanchor="1"&gt;&lt;img border="0" height="140" src="http://1.bp.blogspot.com/-FqedhN8RMbY/TmG1oIRpH8I/AAAAAAAAAGU/vl2tJwl2gyE/s320/Screenshot-andrew%2540ubuntu-desktop%253A%2B%257E-v0.12.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
2. Added argument to Configure to state whether polling for inbound commands should be started. The default is 'start=False'.  This is the correct setting for command line processing but can be changed to 'start=False' when importing this driver into another module and polling the device for inbound commands. Click here to see how.&lt;br /&gt;
&lt;a href="http://ubuntuone.com/0MKk8sY39CBRONepB9atc1"&gt;Download version 0.12&lt;/a&gt;


&lt;br /&gt;
Cheers, Andrew&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
Related Links&lt;/h4&gt;
&lt;a href="http://www.cuddon.net/p/cm19a-page.html"&gt;CM19a Home Page&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;www.cuddon.net&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Cuddonnet/~4/xp_8iHZjGsE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cuddon.net/feeds/2398919669358177574/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.cuddon.net/2011/09/cm19a-driver-new-version-012.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/2398919669358177574?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/2398919669358177574?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Cuddonnet/~3/xp_8iHZjGsE/cm19a-driver-new-version-012.html" title="CM19a Driver - new version 0.12" /><author><name>Andrew Cuddon</name><uri>https://plus.google.com/100115418396733096968</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-y752K0UgEBg/AAAAAAAAAAI/AAAAAAAAAAA/5rWaNrryakc/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-FqedhN8RMbY/TmG1oIRpH8I/AAAAAAAAAGU/vl2tJwl2gyE/s72-c/Screenshot-andrew%2540ubuntu-desktop%253A%2B%257E-v0.12.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://www.cuddon.net/2011/09/cm19a-driver-new-version-012.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0cBR30zfCp7ImA9WhNaGEU.&quot;"><id>tag:blogger.com,1999:blog-136957934485772232.post-5695796063381693665</id><published>2011-09-02T14:02:00.001+10:00</published><updated>2013-02-03T20:50:56.384+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-03T20:50:56.384+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SR7400" /><category scheme="http://www.blogger.com/atom/ns#" term="Python Programming" /><category scheme="http://www.blogger.com/atom/ns#" term="GC-100" /><title>SR7400 Page updated</title><content type="html">I have now updated the static page for the Marantz SR7400/SR8400 Surround Sound Receiver.  This includes the serial control specification and my automation driver.

Click on the SR7400 Page above or &lt;a href="http://www.cuddon.net/p/sr7400-page.html"&gt;click here&lt;/a&gt;.

&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;www.cuddon.net&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Cuddonnet/~4/7SVus2bTkp8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cuddon.net/feeds/5695796063381693665/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.cuddon.net/2011/09/sr7400-page-updated.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/5695796063381693665?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/5695796063381693665?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Cuddonnet/~3/7SVus2bTkp8/sr7400-page-updated.html" title="SR7400 Page updated" /><author><name>Andrew Cuddon</name><uri>https://plus.google.com/100115418396733096968</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-y752K0UgEBg/AAAAAAAAAAI/AAAAAAAAAAA/5rWaNrryakc/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.cuddon.net/2011/09/sr7400-page-updated.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0IESX06fCp7ImA9WhNaGEg.&quot;"><id>tag:blogger.com,1999:blog-136957934485772232.post-4454209941606509994</id><published>2011-09-01T21:18:00.001+10:00</published><updated>2013-02-03T11:31:48.314+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-03T11:31:48.314+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Install Script" /><category scheme="http://www.blogger.com/atom/ns#" term="Ubuntu" /><title>Script - Install Mediainfo</title><content type="html">&lt;br /&gt;
&lt;h2&gt;


&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Ubuntu Desktop Script&lt;/span&gt;&lt;/h2&gt;
&lt;br /&gt;
This script installs MediaInfo, which is a great app for displays information on various media files. This script installs both the GUI and command line tools.&amp;nbsp;&lt;a href="http://mediainfo.sourceforge.net/"&gt;http://mediainfo.sourceforge.net/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-4rcliFVhmNw/Tl9pbi3ZViI/AAAAAAAAAGA/ZD04T02PZOQ/s1600/Screenshot-MediaInfo.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="157" src="http://2.bp.blogspot.com/-4rcliFVhmNw/Tl9pbi3ZViI/AAAAAAAAAGA/ZD04T02PZOQ/s400/Screenshot-MediaInfo.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;a href="http://ubuntuone.com/2owUmCHCAkYRcuGfbSP2Gu"&gt;Download the script&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.cuddon.net/p/ubuntu-scripts.html"&gt;Other Ubuntu Scripts&lt;/a&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;www.cuddon.net&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Cuddonnet/~4/xoqc7PrRccA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cuddon.net/feeds/4454209941606509994/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.cuddon.net/2011/09/script-install-mediainfo.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/4454209941606509994?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/4454209941606509994?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Cuddonnet/~3/xoqc7PrRccA/script-install-mediainfo.html" title="Script - Install Mediainfo" /><author><name>Andrew Cuddon</name><uri>https://plus.google.com/100115418396733096968</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-y752K0UgEBg/AAAAAAAAAAI/AAAAAAAAAAA/5rWaNrryakc/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-4rcliFVhmNw/Tl9pbi3ZViI/AAAAAAAAAGA/ZD04T02PZOQ/s72-c/Screenshot-MediaInfo.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://www.cuddon.net/2011/09/script-install-mediainfo.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkUFSH08fyp7ImA9WhBTEUU.&quot;"><id>tag:blogger.com,1999:blog-136957934485772232.post-241569446202282773</id><published>2011-09-01T17:44:00.001+10:00</published><updated>2013-02-07T06:50:19.377+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-07T06:50:19.377+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Install Script" /><category scheme="http://www.blogger.com/atom/ns#" term="Ubuntu" /><title>Script - Install Virtualbox</title><content type="html">&lt;span class="Apple-style-span" style="color: #999999; font-size: large;"&gt;&lt;b&gt;Ubuntu Desktop Script&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-tFCMwdE1Fo8/Tl9lS9LadZI/AAAAAAAAAF8/g4thMRYkrsg/s1600/Screenshot.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-tFCMwdE1Fo8/Tl9lS9LadZI/AAAAAAAAAF8/g4thMRYkrsg/s1600/Screenshot.png" /&gt;&lt;/a&gt;&lt;/div&gt;
Installs Oracle VM Virtualbox. Based on information from &lt;a href="http://www.virtualbox.org/wiki/Linux_Downloads"&gt;http://www.virtualbox.org/wiki/Linux_Downloads&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://ubuntuone.com/61TWzLak3PD3rkHFJHpzK0"&gt;Download&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.cuddon.net/p/ubuntu-scripts.html"&gt;Other Ubuntu Scripts&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;www.cuddon.net&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Cuddonnet/~4/CTlb8HKGxL8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cuddon.net/feeds/241569446202282773/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.cuddon.net/2011/09/script-install-virtualbox.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/241569446202282773?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/241569446202282773?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Cuddonnet/~3/CTlb8HKGxL8/script-install-virtualbox.html" title="Script - Install Virtualbox" /><author><name>Andrew Cuddon</name><uri>https://plus.google.com/100115418396733096968</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-y752K0UgEBg/AAAAAAAAAAI/AAAAAAAAAAA/5rWaNrryakc/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-tFCMwdE1Fo8/Tl9lS9LadZI/AAAAAAAAAF8/g4thMRYkrsg/s72-c/Screenshot.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://www.cuddon.net/2011/09/script-install-virtualbox.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkUBR3w4fCp7ImA9WhBTEUU.&quot;"><id>tag:blogger.com,1999:blog-136957934485772232.post-7263735090463760543</id><published>2011-09-01T15:19:00.000+10:00</published><updated>2013-02-07T06:50:56.234+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-07T06:50:56.234+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Install Script" /><category scheme="http://www.blogger.com/atom/ns#" term="Ubuntu" /><title>Script - Access a networked scanner</title><content type="html">&lt;span style="font-family: inherit;"&gt;This script enables access to a NETWORKED scanner that uses the SANED (Scanner Access Now Easy) daemon. The scanner is attached (usually via USB) to a server or another computer. This setup is not required if you simply connect your scanner directly to your Ubuntu Desktop computer.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-S1IzBF5n4hU/Tl9j23eSOJI/AAAAAAAAAF4/Dbr91OZzVqo/s1600/Screenshot-Preferences2.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="94" src="http://3.bp.blogspot.com/-S1IzBF5n4hU/Tl9j23eSOJI/AAAAAAAAAF4/Dbr91OZzVqo/s320/Screenshot-Preferences2.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;After running the script you should be able to selected your networked scanner (in my case an Epson Multifunction printer&amp;nbsp;&lt;/span&gt;scanner&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;) as you scanning source device.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;a href="http://ubuntuone.com/06GSg4chXahi7fVYQZOqpK"&gt;Download the auto install script&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Related Links
&lt;/h3&gt;
&lt;a href="http://www.cuddon.net/p/ubuntu-scripts.html"&gt;Other Ubuntu Scripts&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.cuddon.net/"&gt;Home Page&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;www.cuddon.net&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Cuddonnet/~4/BqNdf6Z6bBU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cuddon.net/feeds/7263735090463760543/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.cuddon.net/2011/09/script-access-networked-scanner.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/7263735090463760543?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/7263735090463760543?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Cuddonnet/~3/BqNdf6Z6bBU/script-access-networked-scanner.html" title="Script - Access a networked scanner" /><author><name>Andrew Cuddon</name><uri>https://plus.google.com/100115418396733096968</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-y752K0UgEBg/AAAAAAAAAAI/AAAAAAAAAAA/5rWaNrryakc/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-S1IzBF5n4hU/Tl9j23eSOJI/AAAAAAAAAF4/Dbr91OZzVqo/s72-c/Screenshot-Preferences2.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://www.cuddon.net/2011/09/script-access-networked-scanner.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0YHQ3g7eyp7ImA9WhBTEUU.&quot;"><id>tag:blogger.com,1999:blog-136957934485772232.post-1759542692042850687</id><published>2011-08-12T12:06:00.002+10:00</published><updated>2013-02-07T07:05:32.603+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-07T07:05:32.603+11:00</app:edited><title>New links to the CM19a Drivers</title><content type="html">&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;Apologies guys. Obviously I have not been active on this site for quite some time.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;Updated links to the various versions of my driver are provided on the CM19a Page. Click this &lt;a href="http://www.cuddon.net/p/cm19a-page.html"&gt;link&lt;/a&gt; or click on the 'CM19a' tab above.&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;Let me know if you have any problems.&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;i&gt;Andrew&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
Related Links&lt;/h4&gt;
&lt;a href="http://www.cuddon.net/p/cm19a-page.html"&gt;CM19a Home Page&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;www.cuddon.net&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Cuddonnet/~4/0Y49AkavUIY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cuddon.net/feeds/1759542692042850687/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.cuddon.net/2011/08/new-links-to-drivers.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/1759542692042850687?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/1759542692042850687?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Cuddonnet/~3/0Y49AkavUIY/new-links-to-drivers.html" title="New links to the CM19a Drivers" /><author><name>Andrew Cuddon</name><uri>https://plus.google.com/100115418396733096968</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-y752K0UgEBg/AAAAAAAAAAI/AAAAAAAAAAA/5rWaNrryakc/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.cuddon.net/2011/08/new-links-to-drivers.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0YCQ3Y7cCp7ImA9WhBTEUU.&quot;"><id>tag:blogger.com,1999:blog-136957934485772232.post-5293000306070784138</id><published>2010-06-26T15:20:00.001+10:00</published><updated>2013-02-07T07:06:02.808+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-07T07:06:02.808+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Home Automation" /><category scheme="http://www.blogger.com/atom/ns#" term="Python Programming" /><category scheme="http://www.blogger.com/atom/ns#" term="Linux" /><category scheme="http://www.blogger.com/atom/ns#" term="X10" /><category scheme="http://www.blogger.com/atom/ns#" term="CM19a" /><title>Version 2.(beta) Python driver for CM19a X10 RF Transceiver (USB)</title><content type="html">Here's a new version (treat it as a beta) of my Python driver for the CM19a X10 RF Transceiver (USB).&lt;br /&gt;
&lt;br /&gt;
There are many changes including:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;ability to send dim and bright commands.&lt;/li&gt;
&lt;li&gt;ability to receive dim and bright commands from an X10 remote.&lt;/li&gt;
&lt;li&gt;ability to turn off automatic polling of the device for incoming commands from a remote. This is useful if you want control over when the device is polled for inbound commands or if your application just sends commands to X10 units and does not respond to remote controls.&lt;/li&gt;
&lt;li&gt;more error checks.&lt;/li&gt;
&lt;li&gt;some refactoring of the class methods and some methods have been renamed to identify then as private to the class and should not be called externally. This is mostly to support a device manager I am working on which exposes the key methods as XML-RPC functions that can be called remotely by other languages such as Perl.&lt;/li&gt;
&lt;li&gt;I have also included some examples of how you can use this driver to respond to inbound commands and perform a simple macro.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
I have tested this on Ubuntu 10.04. Please let me know if you have any problems.&lt;br /&gt;
&lt;br /&gt;
&lt;strike&gt;Download the version 2 (Beta) driver&lt;/strike&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.cuddon.net/2013/02/x10-cm19a-downloads.html"&gt;Download the latest CM19a Linux driver&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Andrew&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
Related Links&lt;/h4&gt;
&lt;a href="http://www.cuddon.net/p/cm19a-page.html"&gt;CM19a Home Page&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;www.cuddon.net&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Cuddonnet/~4/99K9yH85PEc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cuddon.net/feeds/5293000306070784138/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.cuddon.net/2010/06/version-2beta-python-driver-for-cm19a.html#comment-form" title="13 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/5293000306070784138?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/5293000306070784138?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Cuddonnet/~3/99K9yH85PEc/version-2beta-python-driver-for-cm19a.html" title="Version 2.(beta) Python driver for CM19a X10 RF Transceiver (USB)" /><author><name>Andrew Cuddon</name><uri>https://plus.google.com/100115418396733096968</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-y752K0UgEBg/AAAAAAAAAAI/AAAAAAAAAAA/5rWaNrryakc/s512-c/photo.jpg" /></author><thr:total>13</thr:total><feedburner:origLink>http://www.cuddon.net/2010/06/version-2beta-python-driver-for-cm19a.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEEEQHo8eip7ImA9WhBSGEo.&quot;"><id>tag:blogger.com,1999:blog-136957934485772232.post-4862052372469293681</id><published>2010-06-20T14:32:00.012+10:00</published><updated>2013-02-26T20:56:41.472+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-26T20:56:41.472+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Home Automation" /><category scheme="http://www.blogger.com/atom/ns#" term="Linux" /><category scheme="http://www.blogger.com/atom/ns#" term="X10" /><category scheme="http://www.blogger.com/atom/ns#" term="CM19a" /><title>CM19a USB permissions in Ubuntu Lucid</title><content type="html">&lt;br /&gt;
&lt;i&gt;This post has moved to my&amp;nbsp;&lt;a href="http://www.cm19a.com/2013/02/how-to-set-linux-permissions-usb-device.html" target="_blank"&gt;CM19a Resources Site&lt;/a&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;hr /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Here's how I set permissions in Ubuntu 10.04 (Lucid) so that any user can run my CM19a X10 USB Transceiver driver.&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;1. Create a &lt;/span&gt;&lt;a href="http://linux.die.net/man/7/udev"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;udev&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt; permissions files so that when udev creates a device file when the transceiver is connected, the correct permissions are set&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;sudo nano /etc/udev/rules.d/cm19a.rules&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Note that I did not number this file so it runs after all other permissions are set.&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;2. Add in the following text and save&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;# Allow all users to read and write to the CM19a X10 Transceiver (USB)&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;SYSFS{idVendor}=="0bc7", SYSFS{idProduct}=="0002", MODE="666"&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;3. If your CM19a is plugged in, then remove, wait a sec or two and then plug it back in again. The correct permissions should now be set.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;4. Any user should now be able to run the driver without using sudo.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;eg. From a terminal&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;./CM19A_X10_USB.py&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;
&lt;/span&gt; &lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;
&lt;/span&gt; &lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #cc0000;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Note: In Ubuntu you will also need to blacklist two drivers so they do not take control of the CM19a when it is plugged in.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;
&lt;/span&gt; &lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;1. Edit the blacklist file&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;sudo nano &amp;nbsp;/etc/modprobe.d/blacklist&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;
&lt;/span&gt; &lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;2. Add in the follow text and save&lt;/span&gt;&lt;/div&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;# To enable CM19a X10 Transceiver to work&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt; blacklist lirc_atiusb&lt;br /&gt;
blacklist ati_remote&lt;/span&gt;&lt;/span&gt; &lt;br /&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;
&lt;/span&gt; &lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;3. Reboot so this all takes effect.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;
&lt;/span&gt; &lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h4&gt;
Related Links&lt;/h4&gt;
&lt;a href="http://www.cuddon.net/p/cm19a-page.html"&gt;CM19a Home Page&lt;/a&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;www.cuddon.net&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Cuddonnet/~4/Ep9oPz_e_8Q" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cuddon.net/feeds/4862052372469293681/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.cuddon.net/2010/06/cm19a-usb-permissions-in-ubuntu-lucid.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/4862052372469293681?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/4862052372469293681?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Cuddonnet/~3/Ep9oPz_e_8Q/cm19a-usb-permissions-in-ubuntu-lucid.html" title="CM19a USB permissions in Ubuntu Lucid" /><author><name>Andrew Cuddon</name><uri>https://plus.google.com/100115418396733096968</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-y752K0UgEBg/AAAAAAAAAAI/AAAAAAAAAAA/5rWaNrryakc/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.cuddon.net/2010/06/cm19a-usb-permissions-in-ubuntu-lucid.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0UEQn8_fSp7ImA9WhBTEUU.&quot;"><id>tag:blogger.com,1999:blog-136957934485772232.post-1165622411542092131</id><published>2009-12-27T17:50:00.005+11:00</published><updated>2013-02-07T07:06:43.145+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-07T07:06:43.145+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Home Automation" /><category scheme="http://www.blogger.com/atom/ns#" term="Python Programming" /><category scheme="http://www.blogger.com/atom/ns#" term="CM19a" /><title>Cm19a driver User Interface concept is here</title><content type="html">&lt;a href="http://3.bp.blogspot.com/_rx2cioGV7eU/SzcGp1cWixI/AAAAAAAAAB4/1sQLiZEQkqs/s1600-h/Screenshot.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5419807992354081554" src="http://3.bp.blogspot.com/_rx2cioGV7eU/SzcGp1cWixI/AAAAAAAAAB4/1sQLiZEQkqs/s320/Screenshot.png" style="cursor: hand; cursor: pointer; float: left; height: 180px; margin: 0 10px 10px 0; width: 320px;" /&gt;&lt;/a&gt;Several people have asked for a user interface for my CM19a X10 USB Transceiver driver.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Here's my first attempt at a very simple front end. It's not elegant at all - it just allows a user to turn on/off devices with the click of a button.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
You can download the code from &lt;a href="http://sites.google.com/site/andrewcuddon/blog-attachments/CM19aUIv0.1.py?attredirects=0&amp;amp;d=1"&gt;here&lt;/a&gt;.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Requires my CM19a driver version 0.11 or later, available &lt;a href="http://sites.google.com/site/andrewcuddon/blog-attachments/cm19aDriver.py?attredirects=0&amp;amp;d=1"&gt;here&lt;/a&gt;. You must run this with root privileges (I use gksudo) for the driver to be able to access the usb device.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;h4&gt;
Related Links&lt;/h4&gt;
&lt;a href="http://www.cuddon.net/p/cm19a-page.html"&gt;CM19a Home Page&lt;/a&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;www.cuddon.net&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Cuddonnet/~4/4oCWIaZPUeo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cuddon.net/feeds/1165622411542092131/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.cuddon.net/2009/12/cm19a-driver-user-interface-concept-is.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/1165622411542092131?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/1165622411542092131?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Cuddonnet/~3/4oCWIaZPUeo/cm19a-driver-user-interface-concept-is.html" title="Cm19a driver User Interface concept is here" /><author><name>Andrew Cuddon</name><uri>https://plus.google.com/100115418396733096968</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-y752K0UgEBg/AAAAAAAAAAI/AAAAAAAAAAA/5rWaNrryakc/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_rx2cioGV7eU/SzcGp1cWixI/AAAAAAAAAB4/1sQLiZEQkqs/s72-c/Screenshot.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://www.cuddon.net/2009/12/cm19a-driver-user-interface-concept-is.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0QHQng_fSp7ImA9WhBTEUU.&quot;"><id>tag:blogger.com,1999:blog-136957934485772232.post-7877196037591078146</id><published>2009-12-26T23:53:00.004+11:00</published><updated>2013-02-07T07:08:53.645+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-07T07:08:53.645+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Home Automation" /><category scheme="http://www.blogger.com/atom/ns#" term="Linux" /><category scheme="http://www.blogger.com/atom/ns#" term="CM19a" /><title>Cm19a driver User Interface</title><content type="html">&lt;a href="http://1.bp.blogspot.com/_rx2cioGV7eU/SzYIJgwSjCI/AAAAAAAAABw/MlEZU05K_7g/s1600-h/Screenshot-CM19a+driver+front+end+(v0.1).png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5419528161091292194" src="http://1.bp.blogspot.com/_rx2cioGV7eU/SzYIJgwSjCI/AAAAAAAAABw/MlEZU05K_7g/s400/Screenshot-CM19a+driver+front+end+(v0.1).png" style="cursor: hand; cursor: pointer; float: left; height: 141px; margin: 0 10px 10px 0; width: 400px;" /&gt;&lt;/a&gt;&lt;br /&gt;
Just started working on a simple user interface to demonstrate how my Cm19a driver works.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Related Links&lt;/h3&gt;
&lt;a href="http://www.cuddon.net/p/cm19a-page.html"&gt;CM19a Home Page&lt;/a&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;www.cuddon.net&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Cuddonnet/~4/j3IIq2KM9A4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cuddon.net/feeds/7877196037591078146/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.cuddon.net/2009/12/cm19a-driver-user-interface.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/7877196037591078146?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/7877196037591078146?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Cuddonnet/~3/j3IIq2KM9A4/cm19a-driver-user-interface.html" title="Cm19a driver User Interface" /><author><name>Andrew Cuddon</name><uri>https://plus.google.com/100115418396733096968</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-y752K0UgEBg/AAAAAAAAAAI/AAAAAAAAAAA/5rWaNrryakc/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_rx2cioGV7eU/SzYIJgwSjCI/AAAAAAAAABw/MlEZU05K_7g/s72-c/Screenshot-CM19a+driver+front+end+(v0.1).png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://www.cuddon.net/2009/12/cm19a-driver-user-interface.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEAER3wycCp7ImA9WhBSGEo.&quot;"><id>tag:blogger.com,1999:blog-136957934485772232.post-9147951180762331630</id><published>2009-08-19T15:16:00.010+10:00</published><updated>2013-02-26T20:58:26.298+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-26T20:58:26.298+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Home Automation" /><category scheme="http://www.blogger.com/atom/ns#" term="Python Programming" /><category scheme="http://www.blogger.com/atom/ns#" term="Linux" /><category scheme="http://www.blogger.com/atom/ns#" term="X10" /><category scheme="http://www.blogger.com/atom/ns#" term="CM19a" /><title>Python driver v0.11 for CM19a X10 Transceiver</title><content type="html">&lt;div&gt;
&lt;span style="color: red;"&gt;Version 0.11 is superseded.&amp;nbsp;&lt;/span&gt;&lt;span style="color: red;"&gt;The latest driver can be found on&amp;nbsp;my&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.cm19a.com/2013/02/python-x10-cm19a-usb-software-linux.html" target="_blank"&gt;CM19a Site&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;hr /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #3333ff;"&gt;Now updated to version 0.11. Just a few bug fixes plus it now saves any error messages to an object attribute so these can be accessed externally (such as via a user interface app).&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
Here's my first attempt at a Python driver for the CM19a wireless (USB, Firecracker) transceiver.&lt;br /&gt;
This is a user space driver so a kernel driver for the CM19a does not need to be installed.&lt;br /&gt;
&lt;br /&gt;
Functionality&lt;br /&gt;
- Use the CM19a to send any X10 on/off command (eg A1OFF, C16ON) wirelessly to a lamp or appliance module (requires an X10 receiver module).&lt;br /&gt;
- Use the CM19a to automatically receive and log to a queue any command received from an X10 remote control.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://sites.google.com/site/andrewcuddon/blog-attachments/cm19aDriver.py?attredirects=0&amp;amp;d=1"&gt;Click here for the Python code&lt;/a&gt;(version 0.11)&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://sites.google.com/site/andrewcuddon/blog-attachments/CM19aProtocol.txt?attredirects=0"&gt;Click here for the X10 protocol file&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Andrew&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;Example Output&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #666666; font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Configuring...&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;CM19a found and opened&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  Vendor ID (dev.idVendor): 3015 (0bc7 hex)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  Product ID (dev.idProduct): 2 (0002 hex)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  Device Version: 01.00&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  usbVersion:  01.10&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  Number of Configurations:  1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Turning ON A1...&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Waiting 5 seconds...&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Turning OFF A1...&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Press one or more keys on the x10 remote within the next 30 seconds&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Command A3OFF received via cm19a&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Command A3ON received via cm19a&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Command A3ON received via cm19a&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Command A4OFF received via cm19a&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Command A3OFF received via cm19a&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Command A1OFF received via cm19a&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Receive Queue: ['A3OFF', 'A3ON', 'A3ON', 'A4OFF', 'A3OFF', 'A1OFF']&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Press one or more keys on the x10 remote within the next 30 seconds&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Command A1ON received via cm19a&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Command A2ON received via cm19a&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Command A2ON received via cm19a&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Command A3ON received via cm19a&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Command A4ON received via cm19a&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Receive Queue (since the last time we requested the queue): ['A1ON', 'A2ON', 'A2ON', 'A3ON', 'A4ON']&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Tests complete.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #666666; font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style="color: #666666; font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style="color: #666666; font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;hr /&gt;
&lt;h4&gt;
Related Links&lt;/h4&gt;
&lt;a href="http://www.cuddon.net/p/cm19a-page.html"&gt;CM19a Home Page&lt;/a&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;www.cuddon.net&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Cuddonnet/~4/8HqDAjHokQs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cuddon.net/feeds/9147951180762331630/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.cuddon.net/2009/08/python-driver-v01-for-cm19a-x10.html#comment-form" title="24 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/9147951180762331630?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/9147951180762331630?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Cuddonnet/~3/8HqDAjHokQs/python-driver-v01-for-cm19a-x10.html" title="Python driver v0.11 for CM19a X10 Transceiver" /><author><name>Andrew Cuddon</name><uri>https://plus.google.com/100115418396733096968</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-y752K0UgEBg/AAAAAAAAAAI/AAAAAAAAAAA/5rWaNrryakc/s512-c/photo.jpg" /></author><thr:total>24</thr:total><feedburner:origLink>http://www.cuddon.net/2009/08/python-driver-v01-for-cm19a-x10.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CE8DRX85eip7ImA9WhBSGEo.&quot;"><id>tag:blogger.com,1999:blog-136957934485772232.post-6775981426011164333</id><published>2009-08-11T13:36:00.004+10:00</published><updated>2013-02-26T21:01:14.122+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-26T21:01:14.122+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Home Automation" /><category scheme="http://www.blogger.com/atom/ns#" term="Linux" /><category scheme="http://www.blogger.com/atom/ns#" term="X10" /><category scheme="http://www.blogger.com/atom/ns#" term="CM19a" /><category scheme="http://www.blogger.com/atom/ns#" term="Ubuntu" /><title>CM19a USB Permissions</title><content type="html">&lt;div style="text-align: center;"&gt;
The latest version of this post can be found at my &lt;a href="http://www.cm19a.com/2013/02/how-to-set-linux-permissions-usb-device.html" target="_blank"&gt;X10 CM19a Software&lt;/a&gt; site&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
A typical user in Linux does not have sufficient privileges to read/write to the CM19a USB device without the appropriate driver installed with the correct permissions. Since I am writing a User Space driver in Python I need a way to read/write to the device without having to run the script/programme as thee root user.&lt;br /&gt;
&lt;br /&gt;
The following notes show how I have set up &lt;span style="font-weight: bold;"&gt;udev&lt;/span&gt; rules to automatically set the correct permissions on system start or hot pluggin the CM19a.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;1. Create the udev rules file:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-style: italic;"&gt;gksudo gedit /etc/udev/rules.d/40-cm19a.rules&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;This uses gedit text editor in Ubuntu. You can create the text file any way you like.&lt;/li&gt;
&lt;li&gt;The '''40''' is the priority/order for the rule relative to other rules found in /etc/udev/rules.d (user rules) and /lib/udev/rules.d (system/package rules etc)&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;2. Add the rules&lt;/span&gt;&lt;br /&gt;
These rules says that for a device with the specific vendor and product id, enable read/write access to any user who is a member of the '''cm19a-users''' groups&lt;br /&gt;
&lt;br /&gt;
&lt;div style="font-size: small;"&gt;
&lt;br /&gt;
# Sets user permissions for the CM19a X10 US Wireless Transceiver&lt;br /&gt;
# Users who are members of the cm19a-users group have read and write access to this device&lt;br /&gt;
# Note that the vendor and product IDs are hexadecimal values&lt;br /&gt;
# Vendor id = 3015 (decimal), 0bc7(hex), X10 Wireless Technology Inc&lt;br /&gt;
# Product id = 2 (decimal), 0002 (hex), USB Transceiver&lt;br /&gt;
&lt;br /&gt;
# Skip these rules if a usb device is not being added&lt;br /&gt;
SUBSYSTEM!="usb_device", ACTION!="add", GOTO="end_of_cm19a_rules"&lt;br /&gt;
&lt;br /&gt;
SYSFS{idVendor}=="0bc7", SYSFS{idProduct}=="0002", MODE:="0660", GROUP:="cm19a-users"&lt;br /&gt;
&lt;br /&gt;
LABEL="end_of_cm19a_rules"&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Restart the server/pc to ensure to permissions take hold.&lt;br /&gt;
(Just re-plugging the device does not seem to work correctly)&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;4. Check that the CM19a has been detected&lt;/span&gt;&lt;br /&gt;
&lt;div style="font-size: small;"&gt;
&lt;br /&gt;
&lt;span style="font-style: italic;"&gt;lsusb&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub&lt;br /&gt;
Bus 005 Device 002: ID 046d:c517 Logitech, Inc. LX710 Cordless Desktop Laser&lt;br /&gt;
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub&lt;br /&gt;
Bus 004 Device 003: ID 0bc7:0002 X10 Wireless Technology, Inc. Firecracker Interface (ACPI-compliant)&lt;br /&gt;
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub&lt;br /&gt;
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub&lt;br /&gt;
Bus 002 Device 002: ID 045e:00f5 Microsoft Corp. LifeCam VX-3000.&lt;br /&gt;
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;5. Check the group ownership&lt;/span&gt;&lt;br /&gt;
&lt;div style="font-size: small;"&gt;
&lt;br /&gt;
&lt;span style="font-style: italic;"&gt;ls -la /dev/bus/usb/004/&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
total 0&lt;br /&gt;
drwxr-xr-x 2 root root              80 2009-08-11 11:22 .&lt;br /&gt;
drwxr-xr-x 7 root root             140 2009-08-11 18:20 ..&lt;br /&gt;
crw-rw-r-- 1 root root        189, 384 2009-08-11 18:20 001&lt;br /&gt;
crw-rw---- 1 root cm19a-users 189, 387 2009-08-11 11:22 003&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* 004 in the ls command is the bus number where lsusb found the device&lt;br /&gt;
* The ls command lists the devices found on that bus&lt;br /&gt;
* The Cm19a is device number 003 on bus 004&lt;br /&gt;
* Owner is root with permissions: create, read, write&lt;br /&gt;
* Group is cm19a-users with permissions: read, write&lt;br /&gt;
* The World has no permissions at all&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;6. Add any users who need to access the CM19a to the cm19a-users group.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;7. Now your users have read/write access to the device&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h4&gt;
&lt;span style="font-weight: bold;"&gt;Related Links&lt;/span&gt;&lt;/h4&gt;
&lt;div style="font-weight: normal;"&gt;
&lt;span style="font-weight: bold;"&gt;&lt;a href="http://www.cuddon.net/p/cm19a-page.html"&gt;CM19a Home Page&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;www.cuddon.net&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Cuddonnet/~4/skuk5JbPwjA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cuddon.net/feeds/6775981426011164333/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.cuddon.net/2009/08/cm19a-usb-permissions.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/6775981426011164333?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/6775981426011164333?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Cuddonnet/~3/skuk5JbPwjA/cm19a-usb-permissions.html" title="CM19a USB Permissions" /><author><name>Andrew Cuddon</name><uri>https://plus.google.com/100115418396733096968</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-y752K0UgEBg/AAAAAAAAAAI/AAAAAAAAAAA/5rWaNrryakc/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.cuddon.net/2009/08/cm19a-usb-permissions.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0UMQX89cSp7ImA9WhBTFUo.&quot;"><id>tag:blogger.com,1999:blog-136957934485772232.post-3005660255591919610</id><published>2009-08-11T13:11:00.002+10:00</published><updated>2013-02-11T21:41:20.169+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-11T21:41:20.169+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Home Automation" /><category scheme="http://www.blogger.com/atom/ns#" term="Python Programming" /><category scheme="http://www.blogger.com/atom/ns#" term="Linux" /><category scheme="http://www.blogger.com/atom/ns#" term="X10" /><category scheme="http://www.blogger.com/atom/ns#" term="CM19a" /><title>CM19a USB Info</title><content type="html">This post is superseded. See&amp;nbsp;&lt;a href="http://www.cuddon.net/2013/02/how-to-set-permissions-for-usb-device.html"&gt;http://www.cuddon.net/2013/02/how-to-set-permissions-for-usb-device.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;hr /&gt;
&lt;br /&gt;
Here's my programme to extract the Descriptor info from the CM19a X10 USB Transceiver.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://sites.google.com/site/andrewcuddon/blog-attachments/CM19aUSBinfov1.0.py?attredirects=0"&gt;Click Here&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
By Default, a normal user does not have sufficient privileges to access this device so you can either:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;run the programme as root (sudo python CM19aUSBinfo.py); or&lt;/li&gt;
&lt;li&gt;set the privileges when &lt;span style="font-weight: bold;"&gt;udev&lt;/span&gt; detects the device (see my next post for how to do this)&lt;/li&gt;
&lt;/ul&gt;
On my PC, the Python script returns the following information for the CM19a:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="color: grey; font-family: Arial,Helvetica,Serif; font-size: small;"&gt;
&lt;br /&gt;
Bus number (bus.dirname): 004&lt;br /&gt;
CM19a found:&lt;br /&gt;
Device Number(dev.filename): 002&lt;br /&gt;
Device class: 0 (Per Interface)&lt;br /&gt;
Device sub class: 0 (Per Interface)&lt;br /&gt;
Device protocol: 0&lt;br /&gt;
Max packet size for Endpoint 0: 8&lt;br /&gt;
Vendor ID (dev.idVendor): 3015 (0bc7 hex)&lt;br /&gt;
Product ID (dev.idProduct): 2 (0002 hex)&lt;br /&gt;
Device Version: 01.00&lt;br /&gt;
Manufacturer (dev.iManufacturer): 1, X10 Wireless Technology Inc&lt;br /&gt;
Product (dev.iProduct): 2, USB Transceiver&lt;br /&gt;
SerialNumber (dev.iSerialNumber):  0, ?&lt;br /&gt;
usbVersion:  01.10&lt;br /&gt;
Number of Configurations:  1&lt;br /&gt;
Configuration: 1&lt;br /&gt;
Total length: 32&lt;br /&gt;
selfPowered: 0&lt;br /&gt;
remoteWakeup: 0&lt;br /&gt;
maxPower: 4&lt;br /&gt;
Configuration Description:  0&lt;br /&gt;
Number of Interfaces:  1&lt;br /&gt;
Interface tuple:  ((usb.Interface object at 0xb7d22cb0,),)&lt;br /&gt;
Interface Number:  0&lt;br /&gt;
Alternate Setting Number: 0&lt;br /&gt;
Interface class: 255 (Vendor Specific)&lt;br /&gt;
Interface sub class: 0 (Per Interface)&lt;br /&gt;
Interface protocol: 0&lt;br /&gt;
Number of end points:  2&lt;br /&gt;
Endpoint tuple:  (usb.Endpoint object at 0xb7d441c0, usb.Endpoint object at 0xb7d441d0)&lt;br /&gt;
Endpoint address: 129 (0081 hex)&lt;br /&gt;
Type: 3 (INTERRUPT):&lt;br /&gt;
Max packet size: 8 bytes&lt;br /&gt;
Interval: 10&lt;br /&gt;
Endpoint address: 2 (0002 hex)&lt;br /&gt;
Type: 3 (INTERRUPT):&lt;br /&gt;
Max packet size: 8 bytes&lt;br /&gt;
Interval: 10&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h4 style="color: black; font-family: 'Times New Roman'; font-size: medium;"&gt;
Related Links&lt;/h4&gt;
&lt;div style="color: black; font-family: 'Times New Roman'; font-size: medium;"&gt;
&lt;a href="http://www.cuddon.net/p/cm19a-page.html"&gt;CM19a Home Page&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;www.cuddon.net&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Cuddonnet/~4/iSsSgVk_Grs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cuddon.net/feeds/3005660255591919610/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.cuddon.net/2009/08/cm19a-usb-info.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/3005660255591919610?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/3005660255591919610?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Cuddonnet/~3/iSsSgVk_Grs/cm19a-usb-info.html" title="CM19a USB Info" /><author><name>Andrew Cuddon</name><uri>https://plus.google.com/100115418396733096968</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-y752K0UgEBg/AAAAAAAAAAI/AAAAAAAAAAA/5rWaNrryakc/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.cuddon.net/2009/08/cm19a-usb-info.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0UCRXY6fip7ImA9WhBTEUU.&quot;"><id>tag:blogger.com,1999:blog-136957934485772232.post-7724802044325932758</id><published>2009-08-03T10:33:00.012+10:00</published><updated>2013-02-07T07:07:44.816+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-07T07:07:44.816+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Home Automation" /><category scheme="http://www.blogger.com/atom/ns#" term="Python Programming" /><category scheme="http://www.blogger.com/atom/ns#" term="Linux" /><category scheme="http://www.blogger.com/atom/ns#" term="X10" /><category scheme="http://www.blogger.com/atom/ns#" term="CM19a" /><title>Python Driver for the CM19a X10 USB Transceiver</title><content type="html">&lt;b&gt;Python Driver for the CM19a X10 RF Transciever (USB)&lt;/b&gt;&lt;br /&gt;
1. I have started developing a driver for the CM19a using &lt;a href="http://pyusb.wiki.sourceforge.net/" rel="nofollow" target="_blank"&gt;pyUSB&lt;/a&gt;, which allows for easy integration in my home-grown Python-based automation software. PyUSB is simply to install in Ubuntu:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Open a terminal&lt;/li&gt;
&lt;li&gt;Install dependencies: &lt;i style="color: black;"&gt;sudo apt-get install python gcc python-dev libusb-dev&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;Change directory to the puSUB source:&lt;i&gt;&lt;span style="color: black;"&gt; cd ~/pyusbfolder&lt;/span&gt;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;Install pyUSB: &lt;i style="color: black;"&gt;sudo python setup.py install&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;Test the installation by running &lt;span style="color: black;"&gt;usbenum.py&lt;/span&gt; which is found in the samples folder&lt;span style="color: black;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
2. Here's a dump of the information extracted from the CM19a using usbenum.py. Note this the vendor information is independent of the actual branding of the device, which in my case is &lt;a href="http://www.winplus.com.au/automated_entertainment.html" rel="nofollow" target="_blank"&gt;Winplus Home Automation&lt;/a&gt;.&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Vendor ID:  3015 (decimal),  0bc7 (hex)   = X10 Wireless Technology, Inc.&lt;/li&gt;
&lt;li&gt;Device ID:  2 (decimal), 0002 (hex) = Firecracker Interface (ACPI-compliant)&lt;/li&gt;
&lt;li&gt;Interface Class = 255 (decimal), FF (Hex) = Vendor Specific&lt;/li&gt;
&lt;li&gt;Interface subclass and protocol = 0 (decimal), 0000 (Hex) = Vendor Specific&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;div style="border: 1px solid gray; font-size: 75%; width: 60%;"&gt;
&lt;div style="background-color: silver; border: 1px solid gray; font-size: 100%; font-weight: bold; padding: 4px;"&gt;
USB Device Details&lt;/div&gt;
&lt;br /&gt;
Device: 002&lt;br /&gt;
Device class: 0&lt;br /&gt;
Device sub class: 0&lt;br /&gt;
Device protocol: 0&lt;br /&gt;
Max packet size: 8&lt;br /&gt;
idVendor: 3015 (0x0bc7)   X10 Wireless Technology, Inc.&lt;br /&gt;
idProduct: 2 (0x0002)     Firecracker Interface (ACPI-compliant)&lt;br /&gt;
Device Version: 01.00&lt;br /&gt;
Configuration: 1&lt;br /&gt;
Total length: 32&lt;br /&gt;
selfPowered: 0&lt;br /&gt;
remoteWakeup: 0&lt;br /&gt;
maxPower: 4&lt;br /&gt;
Interface: 0&lt;br /&gt;
Alternate Setting: 0&lt;br /&gt;
Interface class: 255&lt;br /&gt;
Interface sub class: 0&lt;br /&gt;
Interface protocol: 0&lt;br /&gt;
Endpoint: 0x81L&lt;br /&gt;
Type: 3&lt;br /&gt;
Max packet size: 8&lt;br /&gt;
Interval: 10&lt;br /&gt;
Endpoint: 0x2L&lt;br /&gt;
Type: 3&lt;br /&gt;
Max packet size: 8&lt;br /&gt;
Interval: 10&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Now I need to start developing the Python Driver module and classes. The basic approach will likely be something like this:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Load pyUSB&lt;/li&gt;
&lt;li&gt;find the correct device and get all the details&lt;/li&gt;
&lt;li&gt;Open the device and claim the interface&lt;/li&gt;
&lt;li&gt; send and receive commands (using the appropriate protocol)&lt;/li&gt;
&lt;li&gt;Release the interface&lt;/li&gt;
&lt;li&gt;Close and cleanup&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
Related Links&lt;/h4&gt;
&lt;a href="http://www.cuddon.net/p/cm19a-page.html"&gt;CM19a Home Page&lt;/a&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;www.cuddon.net&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Cuddonnet/~4/HwoeWPQNsMM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cuddon.net/feeds/7724802044325932758/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.cuddon.net/2009/08/python-driver-for-cm19a-x10-usb.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/7724802044325932758?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/7724802044325932758?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Cuddonnet/~3/HwoeWPQNsMM/python-driver-for-cm19a-x10-usb.html" title="Python Driver for the CM19a X10 USB Transceiver" /><author><name>Andrew Cuddon</name><uri>https://plus.google.com/100115418396733096968</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-y752K0UgEBg/AAAAAAAAAAI/AAAAAAAAAAA/5rWaNrryakc/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.cuddon.net/2009/08/python-driver-for-cm19a-x10-usb.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A08NRHs-eyp7ImA9WhNaGEk.&quot;"><id>tag:blogger.com,1999:blog-136957934485772232.post-696017816804415632</id><published>2009-08-03T09:56:00.004+10:00</published><updated>2013-02-03T11:04:55.553+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-03T11:04:55.553+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Home Automation" /><category scheme="http://www.blogger.com/atom/ns#" term="SR7400" /><title>RS232C Controller Specification for Marantz SR8500/SR7500/SR5500</title><content type="html">Click &lt;a href="http://sites.google.com/site/andrewcuddon/blog-attachments/RS232marantzSR7500.doc?attredirects=0"&gt;here &lt;/a&gt;for the specification.&lt;br /&gt;
&lt;br /&gt;
Source: &lt;a href="http://us.marantz.com/136.asp"&gt;Marantz USA&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are looking for my driver for the &lt;b&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;SR7400&lt;/span&gt;&lt;/b&gt; &lt;a href="http://www.cuddon.net/2009/07/marantz-sr7400-surround-sound-receiver.html"&gt;click here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;www.cuddon.net&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Cuddonnet/~4/RUPr04dBCKY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cuddon.net/feeds/696017816804415632/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.cuddon.net/2009/08/rs232c-controller-specification-for.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/696017816804415632?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/696017816804415632?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Cuddonnet/~3/RUPr04dBCKY/rs232c-controller-specification-for.html" title="RS232C Controller Specification for Marantz SR8500/SR7500/SR5500" /><author><name>Andrew Cuddon</name><uri>https://plus.google.com/100115418396733096968</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-y752K0UgEBg/AAAAAAAAAAI/AAAAAAAAAAA/5rWaNrryakc/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.cuddon.net/2009/08/rs232c-controller-specification-for.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkEDSHs7fSp7ImA9WhNaGEg.&quot;"><id>tag:blogger.com,1999:blog-136957934485772232.post-818960524293990644</id><published>2009-07-13T11:58:00.012+10:00</published><updated>2013-02-03T11:17:59.505+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-03T11:17:59.505+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Home Automation" /><category scheme="http://www.blogger.com/atom/ns#" term="SR7400" /><category scheme="http://www.blogger.com/atom/ns#" term="AudioVisual" /><title>Marantz SR7400 Surround Sound Receiver</title><content type="html">This is an old post. Go to my &lt;a href="http://www.cuddon.net/p/sr7400-page.html"&gt;Marantz SR7400&lt;/a&gt; page for all the details and a how to.
&lt;br /&gt;
&lt;hr&gt;
&lt;br /&gt;

&lt;ul&gt;
&lt;li&gt;Great sounding receiver&lt;/li&gt;
&lt;li&gt;Crossover settings could go a little lower to better cater for small speakers&lt;/li&gt;
&lt;li&gt;Automation via its RS232 port&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;b&gt;Serial Protocol and codes&lt;/b&gt;&lt;br /&gt;
Note that the codes used by this receiver are completely different to the SR7&lt;span style="font-weight: bold;"&gt;5&lt;/span&gt;00.&lt;br /&gt;
&lt;br /&gt;
Here is the official specification (I can no longer find the original source)&lt;br /&gt;
&lt;a href="http://sites.google.com/site/andrewcuddon/blog-attachments/MarantzSR7400.pdf?attredirects=0"&gt;Marantz SR7400 Serial Control Specification&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Here is the &lt;a href="http://sites.google.com/site/andrewcuddon/blog-attachments/MarantzSR7400SerialProtocol.ini?attredirects=0"&gt;serial control protocol&lt;/a&gt; file I use for my AV automation controller.&lt;br /&gt;
&lt;br /&gt;
This specification also applies to the &lt;span style="font-weight: bold;"&gt;SR8400&lt;/span&gt; (but &lt;u&gt;not&lt;/u&gt; the &lt;a href="http://www.cuddon.net/2009/08/rs232c-controller-specification-for.html"&gt;SR7&lt;span style="font-weight: bold;"&gt;5&lt;/span&gt;00/SR8&lt;span style="font-weight: bold;"&gt;5&lt;/span&gt;00/SR5&lt;span style="font-weight: bold;"&gt;5&lt;/span&gt;00&lt;/a&gt;).&lt;br /&gt;
&lt;br /&gt;
NOTE On the serial comms parameters required&lt;br /&gt;
&lt;div style="background-color: silver; color: black; font-size: 80%; width: 33%;"&gt;
A STRAIGHT THROUGH serial (NOT a Null Modem cable) is required (the SR7400 has its pins already reversed)&lt;br /&gt;
Baud: 9600 bps&lt;br /&gt;
Parity: None&lt;br /&gt;
Stop Bits: 1&lt;br /&gt;
Data bits: 8&lt;br /&gt;
Flow Control: RTS/CTS (Hardware Flow Control)&lt;br /&gt;
Note that software flow control and no flow control do not work so the connecting master device must support hardware flow control&lt;/div&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;Infrared Protocol and codes&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Search for SR7400 on the &lt;a href="http://us.marantz.com/136.asp"&gt;Marantz USA&lt;/a&gt; support site.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;Python comms driver I wrote to control this device&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Here is my &lt;a href="http://sites.google.com/site/andrewcuddon/blog-attachments/SR7400_TCP.py?attredirects=0"&gt;Python driver&lt;/a&gt; for controlling the Marantz SR7400 AV Receiver over TCP (connected via serial to a Global Cache GC-100).&lt;div class="blogger-post-footer"&gt;www.cuddon.net&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Cuddonnet/~4/XO6I5Wv_cJ0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cuddon.net/feeds/818960524293990644/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.cuddon.net/2009/07/marantz-sr7400-surround-sound-receiver.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/818960524293990644?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/136957934485772232/posts/default/818960524293990644?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Cuddonnet/~3/XO6I5Wv_cJ0/marantz-sr7400-surround-sound-receiver.html" title="Marantz SR7400 Surround Sound Receiver" /><author><name>Andrew Cuddon</name><uri>https://plus.google.com/100115418396733096968</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-y752K0UgEBg/AAAAAAAAAAI/AAAAAAAAAAA/5rWaNrryakc/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.cuddon.net/2009/07/marantz-sr7400-surround-sound-receiver.html</feedburner:origLink></entry></feed>
