|
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 Bluemix | Watson IoT Platform | already running | serves as an MQTT broker to which gateways and applications connect |
---|---|---|---|
makeamesh | already running | a Python program which interacts with the gateways to maintain an overall view of the topology | |
Node-RED instance | already running | used to monitor the status of the platform (we will not work with it) | |
next to the manager | gateway | you will launch it in Part 2 | the software you run to connect to Watson IoT |
anywhere on the planet | application | you will launch it in Part 4 | the software you run to interact with your devices and do interesting things |
Why call it a "canopy" network? |
This diagram shows what you will run on your gateway
JsonServer | A Python program which connects to the manager's serial API port, and offers an HTTP JSON interface |
---|---|
Node-RED | Bridges between the IBM Watson IoT Platform and the JsonServer HTTP API |
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):
Type the following command:
C:\Users\Thomas\Desktop\smartmeshsdk-master\app\JsonServer>python JsonServer.py --serialport=<your manager's API serial port> |
Start Node-RED on your local machine by typing
node-red |
C:\Users\Thomas\Desktop\smartmesh-bluemix-master\01-gateway\02-node-red\flows.json
with a text editor, copy the entire contents (Ctrl+C)A new tab "gateway" appears
If Node-RED complains that it doesn't know what the "Watson IoT" node, you didn't install that extension. Go back to Things to prepare before the session. |
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! |