Overview

Skill Level: Beginner

Beginner

PrepareComplete the relevant steps in the appropriate Getting Started Guide. These steps include connecting your board to a Windows, Mac or Linux computer using the serial connection and connecting your kit to an internet connected network using an ethernet cable.Connect (Quickstart)IBM Watson IoT Platform Quickstart connectionDownload ibm-iot-quickstart.zip to your computer, and extract the contents (source […]

Ingredients

Hardware Requirments

Step-by-step

  1. Prepare

    Complete the relevant steps in the appropriate Getting Started Guide. These steps include connecting your board to a Windows, Mac or Linux computer using the serial connection and connecting your kit to an internet connected network using an ethernet cable.

  2. Connect and Visualize (Quickstart)

    IBM Watson IoT Platform Quickstart connection

    1. Download ibm-iot-quickstart.zip to your computer, and extract the contents (source code is available).
      • Run ifconfig using your Putty window to establish the IP address of the board
      • Confirm that ssh is running by using the command service sshd start

    2. Copy the ibm-iot-quickstart.zip file to your development kit, using the IP address that you previously noted:
      scp ./ibm-iot-quickstart.zip root@ip_address:/

      Note that on Windows, you will need to install a version of scp and ssh.

    3. Now you can load the Quickstart software onto your board:
      • Go to the root directory:
        cd /
      • Extract the contents of the compressed file with the following command:
        unzip /ibm-iot-quickstart.zip
      • The Python script ibm-iot-quickstart.py requires ibmiotf python library to be in place, before it can be executed. The following PIP command ensures that this module dependency is met, by setting up the ibmiotf python library. Use sudo privilege to execute the PIP command, as needed.
        pip install ibmiotf
      • Run the sample by entering:
        python ibm-iot-quickstart.py
      • Note the MAC address that is displayed in the console window.

    To Visualize device data in Real Time, simply visit Quickstart and type in the MAC address of your device

    Note: A Configuration file is provided along with the zip file for your reference. However, you wouldn’t need the Configuration file, if you are using Quickstart Service ( mentioned in this section ). The section Connect and Visualize (Registered) makes use of the Configuration file. Hence it is recommended to Rename or Delete the Configuration file, while you work with this section, i.e with Quickstart Service.

  3. Register your Device In Watson IoT Platform

    To explore and make use of full capabilities of Watson IoT Platform, we need to setup and register your device(s) in it. This section shows how you can setup the same.

    Carry out the steps present in this recipe to register your device(s) in IBM Watson Internet of Things Platform.

    At this step, we have successfully created the Watson IoT service and registered your device(s) in it.

  4. Connect and Visualize (Registered)

    1. If the ibm-iot-quickstart.py script is still running stop it by pressing Ctrl+C from the command line
    2. Create the configuration file by typing
      vi device.cfg
    3. Copy the following code and paste it into the opened sample configuration file. To paste, press ‘insert’ then Shift + Insert
      [device] =
      org=<Organization ID>
      type=<Device Type>
      id=<Device ID>
      auth-method=token
      auth-token=password
      clean-session=true
    4. Provide the values for each of the parameters in the configuration file, with the details gathered during registration
    5. Exit vi editor by pressing Escape, then typing ‘:wq’ and pressing Enter
    6. Back in the console type the following again and see your device connecting to the registered service
      python ibm-iot-quickstart.py

       

    With the new boards and cards capability in the Watson Internet of Things platform, you can build your own Custom dashboard without writing any code. You can use the boards as the landing page of interest and then make use of the cards within them to:

    • Create visualization charts for the real time data from your devices
    • Create Gauges for visualizing physical quantities like Vehicle Speed, Temperature, pressure
    • Create Donuts charts, bar charts to display the current value of the data points
    • See the Data and storage consumption of your devices
    • List of registered devices and etc..

    Refer to Configuring Boards & Cards in the new Watson IoT Dashboard recipe to view the registered device events in Watson IoT Platform using the boards and cards.

  5. Conclusion and other related decipes

    In this recipe, we showcased how we can connect an Intel IoT Gateway to IBM Watson IoT Platform. We also have lot of recipes that demonstarte connecting varieties of devices to IBM Watsb IoT Platform. Here given are the some of the related recipes to refer as part of where to go from here:

Join The Discussion