Posted by: Peter Quirk | January 21, 2009

Sensor networks and virtual worlds

There’s a surprisingly strong connection between virtual worlds and sensor networks. Many proponents of virtual worlds position them as mirror worlds — 3D canvases for visualizing what’s going on in the real world. The Eolus One initiative to model and control the energy consumption of a physical house in the virtual world is well-known to users of Second Life. The prototype, while interesting, doesn’t show how an individual might so the same thing with his/her house. Last year, the realXtend group shipped a virtual world platform that included sample code for controlling a device through an X10 controller. (See the X10manager download here and read the included readme.txt for instructions.) Although it contained no sample code for sensing X10 state, it’s easy to extend the code to read the state of X10 controllers.  With this platform running inside your house you could monitor and control many devices in your home.

But what if your goal is to measure the energy use of an entire community in order to change consumer behavior? There are many wireless and power line networks being implemented today by power companies to capture real-time energy data from homes. Unfortunately, some of these companies have no plans to share the data with you, your community or your government, nor to enable you to integrate other data nor to control your resource usage remotely. A good example of the arguments on both sides can be found in this correspondence (PDF) between Good Corporation on behalf of Direct Energy  and the Public Utility Commission of Texas.

All utilities are in the process of filing for increased tariffs (or have new tariffs approved) so that you bear the cost of the systems that help them delay the construction of new generating capacity. This presentation (PPT) by Freeman, Sullivan and Co. shows that Advanced Metering Infrastructure (AMI) can result in net savings to utilities (at least in Vermont) through reduced service costs, avoidance of meter reading, and improved response to storm damage. You have to wonder why we’re being asked to pay for these systems.

Enthusiasts around the world have been building energy monitoring systems for years. With the rise of the Arduino project (an inexpensive microcontroller project with an open design first released in 2005), numerous designs have appeared on the internet, in Make magazine, and have been produced in kit form or embedded in products. Arduino has competitors like Phidgets, offering a richer set of analog sensors and more capable software for a significantly higher price.

In the UK and Europe, the Current Cost Meter is a popular solution. Its serial interface enables one to capture total power usage and temperature and build databases of historical energy usage. The Current Cost Meter doesn’t provide you with any control and doesn’t fetch real-time pricing data from utilities.

So much for collecting data. What if you want to share the data with others in your community? There are two sensor networks of interest today, but like social networks, social data networks (SDNs) such as these will proliferate as entrepreneurs discover their power to aggregate audiences with specific shared interests and use them to sell products and services to them.

Sensorbase is an iteration of a data logging system developed by the Center for Embedded Network Sensing (CENS) at the University of California. (Sensorbase should not be confused with the Sensorbase database in the Hackystat system, an instrumentation project for collecting real world data about all phases of a software development project.) The new design addresses problems with earlier versions of the CENS data logging systems which were distributed but difficult to query in a correlated fashion. Sensorbase is built on star schema, enabling OLAP queries with common time and location dimensions and efficient aggregate queries. It’s quite easy to define a project, a table and upload CSV or XML data to through your browser. Data can also be published or fetched through HTTP POST operations from your favorite language. I haven’t found any examples yet of people connecting Sensorbase to Second Life, but it has been connected to Google Earth to visualize micro-climate data for the James Reserve, located in the San Jacinto Mountains east of Riverside, California.

Pachube (usually pronounced patch bay) grew out of its founder’s interest in “hacking” buildings to sense the built environment and display or control it remotely. Usman Haque, an architect with a deep interest in systems and performance art, spun out a business to promote what could be termed a Global Service Bus (in the style of an Enterprise Service Bus). Anyone can put data on the bus, and anyone can the consume the data. The current implementation (as of Jan 21, 2009) has limited support for history (only 24 hours), but the roadmap includes support for extended history. The original intent of Pachube was that it might become the YouTube of streaming data, in other words a deep repository of information that can be searched, embedded, tagged, etc.)

Pachube leads Sensorbase slightly in its integration with virtual worlds, and will likely pull ahead given the social thrust of Pachube versus the scientific thrust of Sensorbase. Code is available on the Pachube site for collecting and consuming data in Second Life. In the coming weeks, code will be published for connecting Pachube feeds to elements in Sketchup models, allowing visual representations of sensor data to be placed on Google Maps or in Google Earth. (Since Microsoft Virtual Earth also supports KML, it’s reasonable to think that the same models would work with little or no change on Virtual Earth.)

A third network, AMEE, is devoted to the very specific issue of aggregating the world’s carbon footprint. The AMEE network seeks to document the operational and upstream (associated with manufacturing, transportation and storage) carbon footprint of every object we use. The first AMEE/Second Life integration was a project called Carbon Goggles, a heads-up display that superimposed a dark gaseous cloud over objects being modeled in the virtual world.  The size of the cloud was proportional to the carbon footprint of an appliance or vehicle. Tish Shute has described AMEE and interviewed its founder Gavin Starks in a recent post. She also interviewed Andy Stafford Clark, creator of the Current Cost meter. 

Pachube and Sensorbase are serious competitors for the web portals associated with the Advanced Metering Infrastructure (AMI/AMS) being pushed by the utilities. For a start, you control who you share your data with. Secondly, you can integrate data that a power utility might not be interested in, such as water consumption, oil usage, wood fuel usage, propane, or caffeine. Thirdly, you can use these networks to remotely control systems in your home. Both are capable of feeding data to a PC or control system that controls appliances or thermostats. The commands could be posted by a standard SMS text message, a tweet from Twitter, or by an HTTP POST from a smartphone.

In coming posts I’ll explore the integration of these sensor networks with OpenSim, realXtend, Sketchup and Google Maps/Google Earth. If you’ve done something cool with sensor networks and virtual worlds or maps, I’d love to hear about it!



  1. […] integrations are a part of what  Pachube is about (also see Peter Quirk’s in depth post on the strong connection between virtual worlds and sensor networks), and an interest in home automation and energy management is giving a lot of early momentum to […]

  2. its a very good article for a start.

    I am working on these kind of things.
    1.Now i need your help regarding interaction of sensors with realXtend and to use java SDk with realXtend Viewer?

  3. I plan to publish an example of reading and writing sensor data with realXtend’s Python scripts soon. The pachube site includes an example of an LSL script in Second Life to read and write sensor data. This script also works in Opensim, but doesn’t work in realXtend due to the LSL compiler being a couple of months behind the one in Opensim. I am also working on the merged Opensim+realXtend (usign the modrex regionmodule for Opensim). If I can get this to function well enough, I’ll be able to use the LSL scripts wihout change.

    Don’t forget to examine the X10manager code (separately downloadable from It interacts with RCcore/ in the Pythonscripts folder.

    I haven’t looked into Java integration with realXtend. There are various possibilities that depend on the degree of coupling you require, and whether bi-directional data exchange is required. One possibility is to exchange Python objects in pickle format or XML format with another process running on Jython. Jython would give you access to the Java SDK. This approach would support bi-directional data exchange.

  4. Hi Peter,

    Kindly tell me the status of your about about reading and writing sensors data with realXtend

  5. I won’t respond to technical issues–I’d be of no help.

    I will add, however, that this type of application (as well as others I see here at your site) answer a question I get in presentations on SL: “What is the educational advantage of it?”

    Simulation is the “killer” use of SL and other VWs. Thank you for this post and for the comment on my Blog at the Times-Dispatch.

  6. Thanks for this great overview, and for your help to me, a novice in rex, yesterday. I’ve been working in Pachube toward a RL application in building and community monitoring – – and you can see a working Pachube link now in Homecamp sim, ReactionGrid. Please keep up the great coverage of sensors, VWs, and realXtend.

  7. I should add that importing a Sketchup model of the building we will construct (in order to simulate performance and monitor sensor readings) into OpenSim was the point of my failed exercise yesterday. But we are all getting closer.

  8. […] integrations are a part of what  Pachube is about (also see Peter Quirk’s in depth post on the strong connection between virtual worlds and sensor networks), and an interest in home automation and energy management is giving a lot of early momentum to […]

  9. I see this ability to pull data feeds and use them to recreate 3D simulations the next step to SCADA systems. My interest lies specifically with water and wastewater treatment & distribution, but it could also be extended in my field to traffic operations.

    The only place I have seen progress towards a true creation of a 3D SCADA system for these types of operations has been in Reaction Grid. And I agree that Pachube has been key to hosting and pushing out this data.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: