DESIGN AND INTEGRATION OF MIDDLEWARE FOR IoT ......Here we are focused to build middleware for Solar...
Transcript of DESIGN AND INTEGRATION OF MIDDLEWARE FOR IoT ......Here we are focused to build middleware for Solar...
DESIGN AND INTEGRATION OF MIDDLEWARE FOR IoT DEVICES
TOWARDS SOLAR PANEL MONITORING BASED ON RASPBERRY PI 1Mallegowda M, 2Dr Anithakanavalli,3Amrutha M P,
Department of computer science and Engineering College
Ramaiah Institute of Technology MSR Nagar, Bengaluru, Karnataka 560054
ABSTRACT
The use of technology has become an essential part of improving lifestyle, work
efficiency, and a catalyst for economic growth. The benefit of the Internet of Things
(IoT) and connected nodes has been on a steep incline in recent years. This work aims to
research, build, test and implement a low-cost solar energy monitoring and control
system using IoT devices. Photovoltaic energy can be controlled and monitored using IoT
technology from any place in the world. In order to accomplish this goal, a complete
front-end to back-end system that includes a smart device application (iOS platform), a
cloud-based database, an Application Programming Interface (API), and a hardware
development is proposed. A small programmable specialized computing device (e.g.,
Raspberry Pi) for preliminary testing. This smart node was chosen due to familiarity, and
its capabilities, such as general purpose pins and built-in Wi-Fi chip. The end goal is to
observe energy efficiency by monitoring and controlling photovoltaic energy units. This
research paper proposes an IOT based approach for solar power consumption and
monitoring that allow the users to monitor or control a solar plant. Majorly, solar plants
are built in the locations where people cannot reach on daily basis so this approach allows
the people to virtually control their systems from faraway places.
Key words: Internet of Things, iOS platform, Application Programming Interface,
Raspberry Pi, Solar
1. INTRODUCTION
With headway of wired and remote system advances, web associated cell phones,
for example, advanced mobile phones and tablets are currently in across the board utilize.
Journal of Seybold Report ISSN NO: 1533-9211
VOLUME 15 ISSUE 9 2020 Page: 4215
Therefore bringing about another idea, Internet of Things (IoT) [1-2], was presented and
has gotten consideration in the course of the last few a long time. When all is said in
done, IoT is really a data sharing condition where protests in consistently life are
associated to wired and remote systems. As of late, it is utilized not just for the field of
buyer gadgets and machines additionally in different fields, for example, a savvy city,
human services, keen home, savvy auto, vitality framework, and modern security. At
present, the sunlight based photovoltaic (PV) vitality is one of the urgent renewable
vitality sources. The sunlight based vitality is turning into a potential arrangement
towards practical vitality supply in future. As more Rooftop Solar Photovoltaic
frameworks are getting incorporated into the current matrix, there is a developing
requirement for checking [3] of constant era information got from sun oriented
photovoltaic plants so as to improve the general execution of the sun oriented power plant
and to keep up the matrix steadiness. As nearby observing is unrealistic for the installer in
this way checking remotely is basic for each sun oriented power plant At this juncture
harnessingthe power of IoT for monitoring solar power plants by using raspberry pi and
more advanced computational facilities is promising.
The Control era from Solar Photovoltaic plants is variable in nature because of
changes in sun powered irradiance, temperature and different elements. Along these lines
remote observing is basic. For creating remote observing framework for sun powered
photovoltaic control plant, IoT (Internet of Things) approach is taken in this work which
really imagines a not so distant future where regular articles will be furnished with
microcontrollers and handsets for computerized correspondence. The remote observing
take out the risks associated[4] with the customary wiring frameworks and make
information estimation and observing procedure considerably less demanding and
financially savvy and IoT based frameworks take a monster jump towards checking by
insightful basic leadership from web executed in the raspberry pi.
The decentralized design of the remote checking frameworks and its adaptability
of organization make it most appropriate for sun based mechanical purposes.When all is
Journal of Seybold Report ISSN NO: 1533-9211
VOLUME 15 ISSUE 9 2020 Page: 4216
said in done remote checking frameworks need to get, dissect, transmit, oversee and input
the remote data [5], by using the most developed science and innovation field of
correspondence innovation and other zones. It additionally combines far reaching
utilization of instrumentation, electronic innovation and PC programming. Pervasive
checking PV framework approaches show represents a few issues like low automaticity
and poor constant. These issues can be deflected with a proficient remote condition data
observing and controlling framework. This framework ought to incorporate programmed
determination systems the PV station.
Therefore in this work utilizing Python equal programming language and will be
placed on Raspberry Pi 3. To support individuals learning IoT for fundamental, we make
comfort applications to send and accepting order line information to get to S or A. This
mlw serves to decipher a line of orders used to run or access the different highlights in
the IoT section. MP / MT is used in Python towards the time-competency of program
work execution
2. PROPOSED IoT BASED SOLAR PANEL MONITORING
In this chapter discuss the complete details of the architecture and designs for
proposed solar panel monitoring system. The structure of the proposed Deployment
representation of middleware design is shown in figure 1.
Figure 1. Deployment representation of middleware.
Journal of Seybold Report ISSN NO: 1533-9211
VOLUME 15 ISSUE 9 2020 Page: 4217
Here we are focused to build middleware for Solar Panel monitoring module
device which is application specific middleware. The developed middleware is designed
for the Solar Panel Monitoring IoT module based on embedded systems using the
Raspberry Pi command line sent via the firebase's real-time database. The middleware is
designed using multiprocessing or multi - threading with a combination of Python
parallel programming language for executable programs to operate a sensor or actuator
that is most effective in CPU use and memory use. The developed middleware is really
an interpreter to convert command protocols which is used to monitor the actuator or to
obtain data from sensors. Furthermore, this is always anticipated that Raspberry Pi also
used modularly in case of an IoT Solar Panel Monitoring Device.
2.1 Middleware layer located in Raspberry Pi
The middleware comprises of two sections, one is sent on sensor router side and
the other conveyed on entryway side. The middleware which is between application
framework and basic sensor arrange, passage side offering types of assistance dynamic
and advancement interface for the application. Through control and booking of passage,
sensor router side actualizes the assignment reallocation to help the utilization of fine-
grained usage
Figure 2. Middleware layer located in Raspberry Pi along Raspbian OS
Journal of Seybold Report ISSN NO: 1533-9211
VOLUME 15 ISSUE 9 2020 Page: 4218
The figure2 shows the architecture layer of the mlw system to be designed and
built with Raspberry Pi. The architecture mainly consists of two main principles that is
the hardware and the software phase. The key blocks on the middleware of the software
system architecture consisted of blocks for data exchange, blocks for translation and data
generation as work orders and blocks for sensors and actuators accessing the system. The
hardware architecture consists of the construction of a set of sensors and actuators which
could be used flexibly. Here, the middleware component is to configure the request
feature mostly on second portion of the system driver.
Figure 3: Sensor and Actuator which can be accessed through middleware
The instruction data is deciphered into an errand or task pack by the receiver class
which would be completed by the task assignment class of the undertaking that should be
finished by the Raspberry Pi-dependent IoT portion. The mechanism is then formed as a
job or task to be completed and instructions are given to the system driver containing
sensor class and actuator class. Sensor nodes could be accessed easily by sending a
command line with certain stated requirements for commands to control the sensor or
actuator. The S&A chart that can be used for Raspberry Pi 's built-in middleware is
shown figure 3
Journal of Seybold Report ISSN NO: 1533-9211
VOLUME 15 ISSUE 9 2020 Page: 4219
2.2 Implementation of proposed system
The proposed system is implemented using paython programing language. The
MP / MT used in Python is necessary to make mlw with circulated process for
enormously powerful processors and to allow heterogeneity access to S or A, all the more
fundamentally interfacing equipment and to upgrade organized effort between
applications and equipment. Lastly, we evaluate MP&MT for CPU bond and memory
use.
Figure 4 Solar panel monitoring system contained IoT sections and mlw
The figure 4 shows overall implementation of our work, were in the
middleware is built for the specific application that is for solar panel monitoring using
raspberry pi and measures temperature, humidity and lux by the sensor nodes
configured in different localities.
Journal of Seybold Report ISSN NO: 1533-9211
VOLUME 15 ISSUE 9 2020 Page: 4220
Figure 5: First module for Raspberry including S & A
The hardware module for Raspberry Pi to scale S & A. The figure 5 shows the
initial module for the extended GPIO, sensor and L293D DC engine driver.
Figure 6: module for Raspberry including sensor actuator
The developed hardware modules for Raspberry Pi for the scaling temperature
sensor, dust sensor, servo motor. We designed the hardware module for Raspberry Pi
to connect OLED LCD and the push button. The figure 6 shows second module that
must attached to first module:
Figure 7: Overall system workflow
Journal of Seybold Report ISSN NO: 1533-9211
VOLUME 15 ISSUE 9 2020 Page: 4221
Here are two primary elements in the use of mlw on IoT section,For example,
look at the notification of orders sent and the management of the devices which
should be utilized. Incoming information processing, interpretation and running
functions are done in the middleware to get to the S&A as a procedure. The figure 7
shows the system overflow and how the system interacts with other modules.
2.3 RSA (Rivest-Shamir-Adleman) Algorithm
In this work, we use RSA algorithm to encrypt and decrypt data sent between the
sensor nodes and master nodes that is for solar panel monitoring. The RSA algorithm
is a public key encryption method and is known to be the most secure form of
encryption. It has the following features:
a. RSA algorithm is a common exponentiation in a finite field over integers
including prime numbers.
b. The integers used for this approach are big enough to make it impossible to
solve.
c. There are two sets of keys in this algorithm: private key and public key.
The figure8 shows the general description of RSA algorithm:
Figure 8: RSA Algorithm
Journal of Seybold Report ISSN NO: 1533-9211
VOLUME 15 ISSUE 9 2020 Page: 4222
2.3.1 Algorithm
The steps of RSA are as follows:
Step1: Select two large prime numbers, x and y. The prime numbers need to be large
so that they will be difficult for someone to figure out.
Step2: Calculate n = x * y.
Step3: Calculate the quotient function; ϕ(n)=(x−1)(y−1)
Step4: Select an integer e, such that e is co-prime to ϕ(n) and 1<e<ϕ(n). The pair of
numbers (n,e)(n,e) makes up the public key.
Step5: Calculate d such that e.d=1 mod \ϕ(n). The pair (n,d)(n,d) makes up the
private key.
The encryption is given by the following equation:
Given a plaintext P, represented as a number, the ciphertext C is calculated as
C=Pe mod n … (1)
The decryption is given by the following equation:
Using the private key (n,d), he plaintext can be found using:
P=Cd mod n … (2)
The first step is to refresh the Firebase real-time databases with a child order
table. Information from Firebase real-time databases is therefore processed with
boundary either capacity code which have been already resolved. The data parsing
results is redirected to the assignment management layer which must be separated
into the application driver blocks. Every data information shall be submitted in the
context of a set of function codes and specifications. Every data information contains
similar framework as the function code and requirements but the number of notes
code program may have various figures.There are two versions of the Task Allocator
on this paper, namely the sensor recipient and the actuator recipient.
The multiprocessing method or feature is a typical parallel computing concept
on an operating system where each operation is performed like a procedure.
Basically, the method (mainly a huge task) has threads to execute its small task.
Threads are often on the similar memory address table, so that the data processing
Journal of Seybold Report ISSN NO: 1533-9211
VOLUME 15 ISSUE 9 2020 Page: 4223
utilizes shared memory on either of the logical processors. The middleware built for
solar panel monitoring utilizes multi-processing or multi-threading, where the phase
of magnitude is split into multiple sub-processes rather than just threads. This
enables sub process work to be performed using another logical processor found in a
CPU. Raspberry Pi has four logical processors. The utilization of multiprocessing is
supposed to be enabled to automatically breakdown the work composed in the
middleware into four cores.
3. RESULTS AND DISCUSSION
In this section discuss the results and discussion of proposedDesign and
Integration of Middleware for IoT Devices towards Solar Panel Monitoring Based On
Raspberry Pi. The propose system is implemented using python programming
language. The proposed system initially recognize a few plan standards for such a
middleware. These standards rouse a bunch based lightweight mlw structure that
isolates application semantics from the fundamental equipment, working framework,
and system foundation. The genuine utilization of sensor arrange mlw exhibit that our
proposed design is exceptionally measured and effective, offers great execution in
complex application situations of Internet of Things
Journal of Seybold Report ISSN NO: 1533-9211
VOLUME 15 ISSUE 9 2020 Page: 4224
Figure 9: Overall setup of the proposed system
The figure 9 shows the overall setup of the proposed solar monitoring system,
which includes the connection between the raspberry pi and sensor nodes.
Figure 10: Result of monitored sensor data
Journal of Seybold Report ISSN NO: 1533-9211
VOLUME 15 ISSUE 9 2020 Page: 4225
The figure 10 shows the result of monitor sensor data. In this proposed system
comprise five sensor, such as temperature, humidity, water level, irradiance and light
level.
Figure 11: Main Interface of the Application
The figure 11 shows Main Interface of the Application. In this main interface
displays the sensor values of temperature, moisture and rain level
Journal of Seybold Report ISSN NO: 1533-9211
VOLUME 15 ISSUE 9 2020 Page: 4226
Figure 12: Collecting Data from sensor nodes
The figure 11 shows Main Interface of the Application. In this main interface
displays the sensor values of temperature, moisture and rain level. These collection
data’s are continuously monitored through IoT and automatically stored on database.
Figure 13: Current Spikes Response
The figure 13 shows Current Spikeresponse in the proposed solar panel
monitoring system for the date of 30th July, 1st august and 3rd august. In this
waveform clearly states that the current have minimum spikes.
Figure 14: Temperature Response
The figure 14 shows temperature response in the proposed solar panel
monitoring system for the date of 30th July, 1st august and 3rd august. The temperature
value of 30th July, 1st august and 3rd august are 32oC ,28oc and 26oc respectively.
Journal of Seybold Report ISSN NO: 1533-9211
VOLUME 15 ISSUE 9 2020 Page: 4227
Figure15: Humidity Response
The figure 15 shows humidity response in the proposed solar panel monitoring
system for the date of 30th July, 1st august and 3rd august. The humidity value of 30th
July, 1st august and 3rd august are 65h, 71h and 76h respectively.
Figure 16: Fire value response
The figure 16 shows fire value response in the proposed solar panel monitoring
system for the date of 30th July, 1st august and 3rd august. The fire value of 30th July,
1st august and 3rd august are 0.2f, 0.5f and 1f respectively.
Journal of Seybold Report ISSN NO: 1533-9211
VOLUME 15 ISSUE 9 2020 Page: 4228
Figure 17: Comparison of CPU using Multiprocessing and Multithreading
The figure 17 shows Comparison of CPU using Multiprocessing and
Multithreading response in the proposed solar panel monitoring system for the date of
30th July, 1st august and 3rd august. The CPU usage of 30th July, 1st august and 3rd
august are 0.6plval, 0.5plval and 0.01plval respectively.
4. CONCLUSION
The proposed middleware will ease the consolidation of software and heterogeneous
hardware with respect to WSN. The Universal Gateway (Middleware Layer) can
make communication between hardware and software layers simpler and supports
most WSN-related specifications, operating systems and protocols. This work
describes development of middleware for IoT module that is for solar panel
monitoring operating on Raspberry Pi utilizing Python parallel programming. The
designed middleware is responsible for translating received commands to reach
existing GPIOs in the IoT module. The sensors and actuators mounted to the IoT
module are ultrasonic sensors, temperature sensors, DC motors, potentiometers,
LEDs, pushbuttons, buzzers, LCDs and servo motors. The designed middleware
framework for solar panel monitoring even uses multi-processing or multi-threading,
so that commands obtained to reach the IoT module can be reacted rapidly and render
CPU usage most effective. Here the middleware layer is built for specific application
Journal of Seybold Report ISSN NO: 1533-9211
VOLUME 15 ISSUE 9 2020 Page: 4229
that is for solar panel monitoring. Hence to suggest that future enhancement would be
to handle multiple application simultaneously with good performance.
REFERENCES
1. Cheddadi, Y., Cheddadi, H., Cheddadi, F. et al. Design and implementation of an
intelligent low-cost IoT solution for energy monitoring of photovoltaic
stations. SN Appl. Sci. 2, 1165 (2020). https://doi.org/10.1007/s42452-020-2997-4
2. Kishorebabu, V., Sravanthi, R. Real Time Monitoring of Environmental
Parameters Using IOT. Wireless PersCommun 112, 785–808 (2020).
https://doi.org/10.1007/s11277-020-07074-y
3. Agrawal, H., Dhall, R., Iyer, K.S.S. et al. An improved energy efficient system for
IoT enabled precision agriculture. J Ambient Intell Human Comput 11, 2337–2348
(2020). https://doi.org/10.1007/s12652-019-01359-2
4. Tenzin, S., &Sriyang, S. (2017). Low cost weather station for climate-smart
agriculture. In 2017 9th international conference on knowledge and smart
technology (IEEE) (pp. 1–10).
5. Solano, G., & Lama, F. (2017). Weather station for educational purposes based on
Atmeg8L. In 2017 IEEE XXIV international, electrical engineering computing
(IEEE) (pp. 1–10).
6. Brito, R. C., &Favarim, F. (2017). Development of low cost weather station using
free hardware and software. In 2017 Latin American robotics symposium (LARS)
and 2017 Brazilian symposium on robotics (SBR) (IEEE) (pp. 1–10).
7. Kishore, R., & Mandal, S. (2016). IOT based weather station. In 2016
international conference on control, instrumentation and computational
technologies (ICCICCT) (IEEE) (pp. 1–10).
8. Saini, H., & Thakur, A. (2016). Arduino based automatic wireless weather station
with remote graphical application and alerts. In 2017 international conference on
signal processing and integrated networks (IEEE) (pp. 605–609).
Journal of Seybold Report ISSN NO: 1533-9211
VOLUME 15 ISSUE 9 2020 Page: 4230
9. Kodali, R. K., &Sahu, A. (2016). An IOT based weather information prototype
using WeMos. In 2016 2nd International conference on Contemporary Computing
and Informatics (IEEE) (pp. 612–616).
10. Palle, D., Kommu, A., Kanchi, R. R. (2016). Design and development of CC3200-
based cloud IOT for measuring humidity and temperature. In 2016 international
conference on electrical, electronics, and optimization techniques ICEEOT (IEEE)
(pp. 3116–3120).
11. . Damanhuri, N. Othman, I. Ibrahim, R. Radzali, and M. Mohd, "System design
and cost analysis simulation of small scale dual-tariff solar photovoltaic (PV)
system in UiTMpulau Pinang Malaysia," in The 2010 International Conference of
Electrical and Electronics Engineering, 2010.
12. S. Manzano, R. Peña, D. Guevara, and A. Ríos, "An Overview Of Remote
Monitoring PV Systems: Acquisition, Storages, Processing And Publication Of
Real-Time Data Based On Cloud Computing," in 13Th International Workshop on
Large-Scale Integration of Wind Power into Power Systems as well as on
Transmission Networks for Offshore Wind Power Plants & 4th Solar Integration
Workshop which will be held from, 2014.
13. N. Othman, N. Damanhuri, I. Ibrahim, R. Radzali, and M. Mohd, "Automated
monitoring system for small scale dual-tariff solar pv plant in uitmpulaupinang,"
in Proceedings of the World Congress on Engineering, 2010, pp. 945-947.
14. M. E. A. López, F. J. G. Mantiñan, and M. G. Molina, "Implementation of
wireless remote monitoring and control of solar photovoltaic (PV) system," in
Transmission and distribution: Latin America conference and exposition (T&D-
LA), 2012 sixth IEEE/PES, 2012, pp. 1-6.
15. S. Ferdoush and X. Li, "Wireless sensor network system design using Raspberry
Pi and Arduino for environmental monitoring applications," Procedia Computer
Science, vol. 34, pp. 103-110, 2014.
Journal of Seybold Report ISSN NO: 1533-9211
VOLUME 15 ISSUE 9 2020 Page: 4231
16. P. Guerriero, F. Di Napoli, G. Vallone, V. d'Alessandro, and S. Daliento,
"Monitoring and diagnostics of PV plants by a wireless self-powered sensor for
individual panels," IEEE Journal of Photovoltaics, vol. 6, pp. 286- 294, 2016.
17. .K. Abeykoon, M. Lin, K. Kleesee van Dam. "Parallelizing X-ray Photon
Correlation Spectroscopy Software Tools using Python MLP", New York
Scientific Data Summit (NYSDS), pp. 1-10.2017.
18. Izzuddin bi Abu Bakar, R.Atan, R. Yaakob. "Mlw framework for integration
of heterogeneous hardware and software", Malaysian Conference in Software
Engineering (MYSEC), pp. 66-69.2011.
19. Y. Nakamura, H. Suwa, Y. Arakawa, H. Yamaguchi, K. Yasumoto, “Design
and Implementation of Mlw for IoT Devices toward Real-Time Flow
Processing", IEEE 36th International Conference on Distributed Computing
System Workshops, pp.162-167,2016.
20. “Middleware Technologies for Internet of Things” by AmirhosseinFarahazadi,
Pooyan Shams and JavadRezazadeh.
21. J.Radhika and S.Malarvizhi. “Middleware approaches for Wireless Sensor
Networks”
22. Securing IoT Devices and Securely Connecting the Dots Using REST API and
Mlw” by Hittu Garg and Mayank Dave.
23. Besari,A.R.A,Sukaridhoto,S.,Wibowo,I.K.,Setiawan, R. Rizqullah, M.R.,
“Preliminary Design of Mobile Visual Programming Apps for Internet of
Things Applications based on Raspberry Pi 3 Platform”, Conference: 2017
International Electronics Symposium (IES), pp 50-54, 2017
24. E.A.D. Ballesteros, C.E.C. Calderon, Y.C. Calderon, E.G. Strauss, “Android
Management Tool, That Controls Electronic Devices Through a Raspberry Pi
Under IoT Model", IEEE 10th Computing Combian Conference, vol 2,
pp.237-244,2015.
25. SEEMd Security Enabled Energy Efficient Mlw for WSN” by Linoy A
Tharakan and R. Dhanasekaran.
Journal of Seybold Report ISSN NO: 1533-9211
VOLUME 15 ISSUE 9 2020 Page: 4232
26. G. Zaccone. Python Parallel Programming Cookbook. Livery Place,
Birmingham, UK :Packt Publishing,2015
Journal of Seybold Report ISSN NO: 1533-9211
VOLUME 15 ISSUE 9 2020 Page: 4233