Publish to Watson IoT Quickstart

Publish to Watson IoT Quickstart

SmartMesh IP mesh networks and and IBM Watson IoT are perfectly complementary. Sending data gathered by a SmartMesh IP mote into the Watson IoT platform is a breeze, as you will see in this recipe.

Overview

Gliffy Diagram is only supported by the cloud editor

Because Forge macros arent supported by the legacy editor, you'll need to convert this content to the cloud editor to display this macro properly. Find out more about converting to the cloud editor

Create your network

  • We assume you have a DC9000B SmartMesh IP starter kit

  • Plug the manager into your computer's USB board and its blue LED switches on

  • Switch on at least one mote, two green LEDs are steady-on when the mote has successfully joined the network and is publishing data:

What just happened?

That's it, you have a fully functional SmartMesh IP network with every mote publishing a temperature reading every 30s.

Run the software

On your computer, you will need to run two programs: JsonServer and Node-RED

JsonServer

JsonServer is a program developed by the DustCloud community and part of the SmartMesh SDK.

It connects to your SmartMesh IP manager and opens an HTTP JSON interface that Node-RED can connect to.

Node-RED

Publish to Watson IoT Quickstart

  • Copy the following Node-RED flow into Node-RED:

 

  • Double-click on "connect serial port" and change "COM13" by the name of the serial port you noted above

     

  • Click the Deploy button on Node-RED

     

  • Click on the left of the "connect serial port" widget

  • Make sure the debug tab on the right contains "200"

  • Click on the left of the "get status" widget

  • Make sure the debug tab on the right contains "connected"


     

  • Choose any one of your motes, and read its label, in my case "3FFEE6"

  • In Node-RED, double-click on the function widget
     

  • Replace "3FFEE6" by what you have on your label and click Done

  • Double-click on the event widget

     

  • Change the Quickstart Id by your mote's identifier, and click Done

  • Click Deploy

  • Go to https://quickstart.internetofthings.ibmcloud.com

    • check the box to accept the terms and conditions

    • enter the identifier of your mote and press Go

  • You start by seeing an empty screen, this is normal as the mote only publishes every 30s

  • Every 30s, a new datapoint plots live

You can see the same data on different devices, just go to https://quickstart.internetofthings.ibmcloud.com and enter the identifier of your board.

Where next?

We hope to have convinced you of how easy it is to send data from your SmartMesh IP to IBM Watson IoT. We have obviously only scratched the surface of what's possible.

Things you can do with your SmartMesh IP motes

  • connect external sensors

  • connect external actuators

  • reprogram motes using the On-Chip SDK

  • etc.

Things you can do with IBM Watson IoT

  • create a your own Watson IoT instance (not the Quickstart) and send data in a quick and secure way into IBM Bluemix

  • start other IBM Bluemix services and applications to store, analyze and visualize your SmartMesh IP network and the data it produces

  • etc.