You are on page 1of 76

Internet of Things

Subject Code: (2069PC01)


UNIT – I: Introduction to Internet of Things

–Definition and Characteristics of IoT, Physical Design of IoT – IoT


Protocols, IoT communication models, IoT Communication APIs, IoT
enabled Technologies – Wireless Sensor Networks, Cloud Computing,
Big data analytics, Communication protocols, Embedded Systems, IoT
Levels and Templates, Domain Specific IoTs – Home, City, Environment,
Energy, Retail, Logistics, Agriculture, Industry, health and Lifestyle.

UNIT – II: IoT and M2M

– Software defined networks, network function virtualization,


difference between SDN and NFV for IoT. Basics of IoT System
Management with NETCOZF, YANG- NETCONF, YANG, SNMP NETOPEER

UNIT – III: Introduction to Python

- Language features of Python, Data types, data structures, Control


of flow, functions, modules, packaging, file handling, data/time
operations, classes, Exception handling. Python packages - JSON, XML,
HTTP Lib, URL Lib, SMTP Lib.
UNIT – IV: IoT Physical Devices and Endpoints

- Introduction to Raspberry PI - Interfaces (serial, SPI, I2C).


Programming – Python program with Raspberry PI with focus of
interfacing external gadgets, controlling output, reading input from
pins.

UNIT – V: IoT Physical Servers and Cloud Offerings

– Introduction to Cloud Storage models and communication APIs.


Web server – Web server for IoT, Cloud for IoT, Python web application
framework. Designing a RESTful web API.

TEXT BOOK:

1. Internet of Things - A Hands-on Approach, Arshdeep Bahga and


Vijay Madisetti, Universities Press, 2015, ISBN: 9788173719547

2. Getting Started with Raspberry Pi, Matt Richardson & Shawn Wallace,
O'Reilly (SPD), 2014, ISBN: 9789350239759
Unit 1:

Introduction to Internet of Things


Internet of Things Definition
• The Internet of Things (IoT) refers to a system
of interrelated, internet-connected objects that
are able to collect and transfer data over a
wireless network without human intervention.
Characteristics of IoT:
• Dynamic & Self-Adapting

• Self-Configuring

• Interoperable Communication Protocols

• Unique Identity

• Integrated into Information Network


Challenges in World of IoT:
• Scalability

• Interoperability

• Lack of government support

• Safety of Patients

• Security and Personal Privacy

• Design Based Challenge


Advantages of IoT
• Communication
• Automation
• Remote control
• More information
• Better decision
• Continuous monitoring
• Time-saving
• Money-saving
• Efficient handling
Disadvantages of IoT
• Lagging of standard compatibility

• More opportunities for failure

• Loss of privacy or security

• More dependent on technology


Applications of IoT:
• Smart home security systems.

• Autonomous farming equipment.

• Wearable health monitors.

• Smart factory equipment.

• Wireless inventory trackers.

• Ultra-high speed wireless internet.

• Biometric cyber security scanners.


Evolution of Internet of Things (IoT)
First come back to Pre-Internet era when their is no internet
or and their is only HUMAN to HUMAN Communication it
may be via "Fixed Telephonic Line or SMS" at this time their is
only network.
Then Comes the era of Internet of CONTENT with the
evolution of World Wide Web (WWW) in this time we
started using Email and minor messaging Service.
After that Comes the era of Internet of SERVICES with the
evolution of WEB 2.0 the major game changer of modern
internet. In this era we started using internet more
frequently for communication and other purpose. Service like
E-Commerce and E-productivity was born.
And Now we are living in Era of Internet of PEOPLE where
humans are connected with each other in various ways and
in real time not only via phone and SMS. In this time Services
like Facebook, Twitter, LinkedIn, Skype, YouTube etc was
born. But till now Human are communicating with humans.
Now its time for MACHINE to MACHINE
communication again a result of continuous
Evolution and this is how "Internet of Things "
was born.
In this era machine become more
intelligent and like humans they have their own
identity, Understanding and other features of a
human still they are lacking in Sense and
intelligence then again with the evolution of
technologies like Artificial Intelligence and ML
they with secure that in future.
Physical Design of IoT
• The physical design of an IoT system is referred
to the Things/Devices and protocols that used to
build an IoT system.

• All these things/Devices are called Node Devices


and every device has a unique identity that
performs remote sensing, actuating, and
monitoring work.

• The protocols that used to established


communication between the Node devices and
server over the internet.
IoT Protocols
• These protocols are used to establish
communication between a node device and
server over the internet.

• It helps to send commands to an IoT device and


receive data from an IoT device over the internet.

• We use different types of protocols that present


on both the server and client-side and these
protocols are managed by network layers like
application, transport, network, and link layer.
Application Layer protocol
• In this layer, protocols define how the data can be sent over the network
with the lower layer protocols using the application interface. These
protocols including HTTP, WebSocket, XMPP, MQTT, DDS, and AMQP
protocols.

HTTP:
• Hypertext transfer protocol is a protocol that presents in an application layer
for transmitting media documents. it is used to communicate between web
browsers and servers. it makes a request to a server and then waits till it
receives a response and in between the request server does not keep any
data between two requests.

WebSocket:
• This protocol enables two-way communication between a client and a host
that can be run on an untrusted code in a controlled environment. this
protocol is commonly used by web browsers.

MQTT:
• It is a machine-to-machine connectivity protocol that was designed as a
publish/subscribe messaging transport. and it is used for remote locations
where a small code footprint is required.
CoAP:
• Constrained Application Protocol (CoAP) is a specialized web
transfer protocol for use with constrained nodes and
constrained networks in the Internet of Things.

• CoAP is designed to enable simple, constrained devices to


join the IoT even through constrained networks with
low bandwidth and low availability.

• It is generally used for machine-to-machine (M2M)


applications such as smart energy and building automation.

XMPP:
• XMPP or the Extensible Messaging and Presence Protocol,
formerly known as Jabber, is a communications protocol
based on XML (Extensible Markup Language), aimed at
message-oriented middleware and applications such as near-
real-time instant messaging and presence information.
DDS:
• DDS stands for Data Distribution Service. It is an IoT
protocol developed for M2M (Machine to Machine)
Communication by OMG (Object Management Group).

• It enables data exchange via publish-subscribe


methodology.

AMQP:
• Advanced Message Queuing Protocol (AMQP) is an open
source published standard for asynchronous messaging
by wire.

• AMQP enables encrypted and interoperable messaging


between organizations and applications. The protocol is
used in client/server messaging and in IoT device
management.
Transport Layer
• This layer is used to control the flow of data segments and
handle the error control. Also, these layer protocols provide
end-to-end message transfer capability independent of the
underlying network.

TCP:
• The transmission control protocol is a protocol that defines
how to establish and maintain a network that can exchange
data in a proper manner using the internet protocol.

UDP:
• a user datagram protocol is a part of internet protocol called
the connectionless protocol. this protocol not required to
establish the connection to transfer data.
Network Layer
• This layer is used to send datagrams from the source network to the
destination network. we use IPv4 and IPv6 protocols as a host identification
that transfers data in packets.

IPv4:
• This is a protocol address that is a unique and numerical label assigned to each
device connected with the network. an IP address performs two main
functions host and location addressing. IPv4 is an IP address that is 32 bit long.

IPv6:
• It is a successor of IPv4 that uses 128 bits for an IP address. it is developed by
the IETF(Internet Engineering Task Force) task force to deal with the long-
anticipated problems.

6LowPAN:
• A key IP (Internet Protocol)-based technology is 6LowPAN (IPv6 Low-power
wireless Personal Area Network). Rather than being an IoT application
protocols technology like Bluetooth or ZigBee, 6LowPAN is a network protocol
that defines encapsulation and header compression mechanisms.
Link Layer
• Link-layer protocols are used to send data over the
network's physical layer. it also determines how the
packets are coded and signaled by the devices.

Ethernet:
• It is a set of technologies and protocols that are used
primarily in LANs. it defines the physical layer and the
medium access control for wired Ethernet networks.

Wi-Fi:
• It is a set of LAN protocols and specifies the set of media
access control and physical layer protocols for
implementing wireless local area networks.
Communication Models in IoT
• It is important and useful to understand how various IoT
devices communicate with each other. Communication
models used in IoT have great value.

• The IoTs allow people and things to be connected any


time, any space, with anything and anyone, using any
network and any service.

Types of Communication Model :

1. Request & Response Model


2. Publisher-Subscriber Model
3. Push-Pull Model
4. Exclusive Pair
1. Request & Response Model
• This model follows a client-server architecture.

• The client, when required, requests the information from the server.
This request is usually in the encoded format.

• This model is stateless since the data between the requests is not
retained and each request is independently handled.

• The server Categories the request, and fetches the data from the
database and its resource representation. This data is converted to
response and is transferred in an encoded format to the client. The
client, in turn, receives the response.

• In Request-Response communication model client sends a request to


the server and the server responds to the request. When the server
receives the request it decides how to respond, fetches the data
retrieves resources, and prepares the response, and sends it to the
client.
2. Publisher-Subscriber Model
• This model comprises three entities: Publishers, Brokers,
and Consumers.

• Publishers are the source of data. It sends the data to


the topic which are managed by the broker. They are not
aware of consumers.

• Consumers subscribe to the topics which are managed


by the broker.

• Hence, Brokers responsibility is to accept data from


publishers and send it to the appropriate consumers. The
broker only has the information regarding the consumer
to which a particular topic belongs to which the
publisher is unaware of.
3. Push-Pull Model
• The push-pull model constitutes data publishers, data
consumers, and data queues.

• Publishers and Consumers are not aware of each other.

• Publishers publish the message/data and push it into the


queue. The consumers, present on the other side, pull the
data out of the queue. Thus, the queue acts as the buffer for
the message when the difference occurs in the rate of push
or pull of data on the side of a publisher and consumer.

• Queues help in decoupling the messaging between the


producer and consumer. Queues also act as a buffer which
helps in situations where there is a mismatch between the
rate at which the producers push the data and consumers
pull the data.
4. Exclusive Pair
• Exclusive Pair is the bi-directional model, including
full-duplex communication among client and server.
The connection is constant and remains open till the
client sends a request to close the connection.

• The Server has the record of all the connections


which has been opened.

• This is a state-full connection model and the server


is aware of all open connections.

• WebSocket based communication API is fully based


on this model.
IoT Communication APIs
• In IoT, there are two communication APIs –
1) REST Based Communication APIs
2)Web Socket Based Communication APIs

1. REST Based Communication API:


• REpresentational State Transfer (REST) is a set of
architectural principles by which you can design web
services and web APIs that focus on a system’s resources
and how resource states are addressed and transferred.

• REST APIs follow the request-response communication


model. The REST architectural constraints apply to the
components, connectors, and data elements, within a
distributed hypermedia system.
2. Web Socket Based Communication APIs :

• Web Socket APIs allow bi-directional, full-duplex


communication between clients and servers.

• It follows the exclusive pair communication model. This


Communication API does not require a new connection
to be set up for each message to be sent between clients
and servers.

• Once the connection is set up the messages can be sent


and received continuously without any interruption.

• WebSocket APIs are suitable for IoT Applications with


low latency or high throughput requirements.
Difference between Rest API and Web Socket API
S.NO. REST API WEB SOCKET API
It is Stateless protocol. It will not store the
1. It is Stateful protocol. It will store the data.
data.

It is Uni-directional. Only either server or It is Bi-directional. Messages can be received or sent by


2.
client will communicate. both server or client.

3. It is Request-response model. It is Full duplex model.

HTTP request contains headers like head It is suitable for real-time applications. It does not have
4.
section, title section. any overhead.

New TCP connection will be set up for each


5. Only Single TCP connection.
HTTP request.

Both horizontal and vertical scaling (we can


Only vertical scaling (we can add resources only
6. add many resources and number of users
vertically).
both horizontally and vertically).

It depends upon the HTTP methods to It depends upon the IP address and port number to
7.
retrieve the data.. retrieve the data
It is slower than web socket regarding the web socket transmits messages very fastly than REST
8.
transmission of messages. API.
It does not need memory or buffers to store
9. It requires memory and buffers to store the data.
the data.
Internet of Things (IoT) Enabling
Technologies
IoT(internet of things) enabling technologies are :

• Wireless Sensor Network


• Cloud Computing
• Big Data Analytics
• Communications Protocols
• Embedded System
1. Wireless Sensor Network(WSN) :

A WSN comprises distributed devices with sensors which


are used to monitor the environmental and physical
conditions. A wireless sensor network consists of end
nodes, routers and coordinators. End nodes have several
sensors attached to them where the data is passed to a
coordinator with the help of routers. The coordinator also
acts as the gateway that connects WSN to the internet.

Example –
• Weather monitoring system
• Indoor air quality monitoring system
• Soil moisture monitoring system
• Surveillance system
• Health monitoring system
2. Cloud Computing :
It provides us the means by which we can access applications as utilities
over the internet. Cloud means something which is present in remote
locations.

With Cloud computing, users can access any resources from anywhere like
databases, web servers, storage, any device, and any software over the
internet.

Characteristics –
• Broad network access
• On demand self-services
• Rapid scalability
• Measured service
• Pay-per-use

Provides different services, such as –


• IaaS (Infrastructure as a service)
• PaaS (Platform as a service)
• SaaS (Software as a service)
3. Big Data Analytics :
It refers to the method of studying massive volumes of data or big data.
Collection of data whose volume, velocity or variety is simply too massive
and tough to store, control, process and examine the data using traditional
databases.
Big data is gathered from a variety of sources including social
network videos, digital images, sensors and sales transaction records.
Several steps involved in analyzing big data –

• Data cleaning
• Munging
• Processing
• Visualization

Examples –
• Bank transactions
• Data generated by IoT systems for location and tracking of vehicles
• E-commerce and in Big-Basket
• Health and fitness data generated by IoT system such as a fitness bands
4. Communications Protocols :

They are the backbone of IoT systems and enable network


connectivity and linking to applications. Communication
protocols allow devices to exchange data over the network.

Multiple protocols often describe different


aspects of a single communication. A group of protocols
designed to work together is known as a protocol suite;
when implemented in software they are a protocol stack.

They are used in


• Data encoding
• Addressing schemes
5. Embedded Systems :

It is a combination of hardware and software used to


perform special tasks. It includes microcontroller and
microprocessor memory, networking units (Ethernet
Wi-Fi adapters), input output units (display keyword
etc. ) and storage devices (flash memory).

It collects the data and sends it to the internet.


Embedded systems used in Examples –
• Digital camera
• DVD player, music player
• Industrial robots
• Wireless Routers etc.
IoT Levels and Templates
• There are 6 IoT Deployment templates. It is based
on Complexity.

1) 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.

• Level-1 IoT systems are suitable for modeling low-


cost and low-complexity solutions where the data
involved is not big and the analysis requirements
are not computationally intensive.
2) IoT Level-2:

• It has a single node that performs sensing and/or


actuation and local analysis (IoT Device and
collected data).

• In this IoT Level Database and application establish


in Cloud.

• It is useful for solutions where the data involved is


big, however, the primary analysis requirement is
not computationally intensive and can be done
locally itself.
IoT Level-3
• A level-3 IoT system has a single node. Data is
stored and analyzed in the cloud and
application is cloud- based.

• Level-3 IoT systems are suitable for solutions


where the data involved is big and the analysis
requirements are computationally intensive.
IoT Level-4
• A level-4 IoT system has multiple nodes that
perform local analysis. Data is stored in the cloud
and application is cloud-based.

• Level-4 contains local and cloud- based observer


nodes which can subscribe to and receive
information collected in the cloud from IoT
devices.

• Level-4 IoT systems are suitable for solutions


where multiple nodes are required, the data
involved is big and the analysis requirements are
computationally intensive.
IoT Level-5
• A level-5 IoT system has multiple end nodes and one
coordinator node.

• The end nodes that perform sensing and/or actuation.

• Coordinator node collects data from the end nodes and


sends to the cloud.

• Data is stored and analyzed in the cloud and application


is cloud-based.

• Level-5 IoT systems are suitable for solutions based on


wireless sensor networks, in which the data involved is
big and the analysis requirements are computationally
intensive.
IoT Level-6
• A level-6 IoT system has multiple independent end nodes
that perform sensing and/or actuation and send data to
the cloud.

• Data is stored in the cloud and application is cloud-based.

• The analytics component analyzes the data and stores


the results in the cloud database.

• The results are visualized with the cloud-based


application.

• The centralized controller is aware of the status of all the


end nodes and sends control commands to the nodes.
Domain Specific IoTs

You might also like