<?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>DiUS</title>
	<atom:link href="http://dius.com.au/feed/" rel="self" type="application/rss+xml" />
	<link>http://dius.com.au</link>
	<description>Where ideas are engineered</description>
	<lastBuildDate>Fri, 17 May 2013 06:01:38 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
		<item>
		<title>DiUS in the news: Qantas Group checks into cloud for hotel bookings success</title>
		<link>http://dius.com.au/2013/04/30/dius-in-the-news-qantas-group-checks-into-cloud-for-hotel-bookings-success/</link>
		<comments>http://dius.com.au/2013/04/30/dius-in-the-news-qantas-group-checks-into-cloud-for-hotel-bookings-success/#comments</comments>
		<pubDate>Tue, 30 Apr 2013 04:22:41 +0000</pubDate>
		<dc:creator>Kirsty Miller</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://dius.com.au/?p=2426</guid>
		<description><![CDATA[A recent article from ZDNet. &#8220;Qantas Group checks into the cloud for hotel bookings success&#8220;, provides a nice write up of the talk DiUS gave at the recent AWS Summit 2013 in Sydney on April 24 on how we helped Qantas launch Hooroo using the cloud and a Lean mindset. The article also provides an update on what&#8217;s been happening with Hooroo since it&#8217;s launch and how Continuous Deployment [...]]]></description>
			<content:encoded><![CDATA[<p>A recent article from ZDNet. &#8220;<a href="http://www.zdnet.com/au/qantas-group-checks-into-cloud-for-hotel-bookings-success-7000014447/">Qantas Group checks into the cloud for hotel bookings success</a>&#8220;, provides a nice write up of the talk DiUS gave at the recent <a title="DiUS helps to navigate the cloud" href="http://dius.com.au/2013/03/25/dius-sponsors-aws-summit/">AWS Summit 2013</a> in Sydney on April 24 on how we helped Qantas launch Hooroo using the cloud and a Lean mindset.</p>
<p>The article also provides an update on what&#8217;s been happening with Hooroo since it&#8217;s launch and how Continuous Deployment and the cloud not only helped fast track delivery, but also enable data to be collected in real time to discover what features work and don&#8217;t work.</p>
<p>Read our case study - <a title="Hooroo – A Qantas Start-up" href="http://dius.com.au/hooroo-a-qantas-startup/">Hooroo: A Qantas Start-up</a></p>
<p>Read the ZDNet article - <a href="http://www.zdnet.com/au/qantas-group-checks-into-cloud-for-hotel-bookings-success-7000014447/">Qantas Group checks into the cloud for hotel bookings success</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://dius.com.au/2013/04/30/dius-in-the-news-qantas-group-checks-into-cloud-for-hotel-bookings-success/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DiUS Computing Appoints Kristian Handberg to Take ChargeIQ Forward</title>
		<link>http://dius.com.au/2013/04/22/dius-computing-appoints-kristian-handberg-to-take-chargeiq-forward/</link>
		<comments>http://dius.com.au/2013/04/22/dius-computing-appoints-kristian-handberg-to-take-chargeiq-forward/#comments</comments>
		<pubDate>Sun, 21 Apr 2013 23:00:59 +0000</pubDate>
		<dc:creator>Kirsty Miller</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://dius.com.au/?p=2411</guid>
		<description><![CDATA[Sydney 22 April 2013 — DiUS Computing is excited to announce the recent appointment of Kristian Handberg to the role of Principal Consultant.   Mr Handberg will be instrumental in defining the strategy and direction of DiUS’ grid-friendly ChargeIQ electric vehicle charging technology and taking it to the global market. ChargeIQ is the world’s first ZigBee-certified [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Sydney 22 April 2013 —</strong> DiUS Computing is excited to announce the recent appointment of Kristian Handberg to the role of Principal Consultant.   Mr Handberg will be instrumental in defining the strategy and direction of DiUS’ grid-friendly <a title="ChargeIQ" href="http://dius.com.au/products/chargeiq/">ChargeIQ</a> electric vehicle charging technology and taking it to the global market.</p>
<p>ChargeIQ is the world’s first ZigBee-certified electric vehicle charger with the ability to communicate with Smart Meters, allowing drivers to take advantage of flexible pricing to reduce the cost of their electric vehicle charging.</p>
<p>Having spent over three years developing ChargeIQ, the Australian technology company is now looking to team-up with “heavy hitters” in the market to take its innovation to the rest of the world.</p>
<p>As part of the newly created role, Mr Handberg, who has an automotive industry background and a deep understanding of the global electric vehicle market, will help DiUS Computing commercialise the revolutionary technology and facilitate investment from partners in the energy and electric vehicle industries or new entrants into these markets.</p>
<p>A recent report from the US forecasted the market for electric vehicle infrastructure will rise significantly around the globe over the next decade, with an expected increase in the market from $140 million in 2012 to $1.2 billion in 2020.</p>
<p>DiUS Computing is leading the world with ChargeIQ.  In December 2012 ChargeIQ was used for the Victorian Department of Transport demonstration project – Electric Vehicle Charge Management using Victoria’s Smart Grid. The project was the first use of the Victoria’s Smart Meters for electricity demand management, and one of the earliest field demonstrations worldwide.</p>
<p>Mr Handberg said ChargeIQ is ready to be tailored to the needs of a commercial partner such as an electricity utility, electric vehicle manufacturer/seller or electric vehicle charging system supplier.</p>
<p>“We&#8217;re already in discussions with a number of potential partners who can see the market-leading &#8216;Smart Energy&#8217; innovation embodied in ChargeIQ.  For these partners ChargeIQ can be a key enabler for their business or an extension of their Smart Energy portfolio,” Mr Handberg said.</p>
<p>DiUS Computing co-founder and director Clency Coutet said Mr Handberg’s expertise in the field will assist DiUS Computing in achieving their goals for ChargeIQ.</p>
<p>&#8220;Mr Handberg brings with him an impressive track record in the EV market as well as a background in engineering, which will significantly contribute to DiUS Computing’s strategic goals to take ChargeIQ forward,&#8221; Mr Coutet said.</p>
<p><strong>-ENDS-</strong></p>
<p><strong>Media Contact:</strong><br />
Sonja Viduka at SoVi Communications on behalf of DiUS Computing on 0425 718 662 or Email <a href="mailto:info@sovi.com.au" target="_blank">info@sovi.com.au</a></p>
<p><strong>About DiUS Computing:</strong><br />
DiUS Computing is an Australian-owned technology company, comprised of over 100 talented professionals across Melbourne and Sydney with a passion for emerging technology and its intelligent business application.</p>
<p>DiUS Computing’s involvement with Victoria’s Advanced Metering Infrastructure (AMI) program began in 2006. Since then, DiUS Computing has helped a number of Australian utilities with technology strategy, planning, architecture, design, build, testing and procurement related activities for their AMI solutions.</p>
]]></content:encoded>
			<wfw:commentRss>http://dius.com.au/2013/04/22/dius-computing-appoints-kristian-handberg-to-take-chargeiq-forward/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DiUS helps accelerate innovation at Agile Australia 2013</title>
		<link>http://dius.com.au/2013/04/18/dius-helps-accelerate-innovation-at-agile-australia-2013/</link>
		<comments>http://dius.com.au/2013/04/18/dius-helps-accelerate-innovation-at-agile-australia-2013/#comments</comments>
		<pubDate>Thu, 18 Apr 2013 00:16:17 +0000</pubDate>
		<dc:creator>Kirsty Miller</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://dius.com.au/?p=2339</guid>
		<description><![CDATA[DiUS Computing is pleased to announce its sponsorship of Agile Australia 2013, a premier event in the Agile community. The two-day conference will be held in Sydney on June 19-20 2013. There is also a day of pre-conference workshops on June 18 2013. With DiUS’s enduring company focus on fostering and stimulating innovation, we’re thrilled [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://dius.com.au/wp-content/uploads/2013/04/agile-aus-2013-banner-blog.jpg"><img class="alignnone size-large wp-image-2345" title="agile-aus-2013-banner-blog" src="http://dius.com.au/wp-content/uploads/2013/04/agile-aus-2013-banner-blog-670x141.jpg" alt="" width="670" height="141" /></a>DiUS Computing is pleased to announce its sponsorship of Agile Australia 2013, a premier event in the Agile community. The two-day conference will be held in Sydney on June 19-20 2013. There is also a day of pre-conference workshops on June 18 2013.</p>
<p>With DiUS’s enduring company focus on fostering and stimulating innovation, we’re thrilled to support Agile Australia 2013’s focus on how business can use an Agile approach to stay ahead of the curve.</p>
<p>Agile Australia 2013 features an inspiring range of keynotes from international thought leaders on the idea of accelerating, or fast-tracking, innovation through Agile delivery methods:</p>
<ul>
<li>Bjarte Bogsnes , Author, Beyond Budgeting</li>
<li>Ryan Martens &#8211; Co-Founder and Chief Technology Officer, Rally Software</li>
<li>Mary Poppendieck &#8211; Author, Lean Software Development: An Agile Toolkit</li>
<li>Dave Snowden &#8211; Chief Scientific Officer, Cognitive Edge.</li>
</ul>
<p>There’s also an impressive line-up of local talent focused on showcasing strategies and new ideas, as well as mastering fundamental building blocks, to help establish an environment where innovation thrives. DiUS will be presenting two talks:</p>
<p><strong>Make a real difference: Community innovations for social good</strong><br />
Pete Cohen, DiUS Business Analyst and Random Hacks of Kindness (RHoK) star, is teaming up with Julian Smith, Senior Policy Officer at the Department of Sustainability and Environment to talk about how technology communities are using technology to develop innovative and sustainable solutions to development problems. This session presents a case study of a recent RHoK hackathon that developed a solution that enables emergency crews to keep track of one another&#8217;s locations and share real-time information about a fire on their smart devices.</p>
<p><strong>A disruption story: how an Australian startup helped a utility giant lead the electricity market into a new world of smart energy</strong><br />
Mark Anderson, DiUS Smart Energy Lead and co-founder and Chief Technology Officer of <a title="Percepscion" href="http://dius.com.au/products/percepscion/">Percepscion</a>, is going to talk about how an Australian utility giant was able to disrupt and lead the heavily regulated energy market into smart energy with a world-first Energy Monitor fridge magnet that displays customer power consumption in real-time. The session explores the challenges of innovating to create product differentiation and deliver added value to customers.</p>
<p>For more information on the conference agenda and speakers, please visit the <a href="http://www.agileaustralia.com.au">Agile Australia website</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://dius.com.au/2013/04/18/dius-helps-accelerate-innovation-at-agile-australia-2013/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hands-on with the Internet of Things – Part 4</title>
		<link>http://dius.com.au/2013/04/12/hands-on-with-the-internet-of-things-part-4/</link>
		<comments>http://dius.com.au/2013/04/12/hands-on-with-the-internet-of-things-part-4/#comments</comments>
		<pubDate>Thu, 11 Apr 2013 22:45:43 +0000</pubDate>
		<dc:creator>Daryl Wilding-McBride</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://dius.com.au/?p=2303</guid>
		<description><![CDATA[This entry is the next part of a series in which I share my experience building a solar-powered camera node for a ZigBee mesh network. These posts are not intended to be a tutorial on ZigBee; there are lots of places to find that information, one of the most digestible being Building Wireless Sensor Networks [...]]]></description>
			<content:encoded><![CDATA[<p><em>This entry is the next part of a series in which I share my experience building a solar-powered camera node for a ZigBee mesh network. These posts are not intended to be a tutorial on ZigBee; there are lots of places to find that information, one of the most digestible being </em>Building Wireless Sensor Networks<em> by Robert Faludi.</em></p>
<p>In <a href="http://dius.com.au/?p=2202">the last episode</a>, I described my first attempt at getting the ZigBee modules communicating with messages, using a JSON format. It worked, but this approach was not very efficient for a couple of reasons:</p>
<ul>
<li>It increased the bandwidth required to send each image segment by a factor of two.</li>
<li>It required a Base64 encoding and decoding step for each image segment.</li>
</ul>
<p>Another shortcoming of this approach is that it used the XBee’s transparent serial or ‘AT’ mode, in which the connection to both ends look like a serial cable between the remote node and the Coordinator. This was not going to suit my ultimate objective of having multiple remote nodes, all sending images to a central repository through the Coordinator, because I would need to reconfigure the Coordinator each time I wanted to receive data from a different remote node. Transparent AT mode is great for one-to-one node communications, but that’s not my real goal here.</p>
<p>The XBees have another mode, called API mode, in which a client can send and receive low-level data packets and individually address each one. I will use this mode to resolve the shortcomings of my JSON-based approach.</p>
<p>There are a number of client libraries that handle the marshaling and unmarshaling of the underlying ZigBee data packets. There’s an Arduino library called <a href="http://code.google.com/p/xbee-arduino/" target="_blank">xbee-arduino</a> which I could see is well-supported and mature.</p>
<p>For the server-side, in the last episode I used a Ruby script running on my Mac Pro. This was easy to get going and worked well for early development. For the future, though, I want the Coordinator to use a server running on a Raspberry Pi. This is of course because Raspberry Pis are cool, and a Pi can be running 24&#215;7 much more cheaply and easily under a pile of papers on my desk than running my Mac Pro all the time.</p>
<div><a href="http://dius.com.au/2013/04/12/hands-on-with-the-internet-of-things-part-4/raspberry-pi/" rel="attachment wp-att-2304"><img class="size-full wp-image-2304" title="raspberry-pi" src="http://dius.com.au/wp-content/uploads/2013/04/raspberry-pi.jpg" alt="" width="600" height="600" /></a></div>
<div>Although it’s essentially a general purpose Linux machine, and I can install any language, it seems the language with a lot of support in the Raspberry Pi community is Python. This is a happy coincidence, as Python is a language I’m interested in learning; my DiUS colleague Fred Rotbart recently used it on a data visualisation and prediction project, and I was really impressed by its speed and power. Surely the Coordinator server is a perfect opportunity to hone my (presently non-existent) Python skills. Hence I needed a Python version of the XBee API-mode library, which also already exists. It’s called <a href="http://code.google.com/p/python-xbee/">python-xbee</a>.</div>
<p>With the pieces in place for API mode, I needed a new protocol, this time based on binary messages. I don’t have much space to play with; for a Series 2 XBee with ZB Pro firmware like the modules I’m using, the maximum payload size for each packet is 84 bytes. Using encryption reduces the size further. So far I’ve been using 32-byte segments for the images, mainly so the very small serial buffers on the camera and Arduino don’t get overwhelmed; I’ll stick with that size to make sure the segments can fit into a packet even if I want to use ZigBee encryption later.</p>
<p>At this stage I want to send two types of messages from remote nodes, for images and information, but there may be more in the future. So I’ll use the first byte of the payload to indicate the message type. Just for fun, I will choose arbitrary values: 0xf3 in the first byte of the payload to indicate a packet contains an information message, and 0xf4 for image messages.</p>
<p><a href="http://dius.com.au/2013/04/12/hands-on-with-the-internet-of-things-part-4/message-format/" rel="attachment wp-att-2305"><img class="alignnone size-full wp-image-2305" title="message-format" src="http://dius.com.au/wp-content/uploads/2013/04/message-format.tiff" alt="" /></a></p>
<div>
<p>Creating an information message on the Arduino is easy with the PString class.</p>
<script src="https://gist.github.com/5361306.js?file=gistfile1.ino"></script><noscript><pre><code class="language-arduino arduino">char payload[2+info.length()];
payload[0] = 0xf3;  // payload type
PString infoString(&amp;payload[1], sizeof(payload)-1);
infoString.print(info);</code></pre></noscript>
<p>Having built the payload, the request is assembled by creating the destination address and pointing to the payload buffer. In a ZigBee network, the address of the Coordinator is always 0&#215;0 (and remember there is always only one Coordinator in a PAN). Therefore if I address the packet with the Coordinator address, the router nodes in the mesh network will make sure the packet is routed to the right node, according to the best network path, a judgement each router makes on the number of hops required to get a packet to the destination and the signal strength of each hop.</p>
</div>
<div>
<script src="https://gist.github.com/5367707.js?file=gistfile1.ino"></script><noscript><pre><code class="language-arduino arduino">// Specify the address of the remote XBee (this is the SH + SL)
XBeeAddress64 addr64 = XBeeAddress64(0x0, 0x0); // Coordinator address
  
// Create a TX Request
ZBTxRequest zbTx = ZBTxRequest(addr64, (uint8_t *)payload, sizeof(payload));
  
// Send the request
xbee.send(zbTx);
</code></pre></noscript>
<div>
<p>The complete Arduino code now looks like this:</p>
<script src="https://gist.github.com/5367721.js?file=gistfile1.ino"></script><noscript><pre><code class="language-arduino arduino">// This program takes a snapshot and sends it to the XBee module

#include &lt;Adafruit_VC0706.h&gt;
#include &lt;SoftwareSerial.h&gt;
#include &lt;XBee.h&gt;
#include &lt;PString.h&gt;

// On Uno: camera TX connected to pin 2, camera RX to pin 3:
SoftwareSerial cameraconnection = SoftwareSerial(2, 3); // Arduino RX, TX
Adafruit_VC0706 cam = Adafruit_VC0706(&amp;cameraconnection);
XBee xbee = XBee();

void sendImagePayload(uint16_t bytesRemaining, uint8_t bufferLength, uint8_t *buffer) {
  uint8_t payload[bufferLength+4];
  payload[0] = 0xf4;  // payload type
  payload[1] = highByte(bytesRemaining);
  payload[2] = lowByte(bytesRemaining);
  payload[3] = bufferLength;
  for (uint8_t i=0; i&lt;bufferLength; i++) {
    payload[i+4] = buffer[i];
  }
  
  // Specify the address of the remote XBee (this is the SH + SL)
  XBeeAddress64 addr64 = XBeeAddress64(0x0, 0x0); // Coordinator address
  
  // Create a TX Request
  ZBTxRequest zbTx = ZBTxRequest(addr64, payload, sizeof(payload));
  
  // Send your request
  xbee.send(zbTx);
}

void sendInfoPayload(String info) {
  info.replace('\n', ',');
  info.replace('\r', ' ');
  char payload[2+info.length()];
  payload[0] = 0xf3;  // payload type
  PString infoString(&amp;payload[1], sizeof(payload)-1);
  infoString.print(info);
  
  // Specify the address of the remote XBee (this is the SH + SL)
  XBeeAddress64 addr64 = XBeeAddress64(0x0, 0x0); // Coordinator address
  
  // Create a TX Request
  ZBTxRequest zbTx = ZBTxRequest(addr64, (uint8_t *)payload, sizeof(payload));
  
  // Send your request
  xbee.send(zbTx);
}

void setup() {

  Serial.begin(57600);

  sendInfoPayload(&quot;VC0706 Camera snapshot test&quot;);
  
  // Try to locate the camera
  if (cam.begin()) {
    sendInfoPayload(&quot;Camera found.&quot;);
  }
  else {
    sendInfoPayload(&quot;No camera found?&quot;);
    return;
  }

  // Get the camera version
  char *reply = cam.getVersion();
  if (reply == 0) {
    sendInfoPayload(&quot;Failed to get version&quot;);
  }
  else {
    sendInfoPayload(reply);
  }
  
  // Set the picture size
  cam.setImageSize(VC0706_640x480);        // biggest

  // Turn on motion detection  
  boolean flag = cam.setMotionDetect(true);           // turn it on
  if (cam.getMotionDetect())
    sendInfoPayload(&quot;Motion detection is ON.&quot;);
  else
    sendInfoPayload(&quot;Motion detection is OFF.&quot;);
}

void loop() {
  if (cam.motionDetected()) {
    cam.setMotionDetect(false);
    // Take the picture
    sendInfoPayload(&quot;Motion detected - taking snap now...&quot;);
    if (! cam.takePicture()) 
      sendInfoPayload(&quot;Failed to snap!&quot;);
    else
      sendInfoPayload(&quot;Picture taken!&quot;);
    
    // Get the size of the image (frame) taken
    uint16_t jpglen = cam.frameLength();
    sendInfoPayload(&quot;Sending &quot; + String(jpglen, DEC) + &quot; byte image.&quot;);
  
    int32_t time = millis();
    // Read all the data up to # bytes!
    while (jpglen &gt; 0) {
      // read 32 bytes at a time;
      uint8_t *buffer;
      uint8_t bytesToRead = min(32, jpglen); // change 32 to 64 for a speedup but may not work with all setups!
      buffer = cam.readPicture(bytesToRead);
      jpglen -= bytesToRead;
      sendImagePayload(jpglen, bytesToRead, buffer);
    }
    time = millis() - time;
    sendInfoPayload(String(time)+&quot; ms elapsed&quot;);
    cam.resumeVideo();
    cam.setMotionDetect(true);
  }
}

</code></pre></noscript>
<div>
<p>You will see at the end of the setup() function that now I’m putting the camera in motion detection mode, so it will take a photo when it detects movement, rather than taking a photo as quickly as possible. This seems to be the best option for when I deploy it in the field, as a photo will likely be most interesting when something moves. In the loop() function, it checks whether motion has been detected; if so, it temporarily turns off motion detection while it takes a photo and sends it to the Coordinator, and then turns it back on.</p>
<p>On the Coordinator server-side, as before, the program will continuously listen for messages and handle them according to their type. Now that I’m using API mode, messages can arrive at the Coordinator from any remote node, and so image segment messages need to be matched up with their source; to get this going, though, for now we’ll continue to assume a single source remote node.</p>
<p>The eventual goal is to be able to view the images from any client, anywhere. Rather than store the messages on the local server, I decided the Python script should push the images to Amazon Web Services (AWS) S3 storage. Later on, I’ll be able to grab the images from each remote node and display them on a web page or iPhone client.</p>
<p>The Python script for the server looks like this:</p>
<div>
<script src="https://gist.github.com/5367737.js?file=gistfile1.py"></script><noscript><pre><code class="language-python python"># Continuously read the serial port and process IO data received from a remote XBee.

from xbee import ZigBee
import serial
import struct
from array import array
import boto
import boto.s3
from datetime import datetime, date, time
import sys
from boto.s3.key import Key

AWS_ACCESS_KEY_ID = &lt;your access key here&gt;
bucketName = AWS_ACCESS_KEY_ID.lower() + '-farmcam-bucket'
conn = boto.connect_s3()
bucket = conn.lookup(bucketName)
if bucket is None:
  bucket = conn.create_bucket(bucketName, location=boto.s3.connection.Location.APSoutheast2)

def ByteToHex(byteStr): 
	# Convert a byte string to it's hex string representation e.g. for output.
	return ''.join( [ &quot;%02X&quot; % ord( x ) for x in byteStr ] ).strip() 

def percent_cb(complete, total):
	sys.stdout.write('.')
	sys.stdout.flush()

ser = serial.Serial('/dev/tty.usbserial-A901JYV9', 57600)
xbee = ZigBee(ser, escaped=True)
imageBytes = array('B')
byteCount = 0

# Continuously read and print packets
print 'Continuously read and print packets'
while True:
	try:
		response = xbee.wait_read_frame()
		msgType = struct.unpack(&quot;B&quot;, response['rf_data'][0])[0]
		if msgType == 0xf3:
			print 'info received from ' + ByteToHex(response['source_addr_long']) + ': ' + response['rf_data'][1:]
		elif msgType == 0xf4:
			bytesRemaining = struct.unpack(&quot;H&quot;, response['rf_data'][1:3][::-1])[0]
			numberOfBytesRxd = struct.unpack(&quot;B&quot;, response['rf_data'][3])[0]
			byteCount += numberOfBytesRxd
			for i in range(numberOfBytesRxd):
				imageBytes.append(struct.unpack(&quot;B&quot;, response['rf_data'][4+i])[0])
			if bytesRemaining &lt;= 0:
				# Write the image to a file
				dt = datetime.now()
				fileName = ByteToHex(response['source_addr_long']) + '-' + dt.strftime(&quot;%Y-%m-%d-%H-%M-%S-%f&quot;) + '.jpg'
				output_file = open('../' + fileName, 'wb')
				imageBytes.tofile(output_file)
				output_file.close()
				# Write the file to S3
				print 'Uploading %s to Amazon S3 bucket %s' % (fileName, bucketName)
				k = Key(bucket)
				k.key = fileName
				k.set_contents_from_filename('../' + fileName, cb=percent_cb, num_cb=10)
				# reset for the next one
				imageBytes = array('B')
				byteCount = 0
		else:
			print 'not a recognised message type.'
	except KeyboardInterrupt:
		break

ser.close()
</code></pre></noscript>
<div>
<p>As a test, I left it running over the length of a day. It works well, although there are packets dropped now and then, which is something I’ll need to check when distances between nodes get more realistic. I may need to add some intelligence into the protocol to implement resending lost packets. But in the main, I’m happy with how it’s working.</p>
<p>Here’s what the camera snapped when I was out of the room and the dog somehow got off her leash. She did what Labradoodles do: go looking for food in the kitchen.</p>
<p><a href="http://dius.com.au/2013/04/12/hands-on-with-the-internet-of-things-part-4/0013a200409959d6-2013-04-07-21-41-52-245346/" rel="attachment wp-att-2313"><img class="alignnone size-full wp-image-2313" title="0013A200409959D6-2013-04-07-21-41-52-245346" src="http://dius.com.au/wp-content/uploads/2013/04/0013A200409959D6-2013-04-07-21-41-52-245346.jpg" alt="" width="640" height="480" /></a></p>
</div>
</div>
</div>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://dius.com.au/2013/04/12/hands-on-with-the-internet-of-things-part-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DiUS sponsors the leading edge of web</title>
		<link>http://dius.com.au/2013/04/03/dius-sponsors-web-directions-code/</link>
		<comments>http://dius.com.au/2013/04/03/dius-sponsors-web-directions-code/#comments</comments>
		<pubDate>Wed, 03 Apr 2013 02:18:27 +0000</pubDate>
		<dc:creator>Kirsty Miller</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://dius.com.au/?p=2267</guid>
		<description><![CDATA[DiUS Computing is proud to announce its sponsorship of Web Directions Code 2013. The two-day conference will be held in Melbourne on the 2nd and 3rd May 2013. Web Directions Code 2013 is focused on the art and science of programming for the web with HTML, CSS and JavaScript. The impressive line-up features CoffeeScript and [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://dius.com.au/wp-content/uploads/2013/04/web-directions-code-2013.png"><img class="alignnone size-full wp-image-2270" title="web-directions-code-2013" src="http://dius.com.au/wp-content/uploads/2013/04/web-directions-code-2013.png" alt="Web Directions Code 2013" width="600" height="160" /></a></p>
<p>DiUS Computing is proud to announce its sponsorship of Web Directions Code 2013. The two-day conference will be held in Melbourne on the 2nd and 3rd May 2013.</p>
<p>Web Directions Code 2013 is focused on the art and science of programming for the web with HTML, CSS and JavaScript. The impressive line-up features CoffeeScript and Backbone inventor Jeremy Ashkenas, everyone’s favourite “big CSS” guru Nicole Sullivan, Etsy’s Garann Means, “Mr Maths” Steven Whittens, Twitter’s Angus Croll, as well as many other local and international experts in JavaScript, CSS and HTML5.</p>
<p>For more information on the conference agenda and speakers, please visit the <a href="http://code13melb.webdirections.org">Web Directions Code 2013 website</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://dius.com.au/2013/04/03/dius-sponsors-web-directions-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hands-on with the Internet of Things – Part 3</title>
		<link>http://dius.com.au/2013/03/26/hands-on-with-the-internet-of-things-part-3/</link>
		<comments>http://dius.com.au/2013/03/26/hands-on-with-the-internet-of-things-part-3/#comments</comments>
		<pubDate>Tue, 26 Mar 2013 05:43:25 +0000</pubDate>
		<dc:creator>Daryl Wilding-McBride</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://dius.com.au/?p=2202</guid>
		<description><![CDATA[This entry is the next part of a series in which I share my experience building a solar-powered camera node for a ZigBee mesh network. These posts are not intended to be a tutorial on ZigBee; there are lots of places to find that information, one of the most digestible being Building Wireless Sensor Networks [...]]]></description>
			<content:encoded><![CDATA[<p><em>This entry is the next part of a series in which I share my experience building a solar-powered camera node for a ZigBee mesh network. These posts are not intended to be a tutorial on ZigBee; there are lots of places to find that information, one of the most digestible being </em>Building Wireless Sensor Networks<em> by Robert Faludi.</em></p>
<p>Now that I had <a title="Hands-on with the Internet of Things – Part 2" href="http://dius.com.au/2013/03/14/hands-on-with-the-internet-of-things-part-2/">the radios talking to each other</a>, I wanted to try out the camera. I chose the <a href="https://www.adafruit.com/products/613">Weatherproof TTL Serial JPEG Camera</a> from Adafruit.com, based on the VC0706 security camera digital processor from Vimicro. The core part of the camera is a 1/4-inch CMOS sensor. A microcontroller can talk to the camera through a serial port; sending a command over the serial port to take a photo and retrieve it will return a JPEG image up to 640 x 480 pixels. The serial port baud rate can go up to 115200 baud. You can send it commands to change focus, and also to take a snapshot when it detects movement.</p>
<p>Another nice thing about this camera is the weatherproof enclosure, and the array of infrared LEDs and a built-in light sensor; if the light sensor detects there is not enough visible light, it switches on the infrared LEDs to illuminate the scene, making it possible to take night shots. At USD$55, I reckon it’s good value.</p>
<p><a href="http://dius.com.au/2013/03/26/hands-on-with-the-internet-of-things-part-3/weathervc0706_lrg/" rel="attachment wp-att-2203"><img class="alignnone size-full wp-image-2203" title="weathervc0706_LRG" src="http://dius.com.au/wp-content/uploads/2013/03/weathervc0706_LRG.jpg" alt="" width="1000" height="769" /></a></p>
<p>&nbsp;</p>
<p>The camera module uses 3.3V logic on its pins; the Arduino uses 5V, so I needed to have a voltage divider on the input to the camera so that voltage levels don’t blow it away.</p>
<p>This is the circuit:</p>
<p><a href="http://dius.com.au/2013/03/26/hands-on-with-the-internet-of-things-part-3/img_1010/" rel="attachment wp-att-2204"><img class="alignnone size-full wp-image-2204" title="IMG_1010" src="http://dius.com.au/wp-content/uploads/2013/03/IMG_1010.jpg" alt="" width="640" height="266" /></a></p>
<p>The TX and RX pins refer to the transmit and receive pins, relative to their module. Pins 2 and 3 on the Arduino will be used for serial receiving and transmitting respectively. RX and TX on the camera are for receiving to and transmitting from the camera.</p>
<p>For now, I wired this up on a small breadboard.</p>
<p><a href="http://dius.com.au/2013/03/26/hands-on-with-the-internet-of-things-part-3/img_1008/" rel="attachment wp-att-2205"><img class="alignnone size-full wp-image-2205" title="IMG_1008" src="http://dius.com.au/wp-content/uploads/2013/03/IMG_1008.jpg" alt="" width="640" height="478" /></a></p>
<p>&nbsp;</p>
<p>Adafruit have done a lot of work to make this camera as easy to use as possible. They have published <a href="https://github.com/adafruit/Adafruit-VC0706-Serial-Camera-Library">an Arduino library and examples</a> for talking to VC0706-based serial JPEG cameras with a higher-level API. It’s quite simple to get the camera to take a snapshot and read it out from the serial port. Then I only needed to send it to the serial port on the XBee module to get the image to the Coordinator and the receiving node.</p>
<p>Since I was now sending a couple of different types of messages, binary images and text debug and information messages, I needed to design a simple message protocol. I decided to use JSON format.</p>
<p>A debug and information message looks like this:</p>
<script src="https://gist.github.com/5252373.js?file=info-message.json"></script><noscript><pre><code class="language-json json">{ &quot;type&quot;: &quot;inf&quot;, &quot;msg&quot;: &quot;an info message&quot; }</code></pre></noscript>
<div>And an image message uses Base64 encoding for each 32-byte segment, also providing the number of bytes remaining in the image:</div>
<script src="https://gist.github.com/5252377.js?file=image-message.json"></script><noscript><pre><code class="language-json json">{ &quot;type&quot;: &quot;img&quot;, &quot;msg&quot;: { &quot;seg&quot;: { &quot;rem&quot;: 345, &quot;enc&quot;: &quot;YW4gZW5jb2RlZCBtc2c=&quot; } } }</code></pre></noscript>
<p>To decode these message types, I changed the Ruby server to handle each type. If it receives an ‘inf’ message type, it just prints out the message contents. If it receives an ‘img’ message type, it decodes the Base64 string into an array of bytes. When it has received all the image in the byte array, it writes the image to a file and waits to receive the next one.</p>
<script src="https://gist.github.com/5252455.js?file=message-server.rb"></script><noscript><pre><code class="language-ruby ruby">require 'serialport'
require 'json'
require 'base64'
 
sp = SerialPort.new &quot;/dev/cu.usbmodem1d11&quot;, 115200, 8, 1, SerialPort::NONE
imageBytes = &quot;&quot;
loop {
  jsonMessage = sp.gets.tr(&quot;\n\r&quot;, &quot;&quot;)
  begin
    parsedMessage = JSON(jsonMessage)
    if parsedMessage[&quot;type&quot;] == &quot;inf&quot;
      puts parsedMessage[&quot;msg&quot;]
    elsif parsedMessage[&quot;type&quot;] == &quot;img&quot;
      imageBytes += Base64.decode64(parsedMessage[&quot;msg&quot;][&quot;seg&quot;][&quot;enc&quot;])
      if parsedMessage[&quot;msg&quot;][&quot;seg&quot;][&quot;rem&quot;] &lt;= 0
        # Write the image bytes to a file
        File.open(&quot;photo.jpg&quot;, &quot;wb&quot;) do |f|
          f.write(imageBytes)
        end
        # Clear the image bytes for the next one
        imageBytes = &quot;&quot;
        puts &quot;Wrote an image to the file. Waiting for the next one.&quot;
      end
    end
  rescue Exception =&gt; e  
    puts e.message
    imageBytes = &quot;&quot;
  end
}</code></pre></noscript>
<p>On the Arduino side, I needed to set up the serial port as before, and to initiate the camera. As indicated in the diagram above, the camera module is connected to digital ports 2 and 3 on the Arduino. Basing the code on the Adafruit snapshot example, it looked like this:</p>
<script src="https://gist.github.com/5252463.js?file=image-streamer.ino"></script><noscript><pre><code class="language-arduino arduino">// This program takes a snapshot and sends it to the XBee module
 
#include &lt;Adafruit_VC0706.h&gt;
#include &lt;SoftwareSerial.h&gt;
#include &lt;Base64.h&gt;
 
// On Uno: camera TX connected to pin 2, camera RX to pin 3:
SoftwareSerial cameraconnection = SoftwareSerial(2, 3); // Arduino RX, TX
Adafruit_VC0706 cam = Adafruit_VC0706(&amp;cameraconnection);
 
void sendMsg(String msgType, String msg) {
  Serial.println(&quot;{\&quot;type\&quot;: \&quot;&quot; + msgType + &quot;\&quot;, \&quot;msg\&quot;: &quot; + msg + &quot;}&quot;);
}
 
String formatImagePayload(uint16_t bytesRemaining, String encodedImageSegment) {
  String result = &quot;{\&quot;seg\&quot;: {\&quot;rem\&quot;:&quot; + String(bytesRemaining) + &quot;, \&quot;enc\&quot;:\&quot;&quot; + encodedImageSegment + &quot;\&quot;}}&quot;;
  return result;
}
 
String formatInfoPayload(String msg) {
  String result = &quot;\&quot;&quot; + msg + &quot;\&quot;&quot;;
  return result;
}
 
void setup() {
 
  Serial.begin(115200);
  sendMsg(&quot;inf&quot;, formatInfoPayload(&quot;VC0706 Camera snapshot test&quot;));
  
  // Try to locate the camera
  if (cam.begin()) {
    sendMsg(&quot;inf&quot;, formatInfoPayload(&quot;Camera found.&quot;));
  }
  else {
    sendMsg(&quot;inf&quot;, formatInfoPayload(&quot;No camera found?&quot;));
    return;
  }
 
  // Set the picture size
  cam.setImageSize(VC0706_640x480);        // biggest
}
 
void loop() {
  // Take the picture
  sendMsg(&quot;inf&quot;, formatInfoPayload(&quot;Snap in 3 secs...&quot;));
  delay(3000);
  if (! cam.takePicture()) 
    sendMsg(&quot;inf&quot;, formatInfoPayload(&quot;Failed to snap!&quot;));
  else
    sendMsg(&quot;inf&quot;, formatInfoPayload(&quot;Picture taken!&quot;));
  
  // Get the size of the image (frame) taken
  uint16_t jpglen = cam.frameLength();
  sendMsg(&quot;inf&quot;, formatInfoPayload(&quot;Sending &quot; + String(jpglen, DEC) + &quot; byte image.&quot;));
 
  int32_t time = millis();
  // Read all the data up to # bytes!
  while (jpglen &gt; 0) {
    // read 32 bytes at a time;
    uint8_t *buffer;
    uint8_t bytesToRead = min(32, jpglen); // change 32 to 64 for a speedup but may not work with all setups!
    buffer = cam.readPicture(bytesToRead);
    int encodedStringLength = base64_enc_len(bytesToRead);
    char encodedStringBuffer[encodedStringLength];
    encodedStringLength = base64_encode(encodedStringBuffer, (char *)buffer, bytesToRead);
    jpglen -= bytesToRead;
    sendMsg(&quot;img&quot;, formatImagePayload(jpglen, encodedStringBuffer));
  }
 
  time = millis() - time;
  sendMsg(&quot;inf&quot;, formatInfoPayload(String(time)+&quot; ms elapsed&quot;));
}</code></pre></noscript>
<div>The resulting image is fair quality; serviceable, but certainly not the best I’ve seen from a serial JPEG module. To be fair, the image below was taken in-doors, in artificial light at night.</div>
<p><a href="http://dius.com.au/2013/03/26/hands-on-with-the-internet-of-things-part-3/photo-1/" rel="attachment wp-att-2206"><img class="alignnone size-full wp-image-2206" title="photo-1" src="http://dius.com.au/wp-content/uploads/2013/03/photo-1.jpg" alt="" width="640" height="480" /></a></p>
<p>The best part is how well the infrared LEDs automatically illuminated the same scene when I turned off the lights.</p>
<p><a href="http://dius.com.au/2013/03/26/hands-on-with-the-internet-of-things-part-3/photo-2/" rel="attachment wp-att-2207"><img class="alignnone size-full wp-image-2207" title="photo-2" src="http://dius.com.au/wp-content/uploads/2013/03/photo-2.jpg" alt="" width="640" height="480" /></a></p>
<p>I’m hoping this will work really well out in the field. More on that later.</p>
<p>With the XBees running at 115200 baud, it seemed to take an average of 20 seconds to send a 45K-byte image. Keen observers, or even casual ones, will note that by choosing a JSON format for the messages, I have effectively doubled the number of bytes required to send an image to the server. I will fix that problem in <a href="http://dius.com.au/?p=2303">the next installment</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://dius.com.au/2013/03/26/hands-on-with-the-internet-of-things-part-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DiUS helps to navigate the cloud</title>
		<link>http://dius.com.au/2013/03/25/dius-sponsors-aws-summit/</link>
		<comments>http://dius.com.au/2013/03/25/dius-sponsors-aws-summit/#comments</comments>
		<pubDate>Sun, 24 Mar 2013 23:06:22 +0000</pubDate>
		<dc:creator>Kirsty Miller</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://dius.com.au/?p=2178</guid>
		<description><![CDATA[DiUS Computing is excited to announce its sponsorship of the Amazon Web Services (AWS) Summit 2013: Navigating the Cloud in Sydney on April 24, 2013 at the Hilton Hotel. AWS Summits are free, one-day events hosted in 12 major cities around the world. These events are designed to provide developers and technical leaders with an [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://dius.com.au/wp-content/uploads/2013/03/AWSSummit.png"><img class="alignleft size-large wp-image-2180" title="AWSSummit" src="http://dius.com.au/wp-content/uploads/2013/03/AWSSummit-670x106.png" alt="" width="670" height="106" /></a></p>
<p>DiUS Computing is excited to announce its sponsorship of the Amazon Web Services (AWS) Summit 2013: Navigating the Cloud in Sydney on April 24, 2013 at the Hilton Hotel.</p>
<p>AWS Summits are free, one-day events hosted in 12 major cities around the world. These events are designed to provide developers and technical leaders with an introduction to the AWS Cloud and guidance on architecture and engineering best practices. Whether you are new to the cloud or an experienced user, you will learn something new at the AWS Summit.</p>
<p>The Sydney AWS Summit features a keynote address from Adam Selipsky, VP of Amazon Web Services, customer presentations and technical content specifically designed for new and experienced users.</p>
<p><strong>Customer case study: Hooroo &#8211; How the cloud and a Lean mindset helped Qantas launch a new business</strong></p>
<p>A joint presentation by Warner Godfrey, DiUS Computing, and Bruce Fair, Hooroo, at the AWS Summit in Sydney will cover<a title="Hooroo – A Qantas Start-up" href="http://dius.com.au/hooroo-a-qantas-startup/"> how DiUS used the cloud to help Qantas successfully enter the burgeoning online travel market with the speed, scale and agility typically associated with a start-up</a>.</p>
<p>Twelve months on and now a global player, we examine the challenges, successes, what we’d do differently and the changing measures of success.</p>
<p>Also covered is how Qantas responded to the commercial challenges of using the cloud such as security, privacy and data sovereignty, and the key development practices such as Continuous Deployment that facilitated three major production releases in 15 months, for Qantas, Jetstar and the launch of a new brand, Hooroo.</p>
<div>
<p><span>For more information about the event, or to view the full agenda, including session abstracts and speaker bios, or to register for your free ticket, visit the <a href="http://aws.amazon.com/aws-summit-2013/sydney/" target="_blank">event website</a></span>.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://dius.com.au/2013/03/25/dius-sponsors-aws-summit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DiUS&#8217;s ChargeIQ Interview on Sky News Australia&#8217;s Tech Report</title>
		<link>http://dius.com.au/2013/03/22/diuss-chargeiq-interview-on-sky-news-australias-tech-report/</link>
		<comments>http://dius.com.au/2013/03/22/diuss-chargeiq-interview-on-sky-news-australias-tech-report/#comments</comments>
		<pubDate>Fri, 22 Mar 2013 01:52:31 +0000</pubDate>
		<dc:creator>Kirsty Miller</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://dius.com.au/?p=2188</guid>
		<description><![CDATA[DiUS Computing director and co-founder Joe Losinno was interviewed about ChargeIQ, the world’s first ZigBee certified electric vehicle charger with the ability to communicate with smart meters, on Sky News Australia&#8217;s Tech Report. It is expected by 2020 that the electric vehicle infrastructure market will be worth over $1.15b. In this video of the Tech Report interview [...]]]></description>
			<content:encoded><![CDATA[<p>DiUS Computing director and co-founder Joe Losinno was interviewed about ChargeIQ, the world’s first ZigBee certified electric vehicle charger with the ability to communicate with smart meters, on Sky News Australia&#8217;s Tech Report. It is expected by 2020 that the electric vehicle infrastructure market will be worth over $1.15b.</p>
<p>In this video of the Tech Report interview Joe explains how ChargeIQ works and how it enables consumers to take advantage of flexible pricing to reduce the cost of their electric vehicle charging.</p>
<p>He discusses how DiUS has been working for the past few years with the Victorian Government on ChargeIQ and that the technology has been in the field for over two years as part of the Department of Transport&#8217;s Electrical Vehicle Trial.</p>
<p>The company plans to team-up with “heavy hitters” in the market to take CharqeIQ to the rest of the world and to as many parts of the electric vehicle market as it can.</p>
<p>Video length: 3 minutes 50 seconds</p>
<p><iframe width="670" height="377" src="http://www.youtube.com/embed/9KG2Eg3gf-Q?feature=oembed" frameborder="0" allowfullscreen></iframe></p>
<p>Vist the <a href="http://chargeiq.com.au/">ChargeIQ website</a> for more information.</p>
]]></content:encoded>
			<wfw:commentRss>http://dius.com.au/2013/03/22/diuss-chargeiq-interview-on-sky-news-australias-tech-report/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hands-on with the Internet of Things &#8211; Part 2</title>
		<link>http://dius.com.au/2013/03/14/hands-on-with-the-internet-of-things-part-2/</link>
		<comments>http://dius.com.au/2013/03/14/hands-on-with-the-internet-of-things-part-2/#comments</comments>
		<pubDate>Thu, 14 Mar 2013 06:01:04 +0000</pubDate>
		<dc:creator>Daryl Wilding-McBride</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://dius.com.au/?p=2129</guid>
		<description><![CDATA[This entry is the next part of a series in which I share my experience building a solar-powered camera node for a ZigBee mesh network. These posts are not intended to be a tutorial on ZigBee; there are lots of places to find that information, one of the most digestible being Building Wireless Sensor Networks [...]]]></description>
			<content:encoded><![CDATA[<p><em>This entry is the next part of a series in which I share my experience building a solar-powered camera node for a ZigBee mesh network. These posts are not intended to be a tutorial on ZigBee; there are lots of places to find that information, one of the most digestible being </em>Building Wireless Sensor Networks<em> by Robert Faludi.</em></p>
<p>With <a title="Getting my hands dirty with the Internet of Things" href="http://dius.com.au/2013/03/06/getting-my-hands-dirty-with-the-internet-of-things/">the parts gathered</a>, the next step was to get the XBee modules communicating with each other. Just to be clear on the terminology I’m using: ZigBee is a communications protocol for low-power wireless mesh networking. The XBee modules I’m using are radio modules from Digi that use the ZigBee protocol. There are other XBee modules that use different communication protocols, but for this project it’s ZigBee I’m interested in.</p>
<p><a href="http://dius.com.au/2013/03/14/hands-on-with-the-internet-of-things-part-2/img_0982-5/" rel="attachment wp-att-2159"><img class="alignnone size-full wp-image-2159" title="IMG_0982" src="http://dius.com.au/wp-content/uploads/2013/03/IMG_09824.jpg" alt="" width="228" height="200" /></a><a href="http://dius.com.au/2013/03/14/hands-on-with-the-internet-of-things-part-2/img_0983-4/" rel="attachment wp-att-2160"><img class="alignnone size-full wp-image-2160" title="IMG_0983" src="http://dius.com.au/wp-content/uploads/2013/03/IMG_09833.jpg" alt="" width="235" height="200" /></a><a href="http://dius.com.au/2013/03/14/hands-on-with-the-internet-of-things-part-2/img_0984-4/" rel="attachment wp-att-2161"><img class="alignnone size-full wp-image-2161" title="IMG_0984" src="http://dius.com.au/wp-content/uploads/2013/03/IMG_09843.jpg" alt="" width="190" height="200" /></a></p>
<p><a href="http://dius.com.au/2013/03/14/hands-on-with-the-internet-of-things-part-2/img_0986-3/" rel="attachment wp-att-2165"><img class="alignnone size-full wp-image-2165" title="IMG_0986" src="http://dius.com.au/wp-content/uploads/2013/03/IMG_09862.jpg" alt="" width="653" height="559" /></a></p>
<p>To begin, each XBee module needs to be configured according to its role in the network. A ZigBee network needs one Coordinator, which is a node that forms the network, hands out addresses to other nodes, and routes information between nodes. A Router node can join a network, send or receive information, and route information from other nodes. An End Device node can also join a network, but it sleeps most of the time, and only wakes up to send or receive information. It doesn’t route information from other nodes. The diagram below shows an example network with the three node types.</p>
<p><a href="http://dius.com.au/2013/03/14/hands-on-with-the-internet-of-things-part-2/part-2-diagrams-001/" rel="attachment wp-att-2169"><img class="alignnone  wp-image-2169" title="Part 2 diagrams.001" src="http://dius.com.au/wp-content/uploads/2013/03/Part-2-diagrams.001.png" alt="" width="467" height="336" /></a></p>
<p>For this project, the Coordinator will be the node at the house, and the node to which all the remote nodes send images. The Coordinator can be anywhere on the network, but since it plays a vital role on the network, I thought it would make sense to give it the most reliable power source.</p>
<p>One of the nice features of a mesh network is that it can create new data paths if a Router node becomes unavailable, or if the signal strength of one of the available paths changes. For example, the End Device on the right-hand side of the diagram has two paths to choose from; if one of the Router nodes becomes unavailable, the other Router node can be used to send data to the Coordinator.</p>
<p>To get the XBee modules talking, I set up the simplest network possible, with a Coordinator and a Router, as shown in the diagram below.</p>
<p><a href="http://dius.com.au/2013/03/14/hands-on-with-the-internet-of-things-part-2/part-2-diagrams-002/" rel="attachment wp-att-2170"><img class="alignnone  wp-image-2170" title="Part 2 diagrams.002" src="http://dius.com.au/wp-content/uploads/2013/03/Part-2-diagrams.002.png" alt="" width="242" height="222" /></a></p>
<p>The Coordinator will be the XBee module on the XBee Explorer USB dongle. The Router will be the XBee module on the Arduino shield.</p>
<p>To tell each module its role in the network, and update its firmware, we need to use a utility from Digi, called X-CTU. X-CTU only runs on Windows, unfortunately, so Mac users will need to use Fusion or VirtualBox to spin up a Windows VM. I used VirtualBox for this.</p>
<p>We can also use X-CTU to tell a module which PAN (Personal Area Network) it belongs to, and configure its destination address, along with stacks of other parameters. We can also use the module’s terminal mode to do that, with AT modem-like commands.</p>
<p><a href="http://dius.com.au/2013/03/14/hands-on-with-the-internet-of-things-part-2/terminal-view-of-the-coordinator-2/" rel="attachment wp-att-2171"><img class="alignnone size-full wp-image-2171" title="Terminal view of the coordinator 2" src="http://dius.com.au/wp-content/uploads/2013/03/Terminal-view-of-the-coordinator-2.png" alt="" width="456" height="591" /></a></p>
<p>The modules have defined serial number addresses, as each ZigBee radio is uniquely identified. On my modules, the addresses are:</p>
<pre>Coordinator address</pre>
<pre>High: 13A200</pre>
<pre>Low: 409959F7</pre>
<pre></pre>
<pre>Router address</pre>
<pre>High: 13A200</pre>
<pre>Low: 409959D6</pre>
<p>I decided to use a PAN identifier of 2001.</p>
<p>For the purpose of this initial setup, I told the Router that it’s destination address is the Coordinator, and vice versa. In the screen shot above, you can see that I’m setting up the Coordinator and setting its destination address to that of the Router.</p>
<p>I programmed the Arduino to repeatedly send a simple-but-friendly message.</p>
<pre>int index = 0;</pre>
<pre>void setup() {</pre>
<pre>  Serial.begin(9600);</pre>
<pre>}</pre>
<pre>void loop() {</pre>
<pre>  String message = "Hello " + String(index++);</pre>
<pre>  Serial.println(message);</pre>
<pre>  delay(5000);</pre>
<pre>}</pre>
<p>A potential trap for newbies is that, by default, the XBee shield uses the Arduino’s hardware serial port, which is also used for programming the Arduino with new sketches (the program running on the Arduino). Initially I thought I would need to take off the XBee shield each time I needed to update the Ardiuno’s software, which was going to get annoying after a while. Then I discovered the DLINE / UART switch on the XBee shield. In the DLINE position, the hardware serial port is used for uploading sketches; in the UART position, the hardware serial port is used for talking to the XBee.</p>
<p>On the Mac connected to the Coordinator node, I wrote a simple Ruby script to receive and display the messages from the Arduino.</p>
<pre>require 'serialport'</pre>
<pre>sp = SerialPort.new "/dev/cu.usbserial-A901JYV9", 9600, 8, 1, SerialPort::NONE</pre>
<pre>loop { puts sp.gets }</pre>
<pre><a href="http://dius.com.au/2013/03/14/hands-on-with-the-internet-of-things-part-2/img_0987/" rel="attachment wp-att-2172"><img class="alignnone size-full wp-image-2172" title="IMG_0987" src="http://dius.com.au/wp-content/uploads/2013/03/IMG_0987.jpg" alt="" width="446" height="640" /></a></pre>
<p>With this setup, I was able to move the Arduino to the other end of the house, and the message was received by the Coordinator without any hiccups. Admittedly the 30m distance wasn’t much of a challenge for the radio, but it did need to go through several walls, a TV, a bookshelf, and a fish tank.</p>
<p>All good so far; onward to sending images! In the <a title="Hands-on with the Internet of Things – Part 3" href="http://dius.com.au/2013/03/26/hands-on-with-the-internet-of-things-part-3/">next installment</a>, I’m going to get the Arduino capturing images from the camera.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://dius.com.au/2013/03/14/hands-on-with-the-internet-of-things-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting my hands dirty with the Internet of Things</title>
		<link>http://dius.com.au/2013/03/06/getting-my-hands-dirty-with-the-internet-of-things/</link>
		<comments>http://dius.com.au/2013/03/06/getting-my-hands-dirty-with-the-internet-of-things/#comments</comments>
		<pubDate>Wed, 06 Mar 2013 02:45:36 +0000</pubDate>
		<dc:creator>Daryl Wilding-McBride</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Internet of Things]]></category>

		<guid isPermaLink="false">http://dius.com.au/?p=2109</guid>
		<description><![CDATA[I live on a rural property, and a few years ago I thought it would be useful to build a prototype solar-powered camera that transmitted still images as fast as possible from various spots around the property. It didn’t need to be video, which would have bigger bandwidth and power demands, but just a still [...]]]></description>
			<content:encoded><![CDATA[<p>I live on a rural property, and a few years ago I thought it would be useful to build a prototype solar-powered camera that transmitted still images as fast as possible from various spots around the property. It didn’t need to be video, which would have bigger bandwidth and power demands, but just a still image that was maybe triggered by movement or time. I thought it would be fun to see what the chooks are doing during the day, for example, or more seriously whether wild dogs were coming on to the property at night. It had to be low power, small, cheap, and be able to form a robust radio network for getting data back to the house.</p>
<p>I did build an Arduino-based prototype that worked. I chose Wi-Fi for the radio, which was certainly fast enough, but consumed too much power to be powered by a small solar panel, couldn’t easily be configured as a mesh network, and was really expensive. I shelved the project for a while, and filled my spare hours building iPhone apps instead.</p>
<p>A few weeks ago I finished reading <em>Makers</em> by Chris Anderson and <em>Building Wireless Sensor Networks</em> by Robert Faludi (both excellent reads, by the way), and I was inspired to have another try at my solar-powered, mesh-networked camera node. This time I’m trying ZigBee radios (XBee Pro 50mW modules), which have a decent bit rate, consume very little power, can easily be configured to form a mesh network, and are certainly cheap. This choice also presents a nice opportunity to get my hands dirty with ZigBee, which plays a key part in <a href="http://percepscion.com">the products DiUS has built for the Smart Meter utility space</a>.</p>
<p>I thought it would be interesting to document my journey, and that will be in the form of a series of posts here on the DiUS web site.</p>
<p>I kicked things off by ordering some parts from Sparkfun.com. It’s a very useful and well-stocked site for building gadgets. Here’s what I needed to get started:</p>
<ul>
<li>1 &#8211; $29.95 &#8211; DEV-11021 &#8211; Arduino Uno &#8211; R3</li>
<li>2 &#8211; $81.90 &#8211; WRL-10421 &#8211; XBee Pro 63mW Wire Antenna &#8211; Series 2B (ZigBee Mesh)  ($40.95 ea.)</li>
<li>1 &#8211; $24.95 &#8211; WRL-08687 &#8211; XBee Explorer USB</li>
<li>1 &#8211; $3.95 &#8211; CAB-11301 &#8211; SparkFun USB Mini-B Cable &#8211; 6 Foot</li>
<li>1 &#8211; $1.50 &#8211; PRT-10007 &#8211; Arduino Stackable Header Kit</li>
<li>1 &#8211; $24.95 &#8211; WRL-10854 &#8211; XBee Shield</li>
</ul>
<p>I already had an Arduino Duemilanove on hand, which was the latest thing in 2010. Now the latest version is the Uno R3, so I ordered one of those. It’s interesting to see them side-by-side; the updated design of the Uno is a lot cleaner.</p>
<div id="attachment_2117" class="wp-caption alignnone" style="width: 650px"><a href="http://dius.com.au/2013/03/06/getting-my-hands-dirty-with-the-internet-of-things/img_0977-2/" rel="attachment wp-att-2117"><img class="size-full wp-image-2117" title="IMG_0977" src="http://dius.com.au/wp-content/uploads/2013/03/IMG_09771.jpg" alt="" width="640" height="252" /></a><p class="wp-caption-text">The Arduino Uno R3 (right) PCB is a lot cleaner-looking than the circa-2010 Duemilanove (left). One of the nice things about the Uno is it uses a ATMega16U2 for USB, which means my Mac&#8217;s OS X recognises it without extra drivers.</p></div>
<p>The Arduino IDE is now at version 1.0, and after a quick glance the software development environment is more mature and the libraries are richer.</p>
<p>There are heaps of different XBee modules from Digi to choose from, but I settled on the XBee Pro 50mW Series 2B with a wire antenna (the 63mW version is switched to the 50mW version for non-US markets). I wanted ZigBee for the ability to set up a mesh network, so that the radio network will have resilience in the case of node failure, and so that each node doesn’t need to be within range of the “home” node. It’s supposed to have a range of 1.5 kms line-of-sight, which should be enough to hop between nodes. The maximum data rate of 250 kbps is faster than previous version of the XBee modules, and I figure it should be enough to send small images if I’m not fussed how quickly they all come in.</p>
<div id="attachment_2111" class="wp-caption alignnone" style="width: 345px"><a href="http://dius.com.au/2013/03/06/getting-my-hands-dirty-with-the-internet-of-things/img_0976/" rel="attachment wp-att-2111"><img class="size-medium wp-image-2111" title="IMG_0976" src="http://dius.com.au/wp-content/uploads/2013/03/IMG_0976-335x343.jpg" alt="" width="335" height="343" /></a><p class="wp-caption-text">The XBee Pro 63mW module with wire antenna &#8211; Series 2B (ZigBee Mesh)</p></div>
<p>The XBee Explorer is really just a USB dongle that takes an XBee module and lets you talk to it over a USB port.</p>
<div id="attachment_2112" class="wp-caption alignnone" style="width: 345px"><a href="http://dius.com.au/2013/03/06/getting-my-hands-dirty-with-the-internet-of-things/img_0975/" rel="attachment wp-att-2112"><img class="size-medium wp-image-2112" title="IMG_0975" src="http://dius.com.au/wp-content/uploads/2013/03/IMG_0975-335x320.jpg" alt="" width="335" height="320" /></a><p class="wp-caption-text">The XBee Explorer</p></div>
<p>The XBee Shield is for connecting an XBee module to an Arduino board. It takes the analog (PWM) and digital pins through, and the power line as well. It doesn’t come with stackable headers on the board; they need to be ordered separately and soldered in.</p>
<div id="attachment_2113" class="wp-caption alignnone" style="width: 345px"><a href="http://dius.com.au/2013/03/06/getting-my-hands-dirty-with-the-internet-of-things/img_0974/" rel="attachment wp-att-2113"><img class="size-medium wp-image-2113" title="IMG_0974" src="http://dius.com.au/wp-content/uploads/2013/03/IMG_0974-335x250.jpg" alt="" width="335" height="250" /></a><p class="wp-caption-text">The XBee Shield with stackable headers soldered in. The trick for newbies is to get the headers sitting straight, which I almost managed to do.</p></div>
<p>The first part of the project will be to configure the XBee modules and just get them talking to each other. That’s what the <a title="Hands-on with the Internet of Things – Part 2" href="http://dius.com.au/2013/03/14/hands-on-with-the-internet-of-things-part-2/">next post</a> will cover.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://dius.com.au/2013/03/06/getting-my-hands-dirty-with-the-internet-of-things/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
