Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info
titleGoal


Excerpt

Each group attaches its manager to the IBM Watson IoT Platform, forming a coordinated canopy network!


Table of Contents

The Setup

You will build the following setup, in which networks and applications are coordinated through the IBM Watson IoT Platform running on IBM Bluemix.

...

Tip
titleCrash Course 33.2.1 (given by your instructor)

Why call it a "canopy" network?

Building your Gateway

Architecture

This diagram shows what you will run on your gateway

...

JsonServerA Python program which connects to the manager's serial API port, and offers an HTTP JSON interface
Node-REDBridges between the IBM Watson IoT Platform and the JsonServer HTTP API

Start the JsonServer

  • From Part 1: Your First Standalone Network, write down the fourth serial port of your manager. This is your manager's API port (not CLI):

    Info
    iconfalse
    titleAnswer 33.2.1


  • Type the following command:

    Code Block
    C:\Users\Thomas\Desktop\smartmeshsdk-master\app\JsonServer>python JsonServer.py --serialport=<your manager's API serial port>


Configure Node-RED

  • Start Node-RED on your local machine by typing

    Code Block
    node-red

  • Open C:\Users\Thomas\Desktop\smartmesh-bluemix-master\01-gateway\02-node-red\flows.json with a text editor, copy the entire contents (Ctrl+C)
  • In Node-RED, choose Import > Clipboard
  • Paste the flow (Ctrl+V) and click "Import"
  • A new tab "gateway" appears

    Note
    titleI get an error!

    If Node-RED complains that it doesn't know what the "Watson IoT" node, you didn't install that extension. Go back to Part 0a: Things to prepare before the session.


  • Double click on the "to IBM Watson IoT" node
  • Click on the pen icon next to "manager credentials"
  • Enter the information contained in your Gateway ID, token and Organization and save
  • Click the "Deploy" button
Tip
titleWhat just happened?

Your manager is now connected to the IBM Watson IoT Platform instance! This allows you to interact with your manager and motes entirely from there!

Visualizing the Network Topology

  • Open https://makeamesh.eu-gb.mybluemix.net/, i.e. the web front-end of the "makeamesh" server running on IBM Bluemix
  • Once all groups have connected to the IBM Watson IoT Platform, you will see a topology similar to the following:

See Motes in the Watson IoT Web Interface

  • Sign into https://internetofthings.ibmcloud.com/ using your Member credentials
  • In the upper righthand corner, select the organization
  • Navigate through the web interface, and click on one of your motes
  • After a few seconds, you will see the sensor information tab filling up as data rolls in

     

...