David Kirwan - 00346128 Supervisor: Eamonn de Leastar
The Ardtweeno system is a distributed sensor mesh network gateway, which bridges devices connected through a serial link to devices over Internet Protocol (IP). It is designed as a PaaS suitable for running on the Raspberry Pi.
Ardtweeno offers the following features
The Ardtweeno API has the following features
Ardtweeno makes use of some of the following technologies
When directly connected to the Ardtweeno Gateway, users are greeted with the following screen. It shows a basic interface including URI's to the gateway git repository, my blog and a simple indicator to tell if the SerialParser subsystem is running or not.
The HTTP front end acts as the API for the Ardtweeno system, which the SerialParser subsystem uses in order to post data to the gateway.
The following Ruby code demonstrates how easy it is to post packet data to the Ardtweeno gateway through the API
require 'rubygems'
require 'typhoeus'
packet = '{"data":[25.5, 999, 10.2], "key":"abcXYZ123etc"}'
apikey = 'abc33fssfe'
Typhoeus::Request.post("http://ardtweeno-hostname/packets",
:body => {:payload => packet, :key => apikey})
The following Ruby code demonstrates how easy it is to retrieve packet data from the Ardtweeno gateway through the API
require 'rubygems'
require 'typhoeus'
apikey = 'abc33fssfe'
paramsToSend = {:key => apikey}
packets = Typhoeus::Request.get("http://localhost:4567/api/v1/packets",
:body=> paramsToSend).body
The following Ruby code demonstrates how easy it is to retrieve node data from the Ardtweeno gateway through the API
require 'rubygems'
require 'typhoeus'
apikey = 'abc33fssfe'
paramsToSend = {:key => apikey}
nodes = Typhoeus::Request.get("http://localhost:4567/api/v1/nodes",
:body=> paramsToSend).body
The following Ruby code demonstrates how easy it is to retrieve zone data from the Ardtweeno gateway through the API
require 'rubygems'
require 'typhoeus'
apikey = 'abc33fssfe'
paramsToSend = {:key => apikey}
zones = Typhoeus::Request.get("http://localhost:4567/api/v1/zones",
:body=> paramsToSend).body
The following Ruby code demonstrates how to retrieve the Ardtweeno status through the API
require 'rubygems'
require 'typhoeus'
apikey = 'abc33fssfe'
paramsToSend = {:key => apikey}
zones = Typhoeus::Request.get("http://localhost:4567/api/v1/system/status",
:body=> paramsToSend).body
The following Ruby code demonstrates how easy it is to retrieve the Ardtweeno Gateway Configuration through the API
require 'rubygems'
require 'typhoeus'
apikey = 'abc33fssfe'
paramsToSend = {:key => apikey}
zones = Typhoeus::Request.get("http://localhost:4567/api/v1/system/config",
:body=> paramsToSend).body
The following Ruby code demonstrates how to start the Ardtweeno SerialParser subsystem through the API
require 'rubygems'
require 'typhoeus'
apikey = 'abc33fssfe'
paramsToSend = {:key => apikey}
zones = Typhoeus::Request.get("http://localhost:4567/api/v1/system/start",
:body=> paramsToSend).body
The following Ruby code demonstrates how to stop the Ardtweeno SerialParser subsystem through the API
require 'rubygems'
require 'typhoeus'
apikey = 'abc33fssfe'
paramsToSend = {:key => apikey}
zones = Typhoeus::Request.get("http://localhost:4567/api/v1/system/stop",
:body=> paramsToSend).body
The following Ruby code demonstrates how to restart the Ardtweeno gateway through the API
require 'rubygems'
require 'typhoeus'
apikey = 'abc33fssfe'
paramsToSend = {:key => apikey}
zones = Typhoeus::Request.get("http://localhost:4567/api/v1/system/restart",
:body=> paramsToSend).body
The following Ruby code demonstrates how to add a node2 to a watchlist through the API
require 'rubygems'
require 'typhoeus'
require 'json'
body = {:key=> "1230aea77d7bd38898fec74a75a87738dea9f657",
:notifyURL=>"",
:method=>"POST",
:timeout=>"60"}
puts Typhoeus::Request.post("http://localhost:4567/api/v1/watch/node2", :body=>body)
The space that I currently see Ardtweeno occupying is a platform as a service on top of which developers can produce home automation systems, very much like a locally running version of Xively or perhaps Nimbits. Ardtweeno has the ability to receive packets of information, then store them for later analysis and graphing much like these propriety systems mentioned.
I have constructed a number of basic systems using data gathered by the Ardtweeno gateway, such as the following punchcard graph which details the number of times the movement sensor platform picked up activity in my sitting room
This topology graph which parses the data retrieved through the API and dynamically constructs a topology of the network
There are various other types of graphs and charts built using highcharts.js
To see these and more, see the tech-demo Sinatra web application bundled with the Ardtweeno system
Built using reveal.js