Professional Documents
Culture Documents
and ZigBee
Abstract. The main benefit of smart home system is controlling and monitoring
of household appliances remotely and flexibly. Control systems for smart home
have been improved with the integration of technologies of communication,
digital information and electronics in the home environment. In this paper, a new
and flexible smart home control system is presented. The proposed system is
based on the Raspberry Pi B+ board, which is programmed as the embedded home
server and the standard ZigBee is used to ensure communications within the home
network. To accomplish this experiment, XBee ZigBee devices, smart plugs, and
Raspberry pi board are used.
Keywords: Smart Home · ZigBee · Embedded server · Web services · Smart plug
HTML user interface
1 Introduction
These systems suffer from limitations such as the lack of flexibility where the appli‐
ances are controlled via a one type of device (as mobile phone through GSM). Another
inconvenient for systems that proposed SMS messages as solution to remotely control
home appliances is that the user has to remember codes or names of all commands to
include in the message body. Hence, the development of a dynamic and flexible user
interface (UI) for controlling and monitoring applications remain the most promising
solution.
In order to overcome the problem of the intrusiveness of the home installation,
different works were presented that use wireless technologies. Sriskanthan et al. [6]
proposed a system of smart home based on a wireless technology which is a Bluetooth.
Zhang et al. [7] present a Wi-Fi smart plug which permits controlling appliances wire‐
lessly based on the WiFi technology, where services are provided using the REST
(Representation State Transfer) architecture.
In order to ensure a remote controlling and monitoring services for smart home
control systems, the proposed approaches converge to the exploitation of a tiny
computers that can be programmed as embedded server and gateway as it is presented
in [8] where the control system proposed is designed around the Cortex A8 processor.
In this paper a raspberry pi B+ is used and programmed as the home embedded
server. The raspberry pi B+, presented in July 2014, is a tiny computer, which has a size
of 85 mm × 56 mm. This board comes with a 512Mo of RAM and an ARM BCM28351
Broadcom SoC (System on Chip) processor running at 700 MHz. The Raspberry Pi has
many positive aspects such as its flexibility and the possibility of its utilization in varia‐
tion of purposes. The Raspberry Pi is suitable for projects that require a graphic interface
or the Internet, and this advantage makes Raspberry Pi perfect for usage in Internet of
Things vision [9].
2 System Architecture
The Fig. 1 shows the proposed smart home control system. Users can control household
appliances locally using a Desktop PC, which is connected to the LAN network via RJ45
interface or via smart devices such as tablet and smart phones that are connected to the
Wi-Fi network. The user can also control the appliances remotely via internet. A user
interface (UI) is coded in HTML in order to simplify the control task for users and gives
them the possibility to use variety of smart devices, and this increase the flexibility of
the smart home control system.
36 T. Dahoumane and M. Haddadi
The Fig. 2 shows the block diagram of the central unit, which is composed from the
Raspberry pi B+ board and an XBee module. This XBee ZigBee module is configured
as the coordinator of the network, which is responsible for forming the network and
assigning addresses for XBee devices within the home network. The Raspberry pi B+
board is programmed as an embedded server, where the home management system is
implemented and data are stored. The implementation details of the home embedded
server are discussed further in the Sect. 3.
The XBee device is chosen to satisfy the need of smart plug. The X-CTU software
from DiGi International is used to configure XBee devices. A mesh network is config‐
ured as the topology of our network. The Coordinator is the responsible of assigning
addresses to XBee Routers that are mounted in the developed boards.
Fig. 4. Smart plug’s command and power circuit released under “Proteus”
The power circuit is composed from a relay that receives order from the transistor
relied to the output of the opto-coupler. A command (turn ON or OFF the appliance)
received on the antenna of the XBee device will activate, through the smart plug’s circuit,
the coil of the relay, which provides electrical energy to the appliance.
Smart Home Control System Based on Raspberry Pi and ZigBee 39
3 Software Development
The actions performed by users, are traduced in requests. The requests are formed
from two parts, an URI and a specific data.
The URI (Uniform Resource Identifier) is a unique identifier for a resource given as
follow: http://<ip>:<port>/path_to_resouce. The URI points to a resource on the
embedded server, this resource is programmed to satisfy the wanted service (ex. reading
the environmental temperature where the selected smart plug is located).
Generally, resources on the embedded server need some data to be executed correctly
(ex. the MAC address of the smart plug of the equipment that the user wants to turn ON
or OFF). REST is representation-oriented architecture, hence, the data that is exchanged
with the server have the format of JSON (JavaScript Object Notation) and XML (eXten‐
sible Markup Language) or in another formats types.
All requests goes through the embedded server based on the client/server architecture
and this is done locally via the Wi-Fi or LAN network or remotely via internet. Received
requests by the embedded server will be transferred to the XBee coordinator via the
serial RS232 protocol. The coordinator will interrogate or order to the smart plug to
execute the intended commands.
4 System Evaluation
The XBee devices are used in order to form the ZigBee mesh network, and are configured
using the X-CTU software. The XBee coordinator is configured as the trust center where
commands goes through this node. The ‘XBee Java Library’, available in the web page
of Digi International, is exploited to ensure the communication between the coordinator
and the home embedded server.
The proposed architecture relies between the UI (user interface), the embedded
server and the ZigBee home network. The executed commands in the real home envi‐
ronment are initiated by the user through the UI, received by the embedded server and
then transferred as commands to the XBee coordinator. The coordinator sent commands
to a specifics smart plug within the home network. The commands are executed by smart
plugs and then the information are sent back to the server. This proposed architecture
shows a reliable control system for smart home.
Smart Home Control System Based on Raspberry Pi and ZigBee 41
Some proposed control systems are based on GSM or Microcontrollers that have the
disadvantage of the lack of flexibility, where the user have to remember commands or
codes for controlling equipments within the home environment. In this paper, a user
interface is coded in HTML and JavaScript which permit dynamic web page. This UI
can be consulted via PCs, mobiles or other smart devices, which increases in flexibility
of the control system.
The test conducted shows that the proposed system is a flexible and reliable smart
home control system. Smart devices as mobile or GSM modem can be connected to the
Raspberry pi, which gives the possibility to an extension of the system. Thus, the Rasp‐
berry pi represents a good choice for extensible smart home control system.
5 Conclusion
References
1. Toschi, G.M., Campos, L.B., Cugnasca, C.E.: Home automation networks: a survey. Comput.
Stand. Interfaces 50, 42–54 (2017). https://doi.org/10.1016/j.csi.2016.08.008
2. Robles, R.J., Kim, T.: Review: context aware tools for smart home development. Int. J. Smart
Home 4(1), 1–12 (2010)
3. Nichols, J., Myers, B.A.: Controlling home and office appliances with smart phones. IEEE
Pervasive Comput. 5(3), 60–67 (2006). https://doi.org/10.1109/MPRV.2006.48
4. Sikandar, M., Khiyal, H., Khan, A., Shehzadi, E.: SMS based wireless home appliance control
system (HACS) for automating appliances and security. Issues Sci. Inf. 6, 887–894 (2009).
https://doi.org/10.28945/3304
5. Kaur, I.: Microcontroller based home automation system with security. IJACSA Int. J. Adv.
Comput. Sci. Appl. 1(6), 60–65 (2010). www.ijacsa.thesai.org. Accessed
6. Sriskanthan, N., Tan, F., Karande, A.: Bluetooth based home automation system. Microprocess.
Microsyst. 26(6), 281–289 (2002). https://doi.org/10.1016/S0141-9331(02)00039-X
7. Wang, L., Peng, D., Zhang, T.: Design of smart home system based on WiFi smart plug. Int.
J. Smart Home 9(6), 173–182 (2015). https://doi.org/10.14257/ijsh.2015.9.6.19
42 T. Dahoumane and M. Haddadi
8. Zhang, S., Xiao, P., Zhu, J., Wang, C., Li, X.: Design of smart home control system based on
Cortex-A8 and ZigBee. In: Proceedings of the IEEE International Conference on Software
Engineering and Service Sciences, ICSESS, pp. 675–678 (2014). https://doi.org/10.1109/
ICSESS.2014.6933658
9. Vujovic, V., Maksimovic, M.: Raspberry Pi as a sensor web node for home automation.
Comput. Electr. Eng. 44, 153–171 (2015). https://doi.org/10.1016/j.compeleceng.2015.01.019