<?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/"
	xmlns:go='http://ns.gigaom.com/'
xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>GigaOM &#187; Apple</title>
	<atom:link href="http://gigaom.com/apple/tag/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://gigaom.com</link>
	<description></description>
	<lastBuildDate>Fri, 10 Feb 2012 07:32:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='gigaom.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/0db8f6557d022075dbbf010c54d46d93?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>GigaOM &#187; Apple</title>
		<link>http://gigaom.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://gigaom.com/osd.xml" title="GigaOM" />
	<atom:link rel='hub' href='http://gigaom.com/?pushpress=hub'/>
		<item>
		<title>iPhone &amp; OS X DIY: Take Control Of Your Holiday Displays With Griswold</title>
		<link>http://gigaom.com/apple/iphone-os-x-diy-take-control-of-your-holiday-displays-with-griswold/</link>
		<comments>http://gigaom.com/apple/iphone-os-x-diy-take-control-of-your-holiday-displays-with-griswold/#comments</comments>
		<pubDate>Tue, 16 Dec 2008 19:00:46 +0000</pubDate>
		<dc:creator>Bob Rudis</dc:creator>
				<category><![CDATA[hardware]]></category>
		<category><![CDATA[Walkthroughs]]></category>
		<category><![CDATA[Christmas]]></category>
		<category><![CDATA[christmas lights]]></category>
		<category><![CDATA[firecracker]]></category>
		<category><![CDATA[holiday lights]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[pyobjc]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[python-cocoa]]></category>
		<category><![CDATA[X10]]></category>

		<guid isPermaLink="false">http://theappleblog.com/?p=13193</guid>
		<description><![CDATA[&#8220;Wouldn&#8217;t it be cool if you could control your Christmas lights from your iPhone?&#8221; That simple question, posed in passing eleven days ago by a good friend, set off a flurry of activity which has become Griswold.app (for the iPhone/iPod touch) and Griswold Server (for OS [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gigaom.com&amp;blog=14960843&amp;post=172085&amp;subd=gigaom2&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img src="http://gigapple.files.wordpress.com/2008/12/house.png?w=250&#038;h=151" alt="" title="house" width="250" height="151"  class=" alignleft" />&#8220;Wouldn&#8217;t it be cool if you could control your Christmas lights from your iPhone?&#8221; That simple question, posed in passing eleven days ago by a good friend, set off a flurry of activity which has become <a href="http://griswoldapp.com">Griswold.app</a> (for the iPhone/iPod touch) and <a href="http://griswoldapp.com/Griswold_App/Downloads.html">Griswold Server</a> (for OS X Leopard, Windows and Linux/BSD). Both are being released here with full source to each and you may just be able to download it from the App Store by the end of the week as well.</p>
<p>If you are one to deck the halls&#8230;and the family room&#8230;and the kitchen&#8230;and the roof then you know how difficult it can be controlling all those displays. Timers are somewhat effective, but are always out of sync with each other. Simple RF remotes provide better control but must be in range or have line-of-sight to work. It really <i>would</i> be cool to be able to control these creations from an iPhone!<br />
<span id="more-172085"></span></p>
<h3>It&#8217;s A Long Way Down Holiday Road</h3>
<p>To view the Xcode project and build the iPhone app you will need a copy of the <a href="http://www.google.com/url?q=http://developer.apple.com/iPhone/program/download.html&#038;sa=X&#038;oi=smap&#038;resnum=1&#038;ct=result&#038;cd=1&#038;usg=AFQjCNGwwIJ8SkEpvPUDKcjxqZuJkKnHkg">iPhone SDK</a> from Apple. That Xcode install will also meet the needs of the back-end server. You will need to download both the <a href="http://theappleblog.com/wp-content/uploads/2008/12/griswold-iphone-src.zip">Griswold iPhone app source</a> (ZIP) and the <a href='http://theappleblog.com/wp-content/uploads/2008/12/griswoldserver-src.zip'>Griswold Server app source</a> (ZIP).</p>
<p>In terms of hardware, you will need an <a href="http://www.x10.com/automation/firecracker.htm">X10 FireCracker</a> starter kit (I recommend purchasing from <a href="http://shop.ebay.com/?_trksid=m38.l1313&#038;_nkw=x10+firecracker&#038;_sacat=See-All-Categories">X10-Express</a> as they have better prices and no pop-ups). NOTE: You may need more X10 outlets depending on the scale of your display. Since your Mac undoubtedly does not have a serial port, you will also need a USB<->Serial adapter (<a href="http://serialio.com/products/adaptors/usb_serial.php">SerialIO</a> has a decent one). The FireCracker module that attaches to your Mac sends wireless commands (i.e. &#8220;on&#8221;, &#8220;off&#8221;) to the receiver which relays them to the X10 &#8220;network&#8221; of modules. This is all maintained by the server component:</p>
<p><img src="http://gigapple.files.wordpress.com/2008/12/griswold-server.png?w=604" alt="" title="griswold-server"  class=" alignleft" /></p>
<p>The iPhone interface needs an IP address to talk to and you can use either the local or remote one, but for the &#8220;remote&#8221; one to work, you will need to configure port-forwarding on your Internet router (forward TCP port 8786 to the internal address).</p>
<p>Each X10 &#8220;switch&#8221; is addressed by a house code and unit code. Griswold Server lets you choose which house code your display is on and can either control a single unit code or all unit codes for a house code. You must choose the serial interface the FireCracker is connected to and you have the option of defaulting your display to &#8220;on&#8221; when the server starts up. &#8220;Seekrit&#8221; also needs to match what you enter on the iPhone.</p>
<p><img src="http://gigapple.files.wordpress.com/2008/12/serverprefs.png?w=433&#038;h=265" alt="" title="serverprefs" width="433" height="265"  class=" alignleft" /></p>
<p>You really do not need the iPhone controller as you can turn the system on and off right from the server console window. But that&#8217;s not nearly as cool.</p>
<p>The server is written using the Python-Cocoa bridge and may be a good starting point for folks who are looking into doing development on the Mac. The application has full <a href="http://growl.info/">Growl support</a> and uses the <a href="">Sparkle framework</a> for automatic updates (in the event you want to just use the server without compiling from source, <a href='http://theappleblog.com/wp-content/uploads/2008/12/griswoldserver.zip'>it, too, is available</a>). You can watch for errors in <code>~/Library/Logs/Griswold Server</code> and take a look at the configuration file in <code>~/Library/Preferences/Griswold Server/Griswold Server.plist</code>.</p>
<h3>For Your iPhone</h3>
<p>As you can see below, the iPhone interface is pretty straightforward. The initial screen shows you the current status (display is on or off) and presents you with a simple, singular control to change that stats:</p>
<p><img src="http://gigapple.files.wordpress.com/2008/12/mainscreen.png?w=320&#038;h=480" alt="" title="mainscreen" width="320" height="480"  class=" alignleft" /></p>
<p>As noted earlier, the configuration screen asks you for an IP address and secret code (akin to &#8220;pairing&#8221;) and gives you the ability to test the connection or force the system to an on or off state.</p>
<p><img src="http://gigapple.files.wordpress.com/2008/12/internalconfigscreen.png?w=320&#038;h=480" alt="" title="internalconfigscreen" width="320" height="480"  class=" alignleft" /></p>
<p>Since the application&#8217;s main function is to pass commands back to the server and retrieve current display status, the majority of the the work is done via a very handy utility method:</p>
<style type="text/css">
pre.textmate-source {margin:0;padding:0 0 0 2px;font-family:Monaco,monospace;font-size:11px;line-height:1.3em; word-wrap:break-word; white-space: pre; white-space: pre-wrap;white-space:-moz-pre-wrap;white-space:-o-pre-wrap;}
pre.textmate-source {color: #000000; background-color: #FFFFFF;}
pre.textmate-source .linenum {width:75px;padding:0.1em 1em 0.2em 0;color:#888;background-color:#eee;}
pre.textmate-source span {padding-top:0.2em;padding-bottom: 0.1em;}
pre.textmate-source ::selection {background-color:#BAD6FD;}
pre.textmate-source .comment {color:#919191;}
pre.textmate-source .string {color:#00A33F;}
pre.textmate-source .constant_numeric {}
pre.textmate-source .constant_language {color: #A535AE;}
pre.textmate-source .constant_character, pre.textmate-source .constant_other {}
pre.textmate-source .variable_language, pre.textmate-source .variable_other {}
pre.textmate-source .keyword {color:#FF5600;}
pre.textmate-source .storage {color:#FF5600;}
pre.textmate-source .entity_name_type {color: #21439C;}
pre.textmate-source .entity_other_inherited-class {}
pre.textmate-source .entity_name_function {color: #21439C;}
pre.textmate-source .variable_parameter {}
pre.textmate-source .entity_name_tag {}
pre.textmate-source .entity_other_attribute-name {}
pre.textmate-source .support_function {color: #A535AE;}
pre.textmate-source .support_constant {color: #A535AE;}
pre.textmate-source .support_type, pre.textmate-source .support_class {color: #A535AE;}
pre.textmate-source .support_variable {	color: #A535AE;}
pre.textmate-source .invalid {color: #FFFFFF;background-color: #990000;}
pre.textmate-source .constant_other_placeholder_py {color: #990000;}
</style>
<pre class="textmate-source" style="padding-bottom:14px"><span class="source source_objc source_objc_iPhone"><span class="meta meta_implementation meta_implementation_objc"><span class="meta meta_scope meta_scope_implementation meta_scope_implementation_objc"><span class="meta meta_function-with-body meta_function-with-body_objc"><span class="meta meta_block meta_block_c"><span class="meta meta_block meta_block_c">       <span class="support support_class support_class_cocoa support_class_cocoa_touch">NSString</span> *myResponse = <span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_begin punctuation_section_scope_begin_objc">[</span> <span class="support support_class support_class_cocoa support_class_cocoa_touch">NSString</span> <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">stringWithContentsOfURL<span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span>url
                                  <span class="support support_function support_function_any-method support_function_any-method_name-of-parameter support_function_any-method_name-of-parameter_objc">encoding<span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="support support_constant support_constant_cocoa support_constant_cocoa_touch">NSUTF8StringEncoding</span> <span class="support support_function support_function_any-method support_function_any-method_name-of-parameter support_function_any-method_name-of-parameter_objc">error<span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span>&amp;error </span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_end punctuation_section_scope_end_objc">]</span></span> ;
</span></span></span></span></span></span></pre>
<p>All you have to do is create a URL and <span class="support support_class support_class_cocoa support_class_cocoa_touch">NSString</span> takes care of setting up the connection, issuing the request, closing down the connection and converting the result to an immediately usable Cocoa string.</p>
<p>Prior to calling this method, it is important to know whether one should bother to since the device may not have connectivity.</p>
<pre class="textmate-source" style="padding-bottom:14px"><span class="source source_objc source_objc_iPhone"><span class="meta meta_implementation meta_implementation_objc"><span class="meta meta_scope meta_scope_implementation meta_scope_implementation_objc"><span class="meta meta_function-with-body meta_function-with-body_objc"><span class="meta meta_block meta_block_c">   <span class="keyword keyword_control keyword_control_c">if</span><span class="meta meta_initialization meta_initialization_c"> <span class="punctuation punctuation_definition punctuation_definition_parameters punctuation_definition_parameters_c">(</span></span><span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_begin punctuation_section_scope_begin_objc">[</span> RootViewController <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">isServerReachable<span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span>hostnameOrIPValue </span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_end punctuation_section_scope_end_objc">]</span></span> &amp;&amp;
       <span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_begin punctuation_section_scope_begin_objc">[</span> RootViewController <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">canConnect<span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span>hostnameOrIPValue
                            <span class="support support_function support_function_any-method support_function_any-method_name-of-parameter support_function_any-method_name-of-parameter_objc">onPort<span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="constant constant_numeric constant_numeric_c">8786</span> <span class="support support_function support_function_any-method support_function_any-method_name-of-parameter support_function_any-method_name-of-parameter_objc">withTimeout<span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="constant constant_numeric constant_numeric_c">5.0</span></span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_end punctuation_section_scope_end_objc">]</span></span>) <span class="meta meta_block meta_block_c">{
</span></span></span></span></span></span></pre>
<p> A quick test (the above code) accomplishes this and relies on two equally simple methods &#8212; <code>isServerReachable:</code> &amp; <code>canConnect:</code>. The first takes advantage of the iPhone SDK &#8220;reachability&#8221; API, but that just tells you whether there is a network path to the host. The second one actually makes a TCP connection on a specified port with a timeout (to avoid hanging the UI) and lets the caller know whether full connectivity is possible.</p>
<pre class="textmate-source" style="padding-bottom:14px"><span class="source source_objc source_objc_iPhone"><span class="meta meta_implementation meta_implementation_objc"><span class="meta meta_scope meta_scope_implementation meta_scope_implementation_objc"><span class="meta meta_function-with-body meta_function-with-body_objc"><span class="meta meta_function meta_function_objc">+ <span class="meta meta_return-type meta_return-type_objc"><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_objc">BOOL</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="entity entity_name entity_name_function entity_name_function_objc">canConnect</span></span><span class="meta meta_argument-type meta_argument-type_objc"><span class="entity entity_name entity_name_function entity_name_function_name-of-parameter entity_name_function_name-of-parameter_objc"><span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="support support_class support_class_cocoa support_class_cocoa_touch">NSString</span> *<span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="variable variable_parameter variable_parameter_function variable_parameter_function_objc">ipAddress</span></span> <span class="entity entity_name entity_name_function entity_name_function_name-of-parameter entity_name_function_name-of-parameter_objc">onPort</span><span class="meta meta_argument-type meta_argument-type_objc"><span class="entity entity_name entity_name_function entity_name_function_name-of-parameter entity_name_function_name-of-parameter_objc"><span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_c">int</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="variable variable_parameter variable_parameter_function variable_parameter_function_objc">port</span></span> <span class="entity entity_name entity_name_function entity_name_function_name-of-parameter entity_name_function_name-of-parameter_objc">withTimeout</span><span class="meta meta_argument-type meta_argument-type_objc"><span class="entity entity_name entity_name_function entity_name_function_name-of-parameter entity_name_function_name-of-parameter_objc"><span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_c">double</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="variable variable_parameter variable_parameter_function variable_parameter_function_objc">seconds</span></span> </span><span class="meta meta_block meta_block_c">{

    <span class="keyword keyword_control keyword_control_exception keyword_control_exception_objc"><span class="punctuation punctuation_definition punctuation_definition_keyword punctuation_definition_keyword_objc">@</span>try</span> <span class="meta meta_block meta_block_c">{

        <span class="support support_type support_type_cocoa support_type_cocoa_touch">CFSocketRef</span> socket ;

       <span class="comment comment_line comment_line_double-slash comment_line_double-slash_c++"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_c">//</span> We justneed a TCP socket. Nothing fancy.
</span>
        socket =<span class="meta meta_function-call meta_function-call_c"><span class="punctuation punctuation_whitespace punctuation_whitespace_function-call punctuation_whitespace_function-call_leading punctuation_whitespace_function-call_leading_c"> </span><span class="support support_function support_function_any-method support_function_any-method_c">CFSocketCreate</span>(</span><span class="constant constant_other constant_other_variable constant_other_variable_mac-classic constant_other_variable_mac-classic_c">kCFAllocatorDefault</span>,
                                PF_INET,SOCK_STREAM,IPPROTO_TCP,
                                <span class="constant constant_numeric constant_numeric_c">0</span>,<span class="constant constant_language constant_language_c">NULL</span>,<span class="constant constant_language constant_language_c">NULL</span>);
        <span class="storage storage_type storage_type_c">struct</span> sockaddr_in<span class="punctuation punctuation_whitespace punctuation_whitespace_support punctuation_whitespace_support_function punctuation_whitespace_support_function_leading punctuation_whitespace_support_function_leading_c"> </span><span class="support support_function support_function_C99 support_function_C99_c">sin</span>;

<span class="punctuation punctuation_whitespace punctuation_whitespace_support punctuation_whitespace_support_function punctuation_whitespace_support_function_leading punctuation_whitespace_support_function_leading_c">        </span><span class="support support_function support_function_C99 support_function_C99_c">memset</span>(&amp;<span class="support support_function support_function_C99 support_function_C99_c">sin</span>, <span class="constant constant_numeric constant_numeric_c">0</span>,<span class="meta meta_function-call meta_function-call_c"><span class="punctuation punctuation_whitespace punctuation_whitespace_function-call punctuation_whitespace_function-call_leading punctuation_whitespace_function-call_leading_c"> </span><span class="support support_function support_function_any-method support_function_any-method_c">sizeof</span>(</span><span class="support support_function support_function_C99 support_function_C99_c">sin</span>));
<span class="punctuation punctuation_whitespace punctuation_whitespace_support punctuation_whitespace_support_function punctuation_whitespace_support_function_leading punctuation_whitespace_support_function_leading_c">        </span><span class="support support_function support_function_C99 support_function_C99_c">sin</span><span class="variable variable_other variable_other_dot-access variable_other_dot-access_c">.sin_len</span> =<span class="meta meta_function-call meta_function-call_c"><span class="punctuation punctuation_whitespace punctuation_whitespace_function-call punctuation_whitespace_function-call_leading punctuation_whitespace_function-call_leading_c"> </span><span class="support support_function support_function_any-method support_function_any-method_c">sizeof</span>(</span><span class="support support_function support_function_C99 support_function_C99_c">sin</span>);
<span class="punctuation punctuation_whitespace punctuation_whitespace_support punctuation_whitespace_support_function punctuation_whitespace_support_function_leading punctuation_whitespace_support_function_leading_c">        </span><span class="support support_function support_function_C99 support_function_C99_c">sin</span><span class="variable variable_other variable_other_dot-access variable_other_dot-access_c">.sin_family</span> = AF_INET;
<span class="punctuation punctuation_whitespace punctuation_whitespace_support punctuation_whitespace_support_function punctuation_whitespace_support_function_leading punctuation_whitespace_support_function_leading_c">        </span><span class="support support_function support_function_C99 support_function_C99_c">sin</span><span class="variable variable_other variable_other_dot-access variable_other_dot-access_c">.sin_port</span> =<span class="meta meta_function-call meta_function-call_c"><span class="punctuation punctuation_whitespace punctuation_whitespace_function-call punctuation_whitespace_function-call_leading punctuation_whitespace_function-call_leading_c"> </span><span class="support support_function support_function_any-method support_function_any-method_c">htons</span>(</span>port); <span class="comment comment_line comment_line_double-slash comment_line_double-slash_c++"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_c">//</span> port we want to connect on
</span><span class="punctuation punctuation_whitespace punctuation_whitespace_support punctuation_whitespace_support_function punctuation_whitespace_support_function_leading punctuation_whitespace_support_function_leading_c">        </span><span class="support support_function support_function_C99 support_function_C99_c">sin</span><span class="variable variable_other variable_other_dot-access variable_other_dot-access_c">.sin_addr.s_addr</span> =<span class="meta meta_function-call meta_function-call_c"><span class="punctuation punctuation_whitespace punctuation_whitespace_function-call punctuation_whitespace_function-call_leading punctuation_whitespace_function-call_leading_c"> </span><span class="support support_function support_function_any-method support_function_any-method_c">inet_addr</span>(</span><span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_begin punctuation_section_scope_begin_objc">[</span> ipAddress UTF8String <span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_end punctuation_section_scope_end_objc">]</span></span> );

        <span class="support support_type support_type_cocoa support_type_cocoa_touch">CFDataRef</span> address =<span class="meta meta_function-call meta_function-call_c"><span class="punctuation punctuation_whitespace punctuation_whitespace_function-call punctuation_whitespace_function-call_leading punctuation_whitespace_function-call_leading_c"> </span><span class="support support_function support_function_any-method support_function_any-method_c">CFDataCreate</span>(</span><span class="constant constant_language constant_language_c">NULL</span>,(<span class="storage storage_type storage_type_c">unsigned</span> <span class="storage storage_type storage_type_c">char</span>*)&amp;<span class="support support_function support_function_C99 support_function_C99_c">sin</span>,<span class="keyword keyword_operator keyword_operator_sizeof keyword_operator_sizeof_c">sizeof</span>(<span class="support support_function support_function_C99 support_function_C99_c">sin</span>));

        <span class="support support_type support_type_cocoa support_type_cocoa_touch">CFTimeInterval</span> timeout = seconds ; <span class="comment comment_line comment_line_double-slash comment_line_double-slash_c++"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_c">//</span> how long to wait before returning
</span>
        <span class="support support_type support_type_cocoa support_type_cocoa_touch">CFSocketError</span> e =<span class="meta meta_function-call meta_function-call_c"><span class="punctuation punctuation_whitespace punctuation_whitespace_function-call punctuation_whitespace_function-call_leading punctuation_whitespace_function-call_leading_c"> </span><span class="support support_function support_function_any-method support_function_any-method_c">CFSocketConnectToAddress</span>(</span>socket,address,timeout);
<span class="meta meta_function-call meta_function-call_c"><span class="punctuation punctuation_whitespace punctuation_whitespace_function-call punctuation_whitespace_function-call_leading punctuation_whitespace_function-call_leading_c">        </span><span class="support support_function support_function_any-method support_function_any-method_c">CFSocketInvalidate</span>(</span>socket) ;

<span class="meta meta_function-call meta_function-call_c"><span class="punctuation punctuation_whitespace punctuation_whitespace_function-call punctuation_whitespace_function-call_leading punctuation_whitespace_function-call_leading_c">        </span><span class="support support_function support_function_any-method support_function_any-method_c">CFRelease</span>(</span>address);
<span class="meta meta_function-call meta_function-call_c"><span class="punctuation punctuation_whitespace punctuation_whitespace_function-call punctuation_whitespace_function-call_leading punctuation_whitespace_function-call_leading_c">        </span><span class="support support_function support_function_any-method support_function_any-method_c">CFRelease</span>(</span>socket);

        <span class="keyword keyword_control keyword_control_c">return</span>(e == <span class="constant constant_numeric constant_numeric_c">0</span>) ;

    }</span> <span class="keyword keyword_control keyword_control_exception keyword_control_exception_objc"><span class="punctuation punctuation_definition punctuation_definition_keyword punctuation_definition_keyword_objc">@</span>catch</span><span class="meta meta_initialization meta_initialization_c"> <span class="punctuation punctuation_definition punctuation_definition_parameters punctuation_definition_parameters_c">(</span></span><span class="storage storage_type storage_type_id storage_type_id_objc">id </span>SocketException) <span class="meta meta_block meta_block_c">{

       <span class="keyword keyword_control keyword_control_c">return</span>(<span class="constant constant_language constant_language_objc">NO</span>) ;

    }</span> <span class="comment comment_line comment_line_double-slash comment_line_double-slash_c++"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_c">//</span> if //
</span>
}</span></span>
</span></span></span></pre>
<p>Overall, it is a pretty basic iPhone application, but it does have all the fundamental elements of a utility app including integration with the iPhone Settings (<span class="support support_class support_class_cocoa support_class_cocoa_touch">NSUserDefaults</span>) interface.</p>
<h3>Keeping In Control</h3>
<p>If you just want to play and do not want to develop, then <a href="http://theappleblog.com/wp-content/uploads/2008/12/griswoldserver.zip">grab the standalone server app</a> (again, Leopard-only) and e-mail me (bob at rudis dot net) your iPhone UDID (Ad Hoc Helper from the app store can help with this). I have some free ad hoc distribution slots that I&#8217;d be willing to part with.</p>
<p>I plan on updating Griswold Server to add more granular control over X10 modules (and update the iPhone app UI accordingly), include scheduled on/off execution and may add the option to have it rest in the menu bar vs the dock (all of which is feedback from my awesome beta testers).</p>
<p>If you have a Windows or Linux box, or just want to keep up with the development of Griswold, head over to <a href="http://griswoldapp.com/">griswoldapp.com</a> or contact me for more information.</p>
<p><strong>Related research and analysis from GigaOM Pro:</strong><br />Subscriber content. <a href="http://pro.gigaom.com/?utm_source=apple&utm_medium=editorial&utm_campaign=auto3&utm_term=172085+iphone-os-x-diy-take-control-of-your-holiday-displays-with-griswold&utm_content=hrbrmstr">Sign up for a free trial</a>.</p><ul><li><a href="http://pro.gigaom.com/2011/01/mobile-q4-all-eyes-were-on-android-4g-and-the-rising-tablet-tide/?utm_source=apple&utm_medium=editorial&utm_campaign=auto3&utm_term=172085+iphone-os-x-diy-take-control-of-your-holiday-displays-with-griswold&utm_content=hrbrmstr">Mobile Q4: All Eyes Were on Android, 4G and the Rising Tablet&nbsp;Tide</a></li><li><a href="http://pro.gigaom.com/2010/12/report-a-mobile-video-market-overview/?utm_source=apple&utm_medium=editorial&utm_campaign=auto3&utm_term=172085+iphone-os-x-diy-take-control-of-your-holiday-displays-with-griswold&utm_content=hrbrmstr">Report: A Mobile Video Market&nbsp;Overview</a></li><li><a href="http://pro.gigaom.com/2010/10/in-q3-the-tablet-and-4g-were-the-big-stories/?utm_source=apple&utm_medium=editorial&utm_campaign=auto3&utm_term=172085+iphone-os-x-diy-take-control-of-your-holiday-displays-with-griswold&utm_content=hrbrmstr">In Q3, the Tablet and 4G Were the Big&nbsp;Stories</a></li></ul><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gigaom.com&amp;blog=14960843&amp;post=172085&amp;subd=gigaom2&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gigaom.com/apple/iphone-os-x-diy-take-control-of-your-holiday-displays-with-griswold/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a08d08f6b541441fccf36bc6392a0784?s=96&#38;d=retro&#38;r=PG" medium="image">
			<media:title type="html">hrbrmstr</media:title>
		</media:content>

		<media:content url="http://gigapple.files.wordpress.com/2008/12/house.png" medium="image">
			<media:title type="html">house</media:title>
		</media:content>

		<media:content url="http://gigapple.files.wordpress.com/2008/12/griswold-server.png" medium="image">
			<media:title type="html">griswold-server</media:title>
		</media:content>

		<media:content url="http://gigapple.files.wordpress.com/2008/12/serverprefs.png" medium="image">
			<media:title type="html">serverprefs</media:title>
		</media:content>

		<media:content url="http://gigapple.files.wordpress.com/2008/12/mainscreen.png" medium="image">
			<media:title type="html">mainscreen</media:title>
		</media:content>

		<media:content url="http://gigapple.files.wordpress.com/2008/12/internalconfigscreen.png" medium="image">
			<media:title type="html">internalconfigscreen</media:title>
		</media:content>
	</item>
		<item>
		<title>ActiveState Takes Komodo Edit To The Community</title>
		<link>http://gigaom.com/apple/activestate-takes-komodo-edit-to-the-community/</link>
		<comments>http://gigaom.com/apple/activestate-takes-komodo-edit-to-the-community/#comments</comments>
		<pubDate>Thu, 13 Mar 2008 19:30:29 +0000</pubDate>
		<dc:creator>Bob Rudis</dc:creator>
				<category><![CDATA[Commentary]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[ActiveState]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://theappleblog.com/2008/03/13/activestate-takes-komodo-edit-to-the-community/</guid>
		<description><![CDATA[As I&#8217;ve been catching up from an illness backlog, I came across this press release from ActiveState – providers of commercially-supported versions of Perl, Python &#038; TCL – on their decision to take their great editor Komodo Edit open source. This editor has been based on [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gigaom.com&amp;blog=14960843&amp;post=171317&amp;subd=gigaom2&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img src='http://gigapple.files.wordpress.com/2008/03/komodo.png?w=604' alt='Komodo Edit Icon'  style="margin-right:10px" class=" alignleft" />As I&#8217;ve been catching up from an illness backlog, I came across this <a href="http://www.activestate.com/company/newsroom/press/2008_03_06_0">press release</a> from ActiveState – providers of commercially-supported versions of Perl, Python &#038; TCL – on their decision to take their great editor <a href="http://www.activestate.com/Products/komodo_ide/komodo_edit.mhtml">Komodo Edit</a> open source. This editor has been based on the Mozilla code base, and the open source version incorporates the same licenses as Firefox: Mozilla Public License (MPL), GNU General Public License (GPL), and GNU Lesser Public License (LGPL).</p>
<p>Komodo Edit has many features <a href="http://www.activestate.com/Products/komodo_ide/edit_features.mhtml">features</a> found in other editors (e.g. TextMate, Xcode) such as code-completion, a code-snippets library, virtual project folders, code folding, and language recognition. Like many editors, it can also be extended via plug-ins with the additional benefit of Komodo plug-ins really being XPI extensions, the same type used in Firefox, with support for all standard Mozilla APIs based on XUL, XBL, and XPCOM. There is also support for Python and JavaScript plug-ins.</p>
<p>Komodo Edit works well on the Mac and is an especially enticing alternative to other editors if you work in a multi-platform shop and would like to use a common tool-set for all developers. Having the full source code available can also be a great learning tool for new developers looking to create large-scale Mac applications or for porting their applications to other platforms.</p>
<p>Coders looking to grab or contribute to the open source version can find out more via the <a href="http://wiki.openkomodo.com/index.php/Building_Open_Komodo">Open Komodo</a> project.</p>
<p><strong>Related research and analysis from GigaOM Pro:</strong><br />Subscriber content. <a href="http://pro.gigaom.com/?utm_source=apple&utm_medium=editorial&utm_campaign=auto3&utm_term=171317+activestate-takes-komodo-edit-to-the-community&utm_content=hrbrmstr">Sign up for a free trial</a>.</p><ul><li><a href="http://pro.gigaom.com/2010/07/report-an-open-source-smart-grid-primer/?utm_source=apple&utm_medium=editorial&utm_campaign=auto3&utm_term=171317+activestate-takes-komodo-edit-to-the-community&utm_content=hrbrmstr">Report: An Open Source Smart Grid&nbsp;Primer</a></li><li><a href="http://pro.gigaom.com/2011/03/why-ipad-2-will-lead-consumers-into-the-post-pc-era/?utm_source=apple&utm_medium=editorial&utm_campaign=auto3&utm_term=171317+activestate-takes-komodo-edit-to-the-community&utm_content=hrbrmstr">Why iPad 2 Will Lead Consumers Into the Post-PC&nbsp;Era</a></li><li><a href="http://pro.gigaom.com/2011/03/the-near-term-evolution-of-social-commerce/?utm_source=apple&utm_medium=editorial&utm_campaign=auto3&utm_term=171317+activestate-takes-komodo-edit-to-the-community&utm_content=hrbrmstr">The Near-Term Evolution of Social&nbsp;Commerce</a></li></ul><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gigaom.com&amp;blog=14960843&amp;post=171317&amp;subd=gigaom2&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gigaom.com/apple/activestate-takes-komodo-edit-to-the-community/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a08d08f6b541441fccf36bc6392a0784?s=96&#38;d=retro&#38;r=PG" medium="image">
			<media:title type="html">hrbrmstr</media:title>
		</media:content>

		<media:content url="http://gigapple.files.wordpress.com/2008/03/komodo.png" medium="image">
			<media:title type="html">Komodo Edit Icon</media:title>
		</media:content>
	</item>
		<item>
		<title>Quick &amp; Secure Network Filesystem Access With ExpanDrive</title>
		<link>http://gigaom.com/apple/quick-secure-network-filesystem-access-with-expandrive/</link>
		<comments>http://gigaom.com/apple/quick-secure-network-filesystem-access-with-expandrive/#comments</comments>
		<pubDate>Tue, 26 Feb 2008 16:36:56 +0000</pubDate>
		<dc:creator>Bob Rudis</dc:creator>
				<category><![CDATA[Software Reviews]]></category>
		<category><![CDATA[expandrive]]></category>
		<category><![CDATA[macfuse]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[sftp]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[sshfs]]></category>

		<guid isPermaLink="false">http://theappleblog.com/2008/02/26/quick-secure-network-filesystem-access-with-expandrive/</guid>
		<description><![CDATA[Magnetk – makers of SftpDrive for Windows – have brought their secure, remote filesystem magic to OS X with version 1.0 of ExpanDrive. If you have a blog/site hosted on any flavor of Linux or BSD (including OS X) or do any amount of cross-platform management or [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gigaom.com&amp;blog=14960843&amp;post=171307&amp;subd=gigaom2&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img src='http://gigapple.files.wordpress.com/2008/02/magnetk.png?w=604' alt='Magnetk ExpanDrive Logo' style="margin-right:10px"  class=" alignleft" />
<p class="excerpt">Magnetk – makers of <a href="http://www.sftpdrive.com/">SftpDrive</a> for Windows – have brought their secure, remote filesystem magic to OS X with version 1.0 of <a href="http://www.magnetk.com/expandrive">ExpanDrive</a>.</p>
<p>If you have a blog/site hosted on any flavor of Linux or BSD (including OS X) or do any amount of cross-platform management or development then you know how useful <code>ssh</code> is for speedy &#038; secure command-line access from the Terminal. The advent of <a href="http://code.google.com/p/macfuse/">MacFUSE</a> on OS X brought <a href="http://code.google.com/p/macfuse/wiki/MACFUSE_FS_SSHFS">sshfs</a> to the Mac application landscape, though it can be slow and cryptic to setup for the average user.</p>
<p>ExpanDrive simplifies access to these remote filesystems via an unobtrusive menubar icon and straightforward user interface. Simply open up the ExpanDrive Manager:</p>
<p><center><img src='http://gigapple.files.wordpress.com/2008/02/expandrivemanager.png?w=604' alt='ExpanDrive Manager' class=" alignleft" /></center></p>
<p>and enter in your connection info. You can leave the password field blank if you already have <code>ssh</code> public/private keys defined and configured your servers appropriately. A simple double-click of the drive in the list view mounts the filesystem and it behaves just like any AFP, SMB or attached disk.</p>
<p>I&#8217;m fairly mobile, moving from AT&#038;T 3G to Wi-Fi to Ethernet throughout the day and I&#8217;ve been able to keep ExpanDrive filesystems mounted across all these transitions without the dreaded &#8220;spinning death ball&#8221; that is usually associated with the Finder and network mounts. While some Mac apps – <a href="http://www.barebones.com/products/textwrangler/">TextWrangler</a> and <a href="http://xtralean.com/IWOverview.html">ImageWell</a> being two that I use –  have native support for SFTP, ExpanDrive provides for universal access across all applications and makes it simple to reliably integrate remote storage operations into your workflow.</p>
<p>If you poke around the application bundle (you <i>do</i> poke around application bundles, right?), you&#8217;ll find that ExpanDrive was developed with Python as a foundation, fully demonstrating that you do not need to be an Objective-C maven to create great Mac software.</p>
<p>ExpanDrive has an introductory price of $29.00USD, is a Universal application and runs on OS X 10.4.1 (Tiger) or higher.</p>
<p>If you give it a try, drop a note in the forum or comments, especially if you are using it with any type of high-speed NAS configuration.</p>
<p><strong>Related research and analysis from GigaOM Pro:</strong><br />Subscriber content. <a href="http://pro.gigaom.com/?utm_source=apple&utm_medium=editorial&utm_campaign=auto3&utm_term=171307+quick-secure-network-filesystem-access-with-expandrive&utm_content=hrbrmstr">Sign up for a free trial</a>.</p><ul><li><a href="http://pro.gigaom.com/2011/03/why-ipad-2-will-lead-consumers-into-the-post-pc-era/?utm_source=apple&utm_medium=editorial&utm_campaign=auto3&utm_term=171307+quick-secure-network-filesystem-access-with-expandrive&utm_content=hrbrmstr">Why iPad 2 Will Lead Consumers Into the Post-PC&nbsp;Era</a></li><li><a href="http://pro.gigaom.com/2011/03/the-near-term-evolution-of-social-commerce/?utm_source=apple&utm_medium=editorial&utm_campaign=auto3&utm_term=171307+quick-secure-network-filesystem-access-with-expandrive&utm_content=hrbrmstr">The Near-Term Evolution of Social&nbsp;Commerce</a></li><li><a href="http://pro.gigaom.com/2011/02/content-farms-the-players-the-benefits-the-risks/?utm_source=apple&utm_medium=editorial&utm_campaign=auto3&utm_term=171307+quick-secure-network-filesystem-access-with-expandrive&utm_content=hrbrmstr">Content Farms: The Players, The Benefits, The&nbsp;Risks</a></li></ul><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gigaom.com&amp;blog=14960843&amp;post=171307&amp;subd=gigaom2&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gigaom.com/apple/quick-secure-network-filesystem-access-with-expandrive/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a08d08f6b541441fccf36bc6392a0784?s=96&#38;d=retro&#38;r=PG" medium="image">
			<media:title type="html">hrbrmstr</media:title>
		</media:content>

		<media:content url="http://gigapple.files.wordpress.com/2008/02/magnetk.png" medium="image">
			<media:title type="html">Magnetk ExpanDrive Logo</media:title>
		</media:content>

		<media:content url="http://gigapple.files.wordpress.com/2008/02/expandrivemanager.png" medium="image">
			<media:title type="html">ExpanDrive Manager</media:title>
		</media:content>
	</item>
	</channel>
</rss>
