Sei sulla pagina 1di 15

The Watson IoT Platform Service

Hands-On Lab Lite

March 21, 2019


Watson IoT Platform Service Hands-On Lab
1. Navigate to the IBM Cloud: www.ibm.com/cloud. Click “Sign up” and walk through the steps
to begin your 30-day free trial and obtain an IBM ID and Password.
2. Once you have made it to the IBM Cloud Dashboard, click “Create resource” in the top
right corner.

3. Within the Catalog, find the Watson IoT Platform Service. Select the service.

4. Type in a unique name in the Service name field (the auto-generated name should work
fine). Click “Create” in the bottom right corner. This may take a few minutes.
5. Once the screen below appears, click “Launch” to open the Watson IoT Platform Service.
6. Navigate to the Watson IoT Platform Starter Kit located in the Cloud catalog under “IoT.”
7. Once you have logged into the platform, drag your mouse to the 3x3 dots icon. A drop-down
menu will appear. This drop-down menu will be used to navigate the Watson IoT Platform
Service.

8. Click on the “Devices” tab. This tab will be used to add a device type, register a device, and
create a physical and logical interface.
9. Click on the “Members” tab. This tab is where you can see the list of members in your
organization.
10. Drag your mouse to the top right corner of the platform. An “ID” will be listed. This “ID” is
unique to each organization. Members of the organization share this “ID.”

11. Click on the “Apps” tab. This tab will be used to generate an “API Key.”
12. Click on the “Boards” tab. This tab will be used to create a basic dashboard.
13. Throughout this tutorial, you will be asked to navigate to the various tabs mentioned above.
14. Navigate to the IoT Device Simulator: http://test-iot-device-simulator.mybluemix.net/

15. The IoT Device Simulator will be used to replicate the behavior of a device for connection
to the Watson IoT Platform Service. NOTE: For the purpose of this lab, I used the following
credentials. Your credentials will be different.

16. Enter in a “Device Type” of your choice. Here’s a suggested format:


FirstName_Lastname_sensors
17. Enter in a “Device Id” of your choice. Here’s a suggested format: FirstName_Lastname_sim.
Leave the rest of the fields blank. We will come back to those later.
18. Navigate back to the Watson IoT Platform Service that you launched earlier.

19. Find your “ID” in the top right corner of the Watson IoT Platform Service. Refer to Step
#10 for assistance.
20. Copy your unique “Org ID” and head back to the IoT Simulator. Paste your Org Id in the
IoTP Org Id field.
21. Navigate back to the IoT Platform and click on the “Device Type” tab listed in the top left
corner.

22. Click on “Add Device Type” in the top right.


23. Keep this page open and navigate back to the IoT Device Simulator.
24. Copy the “Device Type” that you created for the IoT Device Simulator and paste the
“Device Type” copied into the section “Name” as demonstrated below.

Firstname_Lastname_sensor

25. Provide a description for the “Device Type.” Click “Next.”


26. Keep the “Device Information” content blank and click “Done.” You are now ready to
register a device.
27. Click “Register Devices.”

28. Enter in your “Device Type” and then copy your “Device Id” from the Device Simulator
and paste it in the “Device ID” section in the IoT Platform. Both your “Device Type” and
“Device ID” in the IoT Platform Service should match your “Device Type” and “Device
Id” in the Device Simulator.

29. Keep all of the items in the “Device Information” section blank. Click “Next.”
30. Keep the “Authentication Token” section blank and click “Next.” Then click “Done.” THIS
NEXT PAGE IS VERY IMPORTANT. DO NOT CLICK OUT OF IT.
31. This page is a summary of what we have done so far. The “Authentication Token” listed will
not be saved anywhere. Copy and paste the token into a Word document or write it down.
Then, copy the “Authentication Token” and click “Done.” Navigate back to the Device
Simulator tab.

32. Paste your “Authentication Token” in the Device Token field. Leave the IoTP Domain
field as is. Then, click “Connect.”
33. Scroll down to the “Device” section in the IoT Device Simulator tab and enter in random
values for “Temperature 1,” “Temperature 2,” “Pressure 1,” and “Pressure 2.” Select
“Condition 1” and “Condition 2.”
34. Now, click the “Send” box a couple times to send the data to the Watson IoT Platform.

35. Navigate back to the Watson IoT Platform. You are now ready to create a physical and
logical interface. Drag your mouse to the 3x3 dots drop-down menu and return to the
“Devices” tab. The “Browse Devices” section will appear.
36. To ensure that your data was sent to the platform, find your “Device ID” in the list and click
on it. Next, select the “State” tab. Your data should appear below it. If it doesn’t appear,
return to the IoT Device Simulator and click “Send” again.
37. To see the list of Properties and their Values, click on the drop-down arrow next to the “d.”
Notice how the temperature, pressure, and condition “Properties”, “Values,” “Types,”
“Events,” and “Last Received” are displayed. Exit out of the “Device ID.”

38. Navigate to the “Device Type” tab located on the top left in the IoT Platform. Find your
“Device Type” in the list and click on it.
39. Click on the “Interface” tab and ensure that the “Advanced Flow” tab has been selected.
Your screen should match the figure below.

40. Click “Create Physical Interface.” A pre-generated name will appear. Click “Next.” Then
click “+ Create event type” on the top right.
41. A screen will appear searching for devices. Select the drop-down arrow for the Use Last
Event Cache section. Select your “Device ID” in the drop-down menu. An “Event,”
“Format,” and “Payload” should pop up. Select the “Event” and click “Add.”

42. Now, the “Event” appears as a list item titled “d.” If you click on the drop-down menu next
to “d,” the temperature, pressure, and condition are listed under “Property.”
Select the “Property” and click “Done.”
43. You have now finished creating the “Physical Interface.” Click “+ Create Logical
Interface” on the right. A pre-generated name will pop up. Click “Next.”

44. Click “Add Property” on the right. A pop-up menu will appear with all of the properties to
select from. Select “t1” and then click “Save.”

45. The “t1” property will now appear as a list item. Click “add a new property” and select “t2”
and click “Save.” Continue to do this for the last 4 properties until you have all six properties
as list items shown below. Select all of the “Properties” and click “Next.”
46. Select “For State Changes” and click “Done.” Both the Physical Interface and Logical
Interface will be displayed. Click “Activate.”

47. A pop-up window will appear asking to “Deploy” the interfaces. Click “Deploy” and then
click “Done.”

48. We have finished creating a Physical Interface and a Logical Interface. Navigate to the
“Manage Schemas” tab in the IoT Platform. Then click “+ Add Schema.” Find your
“Device Type” in the list and click on it.
49. Click on “Add property.” Then click on the “From Connected” tab. Your latest event data
will be displayed. Select this data and then click “Done.”
50. Now, it is time to display the data in a dashboard. Drag your mouse to the 3x3 dots drop-
down menu and select “Boards.”
51. Click the blue box in the top right corner that contains “Create New Board.” Enter in a
“Board name” and a “Description.” Click “Next” and then click “Submit.”

52. Your board will now appear under “Your boards” as a white box. Click on the board you
just created.
53. A screen with your board title at the top will appear. Click “+ Add New Card” on the top
right.
54. Then click “Donut Chart.”

55. Click on the checkbox for your “Device Id” and click “Next.”
56. Click “New Data Set” and make sure the following is entered and then click “Next”:

57. Choose “XL” and “Next.”


58. Choose a color and click “Submit.”

59. You will then have your first graphical display for the data coming through. As you choose
different values for the temperature simulator, the values here will change as well. You may
also want to add new graphs, charts or maps to your dashboard so feel free to experiment
with these displays!
60. Great work exploring the Watson IoT Platform Service!

Potrebbero piacerti anche