SlideShare a Scribd company logo
Instant mail notification via Connected Mailbox
Vigneshwar Somasundaram
Weisberg Division of Computer Science
Marshall University
Huntington, WV, USA
somasundaram@marshall.edu
Abstract—Connected mailbox is a prototype which is going to
transform the entire mailing system at Marshall University. The
connected mailbox functions through a set of sensors connected
to the internet through an interface. Data from the sensors is
stored and processed in the cloud. Notification to the recipients
are sent through email and text message once the mail hits the
mailbox by analyzing the sensor data in the cloud. The greatest
drawback of the traditional mailing system is that there is no
reliability about the delivery of mail. It is also slow and there are
chances that mailbox will be extinct in the future. This proposed
prototype of connected mailbox overcomes all the difficulties of
the traditional mailing system and make the system thrive for
generations. This connected mailbox will be more efficient and
effective like the email system in the near future.
Keywords—Internet of Things, connected mai-box, smart
campus, cloud,Node-RED, PIR sensor,Raspberry Pi.
I. INTRODUCTION
Internet of things (IoT) has started changing the prospective
of the world [4]. All the things that we look around are gaining
life by just being connected to the internet. This is in turn will
eventually lead to the communication between these devices
and it will further trigger certain actions to perform based upon
the flow of data.
The number of connected devices keeps on increasing
tremendously every year. It is estimated that 30 million devices
will be connected to the internet by 2020 [1]. On understanding
this scenario lots of academic institutions, business
organization and government bodies started to invest huge
sums on IoT projects.
Smart cities, smarter gadgets, smarter environment, smarter
production has started booming because of IoT. Already a
number of connected devices such as connected watches,
health monitoring devices, connected thermostat, connected
cars started toppling the market. The connected mailbox as
similar to those devices. This paper will focus on connected
mailbox, which will be a part of making the campus smarter as
well as connected one.
II. EXPERIMENTAL SETUP – HARDWARE
A. Passive Infrared sensor
Passive Infrared (PIR) otherwise known as motion
detection are mostly used to detect the motions of humans,
animals or any other objects. The PIR sensor works by
detecting the IR signals that are invisible to the human eyes.
The PIR sensor is split into two halves, where each half detects
the levels of IR, so if both detects equal radiation then it
cancels each other. On the other hand, if one detects more
radiation and the other half detects less then it outputs high.
PIR sensor detects through a range of 20feet (6 meters) 110
degrees × 70 degrees’ detection range. It requires a power
supply of 3.3V-5V for its operation [5]. The PIR is provided
with two knobs one for adjusting the distance and another knob
is for adjusting the time delay.
Figure 1 PIR sensor [5]
B. Raspberry Pi
Raspberry Pi is a small pocket size computer developed for
educational and research purpose [2]. For this project, we use
Raspberry Pi 3rd generation model B+. The Pi comes with
four USB hubs, built in Wifi Bluetooth and comes with 40
General Purpose input-output (GPIO) connectors. These GPIO
pins are used to connect to the external circuit. Raspberry Pi3
has a 1.2 GHZ 64 bit quad core processor and 1 GB of RAM.
It runs on Raspbian operating system, which is derived from
the Linux os. The Raspbian os provides better flexibility and
control over the device [3].
Figure 2 Raspberry Pi3
C. Connection Setup
The PIR sensor has three pins Vcc, Gnd and OUT. The
Vcc pin of the sensor is connected to GPIO pin 2 of the Pi,
which sends a 5v power. The Gnd pin in the sensor is
connected to GPIO pin 6 of the Pi which is grounded. The
OUT pin in the sensor sends two types of signal that is, it
sends high when it detects the motion and low when it detects
no motion. This OUT pin is connected to either GPIO pin
26,24 ,21 or 23. The circuit diagram can be clearly understood
through the Figure 3 Connecting PIR sensor with RPi[6]where
the OUT pin is connected to GPIO pin 26.
Figure 3 Connecting PIR sensor with RPi[6]
III. CLOUD
A. MQTT Protocol
MQTT is a publish/subscribe protocol specially designed for
remote locations where a small code footprint is required or the
bandwidth is limited. It is extremely lightweight protocol used
mostly in instant messengers and Internet of Things. For this
project, we use paho MQTT, which is an open source client
implementation of MQTT [7].
In our case, paho MQTT act as a broker by subscribing data
from the RPi and publishing it to the cloud. As RPi supports
only python we use paho Python Cllient which supports both
on python 2.7 stable version as well as 3.x. The data collected
from the sensors are stored in json format and the json object is
published to the cloud.
B. Bluemix
Bluemix is platform as service provided by IBM, which offers
a wide variety of third party applications and open
technologies [9]. Bluemix offers Devops in the cloud – open
and integrated experience, which allows the developers and
firms to easily build and scale up in a short span. It supports a
wide variety of programming languages such as java, pyrhon,
Node.js, PHP, Ruby Sinatra, Ruby on rails and so on [8]. IBM
has recently introduced containers through which we can
deploy our program in real time. In our project, we use
applications such as IBM IoT, Node-RED and cloudant
database.
C. IBM Internet of Things Platform
IBM internet of things is a service that allows connected
devices, sensors and gateways to communicate with apps and
consume data collected from them [10]. The working of IoT
platform is clearly depicted in Figure 4 IBM IoT Platform.
Initially we created the type of device and we define the
required details such as serial number, hardware version,
location, hardware version, class and model. Once we create
the device type, we add our Raspberry Pi’s to the console. We
get a set of configuration files such as organization id, device
id, and token-method and token as soon as we add our device.
This configuration file provides means of authentication
between the device and the cloud.
Figure 4 IBM IoT Platform
Figure 5
Node-RED
Node red is a web-based application built over node.js. It
provides a browser based web flow in which the flows can be
defined using nodes. The flows can be deployed and tested in
real time. Node-RED is extremely lightweight, so it runs on
cloud as well as on small hardware’s such as raspberry pi and
aurdino. Json format is used between the flow, as it is easy to
import and carry across.
The Node-RED provided by IBM comes up with lots of extra
nodes that supports and favors IoT development. The IBM
Node-RED provides special databases and analysis tools
which gives a better instinct about the data. In addition to
these, it provides a wide variety of third party apps and
applications that can be bound within the Node-RED
container.
In this project we used IoT node that is based on mqtt
subscribe to receive data from the user. We define the API key
generated from the IoT service in which we added the device.
The IoT node outputs a message payload that contains the data
sent from the Pi in Json format. Then each sensor data is sent
to separate switch node based on the sensor number. Each
switch works like an if/else statement so if the sensor detects o
then the data is passed through one function and else if it
detects its passed through another function 1 as shown in
Figure 5.
The flow from node 1 is transferred to the mail function node.
As the message payload cannot be sent as a notification
through the Twilio message notification node, the payload is
stored in an object variable and sent. A trigger named delay is
placed between the mail node and notification node in order to
avoid multiple detections. Email notification are send through
email node, which uses SMTP protocol for sending
notification.
D. Twilio
Twilio is an application protocol interface (API) that can be
integrated into to our application and user can send and
receive text message as well as calls. Many leading
organizations such as UBER, Coca-Cola, Sprint, box have
integrated there applications using Twilio API.
In this project, we use Twilio API to send message notification
to the user when a mail is received. In order to use the API
initially we have to create a Twilio account that provides as
with a phone number from where the text will be sent. It also
provides as an account id as well as an API key that enables us
to integrate the service into our application.
Twilio node in Node-RED is configured with same API key
and authorization id. The phone number generated by Twilio
is used as from number.
E. Cloudatnt Database
Cloudant database is an open source, non-relational and
distributed database system [11]. It is a cloud application
provided by IBM, in which the core system is based on
Apache’s Couch DB, an open source Json document. Cloudant
database provides integrated analysis, search for web
applicatons [11]. It also provides special tools for data
warehousing and provides tools to replicate into relational
database.
We stored the data from all the sensors in the cloudant
database in Json format. Time and geolocation of each sensor
is also stored in the database. The geolocation will be very
useful when the number of sensor are increased and are
located in various places.
IV. OVERALL ARCHITECTURE AND RESULTS
The hardware setup and cloud gave an idea about how each
components are used in this project. The overall architecture is
shown clearly in Figure 6 Architectural diagram.
Figure 6 Architectural diagram
Two Raspberry Pi and nine PIR sensors were used to develop
this prototype. Five PIR sensors were connected to one
raspberry pi and four sensors were connected to the second Pi.
Python script was used to collect the data from the sensors by
reading the GPIO pins of the Raspberry Pi.
The data collected from the GPIO pins is stored in variables
named msensor1, msensor2 up to msensor8. Also the current
time and latitude and longitudinal position of each sensor is
collected. These collected data are transferred to Json objects,
so it is easier for the MQTT protocol to subscribe to the data
and publish it to the cloud.
The MQTT protocol publish the data by verifying the
configuration file. Once the data is published, the flow is built
as shown in Fig.5
A model connected postal box which replicates the mailbox at
CITE is built using cardboard and the sensors are fit in such a
way that the face inward. This inward facing method avoids
the detection of unwanted things moving around. The sensor
are focused at an angle of top corner in order to cover the
entire region of the mailbox as shown in Figure 7 Prototype
Mailbox
Figure 7 Prototype Mailbox
Once the mail hits the mailbox notification are sent as text as
well as email to the recipients as shown in the Figure 8
Notification Email and Message.
Figure 8 Notification Email and Message
V. FUTURE ENHANCEMENT
 Mailbox will become smarter like the e-mail system
and can notify the state of the mail whether read or
unread.
 Recipients will be sent with the image of the mail,
this can be achieved by connecting a camera to the
raspberry pi.
 Apart from campus this connected mailbox prototype
can be applied to any postal service. Which in turn
will make even the pickoff boxes connected.
 We can show the data in Google Maps by showing a
red pointer for the mailboxes where there is no mail
and green to show the presence of mail.
 Drones will be able to deliver the mails instantly to
the recipient’s office desk.
VI. CONCLUSION
Internet of things has become an integral part of our life; all
the things around us will be gaining life by getting connected.
Therefore, this connected mailbox prototype will be a seed for
connected campus. This prototype in turn will pave the way
for connected trashcans, connected parking lots and so on. The
entire campus will become really smarter and connected.
VII. REFERENCE
[1] “Internet of Things,” Wikipedia. [Online]. Available at:
https://en.wikipedia.org/wiki/internet_of_things. [Accessed: 30-Mar-
2016].
[2] “Raspberry Pi,” Wikipedia. [Online]. Available at:
https://en.wikipedia.org/wiki/raspberry_pi.
[3] D. Palsharma, A. Baldeo, and C. Phillip, “Raspberry Pi based Smart
Home for Deployment in the Smart Grid,” International Journal of
Computer Applications IJCA, vol. 119, no. 4, pp. 6–10, 2015.
[4] J. Gubbi, R. Buyya, S. Marusic, and M. Palaniswami, “Internet of
Things (IoT): A vision, architectural elements, and future directions,”
Future Generation Computer Systems, vol. 29, no. 7, pp. 1645–1660,
2013.
[5] “PIR Motion Sensor Tutorial,” Instructables.com. [Online]. Available at:
http://www.instructables.com/id/pir-motion-sensor-tutorial/.
[6] “Interfacing PIR Motion Sensor HC-SR501 with Raspberry Pi,”
electroSome, Apr-2015. [Online]. Available at:
https://electrosome.com/pir-motion-sensor-hc-sr501-raspberry-pi/.
[7] “MQTT,” MQTT RSS. [Online]. Available at: http://mqtt.org/.
[8] “Bluemix,” Wikipedia. [Online]. Available at:
https://en.wikipedia.org/wiki/bluemix.
[9] “IBM Launches New PaaS Offering & New Cloud Services,” IBM
News room. [Online]. Available at: http://www-
03.ibm.com/press/us/en/pressrelease/43257.wss.
[10] “Internet of Things Platform - IBM Bluemix,” Internet of Things
Platform - IBM Bluemix. [Online]. Available at:
https://console.ng.bluemix.net/catalog/services/internet-of-things-
platform/.
[11] “Node-RED,” Wikipedia. [Online]. Available at:
https://en.wikipedia.org/wiki/node-red.

More Related Content

PDF
COMPARATIVE STUDY BETWEEN VARIOUS PROTOCOLS USED IN INTERNET OF THING
PDF
IoT Assisted Fingerprint Based Door Security System using Raspberry PI 4
PDF
A SURVEY ON IMAGE STEGANOGRAPHY TYPES AND HIDING TECHNIQUES
PDF
IRJET- Review on IoT based Dual ARM Tele-Robotic System
PDF
SURVEY ON CARD LESS TRANSACTION USING EMERGING TECHNOLOGIES
PDF
Integrative detection of Human, Object movement and Fire Sensing Using LoRaWA...
PDF
Smart Garage Implementation and Design Using Whatsapp Communication Media
PDF
IRJET - Cryptographic Communication between Two ESP32 Devices
COMPARATIVE STUDY BETWEEN VARIOUS PROTOCOLS USED IN INTERNET OF THING
IoT Assisted Fingerprint Based Door Security System using Raspberry PI 4
A SURVEY ON IMAGE STEGANOGRAPHY TYPES AND HIDING TECHNIQUES
IRJET- Review on IoT based Dual ARM Tele-Robotic System
SURVEY ON CARD LESS TRANSACTION USING EMERGING TECHNOLOGIES
Integrative detection of Human, Object movement and Fire Sensing Using LoRaWA...
Smart Garage Implementation and Design Using Whatsapp Communication Media
IRJET - Cryptographic Communication between Two ESP32 Devices

What's hot (20)

PDF
Study of Various Techniques to Filter Spam Emails
PDF
DASH7 Alliance Protocol 1.0: Low-Power, Mid-Range Sensor and Actuator Communi...
PDF
IRJET- IoT based Cost-Effective Digital Light Meter
DOCX
PDF
Secure Routing for MANET in Adversarial Environment
PDF
IRJET- Implementation of Cloud Robotics using Raspberry PI to Monitor Product...
PDF
Beyond GPS - Neogeograpy Data Collection
PDF
Environmental Monitoring using Wireless Sensor Networks (WSN) based on IOT.
PDF
Radio Frequency Identification (RFID) Based Employee Management System (EMS)
PDF
V2 i10 ijertv2is100048
PDF
SMART APP FOR PHYSICALLY CHALLENGED PEOPLE USING INTERNET OF THINGS
PDF
IRJET - Real Time Fuel Monitoring and Theft Detection System using IoT
PDF
Group 5 IoT Architecture Layer
PDF
FLOOD ALERTING SYSTEM USING RASPBERRY PI & THINGSPEAK
PDF
IRJET- Raspberry Pi and NodeMCU based Home Automation System
DOCX
Formatted Paper_References added
PPT
Ip addressing comp
PDF
ip versions.pdf
PDF
RSA Algorithm as a Data Security Control Mechanism in RFID
PDF
Computer network lab note 2
Study of Various Techniques to Filter Spam Emails
DASH7 Alliance Protocol 1.0: Low-Power, Mid-Range Sensor and Actuator Communi...
IRJET- IoT based Cost-Effective Digital Light Meter
Secure Routing for MANET in Adversarial Environment
IRJET- Implementation of Cloud Robotics using Raspberry PI to Monitor Product...
Beyond GPS - Neogeograpy Data Collection
Environmental Monitoring using Wireless Sensor Networks (WSN) based on IOT.
Radio Frequency Identification (RFID) Based Employee Management System (EMS)
V2 i10 ijertv2is100048
SMART APP FOR PHYSICALLY CHALLENGED PEOPLE USING INTERNET OF THINGS
IRJET - Real Time Fuel Monitoring and Theft Detection System using IoT
Group 5 IoT Architecture Layer
FLOOD ALERTING SYSTEM USING RASPBERRY PI & THINGSPEAK
IRJET- Raspberry Pi and NodeMCU based Home Automation System
Formatted Paper_References added
Ip addressing comp
ip versions.pdf
RSA Algorithm as a Data Security Control Mechanism in RFID
Computer network lab note 2
Ad

Viewers also liked (20)

PPT
學生學習歷程簡報
DOC
CV_SANJAY SOHIL
PDF
r3-4-2009f_xts5000_new
PPTX
Heap and Partners
PPT
Brain maturation
PPTX
오픈세미나 플러그인만들기(한번더)
PDF
Tutorial para crear cuenta en slideshare
PPT
Grouping objects
PPT
Tg discussion guide90
DOCX
Kpi publikovani 2
PDF
CV_Jeeshan CPE
PPT
Device driver
PDF
Isabelle: Not Only a Proof Assistant
PPTX
Rreflexion cuento
PDF
Geog 5 fa 2012 schmidt fri
PPT
Pi3 Ef 7 Pe Revision Class
PPTX
UDPSRC GStreamer Plugin Session VIII
PDF
2014 April 17- Fox Valley Program
PDF
Java Thread
PDF
Audio in linux embedded
學生學習歷程簡報
CV_SANJAY SOHIL
r3-4-2009f_xts5000_new
Heap and Partners
Brain maturation
오픈세미나 플러그인만들기(한번더)
Tutorial para crear cuenta en slideshare
Grouping objects
Tg discussion guide90
Kpi publikovani 2
CV_Jeeshan CPE
Device driver
Isabelle: Not Only a Proof Assistant
Rreflexion cuento
Geog 5 fa 2012 schmidt fri
Pi3 Ef 7 Pe Revision Class
UDPSRC GStreamer Plugin Session VIII
2014 April 17- Fox Valley Program
Java Thread
Audio in linux embedded
Ad

Similar to Project Document (20)

PPT
Connecting devices to the internet of things
PDF
IOT Based Smart City: Weather, Traffic and Pollution Monitoring System
PDF
Industrial Data Acquisition, Management and Controlling using IoT
PDF
IRJET- Wireless Sensor Network Based Internet of things for Environmental...
PDF
Fundamental components of the Internet of Things unit 1.pdf
PDF
Review paper on IoT based technology
PPTX
Smart home Environment using iot
PPTX
Home appliances’ control system.pptx
PPTX
Internet of Things (IoT)
PDF
2007.13714
PDF
IRJET- IoT based Garbage Management System for Smart City using Raspberry Pi
PPTX
Connecting Stuff to Azure (IoT)
PDF
Session 1908 connecting devices to the IBM IoT Cloud
PPTX
Internet of things - architectureand Design principles.pptx
PDF
Designing Internet of things
PDF
IRJET- Iot based Interactive Display Unit using Raspberry PI
PDF
IRJET- Environmental Analysis in IoT using Raspberry Pi
PDF
WIRELESS SENSORS INTEGRATION INTO INTERNET OF THINGS AND THE SECURITY PRIMITIVES
PDF
Green House Automation using IoT
PDF
Internet of Things building blocks
Connecting devices to the internet of things
IOT Based Smart City: Weather, Traffic and Pollution Monitoring System
Industrial Data Acquisition, Management and Controlling using IoT
IRJET- Wireless Sensor Network Based Internet of things for Environmental...
Fundamental components of the Internet of Things unit 1.pdf
Review paper on IoT based technology
Smart home Environment using iot
Home appliances’ control system.pptx
Internet of Things (IoT)
2007.13714
IRJET- IoT based Garbage Management System for Smart City using Raspberry Pi
Connecting Stuff to Azure (IoT)
Session 1908 connecting devices to the IBM IoT Cloud
Internet of things - architectureand Design principles.pptx
Designing Internet of things
IRJET- Iot based Interactive Display Unit using Raspberry PI
IRJET- Environmental Analysis in IoT using Raspberry Pi
WIRELESS SENSORS INTEGRATION INTO INTERNET OF THINGS AND THE SECURITY PRIMITIVES
Green House Automation using IoT
Internet of Things building blocks

Project Document

  • 1. Instant mail notification via Connected Mailbox Vigneshwar Somasundaram Weisberg Division of Computer Science Marshall University Huntington, WV, USA somasundaram@marshall.edu Abstract—Connected mailbox is a prototype which is going to transform the entire mailing system at Marshall University. The connected mailbox functions through a set of sensors connected to the internet through an interface. Data from the sensors is stored and processed in the cloud. Notification to the recipients are sent through email and text message once the mail hits the mailbox by analyzing the sensor data in the cloud. The greatest drawback of the traditional mailing system is that there is no reliability about the delivery of mail. It is also slow and there are chances that mailbox will be extinct in the future. This proposed prototype of connected mailbox overcomes all the difficulties of the traditional mailing system and make the system thrive for generations. This connected mailbox will be more efficient and effective like the email system in the near future. Keywords—Internet of Things, connected mai-box, smart campus, cloud,Node-RED, PIR sensor,Raspberry Pi. I. INTRODUCTION Internet of things (IoT) has started changing the prospective of the world [4]. All the things that we look around are gaining life by just being connected to the internet. This is in turn will eventually lead to the communication between these devices and it will further trigger certain actions to perform based upon the flow of data. The number of connected devices keeps on increasing tremendously every year. It is estimated that 30 million devices will be connected to the internet by 2020 [1]. On understanding this scenario lots of academic institutions, business organization and government bodies started to invest huge sums on IoT projects. Smart cities, smarter gadgets, smarter environment, smarter production has started booming because of IoT. Already a number of connected devices such as connected watches, health monitoring devices, connected thermostat, connected cars started toppling the market. The connected mailbox as similar to those devices. This paper will focus on connected mailbox, which will be a part of making the campus smarter as well as connected one. II. EXPERIMENTAL SETUP – HARDWARE A. Passive Infrared sensor Passive Infrared (PIR) otherwise known as motion detection are mostly used to detect the motions of humans, animals or any other objects. The PIR sensor works by detecting the IR signals that are invisible to the human eyes. The PIR sensor is split into two halves, where each half detects the levels of IR, so if both detects equal radiation then it cancels each other. On the other hand, if one detects more radiation and the other half detects less then it outputs high. PIR sensor detects through a range of 20feet (6 meters) 110 degrees × 70 degrees’ detection range. It requires a power supply of 3.3V-5V for its operation [5]. The PIR is provided with two knobs one for adjusting the distance and another knob is for adjusting the time delay. Figure 1 PIR sensor [5] B. Raspberry Pi Raspberry Pi is a small pocket size computer developed for educational and research purpose [2]. For this project, we use Raspberry Pi 3rd generation model B+. The Pi comes with four USB hubs, built in Wifi Bluetooth and comes with 40 General Purpose input-output (GPIO) connectors. These GPIO pins are used to connect to the external circuit. Raspberry Pi3 has a 1.2 GHZ 64 bit quad core processor and 1 GB of RAM. It runs on Raspbian operating system, which is derived from the Linux os. The Raspbian os provides better flexibility and control over the device [3].
  • 2. Figure 2 Raspberry Pi3 C. Connection Setup The PIR sensor has three pins Vcc, Gnd and OUT. The Vcc pin of the sensor is connected to GPIO pin 2 of the Pi, which sends a 5v power. The Gnd pin in the sensor is connected to GPIO pin 6 of the Pi which is grounded. The OUT pin in the sensor sends two types of signal that is, it sends high when it detects the motion and low when it detects no motion. This OUT pin is connected to either GPIO pin 26,24 ,21 or 23. The circuit diagram can be clearly understood through the Figure 3 Connecting PIR sensor with RPi[6]where the OUT pin is connected to GPIO pin 26. Figure 3 Connecting PIR sensor with RPi[6] III. CLOUD A. MQTT Protocol MQTT is a publish/subscribe protocol specially designed for remote locations where a small code footprint is required or the bandwidth is limited. It is extremely lightweight protocol used mostly in instant messengers and Internet of Things. For this project, we use paho MQTT, which is an open source client implementation of MQTT [7]. In our case, paho MQTT act as a broker by subscribing data from the RPi and publishing it to the cloud. As RPi supports only python we use paho Python Cllient which supports both on python 2.7 stable version as well as 3.x. The data collected from the sensors are stored in json format and the json object is published to the cloud. B. Bluemix Bluemix is platform as service provided by IBM, which offers a wide variety of third party applications and open technologies [9]. Bluemix offers Devops in the cloud – open and integrated experience, which allows the developers and firms to easily build and scale up in a short span. It supports a wide variety of programming languages such as java, pyrhon, Node.js, PHP, Ruby Sinatra, Ruby on rails and so on [8]. IBM has recently introduced containers through which we can deploy our program in real time. In our project, we use applications such as IBM IoT, Node-RED and cloudant database. C. IBM Internet of Things Platform IBM internet of things is a service that allows connected devices, sensors and gateways to communicate with apps and consume data collected from them [10]. The working of IoT platform is clearly depicted in Figure 4 IBM IoT Platform. Initially we created the type of device and we define the required details such as serial number, hardware version, location, hardware version, class and model. Once we create the device type, we add our Raspberry Pi’s to the console. We get a set of configuration files such as organization id, device id, and token-method and token as soon as we add our device. This configuration file provides means of authentication between the device and the cloud. Figure 4 IBM IoT Platform
  • 3. Figure 5 Node-RED Node red is a web-based application built over node.js. It provides a browser based web flow in which the flows can be defined using nodes. The flows can be deployed and tested in real time. Node-RED is extremely lightweight, so it runs on cloud as well as on small hardware’s such as raspberry pi and aurdino. Json format is used between the flow, as it is easy to import and carry across. The Node-RED provided by IBM comes up with lots of extra nodes that supports and favors IoT development. The IBM Node-RED provides special databases and analysis tools which gives a better instinct about the data. In addition to these, it provides a wide variety of third party apps and applications that can be bound within the Node-RED container. In this project we used IoT node that is based on mqtt subscribe to receive data from the user. We define the API key generated from the IoT service in which we added the device. The IoT node outputs a message payload that contains the data sent from the Pi in Json format. Then each sensor data is sent to separate switch node based on the sensor number. Each switch works like an if/else statement so if the sensor detects o then the data is passed through one function and else if it detects its passed through another function 1 as shown in Figure 5. The flow from node 1 is transferred to the mail function node. As the message payload cannot be sent as a notification through the Twilio message notification node, the payload is stored in an object variable and sent. A trigger named delay is placed between the mail node and notification node in order to avoid multiple detections. Email notification are send through email node, which uses SMTP protocol for sending notification. D. Twilio Twilio is an application protocol interface (API) that can be integrated into to our application and user can send and receive text message as well as calls. Many leading organizations such as UBER, Coca-Cola, Sprint, box have integrated there applications using Twilio API. In this project, we use Twilio API to send message notification to the user when a mail is received. In order to use the API initially we have to create a Twilio account that provides as with a phone number from where the text will be sent. It also provides as an account id as well as an API key that enables us to integrate the service into our application.
  • 4. Twilio node in Node-RED is configured with same API key and authorization id. The phone number generated by Twilio is used as from number. E. Cloudatnt Database Cloudant database is an open source, non-relational and distributed database system [11]. It is a cloud application provided by IBM, in which the core system is based on Apache’s Couch DB, an open source Json document. Cloudant database provides integrated analysis, search for web applicatons [11]. It also provides special tools for data warehousing and provides tools to replicate into relational database. We stored the data from all the sensors in the cloudant database in Json format. Time and geolocation of each sensor is also stored in the database. The geolocation will be very useful when the number of sensor are increased and are located in various places. IV. OVERALL ARCHITECTURE AND RESULTS The hardware setup and cloud gave an idea about how each components are used in this project. The overall architecture is shown clearly in Figure 6 Architectural diagram. Figure 6 Architectural diagram Two Raspberry Pi and nine PIR sensors were used to develop this prototype. Five PIR sensors were connected to one raspberry pi and four sensors were connected to the second Pi. Python script was used to collect the data from the sensors by reading the GPIO pins of the Raspberry Pi. The data collected from the GPIO pins is stored in variables named msensor1, msensor2 up to msensor8. Also the current time and latitude and longitudinal position of each sensor is collected. These collected data are transferred to Json objects, so it is easier for the MQTT protocol to subscribe to the data and publish it to the cloud. The MQTT protocol publish the data by verifying the configuration file. Once the data is published, the flow is built as shown in Fig.5 A model connected postal box which replicates the mailbox at CITE is built using cardboard and the sensors are fit in such a way that the face inward. This inward facing method avoids the detection of unwanted things moving around. The sensor are focused at an angle of top corner in order to cover the entire region of the mailbox as shown in Figure 7 Prototype Mailbox Figure 7 Prototype Mailbox Once the mail hits the mailbox notification are sent as text as well as email to the recipients as shown in the Figure 8 Notification Email and Message.
  • 5. Figure 8 Notification Email and Message V. FUTURE ENHANCEMENT  Mailbox will become smarter like the e-mail system and can notify the state of the mail whether read or unread.  Recipients will be sent with the image of the mail, this can be achieved by connecting a camera to the raspberry pi.  Apart from campus this connected mailbox prototype can be applied to any postal service. Which in turn will make even the pickoff boxes connected.  We can show the data in Google Maps by showing a red pointer for the mailboxes where there is no mail and green to show the presence of mail.  Drones will be able to deliver the mails instantly to the recipient’s office desk. VI. CONCLUSION Internet of things has become an integral part of our life; all the things around us will be gaining life by getting connected. Therefore, this connected mailbox prototype will be a seed for connected campus. This prototype in turn will pave the way for connected trashcans, connected parking lots and so on. The entire campus will become really smarter and connected. VII. REFERENCE [1] “Internet of Things,” Wikipedia. [Online]. Available at: https://en.wikipedia.org/wiki/internet_of_things. [Accessed: 30-Mar- 2016]. [2] “Raspberry Pi,” Wikipedia. [Online]. Available at: https://en.wikipedia.org/wiki/raspberry_pi. [3] D. Palsharma, A. Baldeo, and C. Phillip, “Raspberry Pi based Smart Home for Deployment in the Smart Grid,” International Journal of Computer Applications IJCA, vol. 119, no. 4, pp. 6–10, 2015. [4] J. Gubbi, R. Buyya, S. Marusic, and M. Palaniswami, “Internet of Things (IoT): A vision, architectural elements, and future directions,” Future Generation Computer Systems, vol. 29, no. 7, pp. 1645–1660, 2013. [5] “PIR Motion Sensor Tutorial,” Instructables.com. [Online]. Available at: http://www.instructables.com/id/pir-motion-sensor-tutorial/. [6] “Interfacing PIR Motion Sensor HC-SR501 with Raspberry Pi,” electroSome, Apr-2015. [Online]. Available at: https://electrosome.com/pir-motion-sensor-hc-sr501-raspberry-pi/. [7] “MQTT,” MQTT RSS. [Online]. Available at: http://mqtt.org/. [8] “Bluemix,” Wikipedia. [Online]. Available at: https://en.wikipedia.org/wiki/bluemix. [9] “IBM Launches New PaaS Offering & New Cloud Services,” IBM News room. [Online]. Available at: http://www- 03.ibm.com/press/us/en/pressrelease/43257.wss. [10] “Internet of Things Platform - IBM Bluemix,” Internet of Things Platform - IBM Bluemix. [Online]. Available at: https://console.ng.bluemix.net/catalog/services/internet-of-things- platform/. [11] “Node-RED,” Wikipedia. [Online]. Available at: https://en.wikipedia.org/wiki/node-red.