Tuesday, November 30, 2010

[Data Out] Barcodes!

Every Nimbits Data Point has a unique identifier; a UUID.  If the data point is configured to be public (the default) anyone can load it's current values, GPS data, and charts using a URL in this format:


This makes it easy to share your data, post to your Facebook wall etc.

Clicking the above link will load my reef aquariums temperature that i'm recording onto the cloud through an Arduino device. (Learn how I do that here). Since this data point is public, you can click on that link above and view it's data.

The Data Point is hosted on the public Nimbits server (app.nimbits.com). If you are running your own Nimbits server, the url is just your app ID in place of my nimbits1.appspot.com.

Now that every data point can be references using that format, it is easy to convert the url into a QR Bar Code:

That Bar code is contains the same information as the url above, just presented in a different format.  If you were to take your smart phone that was capable of reading bard codes, such as an Android Phone with Google Goggles, and point it at your screen right now, you would be able to browse right to this data point. 

There are many uses for this feature, such as printing out stickers to attach to real world objects that are having values fed into a Nimbits data point. I am seriously considering getting a tattoo of some of my more personal data points (kidding....sort of)

To get the Barcode and UUID of any of your Data Points

1. Log into Nimbits by browsing to http://app.nimbits.com (or your installation of a Nimbits server most likely hosted on yourappid.appspot.com)

2. Double Click on a data point or category and then select that point from the point settings menu.

3. The Point properties screen will show you the bardcode and a link for viewing that data using the UUID

Anyone can see this screen and data using this url or barcode


Saturday, November 13, 2010

Nimbits is an Open Source Data Logger

The Nimbits Development Team is pleased to announce that you can now Download your own Nimbits Data Logger Server to install and run on your Google App Engine account.

Nimbits is a free and social data logging service. By creating "Data Points" you can feed any values that change over time, such as a changing temperature or stock price, into that point for storage online. That point can then be visualised and shared using many open source software interfaces and processed using many built in features.

Nimbits also provides data relay services, triggered by schedules and data changes, Nimbits will relay new values to other URLs, Facebook, Twitter, or even another Nimbits Server instance.

Over the past several years, Nimbits has been an online resource for feeding time series data into Data Points. We're very excited to announce the completely open source version of Nimbits Server for download. All of the functionality you've been hearing about can now be further customised to meet your needs, and scaled to any level you desire.

Nimbits runs on Google's App Engine providing exceptionally high uptime and reliability, and automatically propagates your data over a global infrastructure.   A public version of Nimbits is available on app.nimbits.com, all of the functionality you have on the public server can now run on your own App Engine account. 

Learn more at www.nimbits.com

Monday, November 1, 2010

[Data In] Connect Arduino to the Cloud

Here is a fun project to log Arduino data directly to the Google Cloud using your local network without any middle tier. That is, your data goes right from the Arduino and then out to Google to be logged as a Nimbits Data Point.

You may want to download and setup a copy of the Nimbits Data Logger Server on your own app engine account. Learn More Here

Nimbits is a free, open source data logging server. You can use the public server (with some limitations) on app.nimbits.com or setup your own running instance.

The circuit is very simple and only requires an LM35 temperature sensor and three wires.  I went as far as to waterproof my LM35 by soldering it to the end of a cat5 cable and then sealing it in shrink wrap tubing. This is then connected to the ground, 5v and analogue pin 0.  There are many examples of this circuit online like this one: http://pscmpf.blogspot.com/2008/12/arduino-lm35-sensor.html

Here is mine using the Ethernet Shield and my waterproofed LM35

With the code below, i'm sending temp reading directly into a nimbits data point. Since Nimbits integrates into the google chart api, i'm able to generate all kind of charts with this data that I can then embed into emails, web pages, docs etc. Like this:

This chart really is the current reading from my Arduino device, since the image is being loaded from the Nimbits Chart Service.

Here is all of the Arduino code you need to feed your device readings into the Cloud.  You'll just need to modify the service url with your server secret (if you are running your own server) or make your point public, and provide an email and user key.

This code posts the temp reading to google with the host header nimbits1.appspot.com. If you are using the public nimbits server then you keep that. If you set up your own copy of Nimbits on your app engine account. You just replace nimbits1 with your app id.

Because we are proving the host header, we can send this request to google.com's IP and our request will be relayed to the correct service. From there, we can configure nimbits to relay out data to any other url, facebook or twitter.

#include <SPI.h>
#include  <Ethernet.h>
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte ip[] = { 192, 168, 1, 17 }; // a valid IP on your LAN
byte server[] =  {72, 14, 204, 104}; // Google.com or Appspot.com's IP
Client client(server, 80);
int pin = 0; // analog pin
int tempc = 0,tempf=0; // temperature variables
int samples[8]; // variables to make a better precision
int i;

void setup()
  Ethernet.begin(mac, ip);
void loop()
  for(i = 0;i<=7;i++)
    samples[i] = ( 5.0 * analogRead(pin) * 100.0) / 1024.0;
    tempc = tempc + samples[i];
  tempc = tempc/8.0;  
  tempf = (tempc * 9)/ 5 + 32; 
  tempc = 0;
  String s = String(tempf,DEC);
  if (client.connect()) {
     client.println("GET /service/currentvalue?value=" + s + "&point=test&email=bsautner@gmail.com&format=double&secret=yournimbitssecet HTTP/1.1");
     client.println("Host:nimbits1.appspot.com");  //here is your app engine url - app id with appspot.com

[Data Out] Nimbits integrates into the Google Chart API

You can generate countless types of charts using the Google Chart API Service.  Check out the enormous options here: http://code.google.com/apis/chart/

Nimbits is deeply integrated into the Google Chart API.  Outside of Nimbits,  you can load a chart from the google api using a URL that contains the chart types, format and data. Like this:

You can even generate things like bar codes with your data like this (and much much more): 

As you feed time series data into a Nimbits Data Point, you can also call a web service with the same parameters you would feed into the Google Chart API. Instead of the data parameter cht=t:12,34,34 (for example) simply provide a point name and your Nimbits Authentication information, calling the Nimbits Service instead.  http://app.nimbits.com/service/chartAPI

Nimbits will tack on the data from your points to the request you are making and deliver your chart as a PNG image. This means you can embed your Nimbits Data in a web page, document or anything that can load an image from a URL. 

Here is a sample URL for a line chart using the google api directly

If you load that URL in a browser you'll see: 

Notice the chd=t parameter. The Numbers next to it are the values that go into the chart. You can provide the same chart format parameters to the Nimbits chart service, but include a data point name and your credentials and you'll get the same chart but with live data from your Nimbits Data Point. 

Here is a live chart of the temperature of my aquarium that feeds into my TempF data point:

This really is the live feed from my aquarium right here in my blog! Check out how I do this using Arduino.  I set up the TempF point to be public, so everyone can see it. 

How this works: When you pass Google chart api parameters into the Nimbits service, Nimbits tacks on the chd:t parameter with your data point's values and then feeds you the chart you requested. The visualization possibilities are endless.