Professional Documents
Culture Documents
14 Techscripts
Transactions on Engineering and Sciences ISSN: 2347-1964 (Online) 2347-1875 (Print)
Vol.3, Issue 6, October-December 2015
In this paper we use this MQTT protocol so that detail description is given. [5]MQTT protocol is containing
three QoS level.
1) Fire and forget: Message is sent once and no acknowledgement.
2) Delivered at least once: Message is sent at least once and required acknowledgement.
3) Delivered exactly once: Message is delivered exactly one time no copy of messages.
In MQTT one of the very important parts is broker that contains TOPICS. Each client can be a publisher
that send message to the broker to a specific topic and subscriber that receives automatic message every
time. A figure that demonstrate the publish/subscribe architecture. On one side is client and other side is
Server.
B. ESP - 12
ESP 12 is the most popular and flexible device in todays market. It exposes the most GPIO pins for
use. The Pin out of ESP- 12 is shown in below figure:
15 Techscripts
Transactions on Engineering and Sciences ISSN: 2347-1964 (Online) 2347-1875 (Print)
Vol.3, Issue 6, October-December 2015
16 Techscripts
Transactions on Engineering and Sciences ISSN: 2347-1964 (Online) 2347-1875 (Print)
Vol.3, Issue 6, October-December 2015
If Arduino IDE is being installed then install ESP8266 Generic Board. After that check blink example and
dumped in ESP8266 device for test.
V. SYSTEM CONFIGURATION
A very simple example of home automation is light on or off using your android phone. There are
mainly couple of modes in ESP8266 that I configure through program which are online mode and offline
mode.
A. Online Mode
Online mode works same as its name suggest. This mode is use when you are not at home and you want
to control your home device at outside the home. Then here I configure online mode in ESP8266 through
program. In this mode I choose MQTT protocol. As we know MQTT protocol uses publish/subscribe
architecture so for that we have to create different topics and that particular topic publish or subscribe data.
In programing I made different topics for controlling home automation device and that topic also configure
in android application.
So for android application go to the play store and download MyMQTT application and configure
this way:
Open the setting.
Enter URL : test.mosquitto.org
Port: 1883
Here Username and Password Optional its use for authentication.
Go to Subscribe and Add TOPICS which are listed below.
Once all the topics were subscribe then go to Publish and publish data or status on particular topic.
Application is shown here:
TOPIC: PASS
DATA: pass
vi. Reset all configuration
17 Techscripts
Transactions on Engineering and Sciences ISSN: 2347-1964 (Online) 2347-1875 (Print)
Vol.3, Issue 6, October-December 2015
TOPIC: reset
DATA: rst Reset all configuration
B. Offline Mode
In offline mode we can control our home device with in specific range. This range is about 100m to 300m
which is ESP module Wi-Fi range. If you want to use MQTT protocol in offline mode that is possible. But the
problem is one operating system device needs compulsory. We can use Raspberry pi or we can also use over
Laptop. Mosquitto broker is available for OS device so for that we have to install that particular broker in
Raspberry pi or Laptop.
If we choose this protocol for offline mode we have to purchase raspberry pi which is costly about $35.
So instead of MQTT protocol I used TCP protocol and therefor no need of raspberry pi or laptop. In Offline
mode my ESP8266 Wi-Fi module work as an access point so by default its IP Address is 192.168.4.1 and here
port is set by me is 8080.Now download the TCP client application which is located at Google play store.
After downloading the application configure application this way:
Open the application and write IP Address which is 192.168.4.1.
Enter the port number which is 8080.
Click on that configuration.
This configuration is shown in figure.
18 Techscripts
Transactions on Engineering and Sciences ISSN: 2347-1964 (Online) 2347-1875 (Print)
Vol.3, Issue 6, October-December 2015
resolved by integrating a separate Analog IO Expander circuit with the Wi-Fi module.
REFERENCES
[1] Neil Kolban Kolbans Book on ESP8266, 2015.
[2] Tasos Kaukalias and Periklis Chatzimisios, Internet of Things (IoT) C Enabling technologies,
Application and open issues, Encyclopedia of Information Science and Technology (3rd Ed.), IGT Global
Press, 2014.
[3] Sye Loong Keojh, Sandeep s. Kumar, Hannes Tschofenig, Securing the Internet of Things: A
Standardization Perspective, Internet of Things Journal IEEE (Volume: 1, Issue: 3), June 2014, pp. 268-
275.
[4] Maria Rita Palattella, Nicola Accettura, Xavier Vilajosana, Thomas Watteyne, Luigi Alfredo Grieco,
Gennaro Boggia, Mischa Dohler, Standardized Protocol Stack for the Internet of Things,
Communications Surveys & Tutorials IEEE 15(3), 2013, pp. 1389-1406.
[5] http://www.hivemq.com/blog/mqtt-essentials-part
19 Techscripts