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

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/328364742

Ambiance Intelligence Approach Using IoT and Multi-Agent


System

Article  in  International Journal of Distributed Systems and Technologies · January 2019


DOI: 10.4018/IJDST.2019010104

CITATIONS READS

0 624

6 authors, including:

Meftah Zouai Okba Kazar


Université de Biskra Université de Biskra
9 PUBLICATIONS   26 CITATIONS    340 PUBLICATIONS   492 CITATIONS   

SEE PROFILE SEE PROFILE

Guadalupe Ortiz Kabachi Nadia


Universidad de Cádiz Claude Bernard University Lyon 1
114 PUBLICATIONS   606 CITATIONS    68 PUBLICATIONS   184 CITATIONS   

SEE PROFILE SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Service-Oriented Computing View project

IoT and Microservices Architectural Framework : Smart Usage Contexts and Adaptation View project

All content following this page was uploaded by Meftah Zouai on 24 May 2019.

The user has requested enhancement of the downloaded file.


International Journal of Distributed Systems and Technologies
Volume 10 • Issue 1 • January-March 2019

Ambiance Intelligence Approach


Using IoT and Multi-Agent System
Meftah Zouai, Laboratory LINFI, Department of Computer Science, University of Mohamed Khider, Biskra, Algeria
Okba Kazar, Laboratory LINFI, Department of Computer Science, University of Mohamed Khider, Biskra, Algeria
Guadalupe Ortiz Bellot, Laboratory UCASE, University of Cadiz, Cadiz, Spain
Belgacem Haba, Invensas Corp., San Jose, USA
Nadia Kabachi, Laboratory ERIC, University of Lyon 1, Lyon, France
M. Krishnamurhty, Documentation Research & Training Center, Indian Statistical Institute, Bangalore, India

ABSTRACT

Internet of things is a network of objects mainly supported by electronic devices and electronic
components such as sensors and electronic cards. These objects can be physical and virtual devices,
sensors or actuators, are autonomous and have their own intelligence characteristics. On the other
hand, smart environments are those in which sensors and actuators have been integrated, to react to
events and to adapt to those present. The environment acquires intelligence through its intelligent
components, or through the intelligence resulting from its interaction with other components. Our
contribution is a proposal of Cognitive IoT (CIoT) devices structure by adding an agent layer to the
device. Such layer provides the device with agent characteristics (intelligence, autonomy, cooperation
and organization).

Keywords
Agent, Agent Layer, IoT, MQTT

1. INTRODUCTION

Nowadays, the Internet is heavily used by humans, through computers and mobiles; indeed main
communication in the world is being carried out between humans using Internet. The Internet of
Things (IoT) is a present and future technology, which can involve physical and information system
worlds through the use of sensors. Therefore, most current human-to-human interactions will become
as the human-to-machine interactions in the near future.
In this scope, we investigate the additional mechanisms to communicate with the IoT and there
is a need to exchange information between nodes. Things have the ability to cooperate, communicate
and adapt independently, but this requires re-considering the structure of such devices/things.
Several papers analyse the global architecture of the IoT systems, but we rarely find studies on
the structure of the thing itself. The current structure, which can be found in several research papers
(Karagiannis, Chatzimisios, Vazquez-Gallego, and Alonso-Zarate, 2015), is a rigid and passive
architecture with a status on which one can perform operations. The thing (object) is dependent on

DOI: 10.4018/IJDST.2019010104

Copyright © 2019, IGI Global. Copying or distributing in print or electronic forms without written permission of IGI Global is prohibited.


37
International Journal of Distributed Systems and Technologies
Volume 10 • Issue 1 • January-March 2019

acting with the intervention of a third party (human or object) and functions as a Programmable Logic
Controller (PLC) with predefined statuses. In this proposal, we examined the structure of the thing
and found that it loses key features such as autonomy and intelligence. This motivated the main aim
of this paper. It is novel if the addition of an agent layer to the IoT devices is done, providing it with
agent characteristics. This way, the device will be enriched with the ability to work autonomously in
an environment, directly communicate with other agents, and coordinate, collaborate and cooperate
with other objects (other devices). We bear in mind the limited capacity and power of the device,
and paid attention to preserve and exploit it properly. This is why we used the Message Queuing
Telemetry Transport (MQTT) protocol in the process of exchanging commands and information
between the IoT device and the user. Moreover, we used the JADE platform to host the agent so that
the device become a smart element and it is always connected to the IoT Gateway. In all processes
that require great capacity and energy, we can maintain the energy and the ability of the device in
this way, even though it is directed on the application side (has a specific application), and it will
provide its service to the fullest.
The rest of the paper is organized as follow: In section 2 we introduce the area of our research
work, in section 3 we briefly discuss related works. Section 4 describes the proposed structure and
its features, the section 4 outlines the implementation of the CIoT device structure. Finally, some
conclusions and perspectives are presented.

2. BACKGROUND

In this section, we are going to introduce the main concepts and technologies used in our approach.

2.1. Internet of Things


The IoT is a set of computing devices, objects, mechanical and digital machines (Gubbi, Buyya,
Marusic, and Palaniswami, 2013). Such entities remain connected to the Internet, and are integrated
with one or more sensors (Minerva, Biru, and Rotondi, 2010). Currently, IEEE standard association
considers three layers in IoT architecture, as shown in Figure 1 and explained below:

• Application Layer: It represents the software level. It varies according to IoT markets
and stakeholders;

Figure 1. IoT architecture (Wu, Lu, Ling, Sun, and Du, 2010)

38
International Journal of Distributed Systems and Technologies
Volume 10 • Issue 1 • January-March 2019

• Networks and data communication Layer: It is responsible for packet forwarding, which
includes the routing through intermediate routers. Since the networks layer knows the address
of the neighbouring network nodes, it manages quality of service (QoS);
• Sensing Layer: This layer senses/controls the physical world and data-acquirement. It is integrated
with existing hardware (RFID, sensors, actuators, etc.).

2.2. Software Agent


The agent concept was essentially inspired by the fields of philosophy and psychology. Several
definitions have been given throughout the years, where each definition addresses one or more
aspects of this paradigm.
The agent is a software system (Maes, 1994; Brustoloni, 1991) that has a specific purpose (Smith,
Cypher, and Spohrer, 1994) in being able to react with a certain degree of independence (Maes, 1994)
and autonomy (Brustoloni, 1991) in a complex and dynamic environment (Frécon and Kazar, 2009;
Maes, 1995). This agent is characterised from a conventional software by its size and by the objectives
and agendas on which it is based to accomplish its tasks (Smith, Cypher, and Spohrer, 1994) based
on a set of knowledge and representation of predetermined objectives (Maes, 1994).

2.2.1. Characteristics of an Agent


An agent can also be distinguished from other software entities by holding the following features
(Duma, 2008):

• Autonomy: An agent can act without returning to his owner in order to make decisions;
• Social Behaviour: An agent has the ability to communicate and interact with other elements
of his environment;
• Reactivity: An agent can perceive and then react to different events on his environment;
• Pro-Activity: An agent has the ability to take initiatives to adapt to the change in his environment.

2.2.2. Interactions Between Agents


An interaction is a dynamic linking of two or more agents through a set of reciprocal actions to achieve
a specific goal. In this scope, an interaction situation is called a set of behaviours resulting from the
grouping of agents; who must act to meet their objectives; taking into account the constraints resulting
from the more or less limited resources available to them and their individual skills.
In interactions between agents, we sometimes fall into conflict situations which are cases in which
the objectives (intentions) of the agents are not compatible and / or the resources and the capacities
of the agents are insufficient (Gray, Cybenko, Kotz, Peterson, and Rus, 2008).
Interactions between agents are expressed in various forms; cooperation is the most commonly
studied form of interaction in multi-agent systems. An agent avoids conflict situations to solve a
problem through coordination or negotiation (Gray, Cybenko, Kotz, Peterson, and Rus, 2008):

• Coordination: In the case of coordination (Frécon and Kazar, 2009), the agents work on problems
whose solutions are useful for the other agents, so the work must be coordinated over time.
Coordination allows agents to consider all tasks and not duplicate work. The coordination of the
actions is related to the planning and the resolution of the conflicts, because it is at this level that
the actions (plan) of the other agents are taken into account (Bouchenak, 2001);
• Negotiation: The activities of the agents in a distributed system are often interdependent and
result in conflicts. Conflict resolution involves considering the points of view of the agents,
negotiating between them (Frécon and Kazar, 2009), and using decision-making mechanisms
regarding the purposes on which the system focuses. Negotiation is characterized by a small
number of agents involved in the process and a minimal protocol of actions: to propose, evaluate,

39
International Journal of Distributed Systems and Technologies
Volume 10 • Issue 1 • January-March 2019

modify and accept or reject a solution. The problem of negotiation does not necessarily consist
in finding a compromise but can extend to the modification of the beliefs of other agents to make
prevail a point of view (Johansen, 1995).

2.2.3. Agent Types


The properties that characterize an agent determine its type. The main types of agents are explained
in the following paragraphs:

• Reactive Agent: This agent is marked by a behaviour based on the stimulus/response principle.
The structure of purely reactive agents tends to simplicity, but they may be capable of complex
and coordinated group actions. Agents of this type are usually small in the environment. They
are not necessarily intelligent, nevertheless intelligent collective behaviour can emerge (M.
Benjima and M. Feham, 2012);
• Cognitive Agent: A cognitive agent has a symbolic representation of its environment and
is endowed with reasoning skills. The agents are immersed in an environment in which they
interact. Hence, their structure revolves around three main functions: perceiving, deciding and
acting (Bouchenak, 2001);
• Proactive Agents: They are dynamic agents who undertake because they possess in addition
to their attributes and methods, internal processes that allow them to take initiatives to achieve
their goals. A proactive agent is therefore a goal-directed agent (Johansen, 1995).

3. RELATED WORK

In this section, we examine several works related to our proposal. In Bozdogan and Kara (2015), the
authors have proposed a four layered structure for IOT; these layers are perception layer, transport
layer, network layer and application layer. The fundamental function of sensing layer is to collect
information and provide data transmission in case that the homogeneity technology used in the
network. The network layer provides a combined environment for all communication types. The
transport layer provides an implementation of QoS (reliability and security rules). The application
layer provides end-user operations and form communications software. The application software and
services functions are provided in the application layer.
In Darwish (2015), a seven layered structure is proposed; this structure consists of an environment
layer which includes the objects to be tracked which are not usually static and a hardware layer which
includes the hardware components and sensors for collecting environmental data. Additionally,
information, network, communication and service layer perform some operations likewise: service
storage and orchestration, application support and management layer and application layer.
In Zhang, Zhao, Zheng, Wu, and Wei (2012), a cognitive IoT is proposed through a network
topology; the idea is to design cognition-process-related technology. The architecture consists of
perception layer, network interconnection layer, information fusion layer and intelligent service layer.
In Khan, Khan, Zaheer, and Khan (2012), an IoT structure of five layers is proposed. The
perception layer consists of the physical objects and sensor devices. The network layer transfers
the information from sensor devices to the information processing system. The middleware layer is
responsible for the service management, is linked to the database, performs information processing
and ubiquitous computation and takes automatic decision based on the results. The application layer
provides global management of the application based on the object information processed in the
Middleware layer. Finally, Business Layer is responsible for the management of overall IoT system
including the applications and services (see Table 1).
In Bozdogan and Kara (2015), Darwish, (2015), Zhang, Zhao, Zheng, Wu, and Wei, (2012) and
Khan, Khan, Zaheer, and Khan (2012), the authors agree about perception layer, network layer and

40
International Journal of Distributed Systems and Technologies
Volume 10 • Issue 1 • January-March 2019

Table 1. Related works layers

Physical Layer Network Processing Layer Application Layer

Bozdogan and Kara Network layer


Perception layer / Application Layer
(2015) Transport layer
Application support
Environment layer Network layer and management
Darwish, 2015 Services layer layer
Hardware layer communication layer Application layer
Network
Zhang, Zhao, Zheng, Interconnection layer Intelligent Service
Perception Layer /
Wu, and Wei, 2012 Information Fusion Layer
Layer
Khan, Khan, Zaheer,
Perception Layer Network Layer Middleware Layer Application Layer
and Khan (2012)

application layer. However, we found a big difference in the processing layer. In Bozdogan and Kara
(2015), Darwish, 2015 and Zhang, Zhao, Zheng, Wu, and Wei, (2012) as for the structure used, its
main (and important) limitation concerns the rigid structure in levels for the design of the system. In
Bozdogan and Kara (2015), Darwish, 2015, and Wang (2017), the structure of object does not have
the property of intelligence, cooperation or organization.
Therefore, our work keeps the three layers (Perception layer, Network layer, Application Layer) as
they are with a slight change in the network layer where we used the MQTT protocol in the exchange
of information between the device and the user through the IoT gateway. In the processing layer, we
use the intelligent agent for the features it offers to the device from the autonomy and coordination and
cooperation. So that the device is able to make decisions independently through the data captured by
the sensor layer and data sent by other devices (agents) the device becomes aware of its environment.
(Belo, Rodrigues, Barros and Correia, 2016; Murai, 2017).

4. THE PROPOSAL IN A NUTSHELL

In this section, we explain our architecture and its parts, also we have presented the global functioning
of this architecture.

4.1. Proposed Architecture


As previously explained, the current IoT architecture is too much rigid (see Figure 1) and its objects
are not autonomous. Moreover, it is not cognitive for building intelligent and autonomous IoT devices.
Our proposed architecture for IoT devices has four-levels. Particularly, we added an agent layer (Basir
Khan, Jidin, and Pasupuleti, 2016) in the architecture as presented in Figure 3. We integrated the
agent layer to ensure the autonomic and intelligence characteristics in the IoT architecture (Fortino,
Guerrieri, Russo, and Savaglio, 2014), this way the objects hold the autonomic and intelligence
characteristics owned by the agent.
As can be seen in Figure 3, we included the agent layer between the application layer and the
network layer, the reason behind this is that the agent proposed is a software, and it needs to use
the Network and Data Communication (NDC) layer to exchange information with the devices in its
surroundings; the information received from other devices and information sensed by the sensors is
the data on which the agent bases his decisions. The agent uses the physical layer (NDC layer and
Sensing Layer) as sensors to sense the environment and processes this real information. This way,

41
International Journal of Distributed Systems and Technologies
Volume 10 • Issue 1 • January-March 2019

the behaviour of the agent changes according to this information; as a result, this changes a set of
decisions used in the software layer according to the purpose intended for him. For example, if there
is a sudden rise in temperature the agent concluded that this rose is abnormal and there is a fire in the
environment. In this situation, the agent will communicate with other devices to control the situation.
Moreover, it alerts the user about this change and the decisions made to control the fire.

4.2. Global Functioning of the Proposed Architecture


In our architecture, global functioning is composed from three main parties, as shown in Figure 2;
each part contains components and functions different from the other parts:

• IoT Device: It is the central element in this paper. We added the agent layer to it in order to
provide the device with a kind of self-intelligence (Fortino, Guerrieri, Russo, and Savaglio,
2014); this way the device is able to adapt and update the status of the surrounding environment,
through information obtained by the sensors. The agent processes and analyses this information.
Accordingly, it shall make the appropriate decision without contacting the user;
• IoT Gateway: It is the intermediary device between the IoT devices or rather between the agents
integrated in the IoT devices (Zouai, Kazar, Haba, Saouli, and Hind, 2017), and between the IoT
devices and the user. We added two elements in the IoT gateway;

Figure 2. The agent architecture

Figure 3. Proposed architecture

42
International Journal of Distributed Systems and Technologies
Volume 10 • Issue 1 • January-March 2019

• ADE platform: Such the agent’s installation platform was added to facilitate inter-
agents communication;
• MQTT Broker: Added to the IoT device to facilitate the process of communication between the
user and the device while reducing the movement of the network and economy in the energy devices.

5. CASE STUDY (DEVELOPING APPROACH)

We implemented our architecture to create a security IoT device. This, at last, controls the safety of an
environment against accidental and incidental events. Its aim is to act on the existence of a criminal
in the environment. And it can control accidents risk such as fires and gas leaks. The implementation
is shown in Figure 5 and explained below.
We implement our proposed architecture with Raspberry pi 2 card (see left-hand side in Figure
5), where this card enabled us to combine the following three layers into one structure (As shown in
the right-hand side of Figure 5):

• The Application Layer: It is an application of a real security environment (house, apartment,


butter, place of work);
• The Agent Layer: It is an embedded agent (see Figure 6) in the IoT device, it manages the
information received by the sensors, analyses this information and makes decisions;
• Network and Data Communication Layer: The IoT device communicates with the other
devices through this layer;
• Sensing Layer: It was implemented on the presence sensor and the humidity and
temperature sensor.

Figure 6 shows the architecture particularized for the security agent, as explained in the
following paragraphs:

• Environment: It is constituted by the real environment (house, apartment, place of work), it


contents a user’s and neighbouring components (the other component located in the same place);
• Sensors: It is a device that is used to transform the status of a physical quantity observed
(environment) in a usable quantity (measurements). Such as an electrical voltage, a mercury
height, an intensity or the deviation of a needle. Often there is a confusion between sensor and
transducer: a sensor is at least made up of one transducer;
• Historical Basis of Statuses: It is a tool for storing the information history provided by the
sensors (the environment status) and the statuses of the other system components;
• Rules Base: It gathers knowledge of the agent. It contains rules to help the agent make decisions.
Such decisions change his status on the current status of the environment and the statuses of
other agents. The rule base is updated according to new environment statuses and needs. The
rules that represent general safety knowledge about and factual findings.

For example:

In the first rule, when the agent feels gas leakage and the second condition (electric light) is
verified, the agent will alert to the danger of fire. The agent obtained the second condition through
communication with the other agents (see Box 1).
In the second rule, when the surveillance mode is activated and the agent sensed there is a
person in the environment (presence_sensor()=true), the agent concludes that there is an intruder in
the environment (see Box 2).

43
International Journal of Distributed Systems and Technologies
Volume 10 • Issue 1 • January-March 2019

One of the functions of the agent is to monitor the temperature evolution in the environment when
there is sudden rise in temperature and in short time. The agent concludes a fire in the environment
and alerts the user and other agents (see Box 3).

• Analysis Module: It compares the security rules, with data obtained by sensors and data sent
by other agents. The security rules are defined in the rule base, if the agent detects an abnormal
thing. It informs the user and send information to the other agents. The user receives a message
in his smartphone;
• Communication Module: This module provides all agent interaction mechanisms with the other
agents. Moreover, it provides the interaction between decision-making module with history of
the status module (Figure 4).

5.1. Status Diagram


This status diagram in Figure 7 represents the statuses of agent security and the conditions for switching
from one status to another. The agent starts sensing the environment and waiting for the messages
from the other agents, if there is a message, the agent goes to the information analysis status. The
latest compares the security rules with the information delivered by the agents and sensing data. If
there is a True a rule (the rule is achievable) the agent sends orders to the other agents in order to
control the problem. The agent informs the user and the service that can handle this situation.

Figure 4. Global functioning proposed architecture

Figure 5. Implementation of proposed architecture

44
International Journal of Distributed Systems and Technologies
Volume 10 • Issue 1 • January-March 2019

Figure 6. Concrete architecture of the security agent (Zouai, Kazar, Haba, and Saouli, 2017)

Box 1.­

Box 2.­

Box 3.­

5.2. Functioning Diagram of the Architecture


When a device starts, it creates an agent connected to a JADE platform. The agent creates his own
topics on MQTT Broker to share data and decisions with the user.
Figure 8 shows the main function of our system. As we can see, first the sensors sense incoming
data from the environment then it send these data to the device (1-Sensing). After that, the device stores
and analyse its data. Then these data published (2-MQTT publish) in MQTT broker (IoT Gateway),
when the user “Subscribe” to MQTT broker (3-MQTT subscribe), after that the last published data
should be served to the user (4-MQTT publish).
The security scenario works as follows. In case the user switch on the surveillance mode (5-
MQTT publish) the device receives (7-MQTT published) a monitoring request after subscribing
(6-MQTT subscribe) to MQTT broker. When the sensors detect an intruder (8-Sensing), the alert
published in the MQTT broker (9-MQTT publish), and the MQTT broker sends this information to
the user (10-MQTT publish).

45
International Journal of Distributed Systems and Technologies
Volume 10 • Issue 1 • January-March 2019

Figure 7. Security agent status diagram

Figure 8. Sequence diagram of our functioning architecture

46
International Journal of Distributed Systems and Technologies
Volume 10 • Issue 1 • January-March 2019

5.3. Class Diagram of the Architecture


To realize our architecture, we implemented each layer by a Java class, as shown in Figure 9, each
class has its own methods, fields, constructors. Except for the application layer, they are integrated
into the agent layer class:

• Sensing Class: The role of this class is the sensor control, all the methods of this class are able
to return the values captured by the sensors;
• Communication Class: The role of this class is the connection management between the device
and the MQTT broker;
• Security Agent Class: This class inherits from the native Agent class of the JADE platform.

5.4. Implementation
We implemented our architecture using Raspberry PI Model B and the Raspbian operating system.
With them we created the IoT device that launches the security agent embedded on the device to
ensure the security of the environment against accidental and incidental events associated with a
wireless module for the communication of the device with the other devices and with the Internet.
We implemented our security agent through the JADE (Java Agent Development Framework).
It simplifies the implementation of multi-agent systems through a middleware that complies with the
Foundation for Intelligent Physical Agents (FIPA) (Juneja, Jagga, and Singh, 2015) specifications
and through a set of graphical tools that support the debugging and deployment phases.
We uses two type of sensors to deliver the sensing layer: a PIR motion sensor (HCSR501 PIR)
for sensing the presence of someone (Intruder) in the environment. And a gas sensor for detecting
gas leakage in the location. We connected electronic sensors to the Raspberry Pi Model B. Moreover,
we controlled them with Java using General-Purpose Input/Output (GPIO).

Figure 9. Class diagram

47
International Journal of Distributed Systems and Technologies
Volume 10 • Issue 1 • January-March 2019

5.4.1. Hardware Part


The hardware parts are the electronic parts and they are responsible for transforming (Sensors),
analysis, processing (Raspberry PI), and transfer (Communication module) the status of a physical
quantity observed in a usable quantity.
5.4.1.1. PIR Motion Sensor (HCSR501 PIR)
PIR sensors (Figure 10) allow us to sense motion (Tuna, Gungor, and Gulez, 2014) and they are always
used to detect whether a human has moved in/out of the sensors range. They are small, inexpensive,
low-power, easy to use and do not wear out. For that reason they are commonly found in appliances
and gadgets used in homes or businesses. They are often referred to as PIR, “Passive Infrared”,
“Pyroelectric”, or “PIR motion” sensors.
5.4.1.2. Humidity and Temperature Sensor (DHT-11)
Figure 11 shows Humidity and Temperature Sensor Module and is based on the DHT-11 Sensor
(Yang, Qiao, Song, Liu, and Yang, 2015) which is a very popular, ultra-low-cost digital temperature
and humidity sensor. It uses a capacitive humidity sensor, and a thermistor to measure the surrounding
air temperature. The result is available via a digital signal on the data pin (no analogue input pins
needed). It can measure humidity from 20-80% humidity readings with 5% accuracy and 0-50°C
temperature readings ±2°C accuracy.
5.4.1.3. Raspberry Pi Model B
Figure 12 shows the Raspberry Pi Model B (Maksimović, Vujović, Davidović, Milošević, and
Perišić, 2014) which is a small version of a computer running Linux operating system on SD card

Figure 10. PIR motion sensor (HCSR501 PIR) (Chaudhuri, 2015)

Figure 11. Humidity and temperature sensor

48
International Journal of Distributed Systems and Technologies
Volume 10 • Issue 1 • January-March 2019

Figure 12. Raspberry Pi 2 card

for embedded computing application. Due to its characteristics, the deployment agent layer in the
device and operation are the storage and processing capability to improve performance in which this
card it is equipped with Zhang, Zhao, Zheng, Wu, and Wei, 2012:

• Broadcom BCM2836 processor, four 900 MHz ARMv7 cores;


• 1 GB of DDR2 memory;
• Ethernet / RJ45 port, 10.100 BaseT is connect Raspberry Pi to a network;
• Four USB 2.0 ports;
• HDMI video output for connecting a display;
• Taken for camera;
• 40 pins GPIO connectors (all running at 3.3 V);
• Memory card port: 1 micro SD port is used as a storage medium;
• 1 Micro USB for power supply;
• Analogue audio connectors: 1 3.5mm jack output.

5.4.1.4. Wiring and Electronic Circuit


After having the electronic components and the Raspberry PI card (Zhao, Jegatheesan, and Loon,
2015), we need to connect the necessary parts to make the system operational (see Figure 13).
The pins configuration and the electronic schematic pins are in Table 2 respectively.

5.4.2. Software Parts


In this section, we explain the software part that is embedded in IoT device such as the behaviour of
the agent (sensing, processing and communication), and party network communication technology
and protocols.
5.4.2.1. Agent IoT Device Sensing
The agent senses the surroundings through sensors connected to the device. We have written a program
that performs this function. The class “Sensing” is a class programmed by Java, where we used the
GPIO API. The GpioPinDigitalStateChangeEvent event is the status of the environment captured
by the presence sensor; if the status of the event has a high value then prints “Intruder Detected” and
activates the presence status of the agent by calling the method setPresence (true). And if the state
of the event has a Low value set the presence status of the agent is false.
5.4.2.2. Agent IoT Device Possessing
The Security agent Behaviour is cyclic; if the agent detects the presence from someone (Intruder
Detected) in the environment the agent does three actions:

49
International Journal of Distributed Systems and Technologies
Volume 10 • Issue 1 • January-March 2019

Figure 13. The electronic circuit of IoT device

Table 2. Pins configuration

Pin I/O Function


Red / Positive pole 5V
Black / Ground pole 0V
Yellow Input Input DHT-11 Sensor
Blue Input Input PIR motion sensor

• The agent sends a request message to all other devices (agents) by invoking the method broadcast
(“Request close”); each agent received the message “Request close”, it changes its status to the
close status;
• The agent sends help message to the police;
• The agent informs the users by informing message.

5.4.2.3. IoT Device Communication


In our system there are two type of communication. Communication between agents (between
embedded agents in devices) and external communication between the IoT device and the user:

• MQTT protocol Communication: The MQTT protocol is based on the principle of publishing
messages and subscribing to topics, or “pub/sub”. Multiple clients connect to a broker and
subscribe to topics that they are interested in. Clients also connect to the broker and publish

50
International Journal of Distributed Systems and Technologies
Volume 10 • Issue 1 • January-March 2019

messages to topics. Many clients may subscribe to the same topics and do with the information as
they please. The broker and MQTT act as a simple, common interface for everything to connect to.

MQTT (Naik, 2017) allows devices to send information on a given subject to a server (IoT
gateway) that functions as a message broker. The broker pushes this information to customers (IoT
device/user) who have previously subscribed. For the user, a topic resembles a hierarchical path.
Customers can subscribe to a specific level of a subject’s hierarchy or to multiple levels if they use
a wildcard character.

• Agent Communication: For several IoT device to collaborate, they must exchange messages
between JADE agents. Each JADE agent has a sort of mailbox that contains messages sent to
it by other agents. These mailboxes are in the form of a list which contains the messages in the
chronological order of their arrival.
• JADE agents use FIPA-compliant messages (FIPA-ACL): JADE messages are instances of
the ACLMessage class of the jade.lang.acl package.

6. SYSTEM BEHAVIOUR RESULTS

In this section, we review the most important results we have obtained. For a real evaluation, we have
collected the following information by 19-20 December 2017 in Biskra, Algeria.
The system sensed the temperature and humidity of the environment and then stored the data in its
own database. It also notified the user in the event of significant changes in temperature and humidity.
The system also protected the environment from intruders in case the absence of the user and
the system informs the users.
Figure 15 shows a curve which summarizes changes in temperature and humidity in the
atmosphere captured within 24 hours. We can see that the temperature was between 6 and 15 degrees
while the humidity was between 35 - 68 degrees.
Each agent shares information captured by the sensors with other agents. This process allows
each agent to create an image of the surrounding environment through data sent by other agents and
data captured by the sensors. So that all agents have the same information at the same time, which
helps them to make the right decisions through common data.
Window screenshot in Figure 16 explains the exchange of messages between the agents, the agent
“IoT security” does not send a message to the other agents because it does not detect any danger in
the environment.
Window screenshot in Figure 17 explains the reaction of the agent “IoT security” after the
detection of a person in the environment and the monitoring mode is in the active status.
The agent “IoT security” broadcasted a message of “reaction request” and each agent received
such message and responded with the appropriate action to the request.
The agent also alerts the user with a message sent to the smartphone. Figure 18 shows the message
the user received immediately after the device sensed an intruder in the home.

Figure 14. The agent senses the presence of a person at home

51
International Journal of Distributed Systems and Technologies
Volume 10 • Issue 1 • January-March 2019

Figure 15. Temperature and humidity curve captured in 24 hours

Figure 16. Communication between agents

7. CONCLUSION

In this article, we proposed a new architecture for the IoT using the agent paradigm. We benefited
from agent features to enrich the device with autonomy, coordination and cooperation qualities. We
implemented this approach using a Raspberry with sensors integration and using MQTT protocol
for communications.
In the final perspectives of this research work, we like to integrate this platform in the cloud
computing environment for device data storage, transfer and process.

52
International Journal of Distributed Systems and Technologies
Volume 10 • Issue 1 • January-March 2019

Figure 17. The IoT security agent reaction

Figure 18. The IoT security agent send message to user

53
International Journal of Distributed Systems and Technologies
Volume 10 • Issue 1 • January-March 2019

REFERENCES

Basir Khan, M. R., Jidin, R., & Pasupuleti, J. (2016). Multi-agent based distributed control architecture
for microgrid energy management and optimization. Energy Conversion and Management, 112, 288–307.
doi:10.1016/j.enconman.2016.01.011
Belo, O., Rodrigues, P., Barros, R., & Correia, H. (2016). A Personalization System for Data Visualization
Platforms. International Journal of Computational Linguistics Research, 7(4), 116.
Benjima, M., & Feham, M. (2012). Multi Mobile Agent Itinerary for Wireless Sensor Networks. Int. J. Emerg.
Trends Technol. Comput. Sci., 1(1), 6–11.
Bouchenak, S. (2001). Mobilité et persistance des applications dans l’environnement Java. Institut National
Polytechnique de Grenoble-INPG.
Bozdogan, Z., & Kara, R. (2015). Layered model architecture for internet of things. J. Eng. Res. Appl. Sci.,
4(June), 260–264.
Brustoloni, J. C. (1991). Autonomous Agents: Characterization and Requirements. Comput. Sci. Tech. Rep.,
(November), 91–204.
Chaudhuri, D. (2015). GSM based home security system.
Darwish, D. (2015). Improved Layered Architecture for Internet of Things. Int. J. Comput. Acad. Res., 4(4),
214–223.
Duma, M. (2008). Agents, agent architectures and multi-agent systems. Comput. Sci., (September), 132.
Fortino, G., Guerrieri, A., Russo, W., & Savaglio, C. (2014). Integration of agent-based and Cloud Computing
for the smart objects-oriented IoT. In Proc. 2014 IEEE 18th Int. Conf. Comput. Support. Coop. Work Des.
CSCWD 2014 (pp. 493–498).
Frécon, L. & Kazar, O. (2009). Manuel d’intelligence artificielle. PPUR Presses polytechniques.
Gray, R. S., Cybenko, G., Kotz, D., Peterson, R. A., & Rus, D. (2002). D’Agents: Applications and performance
of a mobile-agent system. Software, Practice & Experience, 32(6), 543–573. doi:10.1002/spe.449
Gubbi, J., Buyya, R., Marusic, S., & Palaniswami, M. (2013). Internet of Things (IoT): A vision, architectural
elements, and future directions. Future Generation Computer Systems, 29(7), 1645–1660. doi:10.1016/j.
future.2013.01.010
Johansen, D., Van Renesse, R., & Schneider, F. B. (1995, May). Operating system support for mobile agents.
In Proceedings Fifth Workshop on Hot Topics in Operating Systems (pp. 42–45). IEEE; . doi:10.1109/
HOTOS.1995.513452
Juneja, D., Jagga, A., & Singh, A. (2015). A Review of FIPA Standardized Agent Communication Language
and Interaction Protocols. J. Netw. Commun. Emerg. Technol., 5(2), 179–191.
Karagiannis, V., Chatzimisios, P., Vazquez-Gallego, F., & Alonso-Zarate, J. (2015). A Survey on Application
Layer Protocols for the Internet of Things. Trans. IoT Cloud Comput., 3(1), 11–17.
Khan, R., Khan, S. U., Zaheer, R., & Khan, S. (2012). Future internet: The internet of things architecture,
possible applications and key challenges. In Proc. - 10th Int. Conf. Front. Inf. Technol. FIT 2012 (pp. 257–260).
doi:10.1109/FIT.2012.53
Maes, P. (1994). Agents that reduce work and information overload. Communications of the ACM, 37(7), 30–40.
doi:10.1145/176789.176792
Maes, P. (1995). Agents that Reduce work and information Overload. In Readings in Human–Computer Interaction
(pp. 811–821). Elsevier.
Maksimović, M., Vujović, V., Davidović, N., Milošević, V., & Perišić, B. (2014). Raspberry Pi as Internet of
Things hardware. Performances and Constraints. Des. Issues, 3(June), 8.

54
International Journal of Distributed Systems and Technologies
Volume 10 • Issue 1 • January-March 2019

Minerva, R., Biru, A., & Rotondi, D. (2015). Towards a definition of the Internet of Things (IoT) (Vol. 1). IEEE
Internet Initiat.
Murai, H. (2017). Prototype Algorithm for Estimating Agents and Behaviors in Plot Structures. International
Journal of Computational Linguistics Research, 8(3), 132–143.
Naik, N. (2017). Choice of effective messaging protocols for IoT systems: MQTT, CoAP, AMQP and HTTP. In
2017 IEEE Int. Symp. Syst. Eng. ISSE 2017 - Proc.
Smith, D. C., Cypher, A., & Spohrer, J. (1994). KidSim: Programming agents without a programming language.
Communications of the ACM, 37(7), 54–67. doi:10.1145/176789.176795
Tuna, G., Gungor, V. C., & Gulez, K. (2014). An autonomous wireless sensor network deployment system using
mobile robots for human existence detection in case of disasters. Ad Hoc Networks, 13, 54-68.
Wang, J. (2017). Research on Japanese digital learning system based on Agent model. Journal of Intelligent
Computing, 8(3), 98–104.
Wu, M., Lu, T. J., Ling, F. Y., Sun, J., & Du, H. Y. (2010). Research on the architecture of Internet of Things.
In ICACTE 2010 - 2010 3rd Int. Conf. Adv. Comput. Theory Eng. Proc. (Vol. 5, pp. 484-487).
Yang, W., Qiao, S., Song, Q., Liu, Z., & Yang, J. (2015, June). The design and implementation of wireless
temperature and humidity control system based on nRF905. In Industrial Electronics and Applications (ICIEA),
2015 IEEE 10th Conference on (pp. 753-756). IEEE.
Zhang, M., Zhao, H., Zheng, R., Wu, Q., & Wei, W. (2012). Cognitive internet of things: Concepts and application
example. International Journal of Computer Science Issues, 9(6), 151.
Zhao, C. W., Jegatheesan, J., & Loon, S. C. (2015). Exploring IOT Application Using Raspberry Pi. Int. J.
Comput. Networks Appl. Vol., 2(1), 27–34.
Zouai, M., Kazar, O., Haba, B., & Saouli, H. (2017). Smart house simulation based multi-agent system and
internet of things. In 2017 Int. Conf. Math. Inf. Technol. (pp. 201–203).
Zouai, M., Kazar, O., Haba, B., Saouli, H., & Hind, B. (2017). IoT Approach Using Multi-Agent System for
Ambient Intelligence. International Journal of Software Engineering and its Applications, 11(9), 15–32.

55
View publication stats

You might also like