Skill Level: Beginner

IBM IoT Connection Service allows to bundle preselected services to form public, multitenant SaaS solution. The first part of the article is available at https://developer.ibm.com/recipes/tutorials/ibm-iot-connection-service-watson-iot-platform-part-1/


IBM IoT Connection Service SaaS Instance


  1. Navigate to Sample Application

    • Leave the IoTP open in a separate tab and navigate back to the tab with the IoTCS dashboard.
    • Open the sample application by clicking on the route URL.


  2. Create a Dishwasher Device

    • You can use the sample application to create simulated washer devices.
    • Scroll to the bottom of the page and click the “+” button to create a new simulated washer.
    • The new washer will appear in your list of washers.
    • The sample app will also use the IoTP APIs to register the device with the platform.



  3. Run a Simulation

    From the simulated washer view, click the Start button on the washer to begin a cycle.


  4. Using Node-RED with the Sample App

    • The sample application also allows you to use Node-RED and comes with some handy examples.
    • Open a new tab in your browser and use the following URL to access Node-RED: https://<your sample app>/red
    • For example: https://csna3-starter.mybluemix.net/red


  5. Rules

    • In order to invoke the flow on the “Trigger notifications” tab, we need to create a rule in IoTP that fires off the flow when certain
    conditions are met.
    • The IoTCS creates an example rule for us to use.
    • Back in the IoTP, navigate to the “Rules” tab and click on the “IoT for Electronics notification rule” to open it up.
    • After examining the conditions of the rule, click on the Trigger IoT4E Notification action to open it up.


  6. Actions

    • Click on the pencil icon to edit the action and then click the Next button.
    • In the Edit Action “Configure” tab you need to make a slight modification to the URL in order to match the URL of your Node-RED
    flow. The URL should be the following format: https://<sample app route>/rti-alert
    • For example: https://csna3-starter.mybluemix.net/rti-alert
    • Click Finish button when complete.


  7. Trigger Node-RED flow

    • Now when completing a cycle or injecting a fault using the sample app, you should see information in the debug output tab.
    • **Note** : At the time of creation of these materials, the flow created automatically by IoTCS does not completely work due to
    incorrect settings of Registration service credentials.


  8. Cloudant NoSQL db - Navigation

    • Back in the IoTCS dashboard, click on the “View Details” link of the Cloudant NoSQL DB service.
    • Copy the password and then click the “Launch” button to open the Cloudant web UI in a separate tab.
    • When prompted for the password, paste in the password copied from the view details dialog.
    • Lastly, click the “Sign in” button.


  9. Cloudant WebUI

    • You should now see the Cloudant web UI.
    • Click on the database tab to see all the databases created thus far.


  10. Using the Example Cloudant Node-RED Flow

    • If you want to test out querying the Cloudant DB for data, check out the “Display historical data” flow in your Node-RED sample
    • Follow the instructions in the notes for each step.


  11. DB2 Warehouse on Cloud - Navigation

    • Back in the IoTCS dashboard, click on the “View Details” link of the DB2 Warehouse on Cloud service.
    • Copy the Username and then click the “Launch” button to open the DB2 web UI in a separate tab.
    • When prompted for the username, paste in the username copied from the view details dialog. Then do the same for the password.
    • Lastly, click the “Sign in” button.


  12. DB2 Web UI

    • You should now see the DB2 web UI.
    • Click on the “Explore” tab to see the schema and database tables created thus far.


  13. Browsing Cloud Object Storage

    • Unlike Cloudant and DB2 there is no web UI to launch for the Cloud Object Storage service.
    • The details for the service give you everything you need to connect using APIs from your code.
    • However, if we want to be able to browse the storage like a file explorer, we need a tool that can view S3.
    • There are a number of free options available to download. This exercise will use Cyberduck.
    • Go to the following URL to download and then install Cyberduck: https://cyberduck.io/


  14. Create Cyberduck Connection

    • Once Cyberduck is installed, launch it and create a new connection using the information supplied in the “View Details” of the
    Cloud Object Storage service.


  15. Browse and download buckets

    • You should now be able to view all of the buckets in the S3 storage.
    • The IoTCS automatically creates a bucket for each day’s worth of device data and stores up to a year’s worth of device data by
    • This data can be mined by data scientist using tools such as Watson Data Science Experience (DSX) or SPSS Modeler.


  16. IoT Registration Service

    • Use the IoT Registration Service to add device consumers and pair the consumers with registered devices. For example, you can
    pair a washing machine with a manufacturer and an end user.
    • Click the “View Details” of the service to get the credentials needed to use the API.
    • Documentation for the API can be found here: https://broker-ussiot4e.
    • Use the “Registration” tab in the IoTP service to view any existing pairings.


  17. Message Hub Service

    • Message Hub is a scalable, high-throughput message bus that allows you to wire micro-services together by using open protocols.
    • Connect stream data to analytics to realize powerful insights. Feed event data to multiple applications to react in real time. Bridge
    to your on-premise messaging infrastructure to create a hybrid cloud messaging solution.
    • Click the “View Details” of the service to get the credentials needed to use the API.
    • Documentation for the APIs can be found here: https://console.bluemix.net/docs/services/MessageHub/index.html#messagehub



  18. Secure Gateway Service

    • Secure Gateway is a secure way to access your on-premises or cloud data from your IBM Cloud application by using a secure
    • Customers need to contact the IoTCS support team in order to configure the service.
    • Documentation about the service can be found here:



  19. Single Sign On

    Single Sign On is a policy-based authentication service that you can use to embed the single sign-on capability for your Node.js or Liberty for Java applications.
    • You will not find the Single Sign On service in the IoTCS dashboard.
    • Customers need to contact the IoTCS support team in order to configure the service.
    • Documentation about the service can be found here: https://console.bluemix.net/docs/services/SingleSignOn/index.html

  20. Co-author of this recipe

    Surbhi Agarwal (surbhi_agarwal@in.ibm.com) is IoT Solution Architect and co-author of this recipe.

Join The Discussion