Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 21 Next »

Goal

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

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.

on IBM BluemixWatson IoT Platformalready runningserves as an MQTT broker to which gateways and applications connect
makeameshalready runninga Python program which interacts with the gateways to maintain an overall view of the topology
Node-RED instancealready runningused to monitor the status of the platform (we will not work with it)
next to the managergatewayyou will launch it in Part 2the software you run to connect to Watson IoT
anywhere on the planetapplicationyou will launch it in Part 4the software you run to interact with your devices and do interesting things

Crash 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):

    Answer 33.2.1


  • Type the following command:

    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

    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

    I 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

What 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

     
  • No labels