Part 1 — IBM Watson & NodeRed, IoT Application Development

Abenezer Girma
4 min readFeb 9, 2019

In this series, I will take you through the process of developing an IoT application that involves

  • How to use IBM Watson free service to connect an IoT application to the cloud
  • How to use IBM NodeRed to visualize sensor data generated by IoT devices
  • How to use the IBM device simulator to generate simulated sensor data reading

Setting up an IBM cloud

  • Search for an“IOT” in search bar and select the “Internet of Things Platform
  • Fill out the details and choose the “Lite” which is free
  • Choose the region nearby to your area, finally, click “Create
  • Now click “Launch
  • Click “launch”

Creating a device type

  • First, you need to create a device type in your IBM account
  • Go to the device tab and then click on device types then click on Add Device Types
  • You can choose the type of device either a Device or Gateway
  • Then give it a name and click next
  • Now you can fill the details or leave it open then click Done
  • Now you have two options
  1. To use a real IoT device like Raspberry pi or Esp8266
  2. or you can use IBM IoT device simulator
  • For now, we will use the simulator, and in the next article, I will discuss how to use a real IoT device

Creating simulated devices on IBM Watson IoT Platform

  • Go to the IBM settings then device simulator
  • Turn on “Activate Device Simulator”
  • Then a new tab appears at the right bottom of the screen
  • Click the tab and then click “Create simulated Device”
  • Click on the “selector create device type” in order to select the device type that you want to simulate
  • I choose a “Web_Simulator” device type, when you click the device type this appears
  • Change the code part as follows and set the schedule 4 x every minute,
  • This will generate a random number for temperature in range 0–40 and for humidity in range 50–100
  • Then save it

Creating NodeRed on IBM Cloud

  • Go to IBM Cloud using this link www.bluemix.net
  • And choose your cloud service, for me I am using IoTAbeni1, but for your case, you can choose “Internet of Things Platform for Medium”, which we created at the begging
  • Then click on the link “Visit APP URL”
  • Click on “Go to your Noe-Red flow editor”
  • Click the + Sign to open a new tab

How to program in Node-Red to use sensor data generated by the simulated device and display them in a graphical format

Next Part

--

--

Abenezer Girma

I’m a PhD student working as a researcher assistant in Autonomous Control Information & Technology Institute working on machine learning algorithms & robotics.