IoT AS Unit-1

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 114

IoT Architecture & Sensors

(ET352 Open Elective Course)

Course Instructor
---
VIKRANT VERMA
Assistant Professor
School of Electronics & Telecommunication Engineering
Course Objectives & Course Outcomes
After the completion of today’s lecture you all will be able to –

TLO 1: Define IoT in technical jargons

TLO 2: Identify components for building a basic IoT system


Poll Question 1: Which of the following figures precisely depict an IoT system?

Figure-1

Figure-2
APPLICATIONS OF IOT
Smart Healthcare
Systems

1 2
3 4
APPLICATIONS OF IOT
Ungraded Discussion
Q: Look around yourself and discuss what can be converted into
an IoT system
COMPONENTS OF IOT
Building Blocks of IoT

Figure Credits: iothub.com


Sensors Gas
Ultrasonic
Sensor Sensor
DHT11 Sensor
Contactless
Temperature Sensor
Alcohol
Sensor
Touch
Temperature Sensor
Sensor

PIR Motion
Sensor
Pressure
Sensor
Tilt Light
Sensor Sensor

Infrared Soil Moisture Current


Sensor Sensor Sensor
Display Devices
Actuators
Some of the Low-Power, High-Performance and Most Acceptable Microcontrollers
Leading the World of Electronics Market Today
Connectivity

➢ Each of these wireless technologies has its own pros and cons in terms of
power, data transfer rate and overall efficiency
➢ Developments in the low power, low cost wireless transmitting devices
are promising in the area of IoT due to its long battery life and efficiency

LoRa Bluetooth Zigbee Wi-Fi Z-Wave


Module Module Module Module Module
Some of the Popular Wireless Modules Available for Implementation of IoT based Applications
IoT Gateways
➢ to manage the bidirectional data traffic between different networks and protocols
➢ to translate different network protocols and make sure interoperability of the connected devices & sensors
Available Cloud Platforms
ThingSpeak is an IoT analytics platform service that allows you to aggregate, visualize, and analyze
live data streams in the cloud. You can send data to ThingSpeak from your devices, create instant
visualization of live data, and send alerts.
HISTORY
of
INTERNET OF THINGS
History of IoT
• The term “Internet of Things” (IoT) was first used in 1999 by British technology pioneer Kevin Ashton to
describe a system in which objects in the physical world could be connected to the Internet by sensors.

Ashton coined the term to illustrate the power of connecting

Radio-Frequency Identification (RFID) tags used in corporate

supply chains to the Internet in order to count and track goods

without the need for human intervention.

Kevin Ashton
Co-founder and executive director of the
Massachusetts Institute of Technology’s
Auto-ID Center
EVOLUTION
of
INTERNET OF THINGS
Evolution of IoT
• Today, the Internet of Things has become a popular term for describing scenarios in which Internet
connectivity and computing capability extend to a variety of objects, devices, sensors, and everyday
items.
• Many applications and industries enabled by IT networks with integrated components are quickly
redefining IoT beyond RFID, machine-to-machine (M2M) or any previous point interconnection
technology.
• IoT encompasses all of these. Thanks to the internet, mobile devices and data analytics, new layers of
capability are added to what IoT encompasses all the time.
• Mainly this phenomena can be put down to the evolution of convergence of multiple technologies,
ranging from the internet to wireless communication; from embedded systems to micro electromechanical
systems (MEMS). As such, embedded systems, wireless sensor networks, control systems, automation
(including home and building automation), and other all contribute to enabling the internet of things.
Industry 4.0 and the automation of production lines relies heavily on IoT
Network control and management of manufacturing equipment, assets and situation management, or
manufacturing process control bring the IoT within the realm of industrial applications and smart
manufacturing.
The IoT intelligent systems use networking machinery, sensors and control systems to enable rapid
manufacturing of new products, dynamic response to product demands, and real-time optimization of
manufacturing production and supply chain networks.

What is Industry 4.0?


Industry 4.0 refers to the “smart” and connected production systems that are designed to
sense, predict and interact with the physical world, so as to make decisions that support
production in real-time.
To efficiently build self-managing production processes, optimizing use of energy & inputs
If the idea of connecting objects to each other and to the Internet is not new, it is reasonable to ask,

“Why is the Internet of Things a newly popular topic today?”


From a broad perspective, the confluence of several technologies and market trends is making it possible to
interconnect more and smaller devices cheaply and easily:

• Ubiquitous Connectivity—Low–cost, high–speed, pervasive network connectivity, especially through

licensed and unlicensed wireless services and technology, makes almost everything “connectable’’.

• Widespread adoption of IP–based networking— IP has become the dominant global standard for

networking, providing a well–defined and widely implemented platform of software and tools that can be

incorporated into a broad range of devices easily and inexpensively.

• Computing Economics— Driven by industry investment in R&D, and manufacturing, Moore’s law

continues to deliver greater computing power at lower price points and lower power consumption.
•Miniaturization— Manufacturing advances allow cutting-edge computing and communications

technology to be incorporated into very small objects. Coupled with greater computing economics, this has

fueled the advancement of small and inexpensive sensor devices, which drive many IoT applications.

• Advances in Data Analytics— New algorithms and rapid increase in computing power, data storage, and

cloud services enable the aggregation, correlation, and analysis of vast quantities of data; these large and

dynamic datasets provide new opportunities for extracting information and knowledge.

• Rise of Cloud Computing– Cloud computing, which leverages remote, networked computing resources to

process, manage, and store data, allows small and distributed devices to interact with powerful back-end

analytic and control capabilities.


IoT Definitions
[1] The term Internet of Things generally refers to scenarios where network connectivity and computing

capability extends to objects, sensors and everyday items not normally considered computers, allowing

these devices to generate, exchange and consume data with minimal human intervention. There is,

however, no single, universal definition.

[2] The Latest Google Definition: “The Internet of Things (IoT) is a system of interrelated computing

devices, mechanical and digital machines, objects, animals or people that are provided with unique

identifiers and the ability to transfer data over a network without requiring human-to-human or human-

to-computer interaction.”
What is IoT?
The Internet of Things (IoT) refers to the interconnected network of physical devices, vehicles,
appliances, and other objects embedded with sensors, software, and connectivity capabilities.

These devices can collect, exchange, and transmit data over the internet, enabling them to communicate

and interact with each other, as well as with centralized systems and applications.

IoT has the potential to revolutionize various industries, including healthcare, manufacturing,

transportation, agriculture, and more, by providing real-time insights, automation, and enhanced

efficiency.

However, it also raises concerns about data privacy, security, and the need for robust infrastructure to

handle the massive influx of data generated by these interconnected devices.


Goal of IoT:
The main goal of IoT is to configure, control and network the devices or things, to internet, which are
traditionally not associated with the internet i.e thermostats, utility meters, a Bluetooth connected headset,
irrigation pumps, sensors and control circuits for an electric car’s engine, logistics, industrial control, retail,
agriculture and many other domain.
QoS (Quality of Service)
In most IoT systems, it is critical to guarantee the quality of service (QoS) to the users, according to the
requirements of the application domain. Several metrics to measure the quality of service of IoT systems have
been proposed. QoS can be classified into three groups:
(1) QoS of communication to measure the quality of network services with metrics such as jitter, bandwidth,
performance and efficiency, and network connection time;
(2) QoS of things with metrics such as availability, reliability, response time, and security; and
(3) QoS of computation to measure computational performance with metrics such as scalability, dynamic
availability, and response time.
Characteristics of IoT
[1] Dynamic & Self Adaptive
All types of unexpected events (such as unstable signal strength, growth in the number of connected
devices, and software and hardware aging) can happen at any time, posing a risk to the Quality of
Service (QoS)
• This unpredictable behavior of the system can be addressed at runtime by self-adaptive systems
• A self-adaptive system modifies its behavior at runtime in response to changes in the system or
its environment to ensure a certain quality level

IoT devices and systems may have the capability to dynamically adapt with the changing contexts
and take actions based on their operating conditions, user’s context, or sensed environment
Scenario: Self-Adaptive HVAC System
Imagine an IoT-enabled smart building with a Heating, Ventilation, and Air Conditioning (HVAC) system
that aims to maintain a comfortable indoor environment while minimizing energy consumption. This
system can exhibit self-adaptiveness through the following components and actions:
1. Sensors and Data Collection: The building is equipped with various sensors distributed across
different areas to continuously collect real-time data about the building's conditions (Dynamic)
2. Data Analysis and Machine Learning: The collected sensor data is analyzed by some algorithms to
identify patterns, trends, and correlations between different environmental factors and occupant
behavior. (Learning)
3. Behavioral Patterns: Over time, the machine learning algorithms recognize patterns, such as peak
occupancy times, preferred temperature ranges, and lighting preferences. The system also learns
about the building's thermal characteristics, including how long it takes to heat or cool different
areas.
4. Dynamic Adjustments: of various parameters of the HVAC system:
•Temperature Setpoints: The system can adjust temperature setpoints in different zones of
the building to match occupants' preferences and occupancy patterns.
•Ventilation Rates: The HVAC system can adjust ventilation rates based on the number of
occupants to maintain indoor air quality.
•Energy Consumption: The system can optimize energy consumption by predicting
demand and adjusting HVAC operation accordingly, for example, pre-cooling or pre-heating
of areas before occupancy spikes.
•Fault Detection and Correction: The system can also use data patterns to detect
potential faults or anomalies in the HVAC equipment. It can then take corrective actions,
such as notifying maintenance personnel or adjusting system components to compensate
for the issue.
5. Continuous Learning: The ML algorithms continue to learn allowing system to adapt to
changing environmental conditions, seasonal variations, and evolving occupancy patterns.
Characteristics of IoT
[2] Self-Configuration: IoT devices are often deployed in diverse and dynamic environments.
Self-configuration involves the ability of these devices to autonomously set up and adapt to their
surroundings.
This includes tasks like
• discovering other devices on the network
• establishing communication protocols
• fetch latest software upgrades
• configuring their operational parameters
and that too without requiring manual intervention
Characteristics of IoT
[3] Self-Optimization: IoT systems can experience varying conditions and workloads
Self-optimization enables devices to adjust their behavior or settings in response to changes in the
environment or workload.
This ensures that the system operates at its best performance levels, whether it's conserving energy,
optimizing data traffic, or adapting to changing usage patterns.

[4] Self-Healing: IoT networks can be vulnerable to failures due to factors like device malfunctions,
communication disruptions, or environmental changes.
Self-healing involves the ability of the system to detect faults, diagnose the root causes of issues, and
take corrective actions to restore normal operation. This might involve
• rerouting traffic
• replacing malfunctioning components
• triggering backup systems
Characteristics of IoT
[5] Self-Protection: Security is a critical concern in IoT systems, as they often handle sensitive data
and interact with physical environments
Self-protection refers to the capability of devices and the network to defend against malicious attacks,
unauthorized access, and data breaches.
This might involve
• implementing encryption
• authentication mechanisms
• intrusion detection, and other security measures to safeguard the system

[6] Interoperable Communication: Interoperability is a characteristic of a product or system to


work with other products or systems.
IoT allows different devices (different in architecture) to communicate with each other as well as with
different network. For eg: MI Phone is able to control the smart AC and smart TV of different make
[7] Unique Identity:
The devices which are connected to the internet have unique identities i.e IP address through which they
can be identified throughout the network
Formulating Definition of IoT
Physical Design of IoT
The physical design of IoT involves creating and configuring the hardware

components that make up interconnected devices within the Internet of Things ecosystem

This design encompasses a variety of aspects, including the selection of sensors, communication modules,
power sources, form factors, and enclosures.

Here are some key considerations in the physical design of IoT:

1. Sensors and Actuators: Choose appropriate sensors to gather relevant data from the device's environment

Choose appropriate actuators to perform actions based on data inputs, such as motors, relays, or solenoids

2. Connectivity: Communication tech., the IoT device will use to transmit data to other devices or the cloud

Options range from Wi-Fi and Bluetooth to cellular networks, LoRaWAN, Zigbee, and more

The choice of connectivity affects the device's range, power consumption, data transmission capabilities
Physical Design of IoT
3. Power Source: Determine how the IoT device will be powered

This could involve batteries, solar panels, energy harvesting, or even wired power sources

The power source influences the device's longevity and maintenance requirements

4. Form Factor & Enclosure: Design the physical shape & size of device to suit its intended environment

The enclosure should protect the internal components from environmental factors like dust, moisture

5. Energy Efficiency: Optimize the design for energy efficiency to extend the device's battery life

Use of low-power components, optimizing data transmission intervals & implementing sleep modes

6. Processing Capability: Processing power & memory needed to execute device's functions & process data

Complexity demands microcontrollers to more powerful microprocessors


Physical Design of IoT
7. Security: Implement security measures to safeguard the device and its data

This might involve encryption, secure boot mechanisms, and authentication protocols

8. Scalability: Design the device with the scalability of the IoT solution in mind

Ensure that devices can easily join the network and that the infrastructure can accommodate a

growing number of interconnected devices

9. Data Storage and Processing: Determine how the device will handle data storage and processing

Some devices might perform basic data preprocessing locally before sending information to the

cloud, while others might transmit raw data for more extensive processing

10. User Interface: If applicable, design a user interface for device configuration and interaction

This could involve physical buttons, touchscreens, or LED indicators


The things/devices in the
IoT system are used for:

• Building connections

• Data processing

• Providing storage

• Providing interfaces

• Providing graphical interfaces

The devices generate data, and the data is used to perform analysis and do operations for improving the system.
Link Layer
IoT Protocols 802.3 – Ethernet
802.11 – WiFi
802.16 – WiMax
802.15.4 – LR-WPAN
2G/3G/4G
Network/Internet Layer
IPv4 -
IPv6
6LoWPAN
Transport Layer
TCP – Transmission Control Protocol
UDP – User Datagram Protocol
Application Layer
HTTP - HyperText Transfer Protocol
CoAP – Constrained Application Protocol
WebSocket
MQTT – Message Queuing Telemetry Transport
XMPP – Extensible Messaging Presence Protocol
DDS – Data Distribution Service
AMQP – Advanced Message Queuing Protocol
Logical Design of IoT
The logical design of IoT involves:
• creating a structured framework and architecture for the software components
• data flows within an Internet of Things ecosystem
This design focuses on how devices communicate, process data, and interact with each other and with
centralized systems. Here are the key aspects of the logical design of IoT:

1. Architecture: This includes deciding whether to use a centralized, decentralized, or edge computing
approach. Consider how data flows between devices, gateways, cloud services, and applications.
2. Communication Protocols: Choose the communication protocols that devices will use to exchange data.
Common protocols include MQTT, CoAP, HTTP, and WebSockets. The choice of protocol can affect data
efficiency, reliability, and latency.
3. Data Ingestion and Processing: Design how data is collected, ingested, and processed. Determine
whether data will be processed at the device level, at gateways, or in the cloud. Implement data filtering,
transformation, and aggregation as needed.
4. Data Storage: Decide how and where data will be stored. Choose between local storage on devices,

cloud-based databases, or a combination of these. Consider factors such as data retention policies,

access control, and scalability.

5. Analytics and Insights: Define how data will be analysed to extract meaningful insights. Implement

data analytics tools and algorithms to derive valuable information from the collected data. This could

involve real-time analytics, predictive modelling, or machine learning.

6. Device Management: Create mechanisms for remotely managing and monitoring IoT devices. This

includes firmware updates, configuration changes, and diagnosing device health.

7. Security and Authentication: Implement security measures to protect data and devices. Use encryption,

secure authentication, and authorization mechanisms to ensure the integrity and confidentiality of data.
8. Scalability: Design the solution to scale seamlessly as the number of devices and data volume increase.
This might involve load balancing, clustering, and efficient resource allocation.
9. APIs and Integration: Define APIs (Application Programming Interfaces) for seamless integration with
other systems and applications. This enables interoperability and data sharing between different IoT
devices and platforms.
10. User Interfaces: Design user interfaces for end-users to interact with the IoT solution. This could involve
web dashboards, mobile apps, or other interfaces for visualizing data, managing devices, and configuring
settings.
11. Data Flow Visualization: Create visual representations of how data flows within the IoT ecosystem. This
helps stakeholders understand the system's architecture and data pathways.
12. Predictive Maintenance and Automation: Implement predictive maintenance algorithms and automation
rules to optimize device performance, reduce downtime, and improve efficiency.
Authentication: Authentication is the process of verifying the identity of a user, system, or entity. It ensures
that the claimed identity is accurate and valid. In other words, authentication answers the question, "Who are
you?" It involves providing credentials, such as usernames and passwords, biometric data (fingerprint, facial
recognition), security tokens, or other forms of proof.
Authentication methods establish a user's identity before allowing access to a system or resource. Once
authenticated, a user gains entry to the system or application.

Authorization: Authorization, on the other hand, is the process of determining what actions or resources an
authenticated user is allowed to access. It defines permissions and rights associated with an identity.
Authorization answers the question, "What are you allowed to do?"
Authorization is implemented based on the principle of least privilege, which means users are granted the
minimum level of access necessary to perform their tasks. This reduces the potential impact of security
breaches or accidental misuse.
REQUEST-RESPONSE COMMUNICATION MODEL

• Request-Response is a communication model in which the client sends requests to the server and the
server responds to the requests.
• When the server receives a request, it decides how to respond, fetches the data, retrieves resource
representations, prepares the response, and then sends the response to the client.
Application Example of Request-Response Communication Model in IoT Design
Smart Home Lighting System
In this system, various IoT devices such as smart light bulbs, motion sensors, and a central control hub are
interconnected.
The request-response communication model is used to enable seamless interaction between these devices.
Components:
1.Smart Light Bulbs: These are IoT devices that can be controlled remotely and can also provide information
about their status, such as whether they are on/off, brightness level, and color.
2.Motion Sensors: These sensors can detect motion within a room and send signals to trigger actions, such as
turning on the lights when motion is detected.
3.Control Hub: This is the central device that manages and coordinates all the smart light bulbs and motion
sensors. It receives commands and sensor data, processes them, and sends appropriate commands back to the
smart light bulbs.
Request-Response Interaction:
1.Turning On/Off Lights:

1. Request: The user initiates a request through a smartphone app to turn on or off a specific light bulb.

2. Response: The control hub receives the request, processes it, and sends a command to the respective

smart light bulb to either turn on or off. The smart light bulb responds with an acknowledgment of the

action taken.

2.Adjusting Brightness:

1. Request: The user adjusts the brightness of a light bulb through the app.

2. Response: The control hub receives the brightness change request, calculates the appropriate settings,

and sends a command to the smart light bulb to adjust its brightness. The bulb acknowledges the

change and may send back the updated brightness level as a confirmation.
3. Motion-Triggered Lights:
1. Response: The motion sensor detects movement and immediately sends a signal to the control hub.
2. Request: The control hub receives the signal, processes it, and sends a command to the nearby smart
light bulbs to turn on.
3. Response: The smart light bulbs that received the command respond with acknowledgments.
4. Status Query:
1. Request: The user queries the status of all connected smart light bulbs (e.g., whether they are on/off,
current brightness).
2. Response: The control hub collects information from all the smart light bulbs and sends back a response
to the user's query, containing the requested information.
This request-response communication model enables seamless interaction between the various
components of the smart home lighting system. It allows users to control and monitor their lighting
environment remotely while ensuring that actions are carried out reliably and responses are received for
confirmation.
PUBLISH-SUBSCRIBE COMMUNICATION MODEL

• Publish-Subscribe is a communication model that involves publishers, brokers and consumers.


• Publishers are the source of data. Publishers send the data to the topics which are managed by the broker.
Publishers are not aware of the consumers.
• Consumers subscribe to the topics which are managed by the broker.
• When the broker receives data for a topic from the publisher, it sends the data to all the subscribed consumers.
Application Example of Publish-Subscribe Communication Model in IoT Design

Environmental Monitoring System


In this system, various IoT devices such as sensors for temperature, humidity, air quality, and light intensity are
deployed in different locations. The publish-subscribe communication model is used to efficiently disseminate
and manage the data collected by these sensors.
Components:
1.Temperature Sensor
2.Humidity Sensor
3.Air Quality Sensor
4.Light Intensity Sensor
5.Data Broker / Message Broker: This is the central component that handles the publish-subscribe
communication model. It acts as an intermediary between publishers (sensors) and subscribers (data
consumers).
Publish-Subscribe Interaction:

1.Temperature Data:
1. Publish: The temperature sensor periodically measures the temperature and publishes the data along
with a topic "environment/temperature" to the data broker.
2. Subscribe: A weather monitoring application has subscribed to the "environment/temperature"
topic with the data broker. It receives the temperature data whenever the sensor publishes it.

2.Humidity Data:
1. Publish: The humidity sensor measures humidity levels and publishes the data with the topic
"environment/humidity" to the data broker.
2. Subscribe: An agriculture monitoring system has subscribed to the "environment/humidity" topic
with the data broker. It receives humidity data updates.
3. Air Quality Data:
1. Publish: The air quality sensor measures pollutants and publishes the data with the topic
"environment/air_quality" to the data broker.
2. Subscribe: An air quality management platform has subscribed to the "environment/air_quality" topic
with the data broker. It receives air quality data for analysis.

4. Light Intensity Data:


1. Publish: The light intensity sensor measures light levels and publishes the data with the topic
"environment/light_intensity" to the data broker.
2. Subscribe: A smart lighting control system has subscribed to the "environment/light_intensity" topic
with the data broker. It adjusts indoor lighting based on light intensity changes.
• The publish-subscribe communication model allows for efficient data distribution
without direct point-to-point connections between sensors and consumers.
• Sensors publish data to specific topics, and subscribers interested in specific types of
data can subscribe to those topics.
• This decoupling of publishers and subscribers allows for scalability and flexibility in
adding or removing components from the system without affecting others.
• The data broker manages the routing of data to the appropriate subscribers based
on their subscriptions.
• This way, each component only needs to know about the topics it's interested in,
reducing complexity and enabling a more modular IoT design.
PUSH-PULL COMMUNICATION MODEL

• Push-Pull is a communication model in which the data producers push the data to queues and the
consumers pull the data from the queues. Producers do not need to be aware of the consumers
• Queues help in decoupling the messaging between the producers and consumers
• Queues also act as a buffer which helps in situations when there is a mismatch between the rate at which
the producers push data and the rate at which the consumers pull data
Application Example of Push-Pull Communication Model in IoT Design

Fleet Management System


Let's consider a fleet management system as an example. In this system, a fleet of vehicles is equipped
with IoT devices that provide real-time information about their location and status. The push-pull
communication model is used to efficiently manage the flow of data between the vehicles and the central
monitoring system.
Components:
1.Vehicle IoT Devices: These devices are installed in each vehicle and continuously gather and transmit
location and status data.
2.Central Monitoring System: This is the central component that collects and processes data from the
vehicles and provides insights for fleet management.
Push-Pull Interaction:

1.Location Data:
1. Push: The vehicle IoT devices periodically push real-time location data to the central monitoring
system.
2. Pull: The central monitoring system can initiate a pull request to get the latest location of a specific
vehicle when needed.

2.Status Data:
1. Push: The vehicle IoT devices send updates about vehicle status (e.g., fuel level, engine temperature)
to the central monitoring system.
2. Pull: The central monitoring system can pull detailed status information about a particular vehicle
in response to user queries.
3. Alerts and Notifications:
1. Push: If a vehicle encounters an issue (e.g., engine malfunction), the vehicle IoT device can
immediately push an alert to the central monitoring system.
2. Pull: The central monitoring system can pull a list of recent alerts from multiple vehicles to
identify patterns and issues.

4. Route Optimization:
1. Push: As a vehicle progresses along its route, it can push location updates and road conditions to
the central monitoring system.
2. Pull: The central monitoring system can pull detailed route and traffic information to optimize
vehicle routes in real time.
• The push-pull communication model in this context enables a balance between proactive
and reactive communication.
• Vehicles proactively push data to the central system to provide real-time updates, while
the central system can also pull specific data when needed.
• This approach ensures that the central system is up-to-date with the latest information
while being able to query specific details as required.
• The push-pull model is particularly useful in scenarios where real-time data is important
for decision-making (e.g., fleet tracking, route optimization, maintenance alerts).
• It allows for efficient data exchange without overwhelming the network with constant
pushing or pulling of data, ultimately leading to more effective fleet management and
better service delivery.
EXCLUSIVE PAIR COMMUNICATION MODEL

• Exclusive Pair is a bidirectional, fully duplex communication model that uses a persistent connection
between the client and server
• Once the connection is setup it remains open until the client sends a request to close the connection
• Client and server can send messages to each other after connection setup
APIs (Application Programming Interface)
Through an API different systems can interact with each other
API helps some big systems to give access of some data to the third-party website

Flight Booking
IXIGO PAYTM MakeMyTrip EaseMyTrip Third-Party Websites

Respective Airlines
Servers

SPICEJET

INDIGO

AIRASIA
What is an API?
In the simplest of terms, an API is a piece of software that plugs one application directly into the data and
services of another by granting it access to specific parts of a server. APIs let two pieces of software
communicate, and they’re the basis for most modern applications. They allow us to streamline IT architectures,
automate marketing workflows, and make it easier to share data sets.
What is REST API?
REST (Representational State Transfer) is truly a “web services” API. REST APIs are based on URIs (Uniform
Resource Identifier, of which a URL is a specific type) and the HTTP protocol and use JSON for a data format,
which is super browser-compatible. (It could also theoretically use the SOAP protocol, as we mentioned above.)
REST APIs can be simple to build and scale, but they can also be massive and complicated—it’s all in how
they’re built, added on to, and what they’re designed to do. Reasons you may want to build an API to be
RESTful include resource limitations, fewer security requirements, browser client compatibility, discoverability,
data health, and scalability—things that really apply to web services.
APIs
• API Key is issued by the System for some authorized third-party websites only
Example: Goindigo.com/make-booking/ “API Key”
• System Monitors through API that which third-party accessed how much data
Example: News API, Weather API, Navigation API, Booking API
Sign-up with Google, Sign-up with Facebook
• There is a proper API Documentation for certain set of protocols and rules to access the system’s
data
• An Integration of APIs into an application gives user the liberty and an extra flavour to have a limited
access of some big platform servers without imitating the same features for that particular application
Example: Integration of a Weather monitoring API into a project saves a lot of time and cost then
physically measuring the weather parameters itself
An API is a piece of software that plugs one application directly into the data and services of another by granting it
access to specific parts of a server. APIs let two pieces of software communicate.
REST API (Representational State Transfer)
It follows Request-Response Communication Model
XML (Extensible Markup Language)
<COUNTRY>
Request Resources <CITY>
Client <TEMP>33</TEMP>
asking Web <HUMIDITY>40</HUMIDITY>
for Response </CITY>
Server </COUNTRY>
Weather
--------------------------------------------------------
Data HTML Page JSON (JavaScript Object Notation )
XML/ JSON {“COUNTRY”;{
“CITY”;{
JSON (JavaScript Object Notation) is a lightweight data- “TEMP”:33,
“HUMIDITY”:40
interchange format and it completely language independent. It is
}
based on the JavaScript programming language and easy to }
}
understand and generate.
JSON is widely used format for transferring data
REST API Example
REST is widely adopted by industries because it works SOAP
Getproducts/1
exclusively on HTTP protocol --------------------------------------------------------
REST
Products/1
HTTP – 4 Verbs
C – Create -> POST
Request: Products/1 R – Read -> GET
U – Update -> PUT
D – Delete -> DELETE
CLIENT Response SERVER
Resources are exclusively held by Server
{
Id:1 Resource is still with the server
Name: Milk
Cost: 30 Representation of Resource
} State of Resource may change such as Cost: 32
WEB SOCKET Based Communication API

• WebSocket APIs allow


bidirectional, full duplex
communication between
clients and servers
• WebSocket APIs follow the
Exclusive-Pair
Communication Model
WEB SOCKET Based Communication API
It supports Stateful Protocols*
- It does not require a new connection to be set up for each message to be sent
- There is no overload for connection set up and termination request for each message
- So Web socket API reduces the network traffic and latency
In web socket communication
- First the client sets up connection with the server
- This request is sent over the HTTP and the server interprets as an upgrade request (called Websocket
handshake)
- If the server supports websocket protocol then only it will respond to this handshake
- If the server supports then client and server can send message to each other in full-duplex mode

* Stateless Protocols: Each time the request is made from client to the server,
it must contain all the information necessary for understanding the request.
REST
1. It supports Request-response communication model
2. It supports stateless protocol
3. It supports unidirectional communication between client and server as only client can send request to server and server
only respond to the request
4. It is half duplex
5. It uses multiple TCP connection for each search over HTTP
6. Since it does not store the request information so each time it needs to provide all the information while creating
communication with server. For this reason header overhead increases
WebSocket
1. It supports Exclusive-pair communication model
2. It supports stateful protocol
3. It supports bidirectional communication between client and server i.e client and server both can request to each other
4. It is full duplex TCP packet header contains the sequence number of the
5. It uses single TCP connection for search over HTTP packet to ensure ordered delivery, a lot of flags to ensure
the packet actually received in its destination and
6. Header overhead is less checksum of the data to ensure it didn’t get corrupted
IoT Enabling Technologies The technologies which are cooperative with IoT
(1) Wireless Sensor Networks (WSN)
An IoT (Internet of Things) Wireless Sensor Network (WSN) refers to a group of spatially dispersed
(scattered in a 3-D space) and dedicated sensors for monitoring, and recording the physical conditions
of the environment, and collectively pass on such data through a wireless network to an internet-based
location. WSNs measures the environmental conditions like temperature, sound, pollution levels,
humidity, wind speed and direction, pressure, etc.
The complete list of available radio transmission technologies we use are:
• Wi-Fi
• LoRaWAN RF
• 3G/4G/5G Mobile Data
• Bluetooth Low Energy (2.4GHz)
A Traditional Wi-Fi Network

• It is a point-to-multipoint network in which all other nodes, called as stations, are directly connected to the access point
(AP), which is a lone central node
• Arbitrating and forwarding signals between the stations is the responsibility of the AP
• A router is used by certain APs to relay communications to/from an external IP network
Disadvantage:
1. Since each station needs to be within the AP's direct range in order to connect, this has the disadvantage of having a
limited coverage area
2. Prone to overloading as the capacity of the AP restricts the number of stations that may be connected to the network at
once
A Wi-Fi Mesh Network

• In this case, connecting to a central node is not necessary. Nodes can instead make connections with nearby nodes.
• The responsibility for relaying each other's signals falls on the nodes themselves.
• Much wider coverage due to the fact that nodes can still join without being within the range of the central node;
• Less prone to overloading due to the fact that the number of nodes allowed on the network is no longer constrained
by a single central node.
• The AP's capacity determines how much data may be permitted in the network.
supports the interoperability of heterogeneous sensors
by eradicating the need for sensor-specific modules
through OTA-based reconfiguration.

The reconfiguration feature allows for new sensors


to connect to an existing adapter, without changing
the hardware units or any external interface
• A WSN consists of several end nodes and routers as well as coordinator.
• Sensors are attached with end nodes. Each router can also be called as end node.
• Routers are responsible for routing the data packets from end nodes to the coordinator nodes.
Coordinator node connects the WSN to the internet. The Coordinator node can be another Arduino,
raspberry pi or any other IoT DIY device. It collects the data from all the nodes.
• WSNs are enabled by wireless communication protocols such as IEEE802.15.4.
• It can also be enabled by ESP 8266 and ZigBee.
• In WSN the devices can reconfigure themselves i.e new nodes can be added to the networks and
software can be updated automatically whenever they will be connected to the internet.
• Ex. of Wireless sensor network: Weather monitoring system, Indoor air quality monitoring, soil
moisture monitoring, surveillance system, smart grids, machine prognosis and diagnosis.
(2) Cloud Computing:
1. It is an emerging technology which enables on-demand network access to computing resources like
network servers, storage, applications and services that can be rapidly provisioned and released
2. On demand: we invoke cloud services only when we need them, they are not permanent part of IT
infrastructure
3. Pay as you go model: You pay for the cloud services when you use them, either for the short period of
time or longer duration (for cloud based storage)
4. Cloud provides various services such as
i. IAAS: Infrastructure as a service
ii. PAAS: Platform as a service
iii. SAAS: Software as a service
IAAS:
Instead of creating a server room we will hire it from a cloud service provider. Here user will not use its local computer,
storage and processing resources rather it will use virtual machine and virtual storage, servers, networking of third party.
Here the client can deploy the OS (operating system), application of his own choice. User can start, stop, configure and
manage the virtual machine instances and virtual storage.
PAAS:
User can develop and deploy applications. For ex. We are using various online editors to write codes like online arduino
IDE, C IDE, APIs, software libraries. Here we don’t need to install anything. The cloud service provider will manage
servers, network, OS and storage. The users will develop, deploy, configure and manage applications on the cloud
infrastructure.
SAAS:
It provides complete software application or the user interface to the application itself. The user is not concerned about
the underlying architecture of cloud only service provider is responsible for this. It is platform independent and can be
accessed from various client devices such as workstation, laptop, tablet and smart phone, running different OS. Ex: The
online software we use like online image converter, doc converter etc.
(3) Embedded Systems:
1. It is a computational system that has hardware and software embedded to perform specific task
2. The key components of an embedded system include microprocessor or micro controller, memory (RAM,
ROM, Cache), networking units (Ethernet, Wi-Fi adapter), input/output units (display, keyboard, etc) and
storage (flash memory). They use some special types of processor such as digital signal processor, graphics
processor and application specific processor). Embedded system uses embedded OS like RTOS
3. Ex. of embedded systems: digital watch, digital camera, vending machines

(4) Communication protocols:


1. Protocol is nothing but rules and regulations. Communication protocol is the backbone of the IoT system.
2. It allows interoperability among various devices. It enables network connectivity & coupling to applications.
3. It allows devices to exchange data over the network. These protocols define data exchange format, data
encoding, addressing schemes for devices and routing of packets from source to destination. It also includes
sequence control, flow control and retransmission of lost packets.
IoT Levels
There are 6 levels of IoT based upon the number of monitoring nodes used, type of data base used,
complexity/ simplicity of analysis, computation. Different applications are implemented based on these
IoT levels.
An IoT system comprises of the following components:

• Device: An IoT device allows identification, remote sensing, actuating and remote monitoring

capabilities.

• Resource: Resources are software components on the IoT device for accessing, processing, and storing

sensor information, or controlling actuators connected to the device. Resources also include the software

components that enable network access for the device.


• Controller Service: Controller service is a native service that runs on the device and interacts with the web

services. Controller service sends data from the device to the web service and receives commands from the

application (via web services) for controlling the device.

• Database: Database means storage of data (locally or in the cloud) generated by an IoT device

• Web Service: Web services serve as a link between the IoT device, application, database and analysis

components. Web service can be either implemented using HTTP and REST principles (REST service) or

using WebSocket protocol (WebSocket service).

• Analysis Component: The Analysis Component is responsible for analyzing the IoT data and generate

results in a form which are easy for the user to understand.

• Application: IoT applications provide an interface that the users can use to control and monitor various

aspects of the IoT system. Applications also allow users to view the system status and view the processed data.
IoT Level-1
• A level-1 IoT system has a single node/device that performs

sensing and/or actuation, stores data, performs analysis and

hosts the application

• Data involved is not big. So data is stored in local database.

• Level-1 IoT systems are suitable for modelling low cost and

low-complexity solutions where the data involved is not big

and the analysis requirements are not computationally

intensive

• Example: Home-Automation
IoT Level-2
• A level-2 IoT system has a single node that performs

sensing and/or actuation, stores data, performs analysis and

hosts the application

• Data involved is big. So, data is stored in the cloud

• It uses cloud based application to visualize data

• The primary analysis requirement is not computationally

intensive and can be performed locally

• Example: Irrigation System


IoT Level-3
• It has single node/device for sensing, monitoring, actuating

and hosting application

• Data involved is big. So data is stored in cloud

• It uses cloud based application to visualize data.

• Primary analysis requirement is computationally intensive.

So, can be aggregated and analyzed in cloud.

• Example: tracking package handling


IoT Level-4
• It has multiple nodes/devices for sensing, monitoring,
actuating, performing analysis and hosting application.
• Data involved is big. So data is stored in cloud.
• It uses cloud based application to visualize data.
• Primary analysis requirement is computationally
intensive. So can be aggregated and analyzed in cloud.
• It has two observer nodes i.e local and cloud based.
They can subscribe to and receive information
collected in cloud from IoT device. They can process
and use those information for various applications
• Observer node does not perform any control function.
• Example: Noise monitoring
IoT Level-5
• It has multiple nodes/devices for sensing,
monitoring, actuating. One coordinator node
for collecting and sending the data to cloud by
controller service
• Data involved is big. So data is stored in cloud
• It uses cloud based application to visualize
data. Suitable for wireless sensor network
• Primary analysis requirement is
computationally intensive. Analytic
component analyze the data and stores result
in cloud and make prediction
• Example: Forest Fire Detection
IoT Level-6
• It has multiple independent nodes/devices for
sensing, monitoring, actuating and sending the data
to cloud by controller service
• Data involved is big. So data is stored in cloud
• It uses cloud based application to visualize data
• Primary analysis requirement is computationally
intensive. Analytic component analyze the data and
stores result in cloud
• It has centralized controller which is aware of the
status of all the end nodes and sends control
command to the nodes
• Example: Weather monitoring and structural
health monitoring
(Machine-to-Machine) M2M
Machine-to-Machine (M2M) refers to networking of machines (or devices) for the purpose of remote

monitoring and control and data exchange


(Machine-to-Machine) M2M
• An M2M area network comprises of machines (or M2M nodes) which have embedded hardware

modules for sensing, actuation and communication

• Various communication protocols can be used for M2M local area networks such as ZigBee,

Bluetooth, Modbus, M-Bus, Wireless M-Bus, Power Line Communication (PLC), 6LoWPAN, IEEE

802.15.4, etc.

• The communication network provides connectivity to remote M2M area networks

• The communication network can use either wired or wireless networks (IP based)

• While the M2M area networks use either proprietary or non-IP based communication protocols, the

communication network uses IP-based networks


(Machine-to-Machine) M2M
• Since non-IP based protocols are used within M2M area networks, the M2M nodes within one network

cannot communicate with nodes in an external network

• To enable the communication between remote M2M area networks, M2M gateways are used
Difference between M2M and IoT
# Communication Protocols

• M2M and IoT can differ in how the communication between the machines or devices happens.

• M2M uses either proprietary or non-IP based communication protocols for communication within the

M2M area networks.

# Machines in M2M vs Things in IoT

• The "Things" in IoT refers to physical objects that have unique identifiers and can sense and

communicate with their external environment (and user applications) or their internal physical states.

• M2M systems, in contrast to IoT, typically have homogeneous machine types within an M2M area

network.
Difference between M2M and IoT
# Hardware vs Software Emphasis

While the emphasis of M2M is more on hardware with embedded modules, the emphasis of IoT is more

on software

# Data Collection & Analysis

• M2M data is collected in point solutions and often in on-premises storage infrastructure

• In contrast to M2M, the data in IoT is collected in the cloud (can be public, private or hybrid cloud)

# Applications

• M2M data is collected in point solutions and can be accessed by on-premises applications

• IoT data is collected in the cloud and can be accessed by cloud applications
Smart Parking provides detection of available Smart Agriculture is designed to perform monitoring
parking spaces by placing the node under the of plants and their cultivation in both urban or rural
pavement. It works using magnetic sensor interference settings - example deployments include irrigation
technology which detects when a vehicle is present or monitoring on golf courses and parks, farm crop
not. Sensor: Magnetic field (3 axis) management and greenhouse control. Sensors:
-------------------------------------------------------------- •Soil moisture
Ambient Control allows to you to create basic •Soil temperature
environment parameters monitoring using the •Leaf wetness
temperature, humidity and luminosity sensors. As well •Solar radiation
as this, movement and vibrations can be measured by •Atmospheric pressure
the internal accelerometer. Sensors: Temperature •Stem diameter
•Humidity •Wind
•Luminosity (LDR) •Ambient temperature
•Luminosity (Luxes Accuracy) for Smart Lighting •Humidity
Smart Air Environment is focused on projects in which Smart metering allows to perform electricity
air quality needs to be measured. Sensors: measurements and control in tank levels.
•Presence Sensors:
•Carbon Monoxide (CO) •Current
•Carbon Dioxide (CO2) •Ultrasounds
•Oxygen (O2) •Liquid level
•Methane (CH4) •Liquid flow
•Hydrogen (H2) •Temperature
•Ammonia (NH3) •Humidity
•Hydrogen Sulfide (H2S) •Luminosity
•Nitrogen Dioxide (NO2)
•Ozone (O3)
•Hydrocarbons (VOC)
•Isobutane
•Ethanol
•Toluene
•Temperature
•Humidity
•Pressure atmospheric
Thank You

You might also like