...
Info | ||
---|---|---|
| ||
|
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 | ||
---|---|---|
| ||
Why call it a "canopy" network? |
Building your Gateway
Architecture
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 |
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 icon false title Answer 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 title 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
Tip | ||
---|---|---|
| ||
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
...