<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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/"
	>

<channel>
	<title>Daddy Fixes Everything &#187; Home Automation</title>
	<atom:link href="http://blog.spoolz.com/category/home-automation/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.spoolz.com</link>
	<description>A father and programmer&#039;s skewed view of the world</description>
	<lastBuildDate>Sun, 26 Apr 2009 03:29:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Monitor Your Elk-M1, Log to MySQL, and Daemonize it!</title>
		<link>http://blog.spoolz.com/2009/04/25/monitor-your-elk-m1-log-to-mysql-and-daemonize-it/</link>
		<comments>http://blog.spoolz.com/2009/04/25/monitor-your-elk-m1-log-to-mysql-and-daemonize-it/#comments</comments>
		<pubDate>Sun, 26 Apr 2009 03:29:43 +0000</pubDate>
		<dc:creator>Karl</dc:creator>
				<category><![CDATA[Home Automation]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[daemon]]></category>
		<category><![CDATA[elk]]></category>

		<guid isPermaLink="false">http://blog.spoolz.com/?p=188</guid>
		<description><![CDATA[I received a request a couple of days ago from someone who saw my posts on the Elk&#8211;Control perl library that I took over responsibility for. I had mentioned that I logged every Elk event into a MySQL database.
I am happy to report that I have this script running as a daemon, logging every ElkM1 [...]]]></description>
			<content:encoded><![CDATA[<p>I received a request a couple of days ago from someone who saw my posts on the <a href="http://blog.spoolz.com/2009/01/30/elk-m1-security-system-control-with-perl-script/">Elk&#8211;Control</a> perl library that I took over responsibility for. I had mentioned that I logged every Elk event into a MySQL database.</p>
<p>I am happy to report that I have this script running as a daemon, logging every ElkM1 event into my database. And it runs for months without issue.</p>
<p>I will keep these instructions brief. If you have detailed questions, please ask in the comments and I&#8217;ll help the best I can.</p>
<h3>Download</h3>
<p>You can download all the scirpts, <a href='http://blog.spoolz.com/wp-content/uploads/2009/04/elk_mysql_scripts.zip'>just click here</a>.</p>
<h3>Notables</h3>
<ol>
<li>If you don&#8217;t know a least a little perl and some MySQL basics, you may want to look elsewhere.</li>
<li>The script and accompanying files are designed to work in concert as a daemonized process.</li>
<li>Everything is logged into &#8216;elk_monitor.log&#8217; in the same directory (or directory of your choosing) as the script. If you have a lot of passive infra-red motion detectors, you will want to monitor the log size.
</ol>
<h3>Basic File Structure</h3>
<p><img src="http://blog.spoolz.com/wp-content/uploads/2009/04/picture-13.png" alt="file structure" title="file structure" width="169" height="110" class="aligncenter size-full wp-image-189" /></p>
<h4>elk_monitor.pl</h4>
<p>This is the main script, it runs in a loop checking for new messages every second. You <em>will</em> need edit the %zonelist, %outputs, %areas near the top. Also, you will need to set some paths, look near the top of the file.</p>
<p>Required: <a href="http://github.com/threadhead/elkm1--control/tree/master">ElkM1::Control</a>, <a href="http://log4perl.sourceforge.net/">Log4perl</a></p>
<h4>elk_monitor.sh</h4>
<p>This is the shell script that controls <em>elk_monitor.pl</em> as a daemon. Setting up daemons can be complex as each system is different, so google around for some help.</p>
<h4>elkm1.sql</h4>
<p>A MySQL script to setup the tables and fields that the <em>elk_monitor.pl</em> script uses. You <em>will</em> need to add a database named &#8216;elkm1&#8242;. After that you can execute this script to create everything else for you.</p>
<h4>lib/elkm1_db.pl</h4>
<p>The database setting and basic sql commands are abstracted into this library. This is where you will need to set MySQL&#8217;s host, name, password, etc.</p>
<h4>lib/file_tickler.pl</h4>
<p>I use a custom ruby script to monitor the daemon. This library just touches a file every minute to let us know the <em>elk_monitor.pl</em> script is still running. Why? Well, I have had the script &#8216;freeze&#8217; without exiting and most monitoring applications do not detect this. Obviously, this part is optional.</p>
<h3>Conclusion</h3>
<p>If you get all the settings right, she should run all day/week/month for you.</p>
<p>I and <strong>not</strong> a perl expert. Far from it. So I&#8217;m sure everything could use some tidying. If you do, please let me know and I&#8217;ll incorporate your changes.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.spoolz.com/2009/04/25/monitor-your-elk-m1-log-to-mysql-and-daemonize-it/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Elk M1 Security System Control with Perl Script</title>
		<link>http://blog.spoolz.com/2009/01/30/elk-m1-security-system-control-with-perl-script/</link>
		<comments>http://blog.spoolz.com/2009/01/30/elk-m1-security-system-control-with-perl-script/#comments</comments>
		<pubDate>Fri, 30 Jan 2009 17:42:26 +0000</pubDate>
		<dc:creator>Karl</dc:creator>
				<category><![CDATA[Home Automation]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[elk]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://blog.spoolz.com/?p=129</guid>
		<description><![CDATA[I have an Elk M1 security system that I like to monitor and record all the activity. It&#8217;s useful to know what doors are open and how long they have been open. For several years in the past I have use Homeseer to do the monitoring where I wrote VBScript files to push the activity [...]]]></description>
			<content:encoded><![CDATA[<p>I have an <a href="http://www.elkproducts.com/index2.html" target="_blank">Elk M1 security</a> system that I like to monitor and record all the activity. It&#8217;s useful to know what doors are open and how long they have been open. For several years in the past I have use <a href="http://www.homeseer.com/" target="_blank">Homeseer</a> to do the monitoring where I wrote VBScript files to push the activity and changes to my MySQL server. Honestly, I have never likes Homseer, it&#8217;s flaky and I prefer that I don&#8217;t depend on WinXP either.</p>
<p>About a year ago, James Russo released a script on <a href="http://www.cocoontech.com" target="_blank">Cocoontech</a> to monitor and control your Elk M1 from a perl script. You can <a href="http://www.cocoontech.com/index.php?showtopic=8920" target="_blank">read the forum post</a> for more details. Thanks to James and other Cocoontech members, it works fairly well.</p>
<p>But there have been no updates or bug fixes in over a year. Not wanting to relive my perl days (sorry, I never really liked perl), I decided to revive the project and give it a new home. I asked James for permission to take over the project and he gracefully agreed.</p>
<h4>ElkM1::Control New Home on Github</h4>
<p>Go check it out! <a href="http://github.com/threadhead/elkm1--control/tree">ElkM1::Control on github</a>.</p>
<p>Why github? First, I have stopped using SVN. And sourceforge, ElkM1::Control&#8217;s original home, doesn&#8217;t support git. Second, github makes it too easy to fork a project and make changes yourself, then push them back up so that I can integrate those changes. You really should try <a href="http://git-scm.com/" target="_blank">git</a> if you haven&#8217;t before. And you don&#8217;t need git to download ElkM1::Control and install it.</p>
<h4>Updates and Bug Fixes!</h4>
<p>You read that right, I have made a few bug fixes and added a couple of new features. I have been running ElkM1::Control on my Ubuntu Hardy server for about a month with no problems. I have also run and do some debugging on OS X (10.5.x).</p>
<p>I also changed the version numbering system to the more common <em>major.minor.release</em> notation. We are not at version 0.1.0.</p>
<h4>Quick Installation Instructions</h4>
<ol>
<li>Goto the <a href="http://github.com/threadhead/elkm1--control/tree" target="_blank">project home page</a> and click the <em>download</em> button. Select the ZIP version (for some reason the TAR doesn&#8217;t work sometimes).</li>
<li>Follow the README file, don&#8217;t forget the PREREQUISITES section. For those who don&#8217;t rtfm&#8230;</li>
<li>From your favorite shell, you may need to add sudo in front of each: &#8216;perl Makefile.PL&#8217;</li>
<li>&#8216;make&#8217;</li>
<li>&#8216;make test&#8217;</li>
<li>Then to install: &#8216;make install&#8217;</li>
</ol>
<p>Next, you&#8217;ll need a little script to get going. There are <a href="http://www.cocoontech.com/index.php?showtopic=8920" target="_blank">several scripts posted on Cocoontech</a>, but this one should get you started:</p>
<pre class="brush: php">
# Example 2: Display all M1 messages
use ElkM1::Control;
    my $elk = ElkM1::Control-&gt;new(host =&gt; &#039;192.168.0.251&#039;, port =&gt; 2101);
    while (1) {  # Loop forever
        while (my $msg = $elk-&gt;readMessage) { # Read the M1&#039;s messages
                print $msg-&gt;toString;  # Print the messages
        }
    }
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.spoolz.com/2009/01/30/elk-m1-security-system-control-with-perl-script/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Disappointed with SmartHome Quality</title>
		<link>http://blog.spoolz.com/2008/05/07/disappointed-with-smarthome-quality/</link>
		<comments>http://blog.spoolz.com/2008/05/07/disappointed-with-smarthome-quality/#comments</comments>
		<pubDate>Thu, 08 May 2008 02:03:13 +0000</pubDate>
		<dc:creator>Karl</dc:creator>
				<category><![CDATA[Home Automation]]></category>
		<category><![CDATA[insteon]]></category>
		<category><![CDATA[smarthome]]></category>

		<guid isPermaLink="false">http://blog.spoolz.com/?p=6</guid>
		<description><![CDATA[My home it pretty well automated. By that, I mean that our security system, an Elk M1-gold, can control the house lighting, thermostats, and drip irrigation system. Lights come on and turn off automatically as necessary. The ELK uses a expander device which connects to an INSTEON controller. The INSTEON controller has the ability to turn on/off/dim [...]]]></description>
			<content:encoded><![CDATA[<p>My home it pretty well automated. By that, I mean that our security system, an <a href="http://www.elkproducts.com/products/m1/M1_Control_Family.htm">Elk M1-gold</a>, can control the house lighting, thermostats, and drip irrigation system. Lights come on and turn off automatically as necessary. The ELK uses a <a href="http://www.elkproducts.com/products/m1/M1XSP.htm">expander device</a> which connects to an INSTEON controller. The INSTEON controller has the ability to turn on/off/dim any light in our house that has an INSTEON switch. When it works, it&#8217;s great. When it doesn&#8217;t work, it really sucks.<a href="http://blog.spoolz.com/wp-content/uploads/2008/05/2493.jpg"><img class="alignright alignnone size-medium wp-image-9" style="float: right;" title="2493" src="http://blog.spoolz.com/wp-content/uploads/2008/05/2493.jpg" alt="" width="144" height="144" /></a></p>
<p>So then, why doesn&#8217;t it work? Well, it seems that the Smarthome engineers forgot to spec quality components as the failure rate of most of the INSTEON and ICON (a cheaper version of the INSTEON switches) is over 50%. That&#8217;s right, more than half of INSTEON switches have failed, they either do not turn off, or they will not turn on. <strong>Nice</strong>.</p>
<p><span id="more-6"></span></p>
<p>No big deal, right? You say the switches are still under warranty! Sure. But now I have to remove each bad switch and replace it with a standard switch while the INSTEON switches are being exchanged for replacement. Now I have to go out and buy more than a dozen temporary switchs that I&#8217;ll only use for a month. Not to mention all the time it&#8217;s going to take to flip all the right breakers and install the temporary switches. A good Saturday afternoon lost, I suspect. <strong>Argh</strong>.</p>
<p>Oh, it gets even better&#8230; you see, each INSTEON device has a unique code that is addressed by other INSTEON devices. Each device must be programmed to control other devices through a time consuming process of putting the switch in programming mode and walking around to each desired device and have it send an acknowledgment. This doesn&#8217;t sound too bad, but when you have 20+ devices that are controlling each other in multiple patterns, it is bad. <strong>Really bad</strong>.</p>
<p>Oh, and if you don&#8217;t deprogram the devices you are going to keep before you remove the defective devices, they will forever try to turn on/off/dim the phantom switch. Do a factory reset on everything and start over from scratch. <strong>Beautiful</strong>. There goes Sunday.</p>
<p>But there must be a super dandy software package that makes this a cinch right? <strong>Wrong</strong>. There is <a href="http://www.perceptiveautomation.com/indigo/index.html">Indigo</a> from Perceptive Automation that works quite well, but it&#8217;s $180. Pretty steep just to fix a couple of light switches. The only other option is a meandering cluster-frack called <a href="http://www.power-home.com/">PowerHome</a>. You thought you&#8217;ve seen bad UI before. You ain&#8217;t seen nothing til you&#8217;ve seen PowerHome. PH is the epitome of why developers should not do UI design.</p>
<blockquote><p>Let me add that Indigo is a wonderful home automation software package that makes any home automation task much simpler. Indigo is highly reliable and expertly supported. If you want or need automation software, buy it.</p></blockquote>
<p>Ok, so four to eight hours later with PowerHome you might (there are no guarantees with PowerHome), might have a functional &#8216;map&#8217; of your INSTEON network. Namely, which switch is talking to which other switch. With this, you could reprogram your new switches with the old mappings. Could, maybe, these are the best you get with PowerHome. Yup, another entire <span style="text-decoration: underline;">day</span> lost. <strong>Super</strong>.</p>
<p>But every other home automation device manufacturer has a free programming/mapping software. Well,  you&#8217;d be right on that one. But hey we&#8217;re SmartHome and we don&#8217;t have our act together and didn&#8217;t think it was important enough. INSTEON has been out for over two years, and they still have nothing.</p>
<p>If I get the replacement switches I&#8217;ll need to do all the previous in reverse. Crap, that&#8217;s another day gone.</p>
<p>So I&#8217;m either stuck with switches that don&#8217;t work when you want them, or I can replace them something more reliable, which will cost several hundred dollars. <strong>Sweet</strong>.</p>
<p><a href="http://blog.spoolz.com/wp-content/uploads/2008/05/img_4170.jpg"><img class="alignleft alignnone size-medium wp-image-10" style="float: left;" title="img_4170" src="http://blog.spoolz.com/wp-content/uploads/2008/05/img_4170.jpg" alt="" width="144" height="192" /></a>It just makes me so mad to spend so much money on a product that has such a high failure rate and is such an incredible pain to fix. I really don&#8217;t have the money right now to switch to another home automation system (like <a href="http://simply-automated.com/products/index.html">SimplyAutomated UPB switches</a>), so I&#8217;m gonna start ripping out the bad INSTEON switches and send them in for replacement. But that&#8217;s it, no more INSTEON for me. As the others start to fail, I will just remove them and replace them with the SimplyAutomated UPB switches.</p>
<p>BTW, I&#8217;m far from the only one who have problems with INSTEON switches. For your reading pleasure:</p>
<ul>
<li><a href="http://www.techmall.com/topic.asp?TOPIC_ID=2536">SmartHome forum</a> &#8211; many wouldn&#8217;t do INSTEON again</li>
<li><a href="http://www.techmall.com/topic.asp?TOPIC_ID=1937">SmartHome forum</a> &#8211; read about all the failures</li>
<li><a href="http://www.avsforum.com/avs-vb/showthread.php?t=907058">AVS forum</a> &#8211; warning of the perils</li>
<li><a href="http://www.powerhomeautomation.com/forum/forum_posts.asp?TID=1698">PowerHome forum</a> &#8211; switches dropping like flies</li>
<li><a href="http://www.perceptiveautomation.com/phpBB2/viewtopic.php?p=11420&amp;sid=42edac60ce76a2a65ddee39fcf3a4b90#11420">Indigo forum</a> &#8211; another switch(s) bites the dust</li>
<li><a href="http://www.cocoontech.com/index.php?showtopic=5826">Cocoontech forum</a> &#8211; I think you&#8217;re getting the message</li>
</ul>
<p>Guess what I&#8217;m doing this weekend.</p>
<p><em>I feel better now℠</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.spoolz.com/2008/05/07/disappointed-with-smarthome-quality/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>
