Smart Agriculture System Project on IBM IOT platform using NodeRed framework

Project Scope

We need to follow these steps to complete our Smart Agriculture System Project:

  • Project Planning and Kickoff
  • Explore the IBM Cloud Platform
  • Connect the IoT Simulator To the Watson IOT Platform
  • Configure the Node-red to Get the Data From the IBM IoT Platform And Open Weather API
  • Building A Web App
  • Configure Your Device to Receive The Data From The Web Application And Control Your Motors

Our Project’s main aim is to help farmers to control their motors from home. He/ She can On and Off his motor by using his mobile phone.
By using Weather API he can know the weather conditions like temperature, humidity, and soil moisture.

Project Background:

  • This Smart Agriculture System Project mainly aims to help the farmers to ease their work.
  • Farmers can get real-time weather conditions by using smart agriculture.
  • Instead of physical devices we create devices in the IBM IoT platform and use them in our project.
  • We connect our device to the IBM node in the NodeRed framework.
  • We need to create a Weather API account to configure the weather API Platform.
  • We then Configure our Node-red to get the weather forecasting data using HTTP requests.

Project Schedule:

  • Project Planning and Kickoff
  • Explore IBM Cloud Platform
  • Connect The IoT Simulator To the Watson IOT Platform
  • Configure The Node-red To Get The Data From IBM IOT Platform And Open Weather API
  • Building A Web App
  • Configure Your Device To Receive The Data From The Web Application And Control Your Motors

Project Requirements:

  • IBM Cloud Account and IBM Watson IOT Platform to create device and sensor
  • Python IDE
  • Node-Red
  • Open weather API Platform

Functional Requirements:

  • Measure Temperature.
  • Gauge Temperature.
  • Gauge Humidity.
  • Gauge Pressure.
  • Weather API.
  • Display the sensor readings using the Watson IOT sensor.
  • Respond to sensor readings and send alerts to the user.

Technical Requirements:

IoT Simulator

Software Requirements:

  • Python
  • Node-Red
  • IBM Watson IOT Platform
  • Open Weather API

Project Deliverables:

A Smart Agriculture System web App for farmers where he can:

• Monitor temperature, humidity, and Soil moisture along with weather forecasting details.
• Control motor for watering the crop through the web app from where he was.

THEORETICAL ANALYSIS

  • Required Software Installation
  • Node-Red

Installation:

  • First, install the Node
  • open command prompt
  • Type ->npm install node-red

To Run the application:

  • open command prompt
  • And then type “node-red”
  • Now open http://localhost:1880/ in the browser

Installation of IBM IOT nodes and Dashboard nodes for Node-Red

  • In order to connect to the IBM Watson IOT platform and create the web UI, these nodes are required
  1. IBM IoT Node
  2. Dash Board Node

IBM Watson IOT Platform

  • Steps To Configure:
  • Create an account in the IBM cloud using your email ID
  • Create IBM Watson Platform in services in your IBM cloud account
  • Launch the IBM Watson lot Platform
  • Create a new device
  • Give credentials like device type, device ID, Token
  • Create API key and store API key and token elsewhere

Python IDE

  • Install python 3 Compiler
  • I Installed PyCharm Community Edition 2020

IoT Simulator

 In our project in the place of sensors, we are going to use a lot sensor simulator which gives random readings to the connected

OpenWeather API

Building Project

Connecting IoT Simulator to IBM Watson IOT Platform

  • Open link Provided in section 4
  • Give the credentials of your device in IBM Watson IoT
  • Click on Connect
  • My credentials given to the simulator are:
  • Organization ID:ka1gns
  • Device Type:nodemcu
  • Device ID:1234five6789
  • Authentication Method:use-token-auth
  • Authentication Token:*********
  • You, Will, receive the simulator data in the cloud
  • You can see the received data in Recent events
  • Data is received in this format (JSON)
  • You can see the received data in cards by creating cards on Boards Tab

4.2    Configuration of Node-Red to collect IBM Cloud Data

  • The Node-Red IBM IoT App is added in Node-Red Work The appropriate device credentials obtained earlier are entered into the node to connect and fetch the device to Node-Red
  • Once it is connected Node-Red receives data from the device
  • Display the data using debug node for

Configuration of Node-Red to collect data from Open weather API

  • The Node-Red also receives data from the OpenWeather API by HTTP GET request. An inject trigger is added to perform HTTP requests for every certain
  • The data we receive from OpenWeather after the request is in JSON format

Configuration of Node-Red to send commands to IBM Cloud

  • By using IBM IoT out Node I used to send data from Node-Red to IBM Watson So, after adding it to flow we need to configure it with the credentials of our Watson device.

Adjusting UserInterface

  • By connecting all the flows shown above
  • We can display our UI by clicking on the dashboard tab in Node-red
  • On the above page, we can display the sensor data and motor
  • On this page, we open weather API data is displayed

Intelligent Customer Help Desk with Smart Document Understanding

INTRODUCTION

Overview

We will be designing an application that leverages multiple Watson Airservices (Discovery, Assistant, Cloud function, and Node Red). By the end of the project, we’ll learn best practices of combining Watson services, and how they can be used to build interactive information retrieval systems with

Discovery + Assistant.

  • Project Requirements: Python, IBM Cloud, IBM Watson
  • Functional Requirements: IBM Cloud
  • Technical Requirements: AI, ML, WATSON AI, PYTHON
  • Software Requirements: Watson assistant, Watson

Scope of Work

  • Create a customer care dialog skill in Watson Assistant
  • Use Smart Document Understanding to build an enhanced Watson Discovery collection
  • Create an IBM Cloud Functions web action that allows Watson Assistant to post queries to Watson Discovery

Proposed solution

For the above problem, we are able to put a virtual agent in the chatbot so it can understand the queries that are posted by customers. The virtual agent should train from some insight records-based company background so it can answer queries supported by the merchandise or associated with the company. In other words, some styles of manual will be accustomed to training the bot using AI. Here I’m using Watson Discovery as a tool for implementing AI and getting trained by the owner’s manual.

THEORETICAL ANALYSIS

Block/Flow Diagram

Hardware / Software Designing

  1. Create IBM Cloud services
  2. Configure Watson Discovery
  3. Create IBM Cloud Functions action
  4. Configure Watson Assistant
  5. Create flow and configure the node
  6. Deploy and run Node-Red app

EXPERIMENTAL INVESTIGATIONS

Create IBM Cloud services

Create the following services:

  • Watson Discovery
  • Watson Assistant
  • IBM cloud function
  • Node-Red

Advantages

  • Companies can deploy chatbots to rectify simple and general human queries.
  • Reduces manpower
  • Cost efficient
  • No need to divert calls to customer agents and customer agents can look at other

Disadvantages:

  • Sometimes chatbots can mislead customers
  • Giving the same answer for different sentiments.
  • Sometimes cannot connect to customer sentiments and intentions

APPLICATIONS

  • It can deploy in popular social media applications like Facebook, slack, and telegram.
  • A chatbot can deploy any website to clarify basic doubts of viewer

CONCLUSION

By doing the above procedure and all we successfully created an Intelligent help desk smart chatbot using Watson assistant, Watson discovery,

Node-RED and cloud functions.

FUTURE SCOPE

We can include Watson studio text-to-speech and speech-to-text services to access the chatbot hands-free. This is one of the future scopes of this project.

Predicting Life Expectancy Using Machine Learning Python Project

Project Name: Predicting Life Expectancy Using Machine Learning

Project scope: The scope of this project is ” Predicting Life Expectancy Using Machine Learning” in this project we are given the task to predict life expectancy, life expectancy is the average time period for which the subject lives.

Project schedule: 

  1. Understanding what to do in the above-given Predicting Life Expectancy Project
  2. Identify and get familiar with the tools needed to complete this project
  3. Writing codes
  4. Collecting Data sets
  5. The time duration is 5 days

 Deliverables: 

  1. Predicting Life Expectancy Using Machine Learning.
  2. Making a user interface too as front-end work and writing code as backend work to make the user interact and calculate the Life

Setting The Development Environment

  1. Creating GitHub account
  2. Creating Slack account
  3. Signing up for cloud services
    1. Node-Red for front end
    2. Watson Studio for coding
  • Machine Learning services

1.  INTRODUCTION

  1.1          Overview:

 This project is based on predicting the life expectancy of a person. It is the statistical average of the number of years a person is expected to live. Factors affecting life expectancy are Country, Mental and Physical Illness, lifestyle, diet, health care services, financial condition, BMI, alcohol consumption, Diseases, etc.

Here in this Predicting Life Expectancy project, our motive is to find the life expectancy of a person after providing details such as the country he is living in is developed or is developing, BMI of the person, Disease history, Income, Population of that country, Expenditure, etc. So here I have used Machine learning and Artificial Intelligence to predict life expectancy. The data used in the training of the model was the data by WHO taken from Kaggle.

There were almost 22 columns stating different factors affecting Life expectancy and 2939 rows comprising data of different persons from different countries. Based on the results we got on Watson Studio some factors which were not affecting the Life expectancy much were removed and the scoring endpoint was obtained after running full code. This scoring endpoint is the URL that helps us to send payload data to a model or function development for analysis (such as to classify the data or to make predictions).

After obtaining the endpoint the next step is to work on Node-red which is the platform, we can use for developing our front-end page that will have a form asking you your details such as year of birth, adult mortality, infant deaths, BMI, etc. rest we’ll discuss in details later on.

Requirements: IBM Cloud, GitHub, Slack, IBM Watson, Node-Red

1.2          Purpose:

 The purpose of this project is to build a model that will predict the Life Expectancy of a person after giving the details of the BMI, Expenditure, Disease history, etc.

2.  Literature Survey

2.1          Proposed Solution:

 The project tries to create a model based on data provided by the World Health Organization (WHO) to evaluate the life expectancy for different countries in years. The data offers data on different person’s Physical health, Mental health, etc from the time frame 2000 to 2015. The data was taken from the website: https://www.kaggle.com/kumarajarshi/life-expectancy- who/data. 

3.  Theoretical Survey

 3.1          Block diagram

 

Block Diagram for Predicting Life Expectancy with Python

3.2          Hardware/Software Designing:

·       GitHub

GitHub is the largest community of developers in the world with millions of people sharing their projects, and ideas for benefiting many people in a very unique way. Any person living in any corner of this world can access this platform for his/her benefit. They can share their problem, their ideas, and solution to some problems. In simple words, it is basically a platform in which anyone can come and share their problems and solutions. It is easy to manage. A team working on the same project can easily monitor the progress and can easily access their work anywhere.

·       Slack

It is a messaging tool that is intended to contact your internal team easily. As it gives you a platform through which we can communicate to our team members easily under one roof. It is not as hectic as sending emails and reading them. It directly comes as a message to you from the group created having your team members. It is great if you are having a team of more than 2 members. Searching for messages becomes an easy, fast medium, searching old messages.

·       IBM Cloud

It is the platform that enables us to use its various features such as Watson Studio which provides a platform where we can write our python code and observe our results in the form of heat maps, graphs, and tables. In this project, we used it and got our scoring endpoint. It is the URL that helps us to send payload data to a model or function development for analysis (such as to classify the data or to make predictions).

·       Node-Red

Node-Red helps us to create a front-end window on which we can get the data from the user such as his Year, BMI, Alcohol intake, etc. and it will then connect to the code written on Watson Studio via the scoring endpoint created after running the python code.

4.  Experimental Investigations

 The graphs of various Factors affecting the prediction of life expectancy are shown in the figure given below:

Curves of life expectancy v/s different factors

Heat map of different factors

Shown above is the heat map of the various factors affecting other various factors some of them have positive values some of them have negative but the thing we have to keep in mind is that we can’t neglect the factors having negative values because they will have the adverse effect which will affect the life expectancy. After some observations, I decided not to include 6 factors that are not affecting life expectancy much and will reduce the calculations and make our model less complex.

5.  Flow Chart

  1. Result

 After filling in all the necessary details asked in the UI form, we got the prediction of life expectancy. The accuracy of our model was 94.41%

Screenshot of the prediction of life expectancy obtained

Advantages and Disadvantages

 Advantages:

  • Easily identifies trends and patterns
  • Wide Applications
  • Handling multi-dimensional and multi-variety data
  • No human intervention is needed (automation)
  • Continuous Improvement

Disadvantages:

  • High error-susceptibility
  • Needs a lot of time to implement
  • Interpreting the results accurately
  • Data set collection is a complex task

Applications 

  1. The form created is easy to understand and is easy to fill by anyone.
  2. It can be used for monitoring health conditions in a particular country
  3. It can be used to get the data about the factor affecting Life expectancy the most in order to work in the direction of obtaining a high life expectancy
  4. It can be used to develop statistics for a country’s development process

Conclusions

This user interface enables any user to predict the life expectancy value of anyone on the basis of the details asked in the form.

Future Scope 

  1. Increase model accuracy
  2. Gives suggestions on how to increase Life Expectancy
  3. Mental health data was missing from the WHO data set which also plays the important role in affecting life expectancy
  4. The scalability and flexibility of the application can be

Energy Management System Python Project

ENERGY MANAGEMENT

  • This is a project on energy management.
  • The project helps to save energy.

Description

  • First, create an IBM cloud account with an e-mail address and password.
  • Then create an IoT platform and node-red platform.
  • We need to write a python code for it because it is a real-time example.
  • Create an MIT app.

First, create an IBM cloud account with an e-mail address and password

Go to google and search for IBM and create an account using your email address and log in to the page. we will get the interface as an IBM dashboard.

CREATING IBM PLATFORM

After creating an IBM account there will be a search option then we can able to see it. Type Internet of things there will be a platform called the internet of thing in that u can able connect the so many services in that internet of things and create a service in that it will ask u to launch it and for creating an internet of things u need some keys as API keys, Device connects and so many things will fill and u can able to see an option as the add device click on new device u can see the device has been created for that u need to keep the API keys, Device information safely in the note pad because it will help u at the need for connecting it.

WRITE PYTHON CODE

we are writing python code because we are going to deal with a real-time example so we need to use python. actually, our project is about how much electricity is causing monthly and its estimated cost
In this, we are writing about fan, light, washing machine, tv, and ac let s take some random values in that because we can’t able take the exact values, and then we need to add all of the to know the charge and then we need to find out the estimation money for it. after completion of this code, u can able to know the code is running.
we need to send it to the IoT platform so we need to install pip by command prompt and then write the code separately so u can able to run and send information to the IoT platform. For sending to the IoT platform we need to give information in a notepad.

python code:

python running code

Information on IoT platform

Creating node-red platform

For creating a node-red platform we need to search in IBM as a node-red app then u can able to see the node app then create it as the local u can create node-red is nothing but we will get the information in the form of a flow chart.
we need to install IoT in, IOT out will be in the node-red app itself and then u can able to use it for better ability and experience we will use the gauge tool and for doing it on the web we will use the HTTP in, HTTP response and then we will use the payload option to print in and I will show u the flow chat I had created and when we run the program u can see the outputs are coming in the debug option.

Create an MIT app.

Search for the MIT app and click on create apps.

First, we should design the app page with alignments given on the left side of MIT. with horizontal alignments drag them to the screen and edit those with suitable markings.
And next insert a text box into the screen. As we have taken energy management the as a fan, ac, light, tv, etc.
Now insert 5 text boxes to the screen and assign the markings. Take two buttons one as checked and another as not checked.

And the two text boxes with one as charge gives the charge of every applicant and another as cost, which gives the summation of all applicants.

This is done and next tap to blocks button. In that create the blocks with URL.

Paste the URL which we have I IBM as:

Now tap on the build option and get the QR code and scan the code you will receive an apk file and install the file and app.

Now the click on the checked button now the values, cost, and charges will be displayed on the screen in their respective blocks.

Intelligent Customer Help Desk Python and Node-Red Project

Project Summary:

In this Intelligent Customer Help Desk project, we need to create a chatbot application that can answer the question(s) that falls outside the scope of the pre-determined question set.

This can be done using a chatbot that will use the intelligent document understanding feature of Watson Discovery. 

Project Requirements:

IBM Cloud, IBM Watson, Python, Node-Red.

Project Scope:

In this Python and Node-Red Project, we need to create a website first using HTML code. Next, we should create a chatbot with help of IBM Watson Assistant and Watson discovery.

Using Node-Red we need to build a web application that integrates all services and deploys the same on the IBM cloud.

This project will answer all queries of the user and if any question falls outside the scope of the predetermined question set then this project will use the Smart Document Understanding feature of Watson Discovery to train it on what text in the owner’s manual is important and what is not.

This will improve the answers returned from the queries.

Intelligent Access Control for Safety Critical Areas Project using IoT Analytics and IBM Cloud Services

Purpose of the Project

  • Access control is done by using a smart Analytic device. It verifies the entry of the person.
  • The Smart device verifies the persons entering into the industry.
  • The details of the person are being taken and uploaded into the cloud.
  • We can Restrict the entry of unknown persons and we can restrict the persons who are not following the safety measures by using this IoT device.

Existing Problem

The Intelligent Access Control problem with the present existing device is it cannot able to identifies the safety measures of the persons it just identifies the entry of the persons.

Proposed Solution

We can make use of IoT Analytics in Access Control, such that during working hours in the industry we can identify the persons who are following the safety measures and who are not following.

 Also, with the usage of IoT, automatically, the details of the person are taken and we can restrict them.

Hardware/Software Designing

The Intelligent Access Control Software design involves general We used IBM Cloud Services to create the Internet of Things platform. In the IoT platform, we create a virtual Raspberry Pi device. After creating the design we get the device credentials. We use these credentials in the Python program then we integrated the Node-Red platform with IoT. With the help of MIT APP Inverter, we designed the app & integrated it with the Node-Red to observe the values.

Experiment Investigation

To complete our Intelligent Access Control project work we collected the required data from Google & research papers. After getting complete knowledge we work according to our roles in the project. At first, we create the IBM Cloud account then we created the Internet of Things Platform after we wrote a python code in IDLE to connect IBM IoT Platform. Next, we created the Node-Red Services. This service helps us to show virtual flow graphs. We connect Node-Red to IBM IoT to get the current, and voltage, and calculate bills. From Node-Red we send values to the MIT APP. From the app, we can view the details of the person.

FLOWCHART

Flow Chart

MIT APP:

MIT App

ADVANTAGES & DISADVANTAGES

Advantages:

1) Increase ease of access for employers

2) Keep track of who comes and goes

3) Protect against unwanted visitors

4) create a safe work Environment

5) Reduce Theft and Accidents

6) Easy Monitoring

Disadvantages:

1) Access control systems can be hacked.

 APPLICATIONS

1) Large Industries

2) In Airports

3) Government Sectors.

AI-Powered News Articles Search Web Application using IBM Cloud and Slack Bot

Purpose

The purpose of this News Articles Search project is to develop a web application that fulfills our need to find the obvious and recent news articles and update them regularly. After the discovery service is integrated with Slack Workspace, it gives a bot as an intermediate to search news with a keyword. In addition, the web application also analysis the sentimental present in the news article and extracts keywords and concepts to make it an attractive and understandable format for the user to understand what is important and what is not.

Literature Survey

Existing Problem

News Article applications that are currently used are confusing the users, with multiple functions and an overflow of design, these applications still do not fulfill the demand of the news users and often get results from the past days, weeks, and months, which confuses the users only. Also, there is no way in these apps to know what the approximate feeling of the audience is regarding the article or news topic, which makes it less interactive and very low number of users.

Proposed Solution

Discovery service available in the IBM cloud, creating a web app to get the latest and obvious news results fast and user friendly. When integrated with Red Node Flow, the IBM Discovery Service can create a simple, engaging, organized user interface that provides users with relevant news articles as Discovery Service continuously crawls the web for the latest news to provide. By adding emotional analysis, we make the user interface more interactive, easier to understand, and attain more users.

Project Tasks

1. Creating and deploying the Watson discovery news app locally.
2. Integrating Slack-bot with Watson Discovery.
3. Creating node-red user Interface.
4. Integrating node-red UI with Watson Discovery.

Flow Chart:

Flow Chart

Experimental Investigation

First, we use the discovery service to configure and query adding our collection. A red node application is created in which the discovery is integrated and a simple flow of 5 nodes is created to enter the news topic and the results show related news. Slack then integrates with Watson’s discovery service so that news articles can be searched on more than one platform, and finally, sentiment analysis is performed on the data/news articles being searched.

Advantages and Disadvantages

1. The News Articles Search web application provides interactive sentiment analysis.
2. It can be accessed through more than one platform which is slack.
3. It collects and delivers the most recent data.
4. It does not have additional features like storing news history.
5. It does not provide a stand-alone app but rather uses a web application.

Applications

1. This News Articles Search web application can be used by any user in need of accurate and fast results.
2. Can be used by firms and organizations.
3. Can be used in the stock market to make predictions.

Bot on slack

Bot on slack

Conclusion

This News Articles Search project gives some basic working knowledge of the Watson Discovery Service and showed you how to use Discovery along with JavaScript and Node.js to build your own news mining web application. It also gives insight into real-world applications of AI and helps us understand Slack better.

Future Scope

1. The IBM Cloud and Slack Bot web application can be integrated with the cloud and made into a mobile app to use on it on-the-go.
2. Additional sentiments can be added to the UI.
3. Related and trending news topics can be shown to the user.

 

Employee Work Appreciation based on Customers Feedback Project using IBM Cognitive Services

PURPOSE OF THE PROJECT

The purpose of the Employee Work Appreciation based on Customers Feedback project is to appreciate the employee’s work based on the feedback given by the customers and the employees. The feedback given by the customers to a respective employee is analyzed i.e. is it polite feedback/satisfied feedback…etc. Based on that, employees will be given appreciation.

Block Diagram:

Block Diagram

Flow Chart Diagram:

Flow Chart Diagram

HARDWARE/SOFTWARE SOLUTION

1. IBM Cloud
2. IBM Watson Tone Analyzer
3. Node-RED
4. Create an employee database in the IBM cloud and upload sample 4 employees feedback JSON files.

EXPERIMENTAL INVESTIGATION

1. Choose a Project Idea:

Employee Work Appreciation based on Customers Feedback.

2. Conduct Background Research
3. Compose a Hypothesis:
Based on our Study and the information gathered we can decide how well an employee is appreciable.
4. Design your Experiment:
First, we need to collect employee reports in which feedback is given by the customers.
Next, we give those reports as input to the Tone analyzer service which predicts the emotion behind the feedback.
5. Draw Conclusions:
After Building our model, we can able to know how well the employee is working and appreciate the employee’s work based on analysis of customer feedback.

Result Screenshots:

Sentiment Analysis:

Sentiment Analysis

Cloudant Dashboard
APPLICATIONS

This Employee Work Appreciation application is used for deciding whether the employee’s work is up to the mark or not.

This system can also be used for employees to check whether they receiving good or bad feedback from customers so that they will improve their work.

Node-RED Flow:

Node-RED Flow

IBM Cloud databases

Input employee reports stored in the employee database

IBM Cloud databases
Output sentiment by tone analyzer stored in sentiment database.