Smart Home automation using Raspberry Pi and IBM Watson.

To develop a smart home automation using Raspberry-Pi and IBM Watson, Creating Internet of Things Platform Starter service in IBM Watson, Click on catalog on your dashboard screen .Under Boiler Plates Click on Internet of Things Platform Service. Give a name for your service and it will created with minutes. Then go to dashboard under service you will have your IOT Platform service created along with Cloudant NOSQL DB also created.

Raspberry Pi IBM Watson IOT

855 Views, 17 Nov 2017 01:49 pm

Description

AIM: To develop a smart home automation using Raspberry-Pi and IBM Watson
Requirements:
Software:
  • IBM Bluemix Account
  • HARDWARE:
  • RASPBERRY-PI (3B)(WITH ETHERNET CABLE OR WIFI CONNECTED)
  • USB MOUSE
  • USB KEYBOARD
  • VGA TO HDMI CABLE
  • A MONITOR
Step-1: Creating Internet of Things Platform Starter service in IBM Watson:
  • Firstly, login into your IBM-Bluemix account with your e-mail ID and Password.


  • Click on catalog on your dashboard screen .Under Boiler Plates Click on  Internet of Things Platform  Service.

  • Give a name for your service and it will created with minutes. Then go to dashboard under  service  you will have your IOT Platform service created along with Cloudant NOSQL DB also created.
Step-2: Create a device in IBM Watson:
  • After getting into your service click on Launch 

  • Then you get into IBM Watson Platform .Then click on Devices

  • When you get into Devices you find a button called +Add Device click on it.

  • Then you get a window where you should click on Create Device Type.

  • Then you will get an another window asking whether to create a device type or gateway type. Click on “Create a Device Type”

  • Then give a name and Description for your device (any name and description can be given) and then click on Next

  • Then another Window appears just click on Next

  • Click on Next for the above window

  • Click on Next for the above window

  • Click on Create at the bottom when the above window appears.

  • Then click on Next when the above window appears.

  • Give your Raspberry-Pi’s IP Address as Device ID for unique identification

  • Click next when the above window appears.

  • Again click on  Next when the above window appears.

  • Then click on Add when the above window appears.

  • Then you get your device Credentials which you can use later. Copy them   and paste them  in a notepad for future uses.
STEP-3: INSTALLING NECESSARY PACKAGES ON YOUR PI:
  • Now we are going to install necessary packages on your pi.
  • Open your terminal in your pi and type the following commands
  • curl -LO https://github.com/ibm-messaging/iot-raspberrypi/releases/download/1.0.2.1/iot_1.0-2_armhf.deb 
  • sudo dpkg -i iot_1.0-2_armhf.deb 
  • service iot status
  • Following are the images  as to what appears on your pi’s terminal when u type these commands:

  • Then open your terminal and type pip install ibmiotf

STEP-4: Creating a Node RED FLOW for your smart home Automation Application:
  • Go to Dashboard  on  your IBM Bluemix page and under app you will find your node red application double click on it and click on Launch. 
  • You will get the node red page on your   give username and password (mostly same as your IBM Bluemix’s login Id and Password).
  • Then you will get a new node red flow window.
  • Firstly  we will be needing  some UI  (some kind of Buttons ) to control your appliances.
  • So, firstly click on the dropdown   beside  Deploy you will get the following options among them click on Manage Palette.

  • Then for getting all the button nodes for UI type node-red-dashboard on your install tab as shown below and click on install

  • After the installation is complete if scroll down you can find your installed nodes in the dashboard section as shown below:

  • Click on button and drag out  6  such buttons with the following for each button






  • Then take out the mqtt node and configure it as follows and write a topic name according to the topic that you have specified in your code to subscribe to.

  • Then bring out an IBM IOT Output node, Device Id and Device type should be same as the one obtained after creation of device.

  • To get to know the output coming out of Mosquitto Broker even include a debug node at the end with following configuration.

  • Your Final Node red Flow will look as shown below:

  • TO have a look at the UI with your buttons copy the url till mybluemix.net and then /UI .
  • You can see your  UI as shown below:

  • Then run your respective code on your Pi with your credentials you obtained at the beginning and then by clicking on the buttons in UI you can control the respective pin assigned to each button in your code.
Conclusion: Hence, we were able to make Smart Home Application using RPI and IBM Watson

Latest IOT Projects
IoT Bootcamp From Sept 2
IoT Analytics Bootcamp From Aug 5
MQTT and CoAP Training From Aug 29
ThingWorx Training From Aug 24
Communication Protocols Training Coming Soon
IOT Development Kits
IoT Bootcamp From Sept 2
IoT Analytics Bootcamp From Aug 5
MQTT and CoAP Training From Aug 29
ThingWorx Training From Aug 24
Communication Protocols Training Coming Soon
Adds Here Adds Here Adds Here

TESTIMONIALS

Sowmya Kambampati
KONY India Pvt Ltd, as a Associate Software Engineer
Ratings :
Review:

I am very thank full to you all for giving such a great training and opportunity to explore my ideas in the stream of IoT, started with a 2 week workshop, very well Hands-on session ever had before...

Poorna prudhvi
Associate Software Engineer in mroads Pvt Ltd
Ratings :
Review:

I interned at smart bridge it's on a mission to become the power House of IOT.The work here is innovative and colleagues are very friendly.i would definitely recommend smart bridge to be a part of you..

P. Sai Teja
System engineer in IBM
Ratings :
Review:

I have done my project and Iot training at Smart Bridge Technologies based on which I got placed in IBM as a system engineer. I am very thankful that i have found my way to build my career further. Th..

Revathi Dhage.
Intern
Ratings :
Review:

The Project was developed in time, and it was appreciated .Many small details were covered well, and proved to be distinguishing points to the project.The concerned mentor, Sandeep Doodigani, has been..