Thursday, December 30, 2010

Nimbits REST API and SDK

You can develop your own software using any platform or programming language you like, and use a Nimbits server as a back end for storing your time series data; taking advantage of all of Nimbit's services.

Most of Nimbits' functionality can be accessed using a REST API Interface and making simple HTTP post, get, put and delete requests. Nimbits supports using a secret key, OAuth, OpenID and Google Authentication.

Documentation on the REST API is available on the Nimbits Server Source Code page on Google Code under featured downloads:

 https://code.google.com/p/nimbits-server/

Taking this a level down, I have a Java Jar file that all of our java based client apps use (including the Android App). This project: Nimbits4J.jar has all of the code needed to authenticate a request with Google, and make requests to Nimbits such as getting a current value, recording values, getting charts, history, creating points etc.

The source code for Nimbits4J is available here:

http://code.google.com/p/nimbits4j/

We do have a .net client package as well but it's not posted for download. If you'd like to get your hands on the .net client for Nimbits, just ask and we'll help you out.

Happy Coding

Friday, December 17, 2010

[Data Out] Data Logging output on Twitter

You can configure a Nimbits time series data point to send a tweet on your twitter account each time it is written to or when it is in an alarm state.  This means that any changing time series value you are recording into Nimbits (be it through a web service call, the API, on your phone etc) the new value will get broadcast through your twitter account.

Since tweets add a hash # flag to your point name, it's easy to see all of that point's tweets just by clicking on it. You can also view #Nimbits to see everyone else's tweets!

To do this, just log into http://app.nimbits.com and click on the "Enable Twitter" menu option on the top. This will direct you to twitter.com where Nimbits is a registered application. Log into Nimbits and authorize the app to post to your twitter account. You'll then be directed back to the Nimbits Portal and you'll be ready to go.

Double click on the point and select the properties menu where you'll see the options to enable tweeting whenever a value is recorded or when the point is in alarm. 

Record a new value and you'll see the message appear on your twitter feed! 

You can also have Nimbits Send you an instant message, post to facebook or email you as your data changes.



Wednesday, December 15, 2010

Nimbits Android Update

We're excited to release a major upgrade to the Android Interface for Nimbits Data Logger. You can download the Nimbits Android App to your phone by visiting the Android Marketplace and searching for Nimbits or Data Logger.

Nimbits Server provides powerful data logging services for recording your time series data into Data Points stored on a global cloud computing infrastructure. The Nimbits Android App provides a window into your data allowing you to:

  • Create Data Points and Categories
  • View Charts and Snapshots.
  • View GPS data on maps.
  • Record New Values. 

Many developers are using our free and open source code to write their own interfaces to feed data from devices into Nimbits Data Points and then monitor those devices from Android.  If you still want to access your data but your phone isn't running Android, you can update and retrieve current values using most instant messenger clients.

Besides using a local database to improve performance, gesture recognition to fling between screens, the latest version has the following enhancements:

1. Switch between Nimbits Servers.  

There is a free, public server on app.nimbits.com you can use to create and manage data points and feed your low impact data into. If you want, you can also build your own Nimbits Server by downloading and installing the package from www.nimbits.com.  If you are running your own Nimbits Server, the Android interface can be configured to use it instead. You can even jump between multiple servers. Please note that the latest version of the App requires Nimbits server 3.0.5 or higher.


 2. Alarm Flags

You can log into a Nimbits Server and set alarms for points. A point can be either high or low. Now, you can see points that are in an alarm state with a red (high) or blue (low) flag.  For example, these 5 Radon meters, with one over the safety limit.


3. Better Charts

Deep integration into the Google Chart API  means the sky is the limit on visualizing your data. We have some exciting new features on the drawing board that will allow you to customizes the way your points are displayed on your phone i.e bar, pie, scatter charts etc. In the meantime, here is one cool chart:


Also, the charts now auto-refresh every 10 seconds.

4. Hey, Developers

All communication between the Nimbits Server and the client code on the phone is done using the Nimbits4J.jar - which is published as open source software on http://code.google.com/p/nimbits4j/

Nimbits4J is a Java library that simplifies Authenticating the Android App to Google, and calling the REST API. This just means I've done most of the work for you for writing the client apps to get recorded values, create points etc.  A Nimbits server can be coded against in any Language using the REST API services documented under featured downloads on the Nimbits Server Download Page.

Thursday, December 2, 2010

Nimbits 3.0.4 is live

Nimbits Server, running on http://app.nimbits.com is now running version 3.0.4 and that version is also available for download.  The archive NimbitsServer-3.0.4.zip and the installation instructions are listed under the featured downloads on the source code repository 


In this release:


Enjoy!

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:

http://nimbits1.appspot.com/?uuid=96c55c29-d60f-42a1-82a9-98d8a76960bd

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



Enjoy!

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);
  Serial.begin(9600);
}
void loop()
{
  for(i = 0;i<=7;i++)
  {  
    samples[i] = ( 5.0 * analogRead(pin) * 100.0) / 1024.0;
    tempc = tempc + samples[i];
    delay(1000);
  }
  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
     client.println("Accept-Language:en-us,en;q=0.5");
     client.println("Accept-Encoding:gzip,deflate");
     client.println("Connection:close");
     client.println("Cache-Control:max-age=0");
     client.println();
     client.stop();
  } 
 
} 
 
Enjoy! 

[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.





  

Saturday, October 30, 2010

[Data In / Out] Pushing and Pulling Data with URL Fetch

A Nimbits Data Point represents a thing, such as a temperature probe, stock price, anything. That point can become part of a system of connected objects, it's value can be used in calculations, alarms, triggers or anything else.

Further, when you make a data point public. It can be found on the Nimbits Data Point Search Engine so other users can connect their points to yours. If you wish, any http capable data logging system you have can be easily connected to the Nimbits Cloud using this method.

A Data Point can be configured to either push or pull (HTTP GET or POST) to a specified url on on a schedule or as an event.   URL Fetch is an app engine service, take a look at Google's guide to this for more details.

To familiarize yourself with this, try logging into the public Nimbits server on http://app.nimbits.com and create a new data point.  Double Click the data point to bring up its data screen. Then, use the Point Settings Menu to bring up the properties of this data point.



There is a tab for selecting URL Fetch Settings:



With these options, every time a program requests the current value of a data point, it can be configured to attempt to pull a new value from the source URL.   If you are hosting your own Nimbits Server on App Engine, you can set yourself up to fetch a new value on a schedule using CRON

That source url can be anything, a server on your network (with the ports open on your firewall). It can be a call to a Nimbits web service requesting the current value of another point. You can use the Nimbits Data Point Search Engine to find public points on other Nimbits Servers and pull that data into your system.

The relay service will take whatever value is written to that point and do an HTTP Get to the specified URL with the current value included in the parameters.  This way, a newly recorded value can act as a trigger to call another URL, triggering further events. 

Please note the caveat that fetch events occur when a new value is actually recorded, which means the value falls out of any compression tolerance settings you configured for a point. Typically, Nimbits only records new values.  If the same number sent into the system over and over it is ignored and will not trigger an event. 

When a URL is fetched, Nimbits is expecting a raw number value in the result. HTTP headers are ignored, there shouldn't be any HTML or XML.  If you load the URL browser, you should only see the number value. You can also provide a full JSON representation of a value object, which can include text annotations, GPS Coordinates, and a timestamp:

{"lat":0.0,"lng":0.0,"d":104.0,"note="hello world","timestamp":"Oct 29, 2010 9:48:28 PM"}

If this is what Nimbits pulls from your URL in a fetch, it would record the value 104.0 to the point with this timestamp with "Hello World" in the note annotation.


Thursday, July 29, 2010

Deep Dive: What is a Data Point

In Nimbits, everything revolves around a Data Point. A Point represents a single collection of time series data. A single temperature reading and any single value that changes over time.  

Your personal collection of data points are connected to the account you were logged in with when you created them.

To create a new Data Point, simply log into Nimbits and select Green Plus sign in the data point tree. You'll be prompted to give the point a name. When a point is created, it is initialized with a zero value at the time of it's creation UTC.


From there, you can double click on that point to view it's chart, map, gauges and anything else. Also, a drop down menu is available to configure the point's properties.




Here is an overview of some of the more important properties a point can have:


Compression

As a value is recorded into a Data Point, the Compression value is referenced. Nimbits only records changes in values. So if a Data Point has a current value of Zero (0) and a Zero value is recorded, there will not be two zeros in the database, the new value will be ignored since the value has not changed.

If a Data point has a compression setting of 1 (One) and a current value of 3.14 and a new value is entered of 3.5, the value will be ignored. Only values that are higher or lower than the current value +/- the compression setting will be recorded as new values.

A Compression setting of 5 and a current value of 100 will ignore all recorded values  less than 105 and greater than 95.  A if the value 106 is recorded into the same point, future recordings less than 111 and greater than 101 will be ignored.

Alerts

All data points can be configured to send alerts.  Set a high and/or low value in the alert settings and turn the high or low alert on and any recorded value greater than the high alert or lower than the low alert will trigger an email to the owner of that point.

Calculations

When a data point is written to with a new value, the event of recording a value can trigger a calculation. The formulas basic arithmetic will be executed and the resulting value will be recorded into the target point – all compression, alerts and other functionality will then be executed.

A Data Point can be a trigger, parameter or target for a formula.

If a point is a trigger and a new value is written to it (see the record value diagram – the new recording must be outside compression settings etc) the formula assigned to that data point will be executed. Usually, the trigger data point is also the X parameter in the formula.

After the formula executes successfully, the resulting double value is stored in the target point and all Record Value settings are processed (Such as Alerts, Compression etc)

Example
A Point is created that has a temperature of degrees F being record to it. The point is set to be a trigger and is also the X variable in this formula (X-32)*(5/9) which is the formula for converting F to C.

A New Data point is created for storing the result of this formula and is then set as the target for this formula in the F Point’s settings. Now, each time the F point is written to, this formula will be executed using the new value as the X Parameter and the result will be stored in the new C Point.  


[Date In] Logging Text Data


Throughout the Nimbits System we've added support for logging text and GPS data along with each value you record.  When you record a value to a data point, that value has a time stamp and numeric value. Such as a Temperature reading of 80 degrees at a specific moment in time. Now, each recorded value can also have a text based note and GPS location coordinates recorded with it.

Every day, when I go jogging, I stop at the end to record how far I jogged in Miles using Nimbits for Android. on my phone. With these new features I also can add some text such as where I was Jogging to produce a chart like this one on the Nimbits Portal:



I like to annoy my friends with this information, so I configured my data point to post new values to twitter and Facebook, producing a wall post like this the one below each time I record a value. Coincidently, my data point that tracks a servers backup time was also posted next to my jogging post, so i'm including that here too:



On my Phone, I'm capturing GPS Location coordinates. Those can be recorded to the data point as well, producing a display of point data on a map like this:



Nimbits is now a full featured GPS Data Logger for text and numeric data. Enjoy!

Nimbits For Android 2.0 Released!

Nimbits is a General Purpose Data Logging System for any values that change over time. It allows you to record text or numeric data into "Data Points" so that data can be shared, charted, calculated against and visualized from anywhere in the world.

We're proud to announce a new release of the Nimbits Android App that is now available for download on the Android Marketplace. It's build on Android 2.2 (Google API 8) so if you do not see it listed in the marketplace when you search for "Data Logger" or "Nimbits" perhaps you need to update your phone's OS.

Version 1.0 of Nimbits simply allowed you to view existing points you created on the Nimbits Portal. Besides the cosmetic enhancements to the interface, Version 2 allows you to:   
  • Create New Points and Categories on your phone
  • View your points on Google Earth (if they have GPS coordinates)
  • Record values to data points (both numeric and text) using your phone
  • Use your phone's GPS unit to record the location on earth of your data entry. 
  • Enhanced account authentication uses your phone's credentials to log into Nimbits; you do not need to enter your Google account and password. 
  • Better performance by caching points on your phone's local database.
We're very happy with the way the app can use the Google credentials on your phone to authenticate to the Nimbits cloud instead of requiring you to log in with your credentials.

Nimbits has grown beyond simple numeric data logging into a full featured GPS Data Logger. You can use your phone's GPS to assign coordinates to your readings as well as log textual data with your entries. That data will show up on your Nimbits Portal, Google Earth etc.

An example making use of Nimbits' GPS Logging capabilities can be demonstrated with these data points that are logging Radon levels in the basement of several homes. Each Radon Monitoring device feeds data into a Nimbits Data Point. Each Data Point is configured with an Alarm Setting of 4.0 or higher. Further, each data point has GPS coordinates set to the location on earth where the monitor physically is located.

Using my Nexus One phone I can see the current values of my Data Points. Here, I also pressed the menu button to show what options are available on this screen:



I can select an individual point to manually log a new value and see a thumbnail chart:


The GPS Enabled message means that when I record this value, the current physical location of the phone be recorded with the current value, and the data point itself will be set to that location.  I can now see my changes on the map with the points that are in an alarm state shown in red.


We may want to check on the people living in the house with a radon reading over 6!  (this is of course for demo purposes)

I hope you get some use out of the Android App, and please let me know if you have any questions or comments.





Friday, July 16, 2010

[Data In] Connect Arduino to Nimbits Data Logger

It's very easy to have an Arduino device feed data up into the Nimbits Data Logger cloud. This is a fun and simple example where a push button that is wired to an Arduino board sends the fact that it was pressed to a listening .net program.  In this example, every time the push button (my house's doorbell) is pressed, a Nimbits data point gets updated and the event is broadcast on Twitter and Facebook.


This is a simple example to give a basic understanding of how to send output from an Arduino device to Nimbits Data Points.

Make sure you log into Nimbits and create a data point. In this example, my data point is called "doorbell".

Double click on the data point and edit it's properties from the menu on the top left. Here is where you can set  the point up to broadcast new values to twitter, facebook or to send you an IM. Make sure you use the menu items to enable these features on your account.



The Circuit

The circuit is right out of this tutorial on the Arduino Home Page: http://www.arduino.cc/en/Tutorial/Pushbutton

The Arduino Code:

A small mod to the code on the sample page will wait until the button is pressed and released before sending the "Ding Dong" message up the serial (USB) connection.


int inPin = 7; // choose the input pin (for a pushbutton)
int val = 0; // variable for reading the pin status
boolean pressed = false;

void setup() {
Serial.begin(9600);
pinMode(ledPin, OUTPUT); // declare LED as output
pinMode(inPin, INPUT); // declare pushbutton as input

}

void loop(){

val = digitalRead(inPin); // read input value
if (val == HIGH) { // check if the input is HIGH (button released)
if (pressed)
{
//must have just been release
pressed = false;
Serial.println("Ding Dong");
}
digitalWrite(ledPin, LOW); // turn LED OFF
} else {
pressed = true;
digitalWrite(ledPin, HIGH); // turn LED ON
}
}



The Windows Program.

You can download Visual Studio 2008 Express to write this simple console application. Create your new project and add the NimbitsSDK as a refrence.  [Download the Nimbits SDK] [Source code]

The SDK simplifies logging in securely with your google account.

Now it's just a matter of running this code to monitor our com port. You'll need to add the credentials you used to log into nimbits, the target data point, and the com port your Arduino is on.:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO.Ports;
namespace NimbitsDoorBell
{
class Program
{
static SerialPort ComPort;
private static string PortName = "COM4"; // Check device Manager for Port Number
private static NimbitsSDK.client SDK1 = new NimbitsSDK.client("example@gmail.com", "password");
private static String pointName = "doorbell";
private static int timesPressed = 0;

static void Main(string[] args)
{

ComPort = new SerialPort(PortName, 9600);
ComPort.Parity = Parity.None;
ComPort.StopBits = StopBits.One;
ComPort.DataBits = 8;
ComPort.DataReceived += OnSerialDataReceived;
ComPort.Open();
while (true) { }

}
public static void OnSerialDataReceived(object sender, SerialDataReceivedEventArgs args)
{
string data = ComPort.ReadLine();
Console.WriteLine( data);
timesPressed += 1;
SDK1.RecordValue(pointName, timesPressed, DateTime.Now, "Doorbell Rang");
Console.WriteLine("Ding Dong" + timesPressed);
}
}
}



That's it! Now every time the button is pressed nobody will be out of the loop!

Monday, June 28, 2010

Nimbits as a Parallax Data Logger

This post will walk you through how to get a value from a Parallax Basic Stamp (BS2) micro-controller and feed it into the Nimbits Data Logger cloud using a bit of C#.

Your reading from any number of Parallax sensors can then be viewed in a Visio Diagram, Spreadsheet, and your Android Phone. You can even have alerts or current readings posted to your Facebook Wall.   Remember, your data is being fed up to the Google App Engine Cloud computing platform, so the data being fed up from your computer's USB port can be accessed from anywhere in the world.

If you're not familiar with Parallax Micro-controllers check out  http://www.parallax.com for some amazing sensors and robotics projects.

I'm not going into how to actually build a sensor. I'm assuming the audience here is already familiar with stamp programming.  The sample code I'm providing here shows the basics of pumping a value from a Parallax Board of Education out a the serial port which is then read by a .net client program running on the computer the stamp board is connected to.

When I tested out this tutorial, I had my old "Board of Education Development Board - Serial Version", connected to my Windows PC using a serial to USB converter.  Parallax also carries a USB BOE now as well.

I was also had a spare BASIC Samp 2 Module.

Step 1 Setup your Data Point

  • Log into app.nimbits.com directly or through Facebook by visiting apps.facebook.com/nimbits
  • Create a new Data Point by clicking the + symbol on the tree. 
  • Name the data point whatever you like. 
  • You can double click the point from here and configure it's settings. Set up a calculation you'd like it to execute, compression settings etc.


Step 2 Setup your stamp 


  • After setting up the hardware mentioned above. Download the Stamp Editor from Parallax's web site: http://www.parallax.com/tabid/441/Default.aspx
  • The COM Port my BOE is on was Com 3. Make a note of what port your stamp is actually on.
  • The .Net code i'm going to provide in Step 3 will receive any number coming up that port that your Stamp Module is sending as a DEBUG message. Here is a snippet of PBASIC code that will send a debug message with number 42 (my favorite number). For this demo, that's all i'm going to do - but that number can of course be a reading from any sensor code you have in place:
' {$STAMP BS2}
' {$PBASIC 2.5}

DO
DEBUG DEC 42
PAUSE 1000
LOOP
END

Step 3 Feed whatever value the Stamp is sending up to Nimbits

  • With this code tokenized to your stamp module, the stamp should now be sending the number 42 up the wire. The next step is to grab the reading and feed it up to the Nimbits Cloud
  • This code is very simple, it uses the Nimbits SDK to authenticate you to Google's infrastructure.
  • In Visual Studio 2008 or Higher, create a new C# Console Application project. 
  • Download the Nimbits SDK 
  • The NimbitsSDK is a .Net 3.5 assembly. Simply add it as a reference in your project.
  • The NimbitsSDK source code is also available on Google Code.
  • Add this code to your project. Change the PointName and PortName to your settings
  • Change the email and passwords that match the account you logged into Nimbits with.

using System.IO.Ports;
namespace TempProbe1
{
class Program
{
static SerialPort ComPort;
private static string PointName = "ParallaxPoint1";
private static string PortName = "COM3"; // Check device Manager for Port Number
private static NimbitsSDK.client SDK1 = new NimbitsSDK.client("example@gmail.com", "password");


static void Main(string[] args)
{


ComPort = new SerialPort(PortName, 9600);
ComPort.Parity = Parity.None;
ComPort.StopBits = StopBits.One;
ComPort.DataBits = 8;
ComPort.DataReceived += OnSerialDataReceived;
ComPort.Open();
while (true) { }


}
public static void OnSerialDataReceived(object sender, SerialDataReceivedEventArgs args)
{
string data = ComPort.ReadExisting();
double v = Double.Parse(data);
SDK1.RecordValue(PointName, v, new DateTime());
Console.WriteLine("Recorded a new value! " + v);


}


}
}

That's it! Your values are now being recorded on the Nimbits Data Logger cloud. Any connected spreadsheet and diagram will show the new readings. Also, if you add Nimbits to your Facebook by visiting http://apps.facebook.com/nimbits you can then configure your point to post new readings to your status. Facebook posts look like this:








Enjoy!

Sunday, June 27, 2010

Nimbits on Facebook

Nimbits is now the only data logging service that integrates with the Facebook Graph platform!  You can add Nimbits Data logging to your Facebook profile by following this link: http://apps.facebook.com/nimbits

When you log into app.nimbits.com you can go to a data points property page and either configure the point to post any newly recorded value to your Facebook wall or post alerts (when the value exceeds your high or low setting.  Of course, be careful. You will probably annoy your friends if you post second by second readings to your wall.

In order to use the Facebook functionality, you must add the Nimbits Facebook app to your profile. Just visit http://apps.facebook.com/nimbits   and allow Nimbits access to your profile. Just note that if you are also using Nimbits with your Google account, the Facebook email account you use must match. Nimbits matches your existing email with the Facebook account. Otherwise, Nimbits will register you as a new user under the Facebook email address it found.

Here is an example of a Facebook wall post when my temperature probe read in a new value







Enjoy!

Wednesday, May 12, 2010

May Newsletter


Back in April, we posted a new version of Nimbits that with the following new features:

·         Drag and Drop from the Data Point tree to the charts and grids
·         You can now re-organize your data points by dragging them around your Point Categories.  
·         We’ve removed limitation on the size of data trends you can request on the portal.
·         New Integration with Google Earth allows you to assign GPS Coordinates to your data points and see your changes on the Map
·         Subscribers can configure data points to Pull Data from a URL at a regular interval
·         Continuous improvements on Data compression and Performance.
·         We’ve flushed out some issues with the Android front end.  We recommend uninstalling the previous version and downloading the update. The new Android App is faster and more reliable.
·         We’re working on a user manual that is available now on our Open Source Repository : http://nimbits.googlecode.com/svn/trunk/Nimbits%20User%20Guide.pdf
o   The manual currently documents the various REST web services that developers can use to program against the Nimbits Platform.
·         Speaking of Open Source. We’re currently working towards making Nimbits an Open Source Project. The Source code for Data Acquisition Studio, the .Net 3.5 Nimbits SDK and the Android Interface are currently part of the Open Source Project under the MIT License. https://code.google.com/p/nimbits


Join Us

We’d really appreciate seeing you on our Facebook Fan Page. If you’d like to post feedback, get support or ask questions it would also be great to see you on the Nimbits News Group. Lastly, if you’d like to get updates on the tutorials and guides we post, it would be great if you would follow the Nimbits Blog.


What’s Next?

Here is what we’re working on for the upcoming versions of Nimbits

o    Nimbits is a social data logging service. The next version will allow you to “Friend” other data loggers and share data with each other.
o    A search engine that will allow you to find and friend other data loggers based on data point descriptions etc.
o    Tighter integration into Google Earth, GPS coordinates will be received from mobile phones
o    Integration with Facebook and Twitter
o    Command Line tools for Linux and windows powershell.
o    Arduino and Stamp support
o    Deep integration into Wolfram Alpha http://www.wolframalpha.com for data modeling
o    Instant Messaging Alerts to popular IM clients
If you have any questions about Nimbits or would like to see a new feature you can use, please just let me know!

Thursday, February 25, 2010

Create a Visio Diagram with Nimbits Data

In this Blog Posting:  Connecting Spreadsheets to Nimbits  I show you how to pull values you are feeing into Nimbits Data Points into an Excel Spreadsheet where you can then create charts, do calcs or any excel function on your current values.

You can very simply take this a step further by including spreadsheet data in a Visio Diagram.  I'm doing this with Visio 2007 Pro - i believe you need a Pro edition of Visio to import data.

Simply Launch Visio 2007 and Create a new Drawing. Select the Data Menu and choose "Link Shapes To Data." Then choose to link to the Microsoft Excel Workbook that you previously set up to use your Nimbits data

Follow the menus to select the rows and columns you are interested in in your workbook. These can be the cells pulling your nimbits data or any other cells that may be performing functions with your data.

You should then have a a screen similar to this. This shows my temp probe:




Now, let's put the value in a shape.  Put any shape you like on the diagram - i'm going to use a thermometer shape. You can then just drag the value you want to assign to your shape onto the graphic, and format it any way you like.  



That's it! You can now create very complex diagrams that will show your changing nimbits data point values


You can read more about Visio and Excel integration here: http://msdn.microsoft.com/en-us/library/aa701255.aspx

Saturday, February 13, 2010

Connecting a Temp Probe to Nimbits

Nimbits is a free Data Historian / Data Logger that allows you to store Time Series data on Google's Infrastructure and Connected to your Google Account.  Learn more at www.nimbits.com

In a previous blog posting  I connect a  Sensetronics Model F Temperature probe to the Nimbits Cloud using pure JAVA and a linux system.  In this posting, i'm going to accomplish the same thing except we're going to do it with a simple .net class and the Nimbits SDK. This is much easier and will run on any Windows Desktop.

When you're done, check out this post on how to automatically post your temp reading to your Facebook wall. 

The end result here is a program that runs on a Windows PC with a Temp Probe attached to a USB port and you'll be able to see changing temperature on your Android Phone Running the Nimbits Data Logger App, Connected Excel Spreadsheets or anything else connected to Nimbits.

This is a good tutorial for using the NimbitsSDK and you should be able to use this as an example for interfacing any device on a COM Port to Nimbits.  The SDK really simplified authenticating to Google and recording your data with just a couple of lines of code.

You can also just download this Visual Studio Project here: TempProbe1.zip


If you're not a programmer, you can download a free client program here that will interface with your Temp Probe to Nimbits and feed the result up to the cloud for you.   Just download the zip file below and run Setup.exe. This will install the client in your program files directory. You can then run the program from the command like like this:


TempProbe.exe /port=COM3 /email=example@gmail.com /password=password /point=FProbe1


The parameters provided above will connect you to Nimbits and begin recording temp readings into the point you provided.  Make sure you log into Nimbits first and create the target point. 

Download TempProbe.zip




What you need
If your computer doesn't have a serial port, you'll need a Serial to USB Converter.

Step 1

Log into Nimbits by visiting www.nimbits.com and launch the Nimbits Portal. Login with your Google Account and follow the instructions to create a new Data Point. In this example, i'm creating a point called FProbe1. It's important that you do this first. 

Launch Visual Studio and Create a new C# Console Application Project. Right click on the project and select to add a reference. Add a reference to NimbitsSDK.dll that you downloaded from the link above.

Step 2. 

Add this code to your project. You'll want to update the name of your data point, and your Google username and password.  Run the program and you should start to see a Fahrenheit reading that will be sent into Nimbits. You'll be able to see these changes on your Android Phone or anywhere else!  You can also use Nimbits to get email alerts if your temp goes out of range, or perform automatic calculations using the readings (for example, you can calculate a dew point or convert your temp to Celsius)

This Code simply creates an instance of the SDK with your Google login, Opens the Com Port, writes a single character to the probe which triggers a reading, and records the result to your Nimbits data point.

Code:


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO.Ports;
using System.Threading;

namespace TempProbe1
{
class Program
{
static SerialPort ComPort;
private static string PointName = "FProbe1";
private static string PortName = "COM3"; // Check device Manager for Port Number

private static NimbitsSDK.client SDK1 = new NimbitsSDK.client("example@gmail.com", "secretpassword");


static void Main(string[] args)
{

ComPort = new SerialPort(PortName, 9600);
ComPort.Parity = Parity.None;
ComPort.StopBits = StopBits.One;
ComPort.DataBits = 8;
ComPort.Handshake = Handshake.None;
ComPort.DataReceived += OnSerialDataReceived;
ComPort.DtrEnable = true;
ComPort.Open();

while (true)
{
ComPort.Write("A");
Thread.Sleep(10000); //10 Second Readings
}

}

//The Device puts out three lines, we're only interested in the temp result
public static void OnSerialDataReceived(object sender, SerialDataReceivedEventArgs args)
{


string data = ComPort.ReadLine();
string result = data.Substring(0,data.IndexOf("\r")).Trim();
Double value = 0.0;

if (! result.Equals("Bat Ok") && ! result.Equals("-99.9"))
{
value = Double.Parse(result);
SDK1.RecordValue(PointName, value, DateTime.Now);

Console.WriteLine(value);
}
}

}
}

Tuesday, January 26, 2010

Nimbits Data Acquisition Studio

The Nimbits Software System consists of three main interfaces:


The Portal app.nimbits.com runs on Google's App Engine and is the main interface to the Nimbits System. It is where you want to get your account setup, manage your points and categories, setup calculations, alerts compression etc. 


There is also an app you can run on your Android Based Phone. Search the Google app store for Nimbits and you can install the free App that lets you log new values and see changes in your points. Learn more here.


The third piece is a nice desktop app called Nimbits Data Acquisition Studio. This runs on Windows PC's and allows you to create points, categories, log values and see charts of your data points. It also comes with a free SDK which is a .net 3.5 dll you can use to develop your own software that can pull data from your data points.


You can download Nimbits Data Acquisition Studio for free from CNET:


Get it from CNET Download.com!


This Screen shot shows Nimbits Data Acquisition Studio after i have logged in with my gmail account using the Google menu and double clicked on my Aquarium Category. (Click on the Image to expand).