<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Jordan Hackworth</title>
	
	<link>http://www.jordanhackworth.com</link>
	<description />
	<lastBuildDate>Mon, 16 Apr 2012 17:09:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/JordanHackworth" /><feedburner:info uri="jordanhackworth" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Home Automation with Asterisk and FreePBX</title>
		<link>http://feedproxy.google.com/~r/JordanHackworth/~3/vbT6L4HvrHo/</link>
		<comments>http://www.jordanhackworth.com/home-automation-with-asterisk-and-freepbx/#comments</comments>
		<pubDate>Thu, 09 Feb 2012 01:29:06 +0000</pubDate>
		<dc:creator>Jordan Hackworth</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.jordanhackworth.com/?p=126</guid>
		<description>To control my house&amp;#8217;s lights and AV equipment, I&amp;#8217;m using a very simple Asterisk IVR, mine controls my lights and turns on/off my TV and Reciever by quereying a URL on my Mi Casa Verde Vera. The IVR answers automatically, is completely silent, and hangs up once it recieves a command. This means to launch [...]</description>
			<content:encoded><![CDATA[<p>To control my house&#8217;s lights and AV equipment, I&#8217;m using a very simple Asterisk IVR, mine controls my lights and turns on/off my TV and Reciever by quereying a URL on my <a href="https://www.amazon.com/dp/B006GWTGOW/ref=as_li_ss_til?tag=jordanhaccom-20&amp;camp=0&amp;creative=0&amp;linkCode=as4&amp;creativeASIN=B006GWTGOW&amp;adid=1XECF3H1SQG5CA8HYXZD&amp;" onclick="javascript:pageTracker._trackPageview('/outbound/article/https://www.amazon.com/dp/B006GWTGOW/ref=as_li_ss_til?tag=jordanhaccom-20&amp;camp=0&amp;creative=0&amp;linkCode=as4&amp;creativeASIN=B006GWTGOW&amp;adid=1XECF3H1SQG5CA8HYXZD&amp;');">Mi Casa Verde Vera.</a>  <img style="float:right" src="http://www.jordanhackworth.com/wp-content/uploads/2012/02/ivr1.jpg" />The IVR answers automatically, is completely silent, and hangs up once it recieves a command. This means to launch an action, I simple hit a speed dial button on the phone next to my couch, then hit a number, and my equipment turns on or off.</p>
<p>For creating the IVR and extension for the IVR I&#8217;m using FreePBX; if you&#8217;re using bare asterisk, check the Asterisk documentation on how to setup a basic IVR.<br />
<span id="more-126"></span><br />
Log into your FreePBX administration page and add two nessicary extension under <code>Tools -> Module Admin</code> named <code>IVR</code> and <code>Misc Applications</code>. </p>
<p>Next, switch to the Setup tab and open IVR, and lets create a basic IVR. Give it a name, and leave all the other options at their defaults.<br />
<img style="float:right" src="http://www.jordanhackworth.com/wp-content/uploads/2012/02/ivr3.jpg" /><br />
Finally, switch to <code>Misc Applications</code> and <code>Add Misc Application</code>, give it a description and a <code>Feature Code</code> (an extension) and set the destination to the IVR you created in the previous step. </p>
<p>Next, we&#8217;ll need to log into your Asterisk box over SSH to edit some config files. </p>
<p>Open a terminal or Putty and ssh into your asterisk box, <code>ssh root@asterisk</code>.</p>
<p>We need to search for the name of the IVR that we created in FreePBX, run </p>
<pre class="brush: bash; light: true; title: ; notranslate">
cat /etc/asterisk/extensions_additional.conf | grep '\[ivr'
</pre>
<p>In my case, the IVR is named <code>[ivr-2]</code></p>
<p>Next, we need to add our own commands,</p>
<pre class="brush: bash; light: true; title: ; notranslate">
nano /etc/asterisk/extensions_custom.conf
</pre>
<p>Copy and paste the below, be sure to change <code>[ivr-2]</code> to the IVR name you discovered earlier. </p>
<div id="gist-1890106" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'>[ivr-2]</div><div class='line' id='LC2'> </div><div class='line' id='LC3'>exten =&gt; 2,1,Macro(blkvm-clr,)</div><div class='line' id='LC4'>exten =&gt; 2,n,TrySystem(wget -b -O /dev/null -o /dev/null  &quot;http://10.10.0.6:49451/data_request?id=lu_action&amp;output_format=xml&amp;serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&amp;action=RunScene&amp;SceneNum=2&quot;)</div><div class='line' id='LC5'> </div><div class='line' id='LC6'>exten =&gt; 3,1,Macro(blkvm-clr,)</div><div class='line' id='LC7'>exten =&gt; 3,n,TrySystem(wget -b -O /dev/null -o /dev/null  &quot;http://10.10.0.6:49451/data_request?id=lu_action&amp;output_format=xml&amp;serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&amp;action=RunScene&amp;SceneNum=4&quot;)</div><div class='line' id='LC8'> </div><div class='line' id='LC9'>exten =&gt; 4,1,Macro(blkvm-clr,)</div><div class='line' id='LC10'>exten =&gt; 4,n,TrySystem(wget -b -O /dev/null -o /dev/null  &quot;http://10.10.0.6:49451/data_request?id=lu_action&amp;output_format=xml&amp;serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&amp;action=RunScene&amp;SceneNum=10&quot;)</div><div class='line' id='LC11'> </div><div class='line' id='LC12'>exten =&gt; 5,1,Macro(blkvm-clr,)</div><div class='line' id='LC13'>exten =&gt; 5,n,TrySystem(wget -b -O /dev/null -o /dev/null  &quot;http://10.10.0.6:49451/data_request?id=lu_action&amp;output_format=xml&amp;serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&amp;action=RunScene&amp;SceneNum=11&quot;)</div><div class='line' id='LC14'> </div><div class='line' id='LC15'>exten =&gt; 0,1,Macro(blkvm-clr,)</div><div class='line' id='LC16'>exten =&gt; 0,n,TrySystem(wget -b -O /dev/null -o /dev/null  &quot;http://10.10.0.6:49451/data_request?id=lu_action&amp;output_format=xml&amp;serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&amp;action=RunScene&amp;SceneNum=12&quot;)</div><div class='line' id='LC17'> </div><div class='line' id='LC18'>; end of [ivr-2]</div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/1890106/fb941392896c73392f721d09d6ecd5c1e54dd7d5/extensions_custom.conf" style="float:right;">view raw</a>
            <a href="https://gist.github.com/1890106#file_extensions_custom.conf" style="float:right;margin-right:10px;color:#666">extensions_custom.conf</a>
            <a href="https://gist.github.com/1890106">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>
</div>

<p>The above uses <code>wget</code> to launch URLs when you hit 2, 3, 4, 5, or 0 after calling the IVR extension, change the URL to match what you're trying to do. You could, for instance, have it pause your torrent or SABnzbd downloads, set a status on Twitter or Facebook, or set your Google Voice account to Do Not Disturb. </p>

<p><a href="http://feedads.g.doubleclick.net/~a/rTcdN6vi5kh6yiAAYJA1-OraP0A/0/da"><img src="http://feedads.g.doubleclick.net/~a/rTcdN6vi5kh6yiAAYJA1-OraP0A/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/rTcdN6vi5kh6yiAAYJA1-OraP0A/1/da"><img src="http://feedads.g.doubleclick.net/~a/rTcdN6vi5kh6yiAAYJA1-OraP0A/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/JordanHackworth/~4/vbT6L4HvrHo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.jordanhackworth.com/home-automation-with-asterisk-and-freepbx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.jordanhackworth.com/home-automation-with-asterisk-and-freepbx/</feedburner:origLink></item>
		<item>
		<title>Home Automation With XBMC</title>
		<link>http://feedproxy.google.com/~r/JordanHackworth/~3/p1ywy3J3NYw/</link>
		<comments>http://www.jordanhackworth.com/home-automation-with-xbmc/#comments</comments>
		<pubDate>Sun, 05 Feb 2012 23:42:13 +0000</pubDate>
		<dc:creator>Jordan Hackworth</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.jordanhackworth.com/?p=114</guid>
		<description>At my home, I use a Mi Casa Verde Vera 3 home automation controller to control lights in my house, and I wanted a way to have XBMC automatically control lights for me. By adding a couple Python scripts to XBMC, whenever I start playing a video the lights in my living room turn off, [...]</description>
			<content:encoded><![CDATA[<p>At my home, I use a <a href="https://www.amazon.com/dp/B006GWTGOW/ref=as_li_ss_til?tag=jordanhaccom-20&amp;camp=0&amp;creative=0&amp;linkCode=as4&amp;creativeASIN=B006GWTGOW&amp;adid=1XECF3H1SQG5CA8HYXZD&amp;" onclick="javascript:pageTracker._trackPageview('/outbound/article/https://www.amazon.com/dp/B006GWTGOW/ref=as_li_ss_til?tag=jordanhaccom-20&amp;camp=0&amp;creative=0&amp;linkCode=as4&amp;creativeASIN=B006GWTGOW&amp;adid=1XECF3H1SQG5CA8HYXZD&amp;');">Mi Casa Verde Vera 3</a> home automation controller to control lights in my house, and I wanted a way to have XBMC automatically control lights for me. By adding a couple Python scripts to XBMC, whenever I start playing a video the lights in my living room turn off, if I pause the video the lights in my living room, kitchen, hallway, and bathroom go to 25% brightness, and when video stops playing, the lights in the living room turn on to full brightness. It also turns on and off my deck lights – no need to waste power when I&#8217;m inside watching something. You could modify the script to do the same thing with X10 or INSTEON, pause or resume your torrent or SABnzbd downloads,     set a status on your Twitter or Facebook that you&#8217;re watching something, set your Google Voice account to Do Not Disturb, or anything else you can think of.<br />
<span id="more-114"></span><br />
All of the below scripts go in the <code>~/.xbmc/scripts</code> directory. If you don&#8217;t have that directory, create it. If you&#8217;re on Windows XP, that directory is under <code>C:\Documents and Settings\[user]\Application Data\XBMC\scripts</code> and on Windows Vista or 7, <code>C:\Users\[user]\AppData\Roaming\XBMC\scripts</code></p>
<p>The first script watches XBMC for the state of the video player and launches actions when it changes. It doesn&#8217;t do anything if you&#8217;re playing music or watching a slide show. Feel free to modify it to cover both Videos and Music by removing <code>if xbmc.Player().isPlayingVideo():</code></p>
<div id="gist-1814336" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="kn">import</span> <span class="nn">xbmc</span><span class="o">,</span><span class="nn">xbmcgui</span></div><div class='line' id='LC2'><span class="kn">import</span> <span class="nn">subprocess</span><span class="o">,</span><span class="nn">os</span></div><div class='line' id='LC3'>&nbsp;</div><div class='line' id='LC4'><span class="k">class</span> <span class="nc">MyPlayer</span><span class="p">(</span><span class="n">xbmc</span><span class="o">.</span><span class="n">Player</span><span class="p">)</span> <span class="p">:</span></div><div class='line' id='LC5'>&nbsp;</div><div class='line' id='LC6'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">def</span> <span class="nf">__init__</span> <span class="p">(</span><span class="bp">self</span><span class="p">):</span></div><div class='line' id='LC7'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">xbmc</span><span class="o">.</span><span class="n">Player</span><span class="o">.</span><span class="n">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span></div><div class='line' id='LC8'>&nbsp;</div><div class='line' id='LC9'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">def</span> <span class="nf">onPlayBackStarted</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span></div><div class='line' id='LC10'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">if</span> <span class="n">xbmc</span><span class="o">.</span><span class="n">Player</span><span class="p">()</span><span class="o">.</span><span class="n">isPlayingVideo</span><span class="p">():</span></div><div class='line' id='LC11'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">os</span><span class="o">.</span><span class="n">system</span><span class="p">(</span><span class="s">&quot;wget --spider &#39;http://10.10.0.6:49451/data_request?id=lu_action&amp;output_format=xml&amp;serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&amp;action=RunScene&amp;SceneNum=19&#39;&quot;</span><span class="p">)</span></div><div class='line' id='LC12'>&nbsp;</div><div class='line' id='LC13'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">def</span> <span class="nf">onPlayBackEnded</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span></div><div class='line' id='LC14'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">if</span> <span class="p">(</span><span class="n">VIDEO</span> <span class="o">==</span> <span class="mi">1</span><span class="p">):</span></div><div class='line' id='LC15'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">os</span><span class="o">.</span><span class="n">system</span><span class="p">(</span><span class="s">&quot;wget --spider &#39;http://10.10.0.6:49451/data_request?id=lu_action&amp;output_format=xml&amp;serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&amp;action=RunScene&amp;SceneNum=2&#39;&quot;</span><span class="p">)</span></div><div class='line' id='LC16'>&nbsp;</div><div class='line' id='LC17'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">def</span> <span class="nf">onPlayBackStopped</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span></div><div class='line' id='LC18'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">if</span> <span class="p">(</span><span class="n">VIDEO</span> <span class="o">==</span> <span class="mi">1</span><span class="p">):</span></div><div class='line' id='LC19'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">os</span><span class="o">.</span><span class="n">system</span><span class="p">(</span><span class="s">&quot;wget --spider &#39;http://10.10.0.6:49451/data_request?id=lu_action&amp;output_format=xml&amp;serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&amp;action=RunScene&amp;SceneNum=2&#39;&quot;</span><span class="p">)</span></div><div class='line' id='LC20'>&nbsp;</div><div class='line' id='LC21'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">def</span> <span class="nf">onPlayBackPaused</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span></div><div class='line' id='LC22'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">if</span> <span class="n">xbmc</span><span class="o">.</span><span class="n">Player</span><span class="p">()</span><span class="o">.</span><span class="n">isPlayingVideo</span><span class="p">():</span></div><div class='line' id='LC23'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">os</span><span class="o">.</span><span class="n">system</span><span class="p">(</span><span class="s">&quot;wget --spider &#39;http://10.10.0.6:49451/data_request?id=lu_action&amp;output_format=xml&amp;serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&amp;action=RunScene&amp;SceneNum=18&#39;&quot;</span><span class="p">)</span></div><div class='line' id='LC24'>&nbsp;</div><div class='line' id='LC25'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">def</span> <span class="nf">onPlayBackResumed</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span></div><div class='line' id='LC26'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">if</span> <span class="n">xbmc</span><span class="o">.</span><span class="n">Player</span><span class="p">()</span><span class="o">.</span><span class="n">isPlayingVideo</span><span class="p">():</span></div><div class='line' id='LC27'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">os</span><span class="o">.</span><span class="n">system</span><span class="p">(</span><span class="s">&quot;wget --spider &#39;http://10.10.0.6:49451/data_request?id=lu_action&amp;output_format=xml&amp;serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&amp;action=RunScene&amp;SceneNum=19&#39;&quot;</span><span class="p">)</span></div><div class='line' id='LC28'><span class="n">player</span><span class="o">=</span><span class="n">MyPlayer</span><span class="p">()</span></div><div class='line' id='LC29'>&nbsp;</div><div class='line' id='LC30'><span class="n">VIDEO</span> <span class="o">=</span> <span class="mi">0</span></div><div class='line' id='LC31'>&nbsp;</div><div class='line' id='LC32'><span class="k">while</span><span class="p">(</span><span class="mi">1</span><span class="p">):</span></div><div class='line' id='LC33'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">if</span> <span class="n">xbmc</span><span class="o">.</span><span class="n">Player</span><span class="p">()</span><span class="o">.</span><span class="n">isPlaying</span><span class="p">():</span></div><div class='line' id='LC34'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">if</span> <span class="n">xbmc</span><span class="o">.</span><span class="n">Player</span><span class="p">()</span><span class="o">.</span><span class="n">isPlayingVideo</span><span class="p">():</span></div><div class='line' id='LC35'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">VIDEO</span> <span class="o">=</span> <span class="mi">1</span></div><div class='line' id='LC36'>&nbsp;</div><div class='line' id='LC37'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">else</span><span class="p">:</span></div><div class='line' id='LC38'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">VIDEO</span> <span class="o">=</span> <span class="mi">0</span></div><div class='line' id='LC39'>&nbsp;</div><div class='line' id='LC40'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">xbmc</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">1000</span><span class="p">)</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/1814336/ed4fce047eb47be3b128425dda957bcbb4853c2f/playeractions.py" style="float:right;">view raw</a>
            <a href="https://gist.github.com/1814336#file_playeractions.py" style="float:right;margin-right:10px;color:#666">playeractions.py</a>
            <a href="https://gist.github.com/1814336">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>
</div>

<p>Save it as playeraction.py in the scripts folder mentioned above. You might be asking why I&#8217;m using <code>os.system("wget")</code>? I wanted to test the commands on my shell to make sure they were the right URLs, and I didn&#8217;t want to clutter up the script with using urllib2 and implementing error handling if someone was going to use the script with local shell commands.</p>
<p>The next script launches actions when XBMC is idle for more than 15 minutes. I have it set to turn off my TV and Receiver to save power – it immediately powers them back on if I touch any button on the remote. </p>
<div id="gist-1814336" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="kn">import</span> <span class="nn">xbmc</span><span class="o">,</span><span class="nn">xbmcgui</span></div><div class='line' id='LC2'><span class="kn">import</span> <span class="nn">subprocess</span><span class="o">,</span><span class="nn">os</span></div><div class='line' id='LC3'>&nbsp;</div><div class='line' id='LC4'><span class="n">ILT</span> <span class="o">=</span> <span class="mi">0</span></div><div class='line' id='LC5'><span class="n">IDLE_TIME_MIN</span> <span class="o">=</span> <span class="mi">15</span></div><div class='line' id='LC6'><span class="n">s</span> <span class="o">=</span> <span class="mi">0</span></div><div class='line' id='LC7'>&nbsp;</div><div class='line' id='LC8'><span class="k">while</span><span class="p">(</span><span class="mi">1</span><span class="p">):</span></div><div class='line' id='LC9'>&nbsp;&nbsp;<span class="n">it</span> <span class="o">=</span> <span class="n">xbmc</span><span class="o">.</span><span class="n">getGlobalIdleTime</span><span class="p">()</span></div><div class='line' id='LC10'>&nbsp;&nbsp;<span class="n">s</span> <span class="o">=</span> <span class="p">((</span><span class="n">IDLE_TIME_MIN</span> <span class="o">*</span> <span class="mi">60</span><span class="p">)</span> <span class="o">-</span> <span class="n">it</span> <span class="p">)</span></div><div class='line' id='LC11'>&nbsp;&nbsp;<span class="k">if</span> <span class="p">(</span><span class="n">s</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">):</span></div><div class='line' id='LC12'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">if</span> <span class="p">(</span><span class="n">ILT</span> <span class="o">==</span> <span class="mi">1</span><span class="p">):</span></div><div class='line' id='LC13'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">if</span> <span class="n">xbmc</span><span class="o">.</span><span class="n">Player</span><span class="p">()</span><span class="o">.</span><span class="n">isPlayingVideo</span><span class="p">():</span></div><div class='line' id='LC14'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">pass</span></div><div class='line' id='LC15'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">else</span><span class="p">:</span></div><div class='line' id='LC16'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">os</span><span class="o">.</span><span class="n">system</span><span class="p">(</span><span class="s">&quot;wget --spider &#39;http://10.10.0.6:49451/data_request?id=lu_action&amp;output_format=xml&amp;serviceId=urn:upnp-org:serviceId:SwitchPower1&amp;action=SetTarget&amp;newTargetValue=1&amp;DeviceNum=10&#39;&quot;</span><span class="p">)</span></div><div class='line' id='LC17'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">ILT</span> <span class="o">=</span> <span class="mi">0</span></div><div class='line' id='LC18'>&nbsp;</div><div class='line' id='LC19'>&nbsp;&nbsp;<span class="k">elif</span> <span class="p">(</span><span class="n">s</span> <span class="o">&lt;</span> <span class="mi">0</span><span class="p">):</span></div><div class='line' id='LC20'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">if</span> <span class="p">(</span><span class="n">ILT</span> <span class="o">==</span> <span class="mi">0</span> <span class="ow">and</span> <span class="n">xbmc</span><span class="o">.</span><span class="n">Player</span><span class="p">()</span><span class="o">.</span><span class="n">isPlayingVideo</span><span class="p">()</span> <span class="o">==</span> <span class="bp">False</span><span class="p">):</span></div><div class='line' id='LC21'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">os</span><span class="o">.</span><span class="n">system</span><span class="p">(</span><span class="s">&quot;wget --spider &#39;http://10.10.0.6:49451/data_request?id=lu_action&amp;output_format=xml&amp;serviceId=urn:upnp-org:serviceId:SwitchPower1&amp;action=SetTarget&amp;newTargetValue=0&amp;DeviceNum=10&#39;&quot;</span><span class="p">)</span></div><div class='line' id='LC22'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">ILT</span> <span class="o">=</span> <span class="mi">1</span></div><div class='line' id='LC23'><span class="n">xbmc</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">5000</span><span class="p">)</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/1814336/4dd53e76b71548ae54e397fa04d40f6d5bc2600a/idletime.py" style="float:right;">view raw</a>
            <a href="https://gist.github.com/1814336#file_idletime.py" style="float:right;margin-right:10px;color:#666">idletime.py</a>
            <a href="https://gist.github.com/1814336">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>
</div>

<p>Change <code>IDLE_TIME_MIN</code> if you want more or less idle time. Save this script as idletime.py in the scripts directory.</p>
<p>Finally, the scripts will need to be launched by XBMC by including them in <code>autoexec.py</code> which is under <code>~/.xbmc/userdata</code> on Mac or Linux, Windows XP is <code>C:\Documents and Settings\[user]\Application Data\XBMC\userdata</code> and on Windows Vista or 7, <code>C:\Users\[user]\AppData\Roaming\XBMC\userdata</code>. You probably already have an <code>autoexec.py</code> but if you don&#8217;t, create one. </p>
<div id="gist-1814336" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="kn">import</span> <span class="nn">os</span></div><div class='line' id='LC2'><span class="kn">import</span> <span class="nn">xbmc</span></div><div class='line' id='LC3'>&nbsp;</div><div class='line' id='LC4'><span class="n">xbmc</span><span class="o">.</span><span class="n">executescript</span><span class="p">(</span><span class="s">&#39;special://home/scripts/playeractions.py&#39;</span><span class="p">)</span></div><div class='line' id='LC5'><span class="n">xbmc</span><span class="o">.</span><span class="n">executescript</span><span class="p">(</span><span class="s">&#39;special://home/scripts/idletime.py&#39;</span><span class="p">)</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/1814336/185e4401aab2b6b8a3a23c69b0f3ad03d05a58ac/autoexec.py" style="float:right;">view raw</a>
            <a href="https://gist.github.com/1814336#file_autoexec.py" style="float:right;margin-right:10px;color:#666">autoexec.py</a>
            <a href="https://gist.github.com/1814336">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>
</div>

<p>What this does is launch the two scripts from the default home directory of your master profile. If you&#8217;re using multiple profiles you&#8217;ll have to modify the <code>special://</code> directory to match the other profile. </p>
<p>If you find the above scripts useful, leave a comment with how you&#8217;re using them, it might inspire someone!</p>

<p><a href="http://feedads.g.doubleclick.net/~a/lLEz-0FBIni1FOCa8G7xvP38w3Q/0/da"><img src="http://feedads.g.doubleclick.net/~a/lLEz-0FBIni1FOCa8G7xvP38w3Q/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/lLEz-0FBIni1FOCa8G7xvP38w3Q/1/da"><img src="http://feedads.g.doubleclick.net/~a/lLEz-0FBIni1FOCa8G7xvP38w3Q/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/JordanHackworth/~4/p1ywy3J3NYw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.jordanhackworth.com/home-automation-with-xbmc/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		<feedburner:origLink>http://www.jordanhackworth.com/home-automation-with-xbmc/</feedburner:origLink></item>
		<item>
		<title>Image Positioning in Markdown</title>
		<link>http://feedproxy.google.com/~r/JordanHackworth/~3/mE12VflbsXg/</link>
		<comments>http://www.jordanhackworth.com/image-positioning-in-markdown/#comments</comments>
		<pubDate>Mon, 19 Sep 2011 17:14:36 +0000</pubDate>
		<dc:creator>Jordan Hackworth</dc:creator>
				<category><![CDATA[Web Dev]]></category>

		<guid isPermaLink="false">http://www.jordanhackworth.com/?p=102</guid>
		<description>With Markdown, an exclamation mark preceding a link, such as ![Example](/example.jpg) will insert an image into your body of text. Unfortunately, Markdown&amp;#8217;s syntax doesn&amp;#8217;t support positioning images, for that you&amp;#8217;ll need to fall back on HTML. Here&amp;#8217;s a quick and easy way to insert images using HTML that lets you float the image left or [...]</description>
			<content:encoded><![CDATA[<p>With Markdown, an exclamation mark preceding a link, such as <code>![Example](/example.jpg)</code>  will insert an image into your body of text. Unfortunately, Markdown&#8217;s syntax doesn&#8217;t support positioning images, for that you&#8217;ll need to fall back on HTML.<br />
<span id="more-102"></span><br />
Here&#8217;s a quick and easy way to insert images using HTML that lets you float the image left or right.</p>
<p><code>&lt;img style="float:right" src="example.jpg" /&gt;</code></p>
<p>You can markup the style element to do anything CSS supports, such as adding margins or setting the width/height.<br />
<img style="float:right" src="http://www.jordanhackworth.com/wp-content/uploads/2011/09/textexpander-img.jpg" /></p>
<p>Since Markdown is intended to speed up writing by simplifying syntax, you could save time by adding the img tag to TextExpander. Have the contents of your clipboard automatically inserted into the <code>src=</code> tag for even more time saving.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/GKMzJlesMH3aNucpLoH2dwr6dp0/0/da"><img src="http://feedads.g.doubleclick.net/~a/GKMzJlesMH3aNucpLoH2dwr6dp0/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/GKMzJlesMH3aNucpLoH2dwr6dp0/1/da"><img src="http://feedads.g.doubleclick.net/~a/GKMzJlesMH3aNucpLoH2dwr6dp0/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/JordanHackworth/~4/mE12VflbsXg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.jordanhackworth.com/image-positioning-in-markdown/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.jordanhackworth.com/image-positioning-in-markdown/</feedburner:origLink></item>
		<item>
		<title>Essential iPhone 4 Accessories</title>
		<link>http://feedproxy.google.com/~r/JordanHackworth/~3/pVeE4IN7cO0/</link>
		<comments>http://www.jordanhackworth.com/essential-iphone-4-accessories/#comments</comments>
		<pubDate>Mon, 19 Sep 2011 00:06:26 +0000</pubDate>
		<dc:creator>Jordan Hackworth</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.jordanhackworth.com/?p=80</guid>
		<description>After having owned an iPhone 4 for more than a year, I&amp;#8217;ve found a few accessores that I consider essential. Batteries As with any smartphone, the iPhone&amp;#8217;s battery drains quickly since we don&amp;#8217;t only use these devices as phones, we use them as GPS units, cameras, music players, web browsers, and countless other uses. By [...]</description>
			<content:encoded><![CDATA[<p>After having owned an iPhone 4 for more than a year, I&#8217;ve found a few accessores that I consider essential.<br />
<span id="more-80"></span></p>
<h3>Batteries</h3>
<p>As with any smartphone, the iPhone&#8217;s battery drains quickly since we don&#8217;t only use these devices as phones, we use them as GPS units, cameras, music players, web browsers, and countless other uses. By the end of a long day, the iPhone&#8217;s battery will probably be drained. There are a few ways to keep your iPhone&#8217;s battery juiced up throughout the day. First, small external batteries that plug into the dock connector can revive an iPhone from completely dead to fully charged. Second, consider keeping a cigarette lighter charger in your vehicle.</p>
<p>For external batteries, I&#8217;d recommend the <a href="https://www.amazon.com/dp/B002OEBMZM/ref=as_li_ss_til?tag=jordanhaccom-20&amp;camp=213381&amp;creative=390973&amp;linkCode=as4&amp;creativeASIN=B002OEBMZM&amp;adid=0467DRQ0ZCWJ7YD640FG&amp;">Kensington Mini Battery Extender.</a> It&#8217;s slim enough to keep in your pocket all day, and the included cover can be used as a stand.<br />
<img style="float:right" src="http://www.jordanhackworth.com/wp-content/uploads/2011/09/250-battery.jpg" /></p>
<p>A bulkier but significantly cheaper alternative to the <a href="https://www.amazon.com/dp/B002OEBMZM/ref=as_li_ss_til?tag=jordanhaccom-20&amp;camp=213381&amp;creative=390973&amp;linkCode=as4&amp;creativeASIN=B002OEBMZM&amp;adid=0467DRQ0ZCWJ7YD640FG&amp;">Kensington Mini Battery Extender</a> is the <a href="https://www.amazon.com/dp/B0035R2QS4/ref=as_li_ss_til?tag=jordanhaccom-20&amp;camp=213381&amp;creative=390973&amp;linkCode=as4&amp;creativeASIN=B0035R2QS4&amp;adid=0QCK256HV1J3H6GCQH41&amp;">Stitchway UltraPower.</a> The build quality and bulkiness is reflected in its cheap price, but at about $7 each you can probably afford to buy several and keep them in different places. In your car, your bag, etc. I wouldn&#8217;t suggest carrying one in your pocket all day as it&#8217;s rather bulky.</p>
<p>A third option for an external battery would be a case. The <a href="https://www.amazon.com/dp/B0044TM0OC/ref=as_li_ss_til?tag=jordanhaccom-20&amp;camp=213381&amp;creative=390973&amp;linkCode=as4&amp;creativeASIN=B0044TM0OC&amp;adid=16W3Z2X839EEV1GP2MW8&amp;">BOOST Case</a> would be a great choice for that, since a case doesn&#8217;t hang off the dock connector, a battery case is the most compact option for keeping your iPhone in your pocket while charging. If you frequently run down your iPhone&#8217;s battery, you could keep the case on at the beginning of the day, until the case&#8217;s battery is dead, then remove the case and use the iPhone for the rest of the day. That would effectively double the runtime on your iPhone.</p>
<h3>Chargers</h3>
<p><img style="float:right" src="http://www.jordanhackworth.com/wp-content/uploads/2011/09/250-carcharger.jpg" /></p>
<p>The best option for keeping your iPhone charged in the car is the <a href="https://www.amazon.com/dp/B003N7NO4Q/ref=as_li_ss_til?tag=jordanhaccom-20&amp;camp=213381&amp;creative=390973&amp;linkCode=as4&amp;creativeASIN=B003N7NO4Q&amp;adid=1FQSY919WPMQ09RTVENR&amp;">Scosche reVIVE II</a> which has two USB outputs, a 1A output for iPhones and a 2.1A output for iPads. Don&#8217;t worry, you can plug any device into that 2.1A output, they&#8217;ll only take as much current as they need. Since the reVIVE has two outputs, you can charge multiple devices at a time. You could keep a <a href="https://www.amazon.com/dp/B0035R2QS4/ref=as_li_ss_til?tag=jordanhaccom-20&amp;camp=213381&amp;creative=390973&amp;linkCode=as4&amp;creativeASIN=B0035R2QS4&amp;adid=0QCK256HV1J3H6GCQH41&amp;">Stitchway UltraPower.</a>  plugged into to the reVIVE so it&#8217;s ready to go when you need it. Whatever car charger you decide to go with, don&#8217;t skimp on a Chinese made knockoff, I&#8217;ve used a few that would barely put out enough current to keep an old iPod charged, and today&#8217;s smart phones demand a lot more current.</p>
<h3>Headphones</h3>
<p>The headphones that come with your iPhone have a built in microphone and volume controls, but the sound quality is significantly lacking. Upgrading to the <a href="https://www.amazon.com/dp/B003TO531K/ref=as_li_ss_til?tag=jordanhaccom-20&amp;camp=213381&amp;creative=390973&amp;linkCode=as4&amp;creativeASIN=B003TO531K&amp;adid=1P62PS4CJNWM2RNKCJZY&amp;">Shure SE115&#8242;s</a> will give you amazing sound quality. I&#8217;ve owned the older Shure E2C&#8217;s for 4 years now, and I can attest to the build quality of any Shure product. My E2C&#8217;s get used nearly every day and still look and sound like the day I bought them. Sound isolating headphones, like the <a href="https://www.amazon.com/dp/B003TO531K/ref=as_li_ss_til?tag=jordanhaccom-20&amp;camp=213381&amp;creative=390973&amp;linkCode=as4&amp;creativeASIN=B003TO531K&amp;adid=1P62PS4CJNWM2RNKCJZY&amp;">Shure SE115&#8242;s</a> act like ear plugs – they come with a few different inserts so you can use which one fits your ears best, and they completely block any outside sound. Since the ear canal is sealed, the bass response is significantly better, and the overall sound quality is vastly improved.<br />
<img style="float:right" src="http://www.jordanhackworth.com/wp-content/uploads/2011/09/250-bluetooth.jpg" /></p>
<p>If you&#8217;re a physically active, cords are a hinderance. That&#8217;s where bluetooth headphones come in. The <a href="https://www.amazon.com/dp/B002BH3I9U/ref=as_li_ss_til?tag=jordanhaccom-20&amp;camp=213381&amp;creative=390973&amp;linkCode=as4&amp;creativeASIN=B002BH3I9U&amp;adid=0YDH96XHK69RX53PHAXE&amp;">Motorola S305 Bluetooth Headphones</a> are a great choice if you&#8217;re a runner or biker. They&#8217;re cheap enough that you don&#8217;t have to worry about them getting damaged by sweat or being dropped, but my pair has been very robust and sweat haven&#8217;t damaged them at all. They&#8217;re also very comfortable to wear, I have no problems wearing them on long runs. The sound quality is on par or slightly better than the headphones included with your iPhone. They also include a microphone, so you can use them to make phone calls. For the money, the <a href="https://www.amazon.com/dp/B002BH3I9U/ref=as_li_ss_til?tag=jordanhaccom-20&amp;camp=213381&amp;creative=390973&amp;linkCode=as4&amp;creativeASIN=B002BH3I9U&amp;adid=0YDH96XHK69RX53PHAXE&amp;">S305 Headphones</a> simply can&#8217;t be beat.</p>
<h3>Armbands</h3>
<p><img style="float:right" src="http://www.jordanhackworth.com/wp-content/uploads/2011/09/250-armband.jpg" /></p>
<p>Speaking of running and biking, putting your iPhone in an arm band is the best option for keeping the iPhone secure to your body. I&#8217;ve been very happy with the <a href="https://www.amazon.com/dp/B003ZZKL6U/ref=as_li_ss_til?tag=jordanhaccom-20&amp;camp=213381&amp;creative=390973&amp;linkCode=as4&amp;creativeASIN=B003ZZKL6U&amp;adid=0FMWP2H622BFZMP4XJE4&amp;">Tuneband</a> since I purchased it. It&#8217;s easy to slip your iPhone into the silicon case, and the elastic armband keeps it in place without feeling uncomfortable.</p>
<h3>Cases</h3>
<p>I usually don&#8217;t bother with a case for my iPhone, but I can definitely recommend any case made by Speck. The <a href="https://www.amazon.com/dp/B003TO53WO/ref=as_li_ss_til?tag=jordanhaccom-20&amp;camp=213381&amp;creative=390973&amp;linkCode=as4&amp;creativeASIN=B003TO53WO&amp;adid=1330QCNGVD3J6DXMX2X2&amp;">Speck CandyShell</a> is a great inexpensive case that comes in a few different color schemes.</p>
<p>If you really want to go stylish, <a href="http://www.grovemade.com/">Grove</a> makes some really awesome bamboo cases that you can get custom engraved, and as a bonus they&#8217;re made locally in Oregon, where I live.</p>
<h3>Back Cover</h3>
<p><img style="float:right" src="http://www.jordanhackworth.com/wp-content/uploads/2011/09/250-back.jpg" /></p>
<p>If the back cover glass on your iPhone 4 is cracked, or the camera lens is scratched up, a new back cover is really cheap and takes less than a minute to install. I ordered <a href="https://www.amazon.com/dp/B0047TNXYU/ref=as_li_ss_til?tag=jordanhaccom-20&amp;camp=213381&amp;creative=390973&amp;linkCode=as4&amp;creativeASIN=B0047TNXYU&amp;adid=0HWTXDJWVTVC2FM57RD7&amp;">this back cover</a> since my camera lens was scratched up and unusable, and the installation is as easy as it gets. Simply unscrew the two screws on either side of the dock, slide the back cover up and it&#8217;ll pull right off. Put the new case on the same way it went off, and you&#8217;re done.</p>
<p>If you have any suggestions for more essential iPhone accessories, please leave a comment!</p>

<p><a href="http://feedads.g.doubleclick.net/~a/95YlYiYg_WChQr6fmkZ7deIOg-U/0/da"><img src="http://feedads.g.doubleclick.net/~a/95YlYiYg_WChQr6fmkZ7deIOg-U/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/95YlYiYg_WChQr6fmkZ7deIOg-U/1/da"><img src="http://feedads.g.doubleclick.net/~a/95YlYiYg_WChQr6fmkZ7deIOg-U/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/JordanHackworth/~4/pVeE4IN7cO0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.jordanhackworth.com/essential-iphone-4-accessories/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.jordanhackworth.com/essential-iphone-4-accessories/</feedburner:origLink></item>
		<item>
		<title>BASH Profile</title>
		<link>http://feedproxy.google.com/~r/JordanHackworth/~3/bLf5mjWwiLM/</link>
		<comments>http://www.jordanhackworth.com/bash-profile/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 23:32:33 +0000</pubDate>
		<dc:creator>Jordan Hackworth</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[BASH]]></category>

		<guid isPermaLink="false">http://www.jordanhackworth.com/?p=23</guid>
		<description>Do you spend a lot of time in the terminal? Do you use BASH? Did you know you could change your default BASH prompt easily? This is my prompt: As you can see, it has the current time, the username, the computer name, and the current working directory. If you&amp;#8217;d like to use this prompt, [...]</description>
			<content:encoded><![CDATA[<p>Do you spend a lot of time in the terminal? Do you use BASH? Did you know you could change your default BASH prompt easily?</p>
<p>This is my prompt: <img class="alignnone size-full wp-image-22" title="bash" src="http://www.jordanhackworth.com/wp-content/uploads/2009/03/bash.png" alt="bash" width="217" height="15" /></p>
<p>As you can see, it has the current time, the username, the computer name, and the current working directory. If you&#8217;d like to use this prompt, you can download my bash_profile <a href="http://www.jordanhackworth.com/wp-content/uploads/2009/03/bash_profile" target="_blank">here</a> and start using it by renaming it .bash_profile and putting it in your home directory. Running <code>mv bash_profile ~/.bash_profile</code> will do it.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/RuIX2V06xqyQS4k8un0fb6s0noo/0/da"><img src="http://feedads.g.doubleclick.net/~a/RuIX2V06xqyQS4k8un0fb6s0noo/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/RuIX2V06xqyQS4k8un0fb6s0noo/1/da"><img src="http://feedads.g.doubleclick.net/~a/RuIX2V06xqyQS4k8un0fb6s0noo/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/JordanHackworth/~4/bLf5mjWwiLM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.jordanhackworth.com/bash-profile/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.jordanhackworth.com/bash-profile/</feedburner:origLink></item>
		<item>
		<title>Recalibraing Your Roomba Battery</title>
		<link>http://feedproxy.google.com/~r/JordanHackworth/~3/Zz9EdUDsAoQ/</link>
		<comments>http://www.jordanhackworth.com/recalibraing-your-roomba-battery/#comments</comments>
		<pubDate>Sun, 15 Mar 2009 04:35:50 +0000</pubDate>
		<dc:creator>Jordan Hackworth</dc:creator>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[Battery]]></category>
		<category><![CDATA[Roomba]]></category>

		<guid isPermaLink="false">http://www.jordanhackworth.com/wordpress/?p=7</guid>
		<description>If you&amp;#8217;ve owned a Roomba for more then a year you have no doubt noticed that the battery life is drastically reduced from when you bought it. Recalibrating, also known as reconditioning, your battery is a simple procedure that may help you reclaim some of that life. Charge your Roomba up all the way Run [...]</description>
			<content:encoded><![CDATA[<p>If you&#8217;ve owned a <a title="Roomba" href="http://store.irobot.com/category/index.jsp?categoryId=3334619&amp;cp=2804605&amp;ab=CMS_RobotSuper_Roomba_102308">Roomba</a> for more then a year you have no doubt noticed that the battery life is drastically reduced from when you bought it. Recalibrating, also known as reconditioning, your battery is a simple procedure that may help you reclaim some of that life.<span id="more-7"></span></p>
<ol>
<li>Charge your Roomba up all the way</li>
<li>Run a &#8216;max&#8217; cycle instead of &#8216;clean&#8217;</li>
<li>When the Roomba thinks the battery is dead, pull the battery out</li>
<li>Hold down the power button on the Roomba for ten seconds, this will discharge all of the capacitors which will reset the charging controller</li>
<li>Put the battery back in the Roomba</li>
<li>Plug the Roomba into the charger, don&#8217;t use the home base for this initial charge. Let it charge for 24 hours and see if you&#8217;ve regained any battery life.</li>
</ol>
<p>In some cases this will help, but my Roomba Discovery&#8217;s stock APS battery was too far gone and would only hold charge for six minutes.</p>
<p>If your battery is due for a replacement you could either replace it with the <a title=" Kitchen &amp; Dining" href="http://www.amazon.com/gp/product/B0015SBAGE?ie=UTF8&amp;tag=jordanhaccom-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B0015SBAGE">stock battery</a> or crack open the battery case and replace the cells, saving you money and getting you a <a title=" Electronics" href="http://www.amazon.com/gp/product/B001AG4EHI?ie=UTF8&amp;tag=jordanhaccom-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B001AG4EHI">higher capacity battery.</a></p>

<p><a href="http://feedads.g.doubleclick.net/~a/nMTMZ-H-yzXlZZTm5ctU7HxZEN0/0/da"><img src="http://feedads.g.doubleclick.net/~a/nMTMZ-H-yzXlZZTm5ctU7HxZEN0/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/nMTMZ-H-yzXlZZTm5ctU7HxZEN0/1/da"><img src="http://feedads.g.doubleclick.net/~a/nMTMZ-H-yzXlZZTm5ctU7HxZEN0/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/JordanHackworth/~4/Zz9EdUDsAoQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.jordanhackworth.com/recalibraing-your-roomba-battery/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://www.jordanhackworth.com/recalibraing-your-roomba-battery/</feedburner:origLink></item>
	</channel>
</rss><!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->

