DesignSpark Electrical Logolinkedin
Menu Search
Ask a Question

30 Sep 2015, 13:00

Real-time data streaming to IBM Bluemix

This screencast walks you through streaming data to IBM Bluemix from a powered device. allows you to git push applications in the form of a Docker container to your Raspberry Pi

How it works

When the device boots starts your applications code in a container on the device. The device will then register automatically with the Bluemix IoTF service and stream randomized data to the cloud. The device's Bluemix ID and auth-token are saved as per-device environment variables on the device, so that the identity persists through container restarts and device reboots.

You can add multiple devices to your application that will automatically download the code, register and then stream to the same Bluemix application as a new device.

Here are the steps to accompany the screen-cast:

Provision your device

•         Sign up with & create an application.

•         Download the applications image.

•         Burn the image to an SD card:

–         Burning instructions for OSX and LINUX

–         Burning instructions for Windows

•          After booting your device it will pop up on your application's dashboard.

Setup Bluemix

•          Sign up for Bluemix.

•          Create an application; use the nodejs IoT boilerplate.

•          Go to "Catalog > Internet of things > Internet of Things service > Select application > Create" and associate this service with the application you just created.

Get the application running on the device

•          Clone the boilerplate Bluemix application:

git clone

•          Add your application's remote endpoint:

git remote add resin

•          Push and will do the rest:

git push resin master

Configure your application

•          Go to your application's dashboard.

•          Select "Environment variables"

•          Add the auth-tokenfollowing key/value pairs:

–         JWT = 2sadfj435tdgsfdsa... (found here)

•          Add the following key/value pairs, which can be found on Bluemix dashboard if you click "Show creds" on the IoTF service:

–         ORGANIZATION = qyfod6

–         API_KEY = a-lydcfi-e7a2au1ymm

–         API_TOKEN = CWaxYwSUxoMd?MMkIu

–         DEVICE_TYPE = RPI2

Enjoy your live-stream

The logs will print a link to your IBM IoTF dashboard where you can manage your devices and view the data they are publishing.

Raspberry Pi & Accessories from RS Components

ResinIO has not written a bio yet…

30 Sep 2015, 13:00