You are on page 1of 58

INTERNET OF THINGS TEMPERATURE DETECTION IN-HOUSE

USING RASPBERRY PI

BY

NGUBO, Chimdindu Emmanuel

BU/16C/IT/1990

DEPARTMENT OF COMPUTER SCIENCE

BAZE UNIVERSITY

ABUJA

JUNE 2021
Thesis Submitted in Partial Fulfilment of the Requirement

for the Degree of

B.Sc.

in

Software Engineering

BY

NGUBO, Chimdindu Emmanuel

BU/16C/IT/1990

To

The Department of Computer Science


Baze University, Abuja

JUNE 2021
DECLARATION
This is to certify that this Report entitled “The Internet of things temperature detection in a
house. -Raspberry pi”, which is submitted by Chimdindu Emmanuel Ngubo in partial
fulfilment of the requirement for the award of degree for B.Sc. in Software Engineering to the
Department of Computer Science, Baze University Abuja, Nigeria, comprises of only my
original work and due acknowledgement has been made in the text to all other materials used.

Date: 5/07/2021 Name of the Student: Chimdindu Emmanuel Ngubo

APPROVED BY …………………………………
Head
Department of Computer Science

I
CERTIFICATION
This is to certify that this thesis entitled “The Internet of things temperature detection in a
house. -Raspberry pi”, which is submitted by Chimdindu Emmanuel Ngubo in partial
fulfilment of the requirement for the award of degree for B.Sc. in Software Engineering to the
Department of Computer Science, Baze University Abuja, Nigeria is a record of the candidate’s
own work carried out by the candidate under our supervision. The matter embodied in this
report is original and has not been submitted for the award of any other degree.

Date: ………………………. 1st Supervisor: DR AMIT MISHRA….……………..

Date: ……………………... 2nd Supervisor: MR NASIRU ABOKI….…………….

II
APPROVAL
This is to certify that the research work, “The Internet of things temperature detection in a
house. -Raspberry pi”, which is submitted by Chimdindu Emmanuel Ngubo with
BU/16C/IT/1990 has been approved by the Department of Computer Science, Faculty of
Computing and Applied Science, Baze University, Abuja, Nigeria.

DR AMIT MISHRA Date/Sign


1st Supervisor

MR NASIRU ABOKI
Date/Sign
2nd Supervisor

Dr. C. V Uppin Date/Sign


Head of Department

Prof M. B. Hammawa Date/Sign


Dean, Faculty of Computing and Applied Science

Prof. A. B. Garko Date/Sign


External Examiner

III
DEDICATION
I would like to dedicate this project to God for providing me with wisdom and my family for
their unwavering support which I have gotten since the beginning of my educational journey.

IV
APPRECIATION
I express gratitude toward my parents once again, both my siblings, and extended family who
supported me. My brothers who I met during my time here and the lecturer’s that had some
impact on my educational journey by teaching me a lot of what I know now. Lecturers such as
Dr Amit Mishra, Mr Charles Isah, Dr Chandrashekar Uppin, Mrs Fatima Baba, Mr Samuel
Ubaru, Dr Sylvanus Ehikioya, Mr Julius Makinde, Mr Kvac Udoh and Mr Abubakar Usman
who really pushed me to do this project and I really appreciate the belief they had in me.

V
ABSTRACT

The revolution of the IT industry is in its ability to introduce automation to tasks that require
human resources. The motivation for this project lies in the automation of a seemingly simple
subject but if done incorrectly, can cost a company millions of naira in damage control and
more millions to recover from. This project focuses on the temperature sensing built on an
event-driven process. Event-driven processes are used all the time and in various scenarios, for
example, the light in the fridge that turns on when the fridge door is opened Or the light bulb
that turns on when the motion sensor senses motion.

In this project, using a combination of two raspberry pi, a temperature sensor, and a light bulb,
we build a temperature sensing system built on an event-driven process. This system is
designed to detect the temperature of any room it is placed in, and raise an alert if the
temperature readings become alarming. One obvious advantage of this project at this point is
the “alert” system. Using the MQTT protocol, the two raspberry pi’s are able to communicate
to each other over a local network or a network as large as the internet. Thereby allowing the
“sensing” raspberry pi to notify the “alarm” raspberry pi of causes for alarm.

Furthermore, to emphasize the usability of this project, a user-friendly website is developed.


This website will graphically present to the user the temperature readings over a period of time,
and not simply the current temperature. This allows the user to narrow his/her debugging
parameters, or simply observe the temperature from a remote location. The light bulb attached
to the alarm raspberry pi, notifies the user that an event has occurred and the automation
process stepped in and executed the pre-programmed instructions. Using a number of
programming languages, programming tools and real hardware devices, a fully functional
event-driven temperature sensing system has been built and tested.

VI
Table of Contents

DECLARATION ........................................................................................................................ I

CERTIFICATION ..................................................................................................................... II

APPROVAL ............................................................................................................................. III

DEDICATION ..........................................................................................................................IV

APPRECIATION .......................................................................................................................V

ABSTRACT..............................................................................................................................VI

LIST OF TABLES ..................................................................................................................... X

LIST OF FIGURES .................................................................................................................. XI

LIST OF ABBREVIATIONS .................................................................................................. XII

CHAPTER 1: INTRODUCTION ........................................................................................ 1

1.1. Overview ..................................................................................................................... 1

1.2. Background and Motivation ........................................................................................ 1

1.3. Statement of the Problem ............................................................................................ 1

1.4. Aim and Objectives ..................................................................................................... 2

1.5. Significance of the Project .......................................................................................... 2

1.6. Project Risk Assessment ............................................................................................. 2

1.7. Scope / Project Organization ....................................................................................... 2

CHAPTER 2: LITERATURE REVIEW ............................................................................. 4

2.1. Introduction ................................................................................................................. 4

2.2. Historical Overview .................................................................................................... 5

2.3. Related work ............................................................................................................... 6

2.4. Summary ..................................................................................................................... 6

CHAPTER 3: REQUIREMENTS, ANALYSIS, AND DESIGN ............................................. 7

3.1. Overview ......................................................................................................................... 7

VII
3.2. Proposed Model .............................................................................................................. 7

3.3. Methodology ................................................................................................................... 8

3.4. Tools and Techniques ..................................................................................................... 8

3.4.1. Developer’s Specification ........................................................................................ 9

3.4.2. Description of Tools .............................................................................................. 11

3.5. Ethical Consideration .................................................................................................... 13

3.6. Requirements Analysis ................................................................................................. 13

3.7 Requirements Specifications .......................................................................................... 14

3.7.1 Functional Requirements Specifications................................................................. 15

3.7.2 Non-Functional Requirements Specifications ................................................... 16

3.8. System design ............................................................................................................... 17

3.8.1. Use-case Diagram .................................................................................................. 19

3.8.4. Activity diagrams ................................................................................................... 20

Summary .............................................................................................................................. 20

CHAPTER 4: IMPLEMENTATION ................................................................................ 21

4.1. Overview ................................................................................................................... 21

4.2. Main Features ............................................................................................................ 21

4.2.1. Back-end ................................................................................................................ 22

4.2.2. Front-end ............................................................................................................... 22

4.2.2.1. Website ........................................................................................................... 22

Development Environment .................................................................................................. 27

IDE ................................................................................................................................... 27

DHT22 Temperature Sensor ............................................................................................ 28

Raspberry PI..................................................................................................................... 29

Website and Python Flask ................................................................................................ 29

VIII
4.3. Implementation Problem ........................................................................................... 29

4.4. Overcoming Implementation problems..................................................................... 30

4.5. Testing ....................................................................................................................... 30

4.5.1. Tests Plans (for Unit Testing, Integration Testing, and System Testing) .......... 30

4.5.2. Test Suite (for Unit Testing, Integration Testing, and System Testing) ............ 32

4.5.3. Test Traceability Matrix (for Unit Testing, Integration Testing, and System
Testing) ………………………………………………………………………………………………………………………33

4.5.4. Test Report Summary (for Unit Testing, Integration Testing, and System Testing)
33

4.5.5. Error Reports and Corrections ........................................................................... 34

4.6. Use Guide .................................................................................................................. 34

4.6.1. Initial view ......................................................................................................... 34

4.6.2. Authentication .................................................................................................... 35

4.6.3. Sensor interaction............................................................................................... 37

4.7. Summary ................................................................................................................... 38

CHAPTER 5: DISCUSSION, CONCLUSION AND FUTURE WORK ........................ 39

5.1. Overview ................................................................................................................... 39

5.2. Objective assessment................................................................................................. 39

5.3. Limitations and challenges ........................................................................................ 39

5.4. Future Enhancements ................................................................................................ 39

5.5. Recommendations ..................................................................................................... 40

5.6. Summary ................................................................................................................... 41

REFERENCES ........................................................................................................................ 42

APPENDICES……………………………………………………………………………………………………………………….43

IX
LIST OF TABLES

Table 1: Developer Specification Hardware …………………………………………………………………………8

Table 2: Software Specification ……………….……………………………………………………………………………9

Table 3: Functional Requirement Specification……………………………………………………………………14

Table 4: Non-Functional Requirement Specification…………………………………………………………….15

Table 5: Test Plan Table……………………………………………………………………………………………………….30

Table 6: Test Suite(for Unit Testing, Integration Testing, and System Testing)…………………….32

Table 7: Test Traceability Matrix Table…………………………………………………………………………………32

Table 8: Error Reports Table……………………………………………………………………………………………….33

X
LIST OF FIGURES

Figure 3.1 Software Development Methodologies and Their Usefulness. (Sami, 2012) .......... 7

Figure 3.2 Agile Development Lifecycle (Sweeney, 2020) ...................................................... 8

Figure 3.3 Raspberry Pi GPIO pin assignment, physical pin numbers and pin configurations
.................................................................................................................................................. 11

Figure 3.4 DHT22 Temperature Sensor................................................................................... 12

Figure 3.5 Communication Design Pattern .............................................................................. 18

Figure 3.6 State change process. .............................................................................................. 18

Figure 3.7 Use-case diagram for this project ........................................................................... 19

Figure 3.8 Activity diagram for this project, showing the interaction between the raspberry pi
and the temperature sensors, as well as the interaction between the user and the website. ..... 20

Figure 4.1. Two Raspberry pi connected to temperature sensors and power cables.………..20

Figure 4.2 MQTT protocol message format for sending temperature readings……………….21

Figure 4.3 Tree diagram of how the files are organized for the project .................................. 27

Figure 4.4 Two Raspberry pi connected to temperature sensors and power cables…………..27

Figure 4.5 Home page of the Temperature Sensing Website………………………………….34

Figure 4.6 Navigation Drop-down Menu of the Temperature Sensing Website Figure……….34

Figure 4.7 Register page of the Temperature Sensing Website………………………………35

Figure 4.8 Log in page of the Temperature Sensing Website…………………………………36

Figure 4.9 Profile page of the Temperature Sensing Website…………………………………36

Figure 4.10 Secondary raspberry pi connected to the LED light. When the LED light turns on,
it signals that the cooling system has been activated…………………………………………37

XI
LIST OF ABBREVIATIONS

API Application Programming Interface

ARM Advanced RISC Machines

GPIO General Purpose Input and Output

HTML Hypertext Markup Language

RISC Reduced Instruction Set Computer

SQL Structured Query Language

UI User Interface

URL Uniform Resource Locator

USB Universal Serial Bus

VSCode Visual Studio Code

XII
CHAPTER 1: INTRODUCTION
1.1. Overview

In recent years, we have witnessed the advancement of technology towards the embedding of
computer systems in household devices, which has led to the term “smart devices”. These
devices alone serve unique purposes; for example, a smart fridge can only carry out operations
required for the optimal running of the fridge but no further. However, by combining multiple
intelligent devices in a network, the term “internet of things” was formed, which allows for
event-driven processes over the network. It is my aim, with the aid of two raspberry pi’s and a
temperature sensor, to build an intelligent thermostat system. Where the temperature sensor is
fastened to one device and depending on the perceived temperature, the other raspberry pi,
which in this case is acting as the temperature setter, will either increase or reduce the internal
temperature. Because this use-case is event-driven, it can be applied to use-cases such as a
specific number of students need to be in class for a video to begin, or when a car reaches a
certain speed, an alert is sent to the owner’s phone.

1.2. Background and Motivation

The motivation for this project stems from a zeal to understand event-driven processes. How
multiple devices communicate together as part of an infrastructure to build a complete system.
Remote monitoring became the next problem encountered. And finally, how to effectively
monitor the system from across the globe.

1.3. Statement of the Problem

The widespread and ubiquitous availability of automated process seen in the western world
still eludes developing countries such as Nigeria. The cause for this might be two-fold, a lack
of highly skilled and knowledgeable people, and the idea that these processes can only be done
with the help of the western man, and the idea that an enormous amount of money would be
required. Whichever the prevalent cause, it is evident that if Nigeria is to stand in the age of
information, then automation via event-driven processes is a must

1
1.4. Aim and Objectives
1. To program the raspberry pi to read temperature data from the temperature sensor, using
a combination of Linux commands and Python programming language.
2. Develop a website where we can view the temperature readings and the activities of
the Raspberry Pi.
3. To create a fully functional login system and Solve bugs.

1.5. Significance of the Project

To successfully design and build a temperature sensing system with remote monitoring
capabilities and an event-driven processing system. The applications of this project are
numerous and can be extended far beyond the current scope. This project aims to show that
using relatively cheap items and a simple website, a temperature sensing system can be built
and its data monitored via a website.

1.6. Project Risk Assessment

Two areas of high risk are hardware and software. The temperature sensor is connected to the
raspberry pi by jumper cables. If the cables become undone, the event-driven system will have
no data to respond to. The second area is in software. Software bugs occur all the time in
software, and the effects are mitigated using software patches. In this project, every effort will
be taken to avoid software bugs.

1.7. Scope / Project Organization

The remaining parts of this project are as organized below:

Chapter Two demonstrates an understanding of recent literature on the subject of the Internet
of Things and an understanding of the state-of-the-art.

Chapter Three is set aside for methodology and design of this project and how it directly and
indirectly contributed during the project.

2
Chapter Four provides a critical analysis of the methodology and an in-depth discussion into
the results obtained from a series of experimentation resulting from combining complex code
and physical engineering.

Chapter Five concludes the project by clearly outlining the results at major milestones of the
project and highlighting possible further research and future work areas.

3
CHAPTER 2: LITERATURE REVIEW
2.1. Introduction

“Nigeria, as the biggest mobile market and most populous African country, has enormous
prospects in IoT…”, these are the published words of D.T. Okafor (Davideen and Ndubuaku,
2015). While the Internet of Things takes the global world by storm, African countries like
Nigeria are embracing it at a slow pace. Nigeria’s adoption rate of IoT is sure to further increase
the gap between Nigeria and the western world. The advantages of IoT are numerous and could
be advantageous to Nigeria in multiple ways. This point of view has also been corroborated by
the tech giant Oracle (Oracle, no date), who plan on aiding Nigeria in its IoT development.
However, this dream might move at a slow pace as (Kunle, Olubunmi and Sani, 2018) says in
their published journal paper that Nigeria’s current infrastructure might present a challenge to
a fast adoption rate.

In the work of (Kunle, Olubunmi and Sani, 2018), the benefits of IoT to Nigeria are numerous.
Some of the sectors that circle in on are the health sector, the energy sector, economic sector,
agricultural sector, etc. (Davideen and Ndubuaku, 2015) also gave an extensive list of the
benefits IoT would bring to waste management and oil and gas sectors, among other sectors.
However, both (Davideen and Ndubuaku, 2015) and (Kunle, Olubunmi and Sani, 2018) did
not fail to mention that the limitations to IoT adoption in Nigeria are numerous and not simply
tackled. On a community level, these limitations include culture and a lack of zeal to adapt to
the times. Also, there is a lack of interoperability amongst telecommunications companies.
These are the companies that should aid in providing the extensive networks required to support
IoT devices and infrastructures. Furthermore, government policies could pose a huge stumbling
block when considering the bidding process involved. On a more nationwide scale, Information
Nigeria (Information Nigeria, no date) noted that only 25% of homes in Nigeria housing 200
million people are served with a “regular” power supply. Note, however, that approximately
45% of the population are connected to the national grid.

Nevertheless, the pursuit for advancement in our country remains. The aim of this project is to
use relatively cheap devices to prove that IoT devices can communicate and function in our
current infrastructure. Furthermore, by ensuring that the proposed system is event-driven, it
prevents the wastage of data involved in periodic pinging messages between devices.

4
2.2. Historical Overview

The Internet of Things, or IoT, as it’s more commonly known, is the interaction between
everyday devices via a network. It is the communication of actionable data over a network
between two or more devices that would otherwise be standalone devices. When the term IoT
was coined in 1999 by British Technologist Kevin Ashton, it simply referred to the
communication of everyday devices with the humans that wield the devices. And while it was
a concept that could not be fully appreciated back in 1999, it is a concept that is now recognized
as a global 749 billion USD industry, as of 2020 (Kaukalias and Chatzimisios, 2014).
Furthermore, when compared to the tech giant Google which just became a trillion USD
industry at the start of 2020, the future of IoT is quite promising, and projections such as 1.1
trillion USD by 2023 does not seem so unreasonable.

Since the term was coined, the popularity of IoT has only skyrocketed, and its widescale
implementation has created new terms such as:

1. Industrial Internet of Things (IIoT): IoT strictly for industrial use in factories to
automate processes and increase the production rate.
2. Smart Home Appliances (SHA): Everyday home appliances such as washing machine,
kettle, etc. now embedded with communication devices that enable them to send data
across a network to other devices.
3. LoWPAN: Low-Power Wireless Area Networks explicitly designed to facilitate
communication between IoT devices which are mostly considered to be constrained
devices, operating on limited battery.
4. Cloud computing: A significant portion of cloud computing is designed to assist IoT
devices with computation and storage resources that are simply not intrinsic to them.

Over the past years, there have been numerous applications of IoT. These applications are not
limited to the IT industry but span across various sectors to achieve a plethora of goals. Such
applications include sensors in smart cars, smart electricity grids in smart cities, smart farming
using IoT, self-driving cars, industrial IoT, etc.

5
2.3. Related work

The success of IoT has raised questions and prompted publications about its usefulness to not
only the Nigerian people but also the Nigerian economy. The concept of temperature sensing
is not new; however, the cost associated with these temperature sensors might be a concern for
start-ups in Nigeria. For example, the cost of an ALTA Wireless Temperature Sensor Coin Cell
is 43,629.19 naira. Laird makes an IoT humidity and temperature sensor. Although the price is
not communicated on their website, the cost was available on Ebay.co.uk and came up to
98,434.49 naira. While these two aforementioned devices are purpose-built and operate as they
are sold, they cannot be extended. The raspberry pi devices used in this project can be used for
a plethora of things, meaning that they can be extended to sense other environmental variables.

2.4. Summary

The literature reviewed in this chapter shows since 2015, there has been an ongoing
conversation about the usefulness and deployment challenges of IoT in Nigeria. Therefore, it
is not only important but also paramount that there be the development of IoT infrastructure in
Nigeria. If Nigeria is going to advance into the information age, then projects such as this are
required to build the skilled manpower necessary to push Nigeria into the information age.

6
CHAPTER 3: REQUIREMENTS, ANALYSIS, AND DESIGN
3.1. Overview

This chapter illustrates how the research was conducted to identify the determinants of attitudes
towards Internet of Things (IoT) apps in Lagos, Nigeria. In addition, this chapter will include
the research methodology, tools& techniques, feasibility studies and fact-finding techniques,
which includes questionnaires and research that were chosen for this project.

3.2. Proposed Model

System development methodologies are a group of processes and guidelines that explain the
combination of engineering advances planned to convey a specific answer. When we say
Methodologies, they are developed as a group of standards; they evolve with various projects.
They should develop and be tweaked to accommodate a company’s changing focus or
direction. In methodologies, we consider some potential approaches in meeting the
requirements but not elaborate on each operando in detail.

Recommending that a business should be “all agile” or “all waterfall” is a negative option. A
number of software developers are constantly looking to put in the perfect components of the
agile and waterfall integrated into their software development processes. Hybrid agile-waterfall
advances are developing. The procedure of evolving information systems is at no time fixed.
Almost all Information System division and project executive acknowledge that the option of
the most preferred development methodology on project characteristics.

Figure 3.1 Software Development Methodologies and Their Usefulness. (Sami, 2012)

7
3.3. Methodology

Agile methodology was adopted. Based on rapid software development and delivery which is
now often the most important requirement for software systems. I reviewed the system as a
complex system where at first, the user requirements could not be fully understood at the
beginning of the project or rather when the project idea was first thought about by the
developers and stakeholders (any person/thing that directly/indirectly affects the project). So,
I adopted the methodology where each phase of the project is inter-leaved, and the outputs
from the development process are decided through a process of negotiation during the software
development process.

Figure 3.2 Agile Development Lifecycle (Sweeney, 2020)

3.4. Tools and Techniques

The technicality of the system involves several resources in trend with current technology.
Therefore, we must consider some factors whether we have the requirements to build the
system. So far, to meet up with the design items and system up-bringing, we need several tools

8
like hardware and software that needs to be purchased. As clearly stated, technical feasibility
is divided into two categories.
➢ Hardware
➢ Software

Hardware specification is divided into two further categories, the developer hardware and the
client’s hardware.
3.4.1. Developer’s Specification
Table 1 Developer’s Specification Hardware

Hardware Specification

S/No Items Specification

1 RASPBERRY PI • Quad Core 1.2GHz 64bit CPU


• 1GB RAM
• Wireless LAN and Bluetooth
Low Energy (BLE)
• 40-pin extended GPIO
• 4 USB 2 ports.
• Full-size HDMI
• Micro SD port for the operating
system and user-defined storage
capacity.
• Micro USB power source up to
2.5A.

2 JUMPER CABLES Female to Female jumper cables.

3 I/O Keyboard, Mouse.

4 Network • The wireless card on the


raspberry pi
• WIFI connection provided by
hotspot.

5 Temperature sensor DHT22 Temperature sensor

9
The nature of the application being built requires the client or user to interact with a website.
While it is appreciated that not every user will have the technical know-how to interact and
modify the various hardware components, the technological advancements of today’s world
guarantees that a majority of people should be more familiar with a website. Therefore, the
hardware requirements for the user are simply a network that provides internet access and a
device capable of displaying the website.

Table 2 Software Specifications

Software Specification

S/No Items

1 Visual Studio Code 2019

2 Python Flask

3 Advanced IP Scanner

4 Google Chrome

Similar to the hardware specifications provided for the client, the software requirements are
minimal and hence caters to a wide array of clients. A browser such as Google Chrome should
suffice. JavaScript has evolved over the years, and this may cause outdated browsers not to
display the graphs and other readings provided by the system. Hence, it is advised that the user
update the browser application.

10
3.4.2. Description of Tools
Raspberry PI

Like all sensors, the temperature sensor used in this work must be connected to a device capable
of interpreting the data it reads and translating that data to a human-readable format. The
raspberry pi is a powerful computer capable of extensions using the GPIO pins in the figure
below. These GPIO pins can be used to send power or receive power, depending on the
requirements of the attached device. Hence, the correct placement of the temperature sensor to
the raspberry pi is crucial. Raspberry pi is a relatively cheap computer costing 13,335 naira
($35). Its size has been compared to the size of a debit card. It is a single-board computer with
a 1.4 GHz quad-core ARM CPU with 1GB RAM. However, this device is so versatile that it’s
equipped with 4 USB ports, 1 full-size HDMI port, an onboard Wi-Fi chip with an ethernet
port capable of 300 Mbit/s, Bluetooth 4.2. It also has 40 GPIO pins to attach other devices,
extending the raspberry pi’s capabilities, a camera and a display interface, a microSD slot
which is used as primary storage for the device. The microSD card contains the operating
system for the device.

Figure 3.3 Raspberry Pi GPIO pin assignment, physical pin numbers and pin configurations

DHT22 Temperature Sensor

The DHT22 sensor is a low-cost temperature and humidity sensor. Its versatility allows it to
transmit over long distances of approximately 20m from the computing device. The only
limitation imposed by the technical specification of the sensor is it has a sampling rate of 2
seconds per reading. Temperature readings can decide if a system is operating at optimal
conditions or aid in identifying a fault or a potential cause for concern. Hence, an accurate

11
temperature sensor is desired. One of the aims of the project is to build a cost-effective
temperature reading system; therefore, the cost of the temperature sensor must not be
outrageous. Based on these requirements, the DHT22 temperature sensor was found better than
another popular temperature sensor, DS18B2. As can be seen from the figure below, this
temperature sensor has three pins. These pins are used to connect the temperature sensor to a
device capable of performing computing operations and providing the necessary power the
temperature sensor requires. These pins are connected to the computing device using jumper
cables, also in the figure below. The relationship between the colours of the cables and the pins
on the temperature sensor are discussed in the implementation chapter.

Figure 3.4 DHT22 Temperature Sensor

Python Flask

Flask is a python web framework that has gained increasing popularity in the python
community in recent years. When compared to other python-based web frameworks such as
Django and Tornado, Flask is often preferred because of the flexibility it provides the
programmer, as it has less built-in functionality and libraries compared to the other
frameworks. Since the code used to interact with the temperature sensor is primarily written in
python, it made sense to develop other elements of the project in python for easy continuity.
Connecting the temperature sensor to the raspberry pi only ensures that the sensor can be
powered, and data can be read from it. It does not provide us with a user-friendly way of
fetching the data and presenting the data. Python Flask is used to feed the sensed temperature
to the website and manage the webpages and database functionality.

12
HTML, CSS and Python

With the front-end being web-based, the webpages are made using HTML. CSS aids with
providing the users with a colourful yet professional looking webpage with interactive
components. Python programming language is used to interface between the front-end and the
back-end. This interaction is facilitated using Jinja2, a template engine for python, which can
be embedded into HTML code.

IDE

Visual studio code (VScode) was used to write the code used for this project. This IDE is quite
user-friendly and was useful to write the code necessary in all the languages used.

MQTT protocol

The MQTT protocol sometimes referred to as the Mosquitto protocol. MQTT is a python
protocol built for communication between IoT devices.

3.5. Ethical Consideration

There are moral concerns recognized straightforwardly with the demonstration of software
development. The developer partakes in friendly cycles during the framework improvement
stage, and these social cycles are completed towards the: customer, clients, stakeholders, and
accomplices. Undertaking administrators and the association being addressed. This social cycle
did include many roads for abuse, which are considered a penetration of moral guidelines and
techniques accordingly, exemplary self-precautionary measures were set up to ensure the
developer against infringement of any moral standard or strategy. For example, throughout this
undertaking, moral standards were kept, no copyright infringement and misrepresentation
affectation were clung to and maintained.

3.6. Requirements Analysis

The initial step in the requirement analysis level was to do the preparatory investigation. During
the preparatory investigation, collecting data is essential. And so that’s the author decided to
use the fact-finding methods. The following techniques were used:

13
• Questionnaires – A questionnaire is a set of questions for gathering information from
individuals. The author intends to distribute questionnaires as a method used to adopt
the survey in the research. It’s used for obtaining primary data. The questions are
designed in such a way to gather information based on the Software Interface
(Website)that acts as a medium between the user and the device. The questions were
answered by family and friends from different rural and urban areas in the country.
Questions asked were based on closed questionnaires that is a set of prescribed answers
are used, and specific responses have to be selected and also, open-ended questionnaires
will be used. Also, these questions were used to learn feelings, opinions and general
experiences on process details or problems. Its main advantage is that it is economical,
saves time, money, and also there is no training required for questionnaires to be given
out or been respondent to.
– Research is a useful fact-finding technique that basically involves a process of
examining the application in detail by taking notes and identifying the risk/problems of
the application that might come up in creating your chosen product/project while you
are dealing with variables and determinants you want to put within a database.
Computer trade journals, reference books and the internet are sources for findings and
materials that were used in the discovery of this project and played a significant role in
the project success rate.

3.7 Requirements Specifications

This section contains a list of requirements, both functional and non-functional and with their
descriptions of the services this application would provide along with their constraints.

14
3.7.1 Functional Requirements Specifications
Table 3 Functional Requirements Specifications

REQ.ID REQUIREMENT DESCRIPTION REQUIREMENT


TYPE

FR-001 The user should be able to Sign-in into the system FUNCTIONAL
REQUIREMENT

FR-002 A new user should be able to register their FUNCTIONAL


credentials/personal information REQUIREMENT

FR-003 User should be able to regulate their temperature limit FUNCTIONAL


REQUIREMENT

FR-004 The User should be able to interact with the website using FUNCTIONAL
his system input devices e.g. keyboard, mouse. REQUIREMENT

FR-005 The user should be able to edit his profile FUNCTIONAL


REQUIREMENT

FR-006 The user should be to create a new password from the FUNCTIONAL
Website REQUIREMENT

FR-007 The website shall have a User-Interface Functional


Requirement

FR-008 The User will be able to connect to the Raspberry pi via Functional
WI-FI Requirement

15
FR-009 The application will run in the Web environment Functional
Requirement

FR-010 The user should be able to interact with the website Functional
Requirement

3.7.2 Non-Functional Requirements Specifications

The table below contains a list of the non-functional requirements and the system’s constraints
coupled together with brief descriptions of these non-functional requirements and their various
types.

Table 4 Non-functional requirements specifications

REQ.ID REQUIREMENT DESCRIPTION REQUIREMENT


TYPE

NFR- The application should be available to Users 100% of the Non-Functional


001 time REQUIREMENT

NFR- The application should be user friendly Non-Functional


002 REQUIREMENT

NFR- The application shall not cause any form of physical Non-Functional
003 damage to the user REQUIREMENT

16
NFR- The response time of the system should not be more than Non-Functional
004 60 seconds REQUIREMENT

NFR- The application shall offer password encryption to its user Non-Functional
005 to provide privacy. REQUIREMENT

NFR- Any three unsuccessful attempts by a user to access the Non-Functional


006 software shall lead to a warning. REQUIREMENT

3.8. System design

This section contains a comprehensive and detailed description of the system and the major
components to be developed. It shows the application architecture, which portrays a view of
what the system should look like and several UML diagrams were adopted, e.g., use case
diagrams and activity diagrams. Firstly, the design below depicts the communication pattern
between the various devices and the website. The blue lines signify the communication
between the raspberry pi devices. The red lines signify the communication between the website
and the temperature reading. The black lines carry the commands the user has requested from
the website.

17
Figure 3.5 Communication Design Pattern
From the below figure, it’s evident that the system remains at state 0 until an input that matches
the condition is provided, which causes the system’s state to change. In the case of this project,
the state represents whether data has been sent to the secondary device. While the temperature
remains within the desired range, the state remains at 0. Once the temperature falls outside of
the desired range, the system’s state is changed to “reported”. This state transition is caused by
a specific event and is thence referred to as an event-driven process.

Figure 3.6 State change process.

18
3.8.1. Use-case Diagram

Figure 3.7 Use-case diagram for this project

19
3.8.4. Activity diagrams

Figure 3.8 Activity diagram for this project, showing the interaction between the raspberry pi
and the temperature sensors, as well as the interaction between the user and the website.

Summary

This chapter highlighted the various requirements and design considerations for this project.
Both client and developer requirements were clearly defined. An activity diagram alongside
other descriptive diagrams was included to clearly define the roles and operational activities of
both the developer and the client. In the next chapter, more emphasis will be made on the
implementation of the design presented here.

20
CHAPTER 4: IMPLEMENTATION
4.1. Overview

This chapter covers the implementation of the design from the previous chapter. The
implementation of the design is explored in-depth here alongside a description of the
development environment. All implementation problems are discussed later in this chapter.
Figure 4.1 shows the two raspberry pi used in this project, fully setup and functional.

Figure 4.1 Two Raspberry pi connected to temperature sensors and power cables.

4.2.Main Features

The main features of this project are as follows:

1. A cost-effective temperature sensing device.


2. A user-friendly website to view the temperature reading data.

21
3. An event-driven application using python triggers a secondary device to implement an
action when the temperature readings fall between a particular range.

This project has two both a front-end and a back-end. So, to provide a far more comprehensible
understanding of this project’s implementation phase, this chapter is divided into both front-
end and back-end.

4.2.1. Back-end

The back-end for this project includes both hardware and software. The hardware includes
raspberry pi’s and the temperature sensor, while the software includes the code written in
Python programming language to run the temperature sensor.

The communication between the two raspberry pi is achieved using the MQTT protocol. The
MQTT protocol is used in the python file by importing paho.mqtt.publish. The format for the
message sent between raspberry pis on this protocol is in figure 4.2 where the temperature is
the sensed temperature that has exceeded the limit identified by the user.

Figure 4.2 MQTT protocol message format for sending temperature readings.

4.2.2. Front-end

The front-end for this project includes the website’s UI design and the code written to build the
website. The user-facing element of this project is a website.

4.2.2.1.Website

The website is designed to be the only user-facing interface a user would require to obtain the
sensor readings from the raspberry pi and interact with the temperature sensor. The website is
hosted on the raspberry pi for convenience and reduces the delay between the raspberry pi and
the website. The website is designed to have 5 pages. These pages are described in the pages
section.

22
4.2.2.1.1. Python Flask

Flask is an integral part of this project’s implementation phase. The website pages are built
using Flask, which is written in the Python programming language. flask_SQLAlchemy is used
to introduce SQL functionality into the project. Other flask modules were used in this project.
For example, flask_login was used to introduce checks that indicate to other parts of this project
if the current user is currently logged in or out.

4.2.2.1.2. Pages

The website designed for this project requires a minimum of 5 pages. These pages are:

1. Home page
2. Register page
3. Login page
4. Profile page
5. My Device page

Page Description

The “Home” page is the first page on the website, and in the URL bar, this page is identified
as “/” or “/home” after the IP address. This page provides a short description of the services
provided by the website and a graph showing a random reading. The data presented by the
graph are for demonstration purposes. This page shows three links, which are “Home”,
“Register”, and “Login”. The register page provides a potential user with a form through which
the user can register him/herself to the platform and create an account. This form, as shown in
figure 4.8, has four fields, which are “username”, “email”, “password”, “confirm password”,
and a submit button. Beneath the submit button is a link to the “login” page, in case the user
already has an account. This page also shows three links, which are “Home”, “Register”, and
“Login”.

The login page provides registered users with a form through which they can gain access to
their account, edit their profile or monitor the temperature of their select environment via the
readings from the sensor available on the user’s “my device” page. The “Login” page allows a
user to log in to the system using an “email address” and “password”. A checkbox is available

23
for the user to indicate to the system that it would like to be remembered against the next login
attempt. This page also shows three links, which are “Home”, “Register”, and “Login”. In
addition to these three links, there is a “forgot password” link. This link is made available for
users to create a new password to their account, identified by a registered email address. Upon
successful authentication, the user is redirected to the “Profile” page.

The “Profile” page displays all the user’s details, such as username, email address, profile
picture. The “My Device” page shows the sensing devices. Since only one sensing device is
used (temperature sensor), the page only displays one device. The page shows the user the
readings from the device and any alterations made to the temperature limit by other users. This
page also shows the temperature of the CPU running the sensor, which would be the raspberry
pi CPU. Other features of the “My Device” page include:

1. Setting the temperature limit.


2. View of previous temperature limit changes.

CSS

This project uses the Bootstrap framework to present a stylistic front-end for the website. The
features of the webpages, e.g. buttons, forms, checkboxes, etc., have CSS styles on them,
implemented using Bootstrap.

4.2.2.1.3. SQL

A database is required to maintain the data supplied to the website, and SQL is used for the
database. A database is essential for various reasons:

1. To maintain a record of the details of all user.


2. To maintain a record of temperature limit changes and who submitted the changes.
3. To have a record of the temperature readings that can be analyzed at a later date.
Three tables are used in the database, and each table corresponds to the above reasons. These
tables are identified as:

1. User

24
2. Temperature Changed
3. Temperature Readings

The User table has 5 columns and 1 relationship field. These five columns are:

1. ID: This column stores an integer count of the number of users in the database and is a
primary key.
2. Username: This column stores the unique username of the user. The term unique
implies that only one user can be referred to by the contents of the column.
3. Email: This column stores the unique email address of the user. This project supports
only one email address per user.
4. Password: This column stores a hashed version of the user’s password. The python
module “bcrypt” was used to hash the password and check the password during a login
attempt.
5. Img_file: This column stores the path to the profile picture of the user. The python
module “secrets” was used to rename the image file with a random hexadecimal value.
Image files need to be renamed to ensure that they are not replaced due to multiple files
having the same name.
6. Changes: This is identified as a relationship in SQL, and it denotes the relationship
between a user and the temperature limit changes the user makes. This relationship
allows the user to identify all of the temperature changes they have implemented.

The Temperature Changed table has 5 columns. These are:

1. ID: This column stores an integer count of the number of temperature changes in the
database and is referred to as a primary key.
2. Low Temp: This column stores, in string format, the lower limit of the temperature
range.
3. High Temp: This column stores, in string format, the higher limit of the temperature
range.
4. Date changed: This column stores, in python DateTime format, the date and the time a
change occurred.
5. User_id: This column stores the user id of the user that requested the change.

The TemperatureReadings table has 5 columns. These are:

1. ID: This column stores an integer count of the number of database entries and is referred
to as a primary key.

25
2. LowTemp: This column stores, in string format, the lower limit of the temperature
range.
3. HighTemp: This column stores, in string format, the higher limit of the temperature
range.
4. Date: This column stores the date the temperature reading was recorded.
5. Time: This column stores the time the temperature reading was recorded.

Each SQL table has five columns. SQL is also used in the project to speed up searches. The
motivation for this was to create the means for a user to search temperature limit changes by
date but now it is done using Username. For example, to identify what the temperature limit
was on a specific date

26
Figure 4.3 Tree diagram of how the files are organized for the project.
Development Environment
IDE

Visual studio code (VSCode) was used to write the code used for this project. This IDE was
found useful to write the code necessary in all the languages used.

27
DHT22 Temperature Sensor

Temperature readings can decide if a system is operating at optimal conditions or aid in


identifying a fault or a potential cause for concern. Hence, an accurate temperature sensor is
desired. One of the aims of the project is to build a cost-effective temperature reading system;
therefore, the cost of the temperature sensor must not be outrageous. Based on these
requirements, the DHT22 temperature sensor was found best amidst the various temperature
sensors, such as the DS18B20 temperature sensor. As can be seen from the figure 3.4, this
temperature sensor has three pins. These pins are used to connect the temperature sensor to a
device capable of performing computing operations and providing the necessary power the
temperature sensor requires. These pins are connected to the computing device using jumper
cables, also in the figure below. The relationship between the colours of the cables and the pins
on the temperature sensor are discussed in the coming sections.

Figure 4.4 Two Raspberry pi connected to temperature sensors and power cables.

28
Raspberry PI

Like all sensors, the temperature sensor used in this work must be connected to a device capable
of interpreting the data it reads and translating that data to a human-readable format. The
raspberry pi is a powerful computer capable of extensions using the GPIO pins in the figure
below. These GPIO pins can be used to send power or receive power, depending on the
requirements of the attached device. Hence, the correct placement of the temperature sensor to
the raspberry pi is crucial. Three pins are used to connect the temperature sensor to the
raspberry pi and provide power to the temperature sensor.

Website and Python Flask

A website built and tailored for this project provides this user-friendly view of the temperature
readings. The website shows graphs of the temperature reading over time and the humidity
readings of the environment. A timeline of the temperature reading provides us with more than
the current temperature reading. It also provides us with a history of the temperature of the
sensed environment. This information is helpful for auditing and troubleshooting. All web
functionality and front-facing attributes interact with the python flask framework at their core.
Python flask was used to host the website.

4.3. Implementation Problem

A few problems were encountered in an attempt to implement the design in Chapter 3. These
problems are:

1. Temperature readings hardly fluctuate drastically in an open environment. There is


some difficulty testing the implemented design without having an environment where
the temperature can change drastically, on-demand. This problem slowed down testing.
2. Feeding a continuous stream of data from the result of a standalone python code to the
webpage presented some difficulty.
3. The forgot password functionality should send instructions to the user’s email upon
request. Implementing this functionality presented some issue, mainly because of
firewalls.

29
4.4. Overcoming Implementation problems

While the problems described in the previous section presented some difficulty, they were
eventually resolved by applying various means. Some of which are detailed below:

1. While it may appear as a crude method, a lighter was used to solve the first problem.
Placing a lighter beside the temperature sensor for some time would result in an increase
in temperature and aid in the testing of the sensor. However, this solution only works
for testing temperature increases and not reductions.
2. The second problem was overcome by diligent research. There was no straightforward
answer to this problem. Its solution came about by combining a number of solutions
and adapting them to this project.
3. After extensive research, it was abundantly clear that the problem was caused by the
firewall, and so the firewall was turned off temporarily.

4.5.Testing

At this point, we monitor both the raspberry pi with the temperature sensor attached to it and
the second raspberry pi to see if the event-driven process is triggered. We can tell from the
graphical reading on the website that the website is functional. Python-Flask is used to host the
website on the IP address of the raspberry pi.

Three types of tests are described in this section: Unit testing, Integration testing and System
testing. These tests are done to validate the performance of individual components, grouped or
related components, and system-wide performance, respectively. For example, under unit
testing, components such as buttons, forms, profile picture upload, and obtaining temperature
readings are tested. Following this, under integration testing, the successful entry of submitted
form data, graphical representation of the temperature data, and the successful fetching of data
from the database are tested. Finally, under system testing, the entire system is tested from the
perspective of a new user. Holistically, these tests are carried out to test the functional
requirements of the project given in section 3.7.1.

4.5.1. Tests Plans (for Unit Testing, Integration Testing, and System Testing)

The table below describes the functionality tested, providing a description of the functionality,
the status of the test and the outcome that yielded the status.

30
Table 5 Test plan table

Number Functionality Description Status Outcome

1. • Profile page
Pages Passed No 404-error code.
• My devices page
• Home page
• Login page
• Register page

2. • Able to edit user


Submitting Passed A green notification bar
profile
forms • Submit registration and at the top of the page to
login credentials
confirm success.

3. • Rollover effect • Colour change


Submit Passed
• Save submitted data to when the mouse
buttons database is over the
button.
• Green
notification at the
top of the page

4.
Upload Photo Upload new profile picture Passed Updated profile picture
is seen immediately on-
submission on the
profile page.

5.
Reject wrong What happens when a wrong Passed Credentials are
Login username/password is rejected, and the user is
credentials entered. notified with a red
notification bar at the
top of the page

31
6.
Incomplete Ensuring the user does not Passed A notification beneath
fields on the leave fields blank on the the incomplete field
form form draws the user’s
attention to the field.

7.
Incompatible What happens when the Passed Reject the image and
image file wrong image file type is notify the user of the
extension submitted. accepted image file
extensions.

8.
Up to date Testing that the graph shows Passed The graph shows the
temperature the most recent temperature sensed temperature and
readings readings from the sensor the time of sensing.

9.
Event trigger Testing if the secondary Passed The secondary pi
raspberry pi is reachable indicated on the console
that it was triggered.

10.
Temperature Testing if the user can Passed A green notification at
Limit change change the temperature the top of the page
trigger points of the sensor. indicating the changes
have been accepted.

4.5.2. Test Suite (for Unit Testing, Integration Testing, and System Testing)
Table 6 Test Suite Table

Req. Description Type


No.

32
R-101 When launched, the system shall stay running unless Performance
there is an intentional shutdown of the system.

R-102 While on the “My devices” page, the graph shall Performance
continue moving along the x-axis unless the user
navigates to a different page.

4.5.3. Test Traceability Matrix (for Unit Testing, Integration Testing, and System Testing)
Table 7 Test Traceability Matrix Table

Number Description Priority Test Test Date Test Result


Case

1 8
The web 1 21st May 2021 Successful
application
should
allow users
to register

2 7
The web 1 8th May 2021 Successful
application
should
allow users
to login

4.5.4. Test Report Summary (for Unit Testing, Integration Testing, and System Testing)

Conclusively, the results of all the tests are given below:

33
Number of tests performed: 10

Number of tests passed: 10

Number of tests failed: 0

Percentage of tests failed: 0%

Percentage of tests passed: 100%

4.5.5. Error Reports and Corrections


Table 8 Error Reports Table

Report Number Error Report Correction

Report 401 Uploaded profile picture with Advice client to use preexisting
phone camera rotated 90o image and not take a new image.
clockwise.

4.6. Use Guide

This section has three main divisions: Initial view, Authentication, Sensor interaction.

4.6.1. Initial view

When a user visits the website, the user is presented with the “Home page”. This page provides
a description of the website, the activities allowed on the website but, more generally, a
beautiful first look at the website. There is limited interaction expected between the user and

34
the home page. Hence, the user is expected to progress to the next division, i.e. the
Authentication phase.

Figure 4.5 Home page of the Temperature Sensing Website

4.6.2. Authentication

Figure 4.6 Navigation Drop-down Menu of the Temperature Sensing Website


At the top of the home page, there is a link in the navigation bar. If the user is new to the
website, the user can proceed to the registration page by clicking on the register link in the
navigation bar. The register page has a registration form with fields for “username”, “email
address”, “password”, and “confirm password”. There is a “Sign up” button beneath the form.
If the user has already registered, there is a link, “Log in”, beneath the button through which
the user can access the login page.

35
Figure 4.7 Register page of the Temperature Sensing Website

The “Log in” page has a form requesting the “username” and “password” of the user. Upon
successful authentication, a green notification bar pops up at the top of the page with the words
“Successful Login”. And the user is redirected to the profile page. In the event that the
authentication attempt is unsuccessful, a red notification bar pops up at the top of the page with
the words “Unsuccessful login for {{email address of the user}}”. There are two links beneath
the Login button. The first is a “Forgot password” link redirecting the user to the “Request
Password Reset” page while the second is a “Register” link, directing the user back to the
Register page.

Figure 4.8 Log in page of the Temperature Sensing Website

36
There is a “Logout” link in the navigation bar through which the user can Log out from his/her
account.

4.6.3. Sensor interaction

After successfully logging in, the user is automatically redirected to his/her profile page. On
the profile page, the user can view the profile picture, username, email address and update any
of these items via an “Update” button.

Figure 4.9 Profile page of the Temperature Sensing Website

can navigate to the “My Devices” page. This page shows the data gathered from the sensor, a
form through which the user can submit requests to change the temperature limit and another
form through which the user can search for temperature changes on a supplied specific date.

37
Figure 4.10 Secondary raspberry pi connected to the LED light. When the LED light turns
on, it signals that the cooling system has been activated.

4.7. Summary

This chapter was designed to clearly show and buttress three things. Firstly, that an accurate
temperature sensor can be built using cheap commodity hardware and programmed to read the
temperature of the room using python. Secondly, that the read temperature of the sensed area
can be displayed not simply on the terminal in text and numbers only but also on a graph via a
dedicated website hosted on the raspberry pi itself. Thirdly, that an engineer is not required to
read the data and act in the event of a critical temperature reading, the event-driven application
will send a message to the second device using the MQTT protocol to implement the necessary
action that the engineer might have to do. These actions range from turning off a specific
machine to turning off or on the available cooling system. In the next section, results obtained
from tests are made available and clear.

Ten tests were carried out to test various aspects of the system, and fortunately, all tests passed
successfully.

38
CHAPTER 5: DISCUSSION, CONCLUSION AND FUTURE WORK
5.1. Overview

The previous chapters have intricately detailed the design considerations for this project, the
objectives, aims, implementation scope and limitations. The aim of this chapter is to discuss
the project with respect to objective assessment, challenges encountered, lessons learned, and
how those lessons shape the direction of future work.

5.2. Objective assessment

With respect to the objectives clearly outlined in section 1.4, all the objectives set out for this
project were met successfully. Chapter four, which detailed the implementation and testing
phase, proved the successful attainment of the objectives. Some of which are:

• Successfully program the raspberry pi to read temperature data from the temperature
sensor, using a combination of Linux commands and python programming language,
• Develop a website where we can view the temperature readings and the activities of the
Raspberry Pi.
• Test the smart thermostat system.

Beyond the scope of the objectives given in section 1.4, the website developed now has a
function password recovery mechanism.

5.3. Limitations and challenges

During the course of this project, numerous challenges and limitations were encountered. Most
of these challenges were due to a lack of experience with using specific tools and frameworks.
This increased research time significantly but also significantly increased learning. Other
challenges, apart from the implementation challenges in section 4.3, centred around time
management.

5.4. Future Enhancements

While an extensive analysis of the project has been provided, some areas have been identified
for future work. Development in these areas could make the application more user-friendly and
more adept for other use-cases. These areas include:

39
• External access.
While the system built is effective, as demonstrated in the above chapters, it has a
viewing limitation. The website is hosted locally on the raspberry pi, and only devices
within the local network can view the website. A possible expansion for future work
will be to configure the system such that the website can be accessed via the public IP
address of the raspberry pi to enable global viewership.

• Inclusion of externally hosted sensors.


Giving users the option to connect their sensors to the website, probably through an
API, and be able to monitor the readings from the sensor.

• Monetize the platform


Charging users an hourly rate for obtaining the temperature readings of a server room,
for example, could be a way of generating revenue. The current infrastructure already
allows for users to have secure credentials. The next step might be to include secure
payment channels and a business model.

• App conversion
A mobile application version of the website that provides users with a concise rendering
of the information present on the website might be helpful to provide data at a glance
and increase the usability of the platform.

5.5. Recommendations

Upon successful implementation and testing, this project should be implemented in a house-
hold environment. The application will require the use of a raspberry pi and temperature
sensors (devices) to enable the app get the raw data. With further enhancement and Steady
electricity, the system can be turned to a “House-Temperature assistant” that provides
information of parallel devices exceeding their temperature limit in-house and state of the
house.

40
5.6. Summary

This project started out with a straightforward goal in mind – build a temperature sensing
system that triggers an instruction to be sent out when very specific conditions are met. And as
shown in chapter 4, this was done successfully. However, as the project progressed, certain
things became beneficial to the project, such as a visual representation of the temperature
readings, a register and login system for users, and a database. Fortunately, all were
accomplished within the available time regardless of the limitations and implementation
challenges. From watching online tutorials to learning new programming languages, concepts
and frameworks, this project has presented quite the challenge as well as a great learning
opportunity.

41
REFERENCES

Davideen, O. and Ndubuaku, M. (2015) ‘State of Internet of things deployment in Africa and
its future: The Nigerian scenario’, South African Journal of Information and
Communication, (15), p. 0. doi: 10.23962/10539/20335.

Information Nigeria (no date) Only 25% Nigerians Have Access To Regular Power Supply -
NAEE - Information Nigeria. Available at:
https://www.informationng.com/2015/11/only-25-nigerians-have-access-to-regular-
power-supply.html (Accessed: 3 April 2021).

Kaukalias, T. and Chatzimisios, P. (2014) ‘Internet of Things (IoT)’, Encyclopedia of


Information Science and Technology, Third Edition, pp. 7623–7632. doi: 10.4018/978-
1-4666-5888-2.ch751.

Kunle, O. J., Olubunmi, O. A. and Sani, S. (2018) ‘Internet of things prospect in Nigeria:
Challenges and solutions’, 2017 IEEE 3rd International Conference on Electro-
Technology for National Development, NIGERCON 2017, 2018-Janua, pp. 736–745.
doi: 10.1109/NIGERCON.2017.8281942.

Oracle (no date) IoT Intelligent Applications | Oracle Nigeria. Available at:
https://www.oracle.com/ng/internet-of-things/ (Accessed: 3 April 2021).

Sami, M. (2012) Software Development Life Cycle Models and Methodologies - Mohamed
Sami, Melsatar.blog. Available at: https://melsatar.blog/2012/03/15/software-
development-life-cycle-models-and-methodologies/ (Accessed: 7 May 2021).

Sweeney, M. (2020) Agile vs Waterfall: Which Method is More Successful? - Clearcode Blog,
Clearcode.cc. Available at: https://clearcode.cc/blog/agile-vs-waterfall-method/
(Accessed: 7 May 2021).

42
APPENDICES

43
44

You might also like