<?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>Jee Labs</title>
	<atom:link href="http://news.jeelabs.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://news.jeelabs.org</link>
	<description>Computing stuff tied to the physical world</description>
	<lastBuildDate>Wed, 10 Mar 2010 23:01:13 +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>Outbound X10</title>
		<link>http://news.jeelabs.org/2010/03/11/outbound-x10/</link>
		<comments>http://news.jeelabs.org/2010/03/11/outbound-x10/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 23:01:13 +0000</pubDate>
		<dc:creator>jcw</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[JeeMon]]></category>

		<guid isPermaLink="false">http://news.jeelabs.org/?p=6454</guid>
		<description><![CDATA[I&#8217;ve added support for controlling X10 devices via the CTX15 module described in the past two days:

First thing was to extend the ookRemote GUI, by adding these definitions to ookRemote.tcl:

With this change, the configuration section in &#8220;config.txt&#8221; supports CTX15 buttons:

These new buttons will send X10 commands to the CTX15 module. But this needs a bit [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve added support for controlling X10 devices via the CTX15 module described in the <a href="http://news.jeelabs.org/2010/03/09/xanura-ctx15/">past</a> <a href="http://news.jeelabs.org/2010/03/10/jeemon-interface-for-x10/">two</a> days:</p>
<p><img src="http://files.jeelabs.org/2010/03/Screen-shot-2010-03-09-at-20.31.20.png" alt="Screen shot 2010-03-09 at 20.31.20.png" border="0" width="208" height="201" /></p>
<p>First thing was to extend the <a href="http://news.jeelabs.org/2010/02/26/ook-remote-control/">ookRemote</a> GUI, by adding these definitions to <a href="http://code.jeelabs.org/viewvc/svn/jeelabs/trunk/jeemon/JeeMon-jcw/ookRemote.tcl">ookRemote.tcl</a>:</p>
<p><img src="http://files.jeelabs.org/2010/03/Screen-shot-2010-03-09-at-20.34.10.png" alt="Screen shot 2010-03-09 at 20.34.10.png" border="0" width="382" height="155" /></p>
<p>With this change, the configuration section in &#8220;config.txt&#8221; supports CTX15 buttons:</p>
<p><img src="http://files.jeelabs.org/2010/03/Screen-shot-2010-03-09-at-20.34.56.png" alt="Screen shot 2010-03-09 at 20.34.56.png" border="0" width="240" height="171" /></p>
<p>These new buttons will send X10 commands to the CTX15 module. But this needs a bit of wrapping to turn them into frames, including the proper checksums. So I added two methods to &#8220;sketches/ctx15try/host.tcl&#8221;:</p>
<p><img src="http://files.jeelabs.org/2010/03/Screen-shot-2010-03-09-at-20.37.16.png" alt="Screen shot 2010-03-09 at 20.37.16.png" border="0" width="393" height="171" /></p>
<p>The &#8220;send&#8221; method overrides the existing one and sets up a frame before calling the original method with it.</p>
<p><em>That&#8217;s it. I can now make the Marmitek AM12 switch &#8220;clunk&#8221; with my mouse &#8211; audible feedback! :)</em></p>
]]></content:encoded>
			<wfw:commentRss>http://news.jeelabs.org/2010/03/11/outbound-x10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JeeMon interface for X10</title>
		<link>http://news.jeelabs.org/2010/03/10/jeemon-interface-for-x10/</link>
		<comments>http://news.jeelabs.org/2010/03/10/jeemon-interface-for-x10/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 23:01:55 +0000</pubDate>
		<dc:creator>jcw</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[JeeMon]]></category>

		<guid isPermaLink="false">http://news.jeelabs.org/?p=6439</guid>
		<description><![CDATA[Now that the CTX15 has been connected via a JeeNode, it&#8217;s fairly straightforward to tie it into JeeMon.
First I created a new folder called &#8220;sketches/ctx15try/&#8221; with a file &#8220;host.tcl&#8221; in it, using this code as quick test:

The reason there is nothing more, is that I changed the ctx15try.pde sketch a little to return lines starting [...]]]></description>
			<content:encoded><![CDATA[<p>Now that the CTX15 has been <a href="http://news.jeelabs.org/2010/03/09/xanura-ctx15/">connected</a> via a JeeNode, it&#8217;s fairly straightforward to tie it into <a href="http://news.jeelabs.org/docs/jeemon.html">JeeMon</a>.</p>
<p>First I created a new folder called &#8220;sketches/ctx15try/&#8221; with a file &#8220;host.tcl&#8221; in it, using this code as quick test:</p>
<p><img src="http://files.jeelabs.org/2010/03/Screen-shot-2010-03-08-at-14.37.36.png" border="0" alt="Screen shot 2010-03-08 at 14.37.36.png" width="264" height="87" /></p>
<p>The reason there is nothing more, is that I changed the ctx15try.pde sketch a little to return lines starting with &#8220;CTX15&#8243; &#8211; since these are the easiest to tie into JeeMon. The change affects these lines in <a href="http://news.jeelabs.org/2010/03/09/xanura-ctx15/">yesterday&#8217;s</a> demo:</p>
<p><img src="http://files.jeelabs.org/2010/03/Screen-shot-2010-03-08-at-14.33.08.png" border="0" alt="Screen shot 2010-03-08 at 14.33.08.png" width="225" height="114" /></p>
<p>I&#8217;ve also wrapped the received frame in {}&#8217;s, because that simplifies processing in JeeMon (Tcl interprets $&#8217;s and []&#8217;s unless escaped).</p>
<p>To activate everything, I added an extra line to the config.txt configuration file, so that the output from the JeeNode USB (serial# A900adwo) automatically gets picked up as sketch:</p>
<p><img src="http://files.jeelabs.org/2010/03/Screen-shot-2010-03-08-at-15.01.22.png" border="0" alt="Screen shot 2010-03-08 at 15.01.22.png" width="317" height="100" /></p>
<p>Here is an example of the above code running:</p>
<p><img src="http://files.jeelabs.org/2010/03/Screen-shot-2010-03-08-at-14.36.50.png" border="0" alt="Screen shot 2010-03-08 at 14.36.50.png" width="413" height="86" /></p>
<p>Good. CTX15 events are coming in. They are easily recognizable as (unit#, command) pairs.</p>
<p>But as you can see, these pairs don&#8217;t always arrive in the same frame. So we have to add a bit of logic to get things right. Here&#8217;s an updated version of host.tcl:</p>
<p><img src="http://files.jeelabs.org/2010/03/Screen-shot-2010-03-08-at-14.51.50.png" border="0" alt="Screen shot 2010-03-08 at 14.51.50.png" width="280" height="254" /></p>
<p>The solution used above is as follows: if it looks like a unit code (A..P + 1..16), then save that as last one seen. If it&#8217;s anything else, use the last saved location. I&#8217;m not sure this covers all possible scenarios, but for this very simple test it seems to work. Here&#8217;s a screen shot of the real-time <a href="http://news.jeelabs.org/2010/02/28/a-real-time-status-gui/">status window</a>:</p>
<p><img src="http://files.jeelabs.org/2010/03/Screen-shot-2010-03-08-at-14.50.48.png" border="0" alt="Screen shot 2010-03-08 at 14.50.48.png" width="314" height="141" /></p>
<p>As you can see, the CTX15 event was turned into an &#8220;AOFF&#8221; command for the &#8220;ctx_A01&#8243; device, which was created on-the-fly by this code.</p>
<p>Hmm, looking further, I think the &#8220;A&#8221; prefix needs to be stripped from &#8220;AOFF&#8221;. <em>Oh well, it&#8217;s all scripted, I&#8217;ll adjust that when I get to using this stuff for real.</em></p>
<p>So that&#8217;s it. A few dozen lines of C code in the JeeNode to act as pass-through and do the polling, and a few dozen lines of Tcl code to tell JeeMon how to interpret the incoming data. Now we get notifications whenever any X10 activity is detected on the mains power line.</p>
<p><em>Onwards!</em></p>
]]></content:encoded>
			<wfw:commentRss>http://news.jeelabs.org/2010/03/10/jeemon-interface-for-x10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Xanura CTX15</title>
		<link>http://news.jeelabs.org/2010/03/09/xanura-ctx15/</link>
		<comments>http://news.jeelabs.org/2010/03/09/xanura-ctx15/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 23:01:28 +0000</pubDate>
		<dc:creator>jcw</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Home automation]]></category>
		<category><![CDATA[JeeNode]]></category>

		<guid isPermaLink="false">http://news.jeelabs.org/?p=6407</guid>
		<description><![CDATA[Another popular home automation module is the Xanura CTX15:

That&#8217;s a live 220V power-line connection in the top right corner!
I&#8217;ve connected the CTX15 module through a UART Plug, with a 4.7 kΩ resistor in series with the RX signal (yellow from CTX15). This is because the signal swings up to 5V, whereas the UART plug only [...]]]></description>
			<content:encoded><![CDATA[<p>Another popular home automation module is the Xanura CTX15:</p>
<p><img src="http://files.jeelabs.org/2010/03/DSC_1228.jpg" border="0" alt="DSC_1228.jpg" width="600" height="604" /></p>
<p><em>That&#8217;s a live 220V power-line connection in the top right corner!</em></p>
<p>I&#8217;ve connected the CTX15 module through a <a href="http://news.jeelabs.org/docs/up1.html">UART Plug</a>, with a 4.7 kΩ resistor in series with the RX signal (yellow from CTX15). This is because the signal swings up to 5V, whereas the UART plug only accepts 3.3V voltage levels. The module is powered from the PWR pin, which on a <a href="http://news.jeelabs.org/docs/ju2.html">JeeNode USB</a> carries 5V.</p>
<p>The CTX15 is a bi-directional interface, it can send as well as receive A10-type power-line commands (a superset of X10). The trouble is that it needs to be polled to read out what has been received and buffered so far.</p>
<p>Here&#8217;s a sketch which takes care of that:</p>
<p><img src="http://files.jeelabs.org/2010/03/Screen-shot-2010-03-08-at-12.08.53.png" border="0" alt="Screen shot 2010-03-08 at 12.08.53.png" width="408" height="575" /></p>
<p>And here&#8217;s some sample output:</p>
<p><img src="http://files.jeelabs.org/2010/03/Screen-shot-2010-03-08-at-12.08.40.png" border="0" alt="Screen shot 2010-03-08 at 12.08.40.png" width="236" height="114" /></p>
<p>As a test, I powered up yesterday&#8217;s <a href="http://news.jeelabs.org/2010/03/08/x10-control/">XM10E test setup</a> as well, to send out on and off commands to unit A.1 every 3 seconds. As you can see with the CTX being read out every 5 seconds, multiple received packets will sometimes be combined and returned as one reply.</p>
]]></content:encoded>
			<wfw:commentRss>http://news.jeelabs.org/2010/03/09/xanura-ctx15/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>X10 control</title>
		<link>http://news.jeelabs.org/2010/03/08/x10-control/</link>
		<comments>http://news.jeelabs.org/2010/03/08/x10-control/#comments</comments>
		<pubDate>Sun, 07 Mar 2010 23:01:17 +0000</pubDate>
		<dc:creator>jcw</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Home automation]]></category>
		<category><![CDATA[JeeNode]]></category>

		<guid isPermaLink="false">http://news.jeelabs.org/?p=6395</guid>
		<description><![CDATA[Let&#8217;s go some more into home automation &#8211; the X10 power-line system in this case.
Here&#8217;s is a sketch which turns a remote appliance on and off every 3 seconds:

I used the Arduino X10 library (had to mess around with the use of headers to get rid of compile errors, and enable the pull-up on the [...]]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s go some more into home automation &#8211; the X10 power-line system in this case.</p>
<p>Here&#8217;s is a sketch which turns a remote appliance on and off every 3 seconds:</p>
<p><img src="http://files.jeelabs.org/2010/03/Screen-shot-2010-03-07-at-23.06.56.png" border="0" alt="Screen shot 2010-03-07 at 23.06.56.png" width="462" height="295" /></p>
<p>I used the Arduino <a href="http://www.arduino.cc/en/Tutorial/X10">X10 library</a> (had to mess around with the use of headers to get rid of compile errors, and enable the pull-up on the zero-crossing input).</p>
<p>This sketch runs @ 3.3V on a JeeNode with some stuff attached to port 1:</p>
<p><img src="http://files.jeelabs.org/2010/03/DSC_1224.jpg" border="0" alt="DSC_1224.jpg" width="604" height="503" /></p>
<p>It&#8217;s just a simple re-wiring to an RJ11 connector. This in turn, plugs into the XM10E opto-isolated interface:</p>
<p><img src="http://files.jeelabs.org/2010/03/DSC_1225.jpg" border="0" alt="DSC_1225.jpg" width="604" height="557" /></p>
<p>There&#8217;s also a X10 receiver built into the XM10E, which I&#8217;m going to ignore for now.</p>
<p>X10, in its simplest and oldest form, is a power-line transmission system, i.e. the signals to control a switch are sent over the same wires as the AC power itself (using a 120 KHz signal injected at the zero crossings). Proper mains isolation is essential, of course &#8211; as built into the XM10E unit.</p>
<p>The result is that you can plug this device into any outlet in the house and it&#8217;ll switch on and off as defined in the above sketch:</p>
<p><img src="http://files.jeelabs.org/2010/03/DSC_1226.jpg" border="0" alt="DSC_1226.jpg" width="604" height="411" /></p>
<p>It&#8217;s hard to miss &#8211; the relay built into that thing switches on and off with a very loud &#8220;clunk&#8221;!</p>
<p>The power consumption of this switch is 0.6 W off and 0.9 W when on, according to the <a href="http://news.jeelabs.org/2009/11/14/energy-tracking-with-cost-control/">Cost Control</a>. Not bad, until you start installing many dozens of these switches around the house &#8230; <em>then it will add up!</em></p>
]]></content:encoded>
			<wfw:commentRss>http://news.jeelabs.org/2010/03/08/x10-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New board summary</title>
		<link>http://news.jeelabs.org/2010/03/07/new-board-summary/</link>
		<comments>http://news.jeelabs.org/2010/03/07/new-board-summary/#comments</comments>
		<pubDate>Sat, 06 Mar 2010 23:01:22 +0000</pubDate>
		<dc:creator>jcw</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[JeePlug]]></category>
		<category><![CDATA[Sensors]]></category>

		<guid isPermaLink="false">http://news.jeelabs.org/?p=6380</guid>
		<description><![CDATA[Here is a summary of the boards which are currently being, eh &#8230; prepared? etched? sprayed? drilled?
First of all, a new JeeNode USB with improved voltage regulator setup:

The Dimmer Plug contains a 16-channel LED dimmer with independent PWM brightness control, using I2C:

The Lux Plug contains a sensitive light meter with high dynamic range, using I2C:

The [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a summary of the boards which are currently being, eh &#8230; <em>prepared? etched? sprayed? drilled?</em></p>
<p>First of all, a new JeeNode USB with improved voltage regulator setup:</p>
<p><img src="http://files.jeelabs.org/2010/03/Screen-shot-2010-03-07-at-00.53.02.png" border="0" alt="Screen shot 2010-03-07 at 00.53.02.png" width="525" height="144" /></p>
<p>The <a href="http://news.jeelabs.org/docs/dp2.html">Dimmer Plug</a> contains a 16-channel LED dimmer with independent PWM brightness control, using I2C:</p>
<p><img src="http://files.jeelabs.org/2010/03/Screen-shot-2010-03-07-at-00.53.25.png" border="0" alt="Screen shot 2010-03-07 at 00.53.25.png" width="320" height="281" /></p>
<p>The <a href="http://news.jeelabs.org/docs/xp1.html">Lux Plug</a> contains a sensitive light meter with high dynamic range, using I2C:</p>
<p><img src="http://files.jeelabs.org/2010/03/Screen-shot-2010-03-07-at-00.53.36.png" border="0" alt="Screen shot 2010-03-07 at 00.53.36.png" width="319" height="279" /></p>
<p>The <a href="http://news.jeelabs.org/docs/gp1.html">Gravity Plug</a> contains a 3-axis accelerometer with 2..8G range, using I2C:</p>
<p><img src="http://files.jeelabs.org/2010/03/Screen-shot-2010-03-07-at-00.53.45.png" border="0" alt="Screen shot 2010-03-07 at 00.53.45.png" width="316" height="277" /></p>
<p>The <a href="http://news.jeelabs.org/docs/yp1.html">Proximity Plug</a> connects up to 8 contacts as capacitive sensing switches, using I2C:</p>
<p><img src="http://files.jeelabs.org/2010/03/Screen-shot-2010-03-07-at-00.53.58.png" border="0" alt="Screen shot 2010-03-07 at 00.53.58.png" width="317" height="277" /></p>
<p>The <a href="http://news.jeelabs.org/docs/ip1.html">Input Plug</a> supports 16 inputs, as either analog or digital inputs (not I2C):</p>
<p><img src="http://files.jeelabs.org/2010/03/Screen-shot-2010-03-07-at-00.54.09.png" border="0" alt="Screen shot 2010-03-07 at 00.54.09.png" width="299" height="276" /></p>
<p>And three more boards. One of them is a mystery sensor &#8211; I&#8217;ve masked out its name for now :)</p>
<p><img src="http://files.jeelabs.org/2010/03/Screen-shot-2010-03-07-at-00.56.00.png" border="0" alt="Screen shot 2010-03-07 at 00.56.00.png" width="283" height="277" /></p>
<p>The other two boards are experimental boards of a different kind &#8211; I&#8217;ll describe &#8216;em when they work.</p>
<p>I&#8217;ve started setting up <a href="http://news.jeelabs.org/docs/">documentation pages</a> for these new PCBs, but so far that&#8217;s just the EAGLE files. Will add more  info in the coming week &#8211; with luck they&#8217;ll be back here for testing within the next 10 days.</p>
<p>I guess the best tactic for me now, is to just forget about this and work on some other stuff for a while. Drat.</p>
<p><em>Patience, patience, patience. I hope it pays off!</em></p>
]]></content:encoded>
			<wfw:commentRss>http://news.jeelabs.org/2010/03/07/new-board-summary/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Catching sun rays</title>
		<link>http://news.jeelabs.org/2010/03/06/catching-sun-rays/</link>
		<comments>http://news.jeelabs.org/2010/03/06/catching-sun-rays/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 23:01:49 +0000</pubDate>
		<dc:creator>jcw</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Energy]]></category>

		<guid isPermaLink="false">http://news.jeelabs.org/?p=6335</guid>
		<description><![CDATA[A few days ago, this country went through a curious ritual&#8230;
In the Netherlands, there is a subsidy as encouragement for people to place solar panels on their roof tops.

The system works as follows:
You&#8217;re considering setting up a couple of photovoltaic solar panels.
You quickly find out that the government is handing out money for this.
 Yippie [...]]]></description>
			<content:encoded><![CDATA[<p><em>A few days ago, this country went through a curious ritual&#8230;</em></p>
<p>In the Netherlands, there is a subsidy as encouragement for people to place solar panels on their roof tops.</p>
<p><img src="http://files.jeelabs.org/2010/03/Screen-shot-2010-03-05-at-23.03.57.png" border="0" alt="Screen shot 2010-03-05 at 23.03.57.png" width="300" height="175" /></p>
<p>The system works as follows:</p>
<p>You&#8217;re considering setting up a couple of photovoltaic solar panels.<br />
You quickly find out that the government is handing out money for this.<br />
<em> Yippie</em> &#8230; and then you get into the rules and regulations bit:</p>
<ul>
<li>You can&#8217;t apply for the subsidy before March 1st.</li>
<li>There is a limited amound of funding.</li>
<li>On the day when submissions exceed funding &#8230; it&#8217;s <em>roulette</em> day!</li>
<li>&#8230; the remaining subsidies are assigned at random.</li>
</ul>
<p>The result?</p>
<p>On March 1st &#8211; <em>everyone</em> submits their proposal for solar energy.</p>
<p>On March 2nd &#8211; sorry folks, we&#8217;re all sold out, try again next year!</p>
<p>It turns out that some 17,000 people signed up for 2010. And about 5,000 of them will win that lottery ticket.</p>
<p><em>Tell me, please, what&#8217;s the meaning of the word &#8220;encouragement&#8221; again?</em></p>
<p>Anyway, so much for silly incentives. The reason I&#8217;m posting this is that we&#8217;ve been looking into solar energy and have decided to install 18..20 solar panels on our roof. It&#8217;s relatively well-positioned, and even the cabling in the house turns out to be very easily adapted for it. And yes, I&#8217;m one of the 17,000 who signed up for the Dutch Solar Casino. Except that we&#8217;re going to go ahead regardless of the outcome (3 <em>months</em> from now!).</p>
<p>The numbers are much better than I expected:</p>
<ul>
<li>With 18..20 panels, we can fill the smallest half of our roof</li>
<li>Modern panels can produce about 3600 &#8220;Watt peak&#8221; total</li>
<li>Heading and tilt are such that we&#8217;re still at ≈ 90% of optimal</li>
<li>Estimated yearly output will be 2500 kWh, 20% more than we need</li>
<li>Unused power is fed to the grid and billed at the same rate, as credit</li>
<li>In other words, the electricity grid will become a &#8211; <em>very</em> &#8211; big capacitor for us :)</li>
</ul>
<p>All in all, I think it&#8217;s a good deal. There will always be better deals in the future, but this is fine.</p>
<p>As for buying more stuff to save and join the green hype: panels also need to be produced and shipped. The energy needed to do so appears to be less than what those panels produce in their first 18 months. So the electricity in the next 20..30 years after that is free, green, and effortless.</p>
<p>I was very surprised to find out that solar energy is practical at 52° latitude, but it really is.</p>
<p><em>Sooo&#8230; apart from seasonal swings and energy storage, Jee Labs will be &#8220;slightly off the grid&#8221; later in 2010!</em></p>
]]></content:encoded>
			<wfw:commentRss>http://news.jeelabs.org/2010/03/06/catching-sun-rays/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>JeeMon goes embedded</title>
		<link>http://news.jeelabs.org/2010/03/05/jeemon-goes-embedded/</link>
		<comments>http://news.jeelabs.org/2010/03/05/jeemon-goes-embedded/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 23:01:54 +0000</pubDate>
		<dc:creator>jcw</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[JeeMon]]></category>

		<guid isPermaLink="false">http://news.jeelabs.org/?p=6305</guid>
		<description><![CDATA[Testing out a new setup &#8230; I started by launching the JeeMon runtime executable as follows:

Then I went back to my Mac and opened a browser window:

It works! You&#8217;re looking at a little web server running on a tiny Technologic TS-7500 board:

ARM based, 64 Mb RAM, µSD card socket on board, running Debian (lenny). It&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>Testing out a new setup &#8230; I started by launching the <a href="http://news.jeelabs.org/docs/jeemon.html">JeeMon</a> runtime executable as follows:</p>
<p><img src="http://files.jeelabs.org/2010/03/Screen-shot-2010-03-02-at-15.41.09.png" alt="Screen shot 2010-03-02 at 15.41.09.png" border="0" width="253" height="12" /></p>
<p>Then I went back to my Mac and opened a browser window:</p>
<p><img src="http://files.jeelabs.org/2010/03/Screen-shot-2010-03-02-at-15.56.12.png" alt="Screen shot 2010-03-02 at 15.56.12.png" border="0" width="594" height="360" /></p>
<p>It works! You&#8217;re looking at a little web server running on a tiny Technologic <a href="http://www.embeddedarm.com/products/board-detail.php?product=TS-7500">TS-7500</a> board:</p>
<p><img src="http://files.jeelabs.org/2010/03/DSC_1213.jpg" alt="DSC_1213.jpg" border="0" width="604" height="415" /></p>
<p>ARM based, 64 Mb RAM, µSD card socket on board, running Debian (lenny). It&#8217;s not very high powered, but in return it only uses 400 mA @ 5V, i.e. it can run off USB power.</p>
<p>I haven&#8217;t yet figured out how to get the FTDI USB serial driver on there, but once that&#8217;s solved this little unit will be able to act as host for USB-connected <a href="http://news.jeelabs.org/docs/ju2.html">JeeNodes</a> or <a href="http://news.jeelabs.org/docs/jl2.html">JeeLinks</a>.</p>
<p>The RAM and storage is more than sufficient to run even a very elaborate JeeMon setup, I expect.</p>
<p><em>This might be an interesting low-end always-on home sensor &amp; automation system!</em></p>
]]></content:encoded>
			<wfw:commentRss>http://news.jeelabs.org/2010/03/05/jeemon-goes-embedded/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Packaging madness</title>
		<link>http://news.jeelabs.org/2010/03/04/packaging-madness/</link>
		<comments>http://news.jeelabs.org/2010/03/04/packaging-madness/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 23:01:08 +0000</pubDate>
		<dc:creator>jcw</dc:creator>
				<category><![CDATA[Musings]]></category>

		<guid isPermaLink="false">http://news.jeelabs.org/?p=6281</guid>
		<description><![CDATA[I ran out of little zip-lock bags. The ones I put small 6-pin headers in, and such.
So I ordered a few more by direct mail, from a Dutch office supplies shop on the web.
Sure enough, one day later &#8211; a big courier delivery truck from DHL stops by and delivers a 25&#215;35 cm box with [...]]]></description>
			<content:encoded><![CDATA[<p>I ran out of little zip-lock bags. The ones I put small 6-pin headers in, and such.</p>
<p>So I ordered a few more by direct mail, from a Dutch office supplies shop on the web.</p>
<p>Sure enough, one day later &#8211; a big courier delivery truck from DHL stops by and delivers a 25&#215;35 cm box with the requested goods:</p>
<p><img src="http://files.jeelabs.org/2010/02/DSC_1212.jpg" border="0" alt="DSC_1212.jpg" width="604" height="417" /></p>
<p>They <em>could</em> have dropped it in a padded envelope, added €1.60 postage, and dropped it in the mail. Which &#8211; in the Netherlands &#8211; is guaranteed to reach me in 24 hours, IOW just as quickly, along with all my other mail. Delivered to my doorstep by our friendly mailman, who services the whole neighborhood &#8230; on bike.</p>
<p><em>Instead, I&#8217;ve caused this ridiculous packaging and delivery nonsense. Yuck.</em></p>
<p><strong>Update</strong> &#8211; I&#8217;ve re-ordered some more (slightly larger) bags from <a href="http://www.gripzakjes.net/">another Dutch supplier</a> suggested by someone after reading this post. Not only did that supplier do the right thing &#8211; they even alerted me to the fact that another item would have pushed postage up to an unreasonable level, and proposed to omit that extra item. <em>Hurray for vendors who use their common sense when serving their customers!</em></p>
]]></content:encoded>
			<wfw:commentRss>http://news.jeelabs.org/2010/03/04/packaging-madness/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pushing data as web client</title>
		<link>http://news.jeelabs.org/2010/03/03/pushing-data-as-web-client/</link>
		<comments>http://news.jeelabs.org/2010/03/03/pushing-data-as-web-client/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 23:01:12 +0000</pubDate>
		<dc:creator>jcw</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[JeeMon]]></category>
		<category><![CDATA[Techniques]]></category>

		<guid isPermaLink="false">http://news.jeelabs.org/?p=6239</guid>
		<description><![CDATA[Another way to get data to another place is via push HTTP requests, i.e. acting as a client for another web server somewhere on internet.
The Pachube site is one place to send measurement results. I&#8217;ve set up a test feed to use with JeeMon, with two data streams. One of the nice features is that [...]]]></description>
			<content:encoded><![CDATA[<p>Another way to get data to another place is via <em>push</em> HTTP requests, i.e. acting as a client for another web server somewhere on internet.</p>
<p>The <a href="http://www.pachube.com/">Pachube</a> site is one place to send measurement results. I&#8217;ve set up a test <a href="http://www.pachube.com/feeds/5942">feed</a> to use with <a href="http://news.jeelabs.org/docs/jeemon.html">JeeMon</a>, with two data streams. One of the nice features is that you can easily produce and embed graphs from that system:</p>
<p><img src="http://files.jeelabs.org/2010/02/Screen-shot-2010-02-26-at-02.45.13.png" border="0" alt="Screen shot 2010-02-26 at 02.45.13.png" width="603" height="215" /></p>
<p>Here&#8217;s how I implemented it in JeeMon. First, I created a configuration section:</p>
<p><img src="http://files.jeelabs.org/2010/02/Screen-shot-2010-02-25-at-22.37.12.png" border="0" alt="Screen shot 2010-02-25 at 22.37.12.png" width="322" height="128" /></p>
<p><em>(I&#8217;ve omitted most of my private API key, but anyone can sign up and get their <a href="http://www.pachube.com/signup">own</a> &#8230;)</em></p>
<p>Next, the code, in the form of a &#8220;pachube.tcl&#8221; file / module / rig:</p>
<p><img src="http://files.jeelabs.org/2010/03/Screen-shot-2010-03-02-at-03.11.12.png" border="0" alt="Screen shot 2010-03-02 at 03.11.12.png" width="473" height="561" /></p>
<p>Note how the configuration file in fact contains &#8220;settings&#8221; which are simply evaluated as a script: the two lines starting with &#8220;Fetch &#8230;&#8221; are handled by the Fetch proc in pachube.tcl, using the JeeMon notification mechanism to get called back whenever either of the &#8220;meter1&#8243; or &#8220;meter2&#8243; readings changes. The Update proc then updates the &#8220;latest&#8221; variable accordingly. Lastly, SendToWebSite periodically does an HTTP PUT request in the background, supplying all the info needed to successfully submit to the Pachube website.</p>
<p>Btw, this simple example is flawed, in that it does not calculate averages &#8211; it just sends the last reading. But things like averaging require a sense of history, and persistence. <em>Haven&#8217;t added that to JeeMon yet&#8230;</em></p>
<p>The missing link, as usual, is a line in the application file to start the ball rolling:</p>
<p><img src="http://files.jeelabs.org/2010/03/Screen-shot-2010-03-02-at-03.03.46.png" border="0" alt="Screen shot 2010-03-02 at 03.03.46.png" width="228" height="17" /></p>
<p>There&#8217;s a lot of flexibility at the protocol and network levels. Such as creating an XML request via templates, if the remote server needs XML. This isn&#8217;t limited to HTTP requests, or to using port 80 &#8211; send emails, FTP files, etc.</p>
<p>There are quite a few details in the above code which I won&#8217;t go into. Again, I&#8217;m doing this mostly to show how little code it takes to initiate periodic HTTP client requests to an outside website.</p>
<p>Apart from sites such as Pachube, this could also be used from a tiny embedded Linux  running JeeMon, to submit incoming data to a different setup elsewhere on the LAN, for example. IOW, JeeMon can be a front-end for other systems. <em>It&#8217;s not about lock-in. </em><em>It&#8217;s a switchboard. It can glue systems together. It bridges gaps.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://news.jeelabs.org/2010/03/03/pushing-data-as-web-client/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JeeMon as web server</title>
		<link>http://news.jeelabs.org/2010/03/02/jeemon-as-web-server/</link>
		<comments>http://news.jeelabs.org/2010/03/02/jeemon-as-web-server/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 23:01:04 +0000</pubDate>
		<dc:creator>jcw</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[JeeMon]]></category>
		<category><![CDATA[Techniques]]></category>

		<guid isPermaLink="false">http://news.jeelabs.org/?p=6209</guid>
		<description><![CDATA[JeeMon comes with a nifty built-in HTTP/1.1 web server (using coroutines to handle requests in parallel).
So let&#8217;s create another real-time status display, but as web application this time:

As before, I&#8217;m leaving out the lipstick &#8211; just showing the core functionality.
Here&#8217;s what I did to generate this page. First of all, I&#8217;m re-using some functionality which [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://news.jeelabs.org/docs/jeemon.html">JeeMon</a> comes with a nifty built-in HTTP/1.1 web server (using coroutines to handle requests in parallel).</p>
<p>So let&#8217;s create another real-time status display, but as web application this time:</p>
<p><img src="http://files.jeelabs.org/2010/02/Screen-shot-2010-02-25-at-17.56.25.png" alt="Screen shot 2010-02-25 at 17.56.25.png" border="0" width="604" height="268" /></p>
<p><em>As before, I&#8217;m leaving out the lipstick &#8211; just showing the core functionality.</em></p>
<p>Here&#8217;s what I did to generate this page. First of all, I&#8217;m re-using some functionality which is already in the <a href="http://news.jeelabs.org/2010/02/28/a-real-time-status-gui/">GUI version</a>, to dynamically construct a matrix with the proper columns and rows, so the &#8220;statusWindow&#8221; code has to be running for the above to work. For real use, that code should probably be reorganized into its own rig.</p>
<p>The main task was to create a HTML template in a file called &#8220;statusPage.tmpl&#8221;:</p>
<p><img src="http://files.jeelabs.org/2010/02/Screen-shot-2010-02-26-at-00.41.23.png" alt="Screen shot 2010-02-26 at 00.41.23.png" border="0" width="421" height="212" /></p>
<p>This uses a simple templating mechanism based on Tcl&#8217;s &#8220;subst&#8221; command. The meta tag sets up the page to self-refresh every 5 seconds. The last line tells the <a href="http://wiki.tcl.tk/23626">Wibble</a> web server to deliver the page as HTML.</p>
<p>To launch the server, this line was added to the main application file (port 8080, current dir is doc root):</p>
<p><img src="http://files.jeelabs.org/2010/02/Screen-shot-2010-02-25-at-18.00.15.png" alt="Screen shot 2010-02-25 at 18.00.15.png" border="0" width="125" height="17" /></p>
<p>That&#8217;s it &#8211; there&#8217;s very little to activating a web server in JeeMon, as you can see. Which is important, because on tiny embedded Linux systems, an HTTP server will probably be the only option to present information.</p>
<p><em>Creating a full-blown site with CSS, JavaScript, and Ajax is a matter of adding more files &#8211; the usual stuff&#8230;</em></p>
<p>Did I mention that it&#8217;s all 100% open source, so you can <a href="http://code.jeelabs.org/viewvc/svn/jeelabs/trunk/jeemon/">browse</a> / extend / change all of this? &#8211; <em>I did? Oh, ok ;)</em></p>
]]></content:encoded>
			<wfw:commentRss>http://news.jeelabs.org/2010/03/02/jeemon-as-web-server/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
