Urban media experience – audiovisual, mobile and network media in the production, consumption and experience of places;
Sensity
Main project URL
http://www.stanza.co.uk/sensity/index.html
Sensity artworks are made from the data that is collected across the urban and environment infrastructure. I have two networks of sensors which collect data, all this is then published online. The sensors interpret the micro-data of the interactive city. The output from the sensors display the “emotional” state of the city online in real time and the information is also used to create offline installations and sculptural artworks.
Several artworks have been made, and several new physical cities are in development for 2009.
To do lists…
2009
Incorporate with my twelve robots and make max/msp tracker version – done
Incorporate with my twelve robots and gps tracker version – done
Incorporate with my twelve robots and live cctv data capture – done
Interface to processing also – done.
Stablise XML feeds and sort a cache – done
2008
I now have real time online data system working, and another motes kit with GPS.
NOTES for me.( for moteview set up on samsung laptop)
motes mts420 GPS
MIB 520
COMM 9
MTS310
MIB 510
COMM 5
xml formating…done
online php… done
get new kit iris motes and test and set up…done
work towards feedback system and output…done
incorporate gps into output display.
finish motereader for online realtime data collection version 2
To do lists…2007
resize to 1024 by 768
makes sure buttons work on mac also
save this version
start new version
Put bubble gum effects on each sensor node reacting to values
zoom feature to zoom onto specific sensors.
move sensors and save new position.
import and save new background image.
Sounds Whats Can Be Done?
Simple flash engine
Director into flash sound engine – done
Java based sound engine
Flash google maps – done
Max msp sounds engine interpreting the data - done
Archiving
xml saving and clearing cache - done
how to save xml in flash or pull from database and import previous version. ie replay data along timeline.
replay hour between this hour and that
Other Sensors
GPS on the sensor for location and movement
Also other hrz ranges.
Get mica 3 ready plus GPS boards.
Pollutions sensors co2 etc?
HardwareI have MTS300CA light / temp / acoustic boards.
Can I put more sensors on this board, if so which ones.
Do I solder them on or can the boards be sent.
Second demo
Lilford Road Sensity Loci. ie version 3 online
London as a whole. Sensity Globi. test online. Needs more hardware.
Nat rule entrries.
Setting up nat rule entries
Ip name it = ppp-o
Rule flavour rdr
Protocol tcp
IP local to ip loical from
ie 192.168.7.13
the other things should be 0.0.0.0
from
desination point to from 9005
local 9005
and if more than one system then need to add another port ie from 9004 to 9005
TECH ISSUES TO SOLVE
—————————————————————
xml to my server space live
Question:
—————————————————————
How do you get the xml out from the sensors to go online in real time. I have the sensor net working and I can save as XML …However I want this to be live real time to my website. Please explain proceedure for setting this bit up.
Stanza image. Sensity data is live and displayed on Pufferfish Display
—————————————————————
The XServe offers limited web interface functionality. The future version will have fully web-enabled interface allowing sensor data also available from web browser.
If you need something before that, you can do what we would do in the new architecture. You can log the data to database, and then use a cgi script in the web server to read the live xml or go to the database and retrieve current data and then display it on a web page. This requires some cgi development, but there is not a switch you can turn on that does this.
One of the things you need to realize, and this is the reason we are taking some time to get this feature in the product, is that web pages requests for a set of data. Web pages are not made for streaming data, which is why realtime music player and flash as applications you need to install on your machine before you get those features.
So with the cgi script mechanism you can make requests from the database for the last X min/hours/days of data to display, but it will not be a screen that just keeps updating itself in real time.
From Nat
You have to write a script to generate XML from the data stored in the database. There are lots of technologies that can do this. PHP is one of the most popular, it can talk to the PostgreSQL database and is usually installed by default when you
install the Apache webserver. Serving the data over HTTP is much easier than doing it by FTP.
Based on what you said the loads on the server will be very low, so apache and PHP will easily cope with the demand. If the load ramps up to a huge number of hits (e.g. you get slashdotted), then we can look into scaling the app horizontally by running multiple web servers, clustering the database and putting in some caching, but I
don’t expect we’ll have to do anything that complicated.
The frequency at which clients poll for data from the web server should be driven by the rate at which data is sent back by the motes, not by the frequency of the animation. There’s no point in clients requesting sample data many times a second if the motes only generate it every 30 seconds, for example. That will also help reduce the load on the server. It will also allow data to be cached in ISPs web caches closer to the clients, again taking load off your server.
——————————————————————————–
early processing code version 1 2006
import org.jdom.transform.*;
import org.jdom.output.*;
import org.jdom.xpath.*;
import org.jdom.input.*;
import org.jdom.filter.*;
import org.jdom.*;Document data;void setup() {
//data = readXml(“http://www.stanza.co.uk/mote/mote.xml”);
data = readXml(“C:\\Documents and Settings\\6070\\Desktop\\mote\\mote.xml”);
java.util.List results = data.getRootElement().getChildren();
println(“number of results = ” + results.size());
for (int i=0; i < results.size(); i++) {
Element result = (Element) results.get(i);
java.util.List subList = result.getChildren();
int nodeId = -1, voltage = -1, mag = -1;
for (int j=0; j < subList.size(); j++) {
Element grandChild = (Element) subList.get(j);
if (grandChild.getName().equals("nodeid")) {
nodeId = Integer.parseInt(grandChild.getText());
}
else if (grandChild.getName().equals("voltage")) {
voltage = Integer.parseInt(grandChild.getText());
}
else if (grandChild.getName().equals("mag")) {
mag = Integer.parseInt(grandChild.getText());
}
}
println("got a result, node_Id = " + nodeId + ", at half voltage " + (voltage / 2) + ", with magnitude = " + mag);
}
}void draw() {
}Document readXml(String urlOrFilename) {
try {
Document doc = null;
SAXBuilder builder = new SAXBuilder();
builder.setExpandEntities(true);
if (urlOrFilename.startsWith(“http://”)) {
URL url = new URL(urlOrFilename);
doc = builder.build(url);
}
else {
doc = builder.build(urlOrFilename);
}
// if we get here, it ran correctly
return doc;
}
catch (Exception ex) {
// if this runs, we’ve failed…
println(“We’ve failed to read the XML from ” + urlOrFilename);
return null;
}
}
———————————————————————
Second processing code version 1 2008 importing real time from my moteproxy for the 420 series.
/*
This example loads a xml file and prints it.
*/
import proxml.*;
XMLInOut xmlIO;
void setup(){
size(750,750);
xmlIO = new XMLInOut(this);
}
void draw(){
xmlIO.loadElement("http://igor.gold.ac.uk/motes/mts420/motestatusxml.php");
delay (1000);
}
void xmlEvent(proxml.XMLElement root_node){
proxml.XMLElement[] children = root_node.getChildren();
int x=10;
for(int i = 0; i < children.length;i++){
proxml.XMLElement child = children[i];
proxml.XMLElement[] elements = child.getChildren();
for (int n=0;n") == 0){
println(Integer.parseInt(element.firstChild().getText()));
rect(100+x,100,20,Integer.parseInt(element.firstChild().getText())/2);
x =x+20;
}
}
}
}
——————————————————————
$ make mica2 install mib510,/dev/ttyS6———————————————————————
Other Sensors.
Our pollution sensor is a dual sensor, one of them sensing oxdizing gases, the other one sensing reducing gases.Reducing gases:
Reducing gases include, Carbon Monoxide (CO), Carbon Dioxide (CO2) and Hydrocarbons.
Our sensor targets CO specifically, but will also pick up “noise” from other reducing gases. Oxidizing gases:
oxidizing gases include Nitrogen Oxides (NOx) and Volatile Organic Compounds (VOC’s).
NOx includes: nitric oxide (NO), nitrogen dioxide (NO2), nitric acid, nitrous oxide and nitrates.Our sensor is rated to sense the entire family of nitrogen oxides, but specifcally targets NO2.It will also pick up “noise” from the presence of Volatile Organic Compounds. VOC’s are chemical compounds present in glues, silicon, cleaning materials and other household items.We purchased our sensor from micro-chemical in switzerland. Note that this sensor is primarily used for automotive applications and we had to follow special calibration procedures in order to adapt it to our application.Other Sensors..

