Abstract
The research of the internet of things (IoT) applications in smart-home monitoring was mainly discussed, and the design of a smart-home monitoring system was accomplished. In the system that was constructed based on the ZigBee scheme, the technologies of WiFi, Node.js and MongoDB were incorporated. Hence, the system supported both the local and the remote accesses. As for the aspect of system applications, many functions were implemented, such as the electrical control, environmental monitor, indoor monitor, abnormity warning, query historical information, and user settings. Compared with the traditional smart-home systems, it centers at the monitoring of communities, where the smart homes are the main branches. In the system, the different scenarios of multi-users and multi-applications with high flexibility and strong extensibility were considered. With the aid of the emerging technologies, the local access system has energy-saving features while the remote access system has good real-time response performance.
Access provided by Autonomous University of Puebla. Download conference paper PDF
Similar content being viewed by others
Keywords
1 Introduction
Internet of things (IoT) is becoming the trend of network convergence. It can be defined as a dynamic global network infrastructure [1]. It describes a vision where objects become part of the Internet: where every object can be uniquely identified, and seamlessly integrated into the information network [2].
As one of the main applications, smart-home monitoring system obtained more and more concerns [3]. Under the environment of the IoT, the people can get certain services with any communications devices and any communications methods at any time [4].
It has been reported that many countries noticed the importance of developing IoT systems and smart homes. They have begun to launch smart-home programs to speed up the developments of the IoT based on their national conditions and economic capabilities [5]. However, the traditional systems also have some problems to be solved as below:
-
(1)
They exist in the form of individual networks independently network connection is not established between families. So, the interconnected feature of IoT is not met; meanwhile, this condition will make the system structure and information type complicated [6].
-
(2)
Smart community building is still in the pilot and groping at home and abroad, maturity construction and service models are not yet formed and application system function is comparatively simple [7].
-
(3)
Energy saving has become a hot topic of local network system in smart home.
-
(4)
Optimizing the network resource allocation.
The system we proposed adopts a series of emerging technology to solve the problem above and uses the least amount of servers possible to satisfy as many users’ request as possible.
One of the most important characters of ZigBee employed in our research is its low-power consumption [8]. The energy consumption performance of the chip CC2530 is shown in Table 1.
Most of the time, the sensor nodes in ZigBee network stay in the sleep state (Power mode 1 and Power mode 2), and the nodes can be easily switched between the sleep state and the normal running state. So the energy consumption is very low. Usually, a node can run continuously for 2 years relying on the general batteries [9].
On the other side, the Node.js is a platform that was developed on Chrome’s JavaScript, used for building fast scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices [10].
In our system, we make the most of its real-time performance. Table 2 shows the comparison of real-time response between Node.js and PHP+Nginx. The condition of the test is 3000 concurrent connections in 30 s, requesting to output “hello world.”
The test results show that the Node.js has a more superior performance in real-time compared with PHP.
Finally, databases are required in our system since a large number of data are to be stored, processed and queried. So, it is very important to select a suitable database to work with. The MongoDB is an open-source document database that provides high performance, high availability, and automatic scaling [11].
In the performance testing, we insert four groups of user information data into database. The format of the data is shown as below.
-
{“family number”: i, “family information”: “information”+str(i)}
The cost time of MongoDB and MySQL was recorded as shown in Table 3.
In the performance of inserting data, MongoDB spends less time than MySQL, which testified it is improving query efficiency.
2 System Overview
In general, the system is required to treat two scenarios. One is the remote access of users to the servers that are usually deployed in or near the community center; the other is the internal access to the local network, which is locally implemented and often deployed in a smart home. In this way, it is relatively easy to get a tradeoff between the access convenience and the response time of the networks. Figure 1 shows such architecture of the network.
A smart community is made up of a unit of property management center and a number of smart home, all families sharing a single server which is deployed in the community property management, each family has its own independent residential gateway and local network nodes, the home gateway is connected to Internet so that users from the remote network can visit it. The property managers can manage various types of information within the community, upgrade and maintain server system through logging in the admin system.
3 Local Network System
3.1 System Model Page Numbering and Running Heads
The design diagram of local system architecture is shown in Fig. 2. It contains ZigBee network, local home gateway, wireless routers, and camera nodes.
3.2 Node Design
Node Communication Design This system is developed based on CC2530 hardware development platform. CC2530 is a true solution of SOC. It supports IEEE 802.15.4 standard and ZigBee 2007 protocol, and it is equipped with Z-Stack of TI to simplify the development [12].
The general nodes in local system can be terminal nodes and router nodes. These nodes have the functions of temperature and humidity acquisition, illumination capture, alarm, control electrical, and data transmission. Its working process is shown in Fig. 3.
Coordinator node exchanges information with local gateway via USB port and communicates with WSN nodes through its built-in ZigBee module. It can analyze, store, and transmit data. Its working process is shown in Fig. 4.
Datagram Format Design We define formats for the datagram transmitted among the WSN sensors as shown in Table 4. Different contents of each field correspond to different meanings.
In the table, the meanings are stated below.
-
Head+LastByte: Communication flags.
-
HeadCom[0∼2]+DataBuf[0∼1]: Command code.
-
HeadCom[0]:‘R’:‘read’; ‘S’:‘set’; ‘T’:‘test’.
-
HeadCom[1∼2]+DataBuf[0∼1]:Sensor type.
-
Laddr[0∼7]: Network address.
-
Saddr[0∼1]: MAC address (sensor code).
-
DataBuf[0∼15]: Data or instructions supplement.
-
CRC: Cyclic redundancy check.
The datagram type can fall into two categories as the direction of data transmission: uplink (from general node to coordinator node), and downlink (from coordinator node to general node). For example, the uplink instruction ‘AIN’ means the infrared alarm, while the downlink instruction ‘RGA’ means to read the gas sensor.
3.3 Embedded Device Design
The embedded device used in our system is OK6410. It implements two modules: Serial communications module and client communications module. The function is shown in Fig. 5.
The client module implements the communications between the gateway and the server based on the ‘net’ module of Node.js. The net module provides us with an asynchronous network wrapper. It contains methods for creating both servers and clients (called streams). We include this module with a command “require (‘net’).”
The serial module implements the communications between gateway and the ZigBee coordinator node based on the ‘serialport2’ module of Node.js. It provides us a wrapper of serial port. We include this module with a command “require(‘serialport2’).”
In order to differentiate varieties of families, we allot a single serial number for every embedded device in the message processing. The allocation method is shown in Fig. 6.
4 Remote Network System
The design of remote system architecture is on the basis of local system. It provides a way for users to visit local system through Internet.
4.1 Remote System Model
We build a web server which is based on Node.js platform in the Linux development environment [13]. As shown in Fig. 7, Embedded Device is responsible for information transmission; the server is in charge of storing information and the terminal is used for interaction with users. The wireless router is responsible for transmitting the video signal which is collected by cameras from LAN to WAN.
Figure 8 is the sequence diagram of remote system. The main feature of this system is that it can connect the kinds of electrical devices in the house to the internet, but only communication between devices and the internet is not enough; it is necessary to realize the interaction between them. The application server stores the devices’ data in database, and then the web server displays the data in the internet for users to inquiry and control at any time. In the case of logging in the browser, after the terminal sensor nodes in ZigBee network upload electrical information regularly via coordinator node, the users can not only observe dynamic information of various appliances on a web page but also can send control commands. After the web page capturing users’ operations, it forwards them to the specified terminal node through ZigBee network gateway.
4.2 Multi-families Design Based on Socket
A network socket is an endpoint of an inter-process communication flow across a computer network. Today, most communication between computers is based on the Internet Protocol. In our system, we invoke two modules to implement the socket protocol, the ‘socket.io’ and the ‘net.’
Socket.IO is a communication mechanism to achieve real-time apps on various browsers and mobile devices. It blurs the differences between the different transport mechanisms [14]. It is care-free real-time 100 % in JavaScript. And the NET module has mentioned earlier. The implementation procedure by using the two modules is shown in Fig. 9.
The members from one family use the same account to log in the server, visiting their own local home network. The basic unit between web page and the server is a socket; different families use different accounts to be differentiated. The basic unit between local home network and the server is a connection; different families use different embedded device serial numbers to be differentiated. When a user registers an account, it will be bound to the serial number. So, the server will isolate each communication link between user and local network as the binding relationships.
5 Conclusion
The design and implementation of a smart community monitoring system were discussed and completed with the aid of the IoT technology. This system has the functions of electric control, environmental monitoring, indoor monitor, abnormal alarm, historical information query, system settings, and many more. The structure of the system can be divided into two parts: local and remote. With the aid of the emerging technologies, the local system has energy-saving features while the remote system has good performance of the real-time response. It focuses on the monitoring of communities, whose main branches are the smart homes. In the system, the scenarios of the multi-user and multi-application with high flexibility and strong extensibility were considered. In addition, as an emerging application technology, the IoT technology inevitably has the lack of full system functions, performance stability, and data reliability in the period of its rapid development, especially at the early stage. Therefore, more research needs to be done in this area to promote the comprehensive applications of the IoT technology in the information society in future. This can provide more convenience for human life and create more values for the social progresses.
References
Sundmaeker, H., Guillemin, P., Friess, P., Woelffle, S.: Vision and Challenges for Realizing the Internet of Things. Publications office of the European Union, Luxemburg (2010)
Coetzee, L., Eksteen, J.: The internet of things—promise for the future? An introduction. In: IST—Africa Conference, pp. 1–9. Gaborone, Botswana (2011)
Kortuem, G., Kawsar, F., Fitton, D., Sundramoorthy, V.: Smart objects as building blocks for the internet of things. IEEE Internet Comput. 14(1), 44–51 (2010)
Yuan, X., Peng, S.: A research on secure smart home based on the internet of things. In: International IEEE Conference on Information Science and Technology (ICIST), pp. 737–740. Wuhan, China (2012)
Li, L., Hu, X., Chen, K., He K.: The applications of WiFi-based wireless sensor network in internet of things and smart grid. In: 6th IEEE Conference on Industrial Electronics and Applications (ICIEA), pp. 789–793. Beijing, China (2011)
Gao, C., Ling, Z., Yuan, Y.: The research and implement of smart home system based on internet of things. In: International Conference on Electronics, Communications and Control (ICECC), pp. 2944–2947. Ningbo, China (2011)
Tong, T., Jian, R., Xiao, C.: Secure wireless monitoring and control systems for smart grid and smart home. IEEE Wirel. Commun. 19(3), 66–73 (2012)
Yashiro, T.: An internet of things (IoT) architecture for embedded appliances. In: IEEE Region 10 Humanitarian Technology Conference (R10-HTC), pp. 314–319. Sendai, Japan (2013)
Bruckner, D., Dillon, T., Hu, S., Palensky, P., Wei, T.: Guest editorial special section on building automation, smart homes, and communities. IEEE Trans. Industr. Inf. 10(1), 676–679 (2014)
Ojamaa, A., Duuna, K.: Assessing the security of Node.js platform. In: The 7th International Conference for Internet Technology and Secured Transactions (ICITST-2012), pp. 348–355. London, England (2012)
Zhu, W.-P., Li, M.-X., Chen, H.: Using MongoDB to implement textbook management system instead of MySQL. In: IEEE 3rd International Conference on Communication Software and Networks (ICCSN), pp. 303–305. Xi’an, China (2011)
Texas Instruments: CC2530 datasheet (SWRS081A) [OL]. www.ti.com (2009)
Tilkov, S., Vinoski, S.: Node.js: using JavaScript to build high-performance network programs. IEEE Internet Comput. 14(6), 80–83 (2010)
Zhao, Z., Espinosa, A., Iskra, K., Raicu, I., Foster, I., Wilde, M.: Design and evaluation of a collective IO model for loosely coupled pet scale programming. In: MTAGS 2008. Workshop on Many-Task Computing on Grids and Supercomputers, pp. 1–10. Austin, USA(2008)
Acknowledgments
The work was supported by the National Natural Science Foundation of China (Nos. 61173018 and 61401164) and the Science and the Natural Science Foundation of Guangdong Province of China (No. 2014A030310308).
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2016 Springer India
About this paper
Cite this paper
Jiang, Y., Liu, X., Lian, S. (2016). Design and Implementation of Smart-Home Monitoring System with the Internet of Things Technology. In: Zeng, QA. (eds) Wireless Communications, Networking and Applications. Lecture Notes in Electrical Engineering, vol 348. Springer, New Delhi. https://doi.org/10.1007/978-81-322-2580-5_43
Download citation
DOI: https://doi.org/10.1007/978-81-322-2580-5_43
Published:
Publisher Name: Springer, New Delhi
Print ISBN: 978-81-322-2579-9
Online ISBN: 978-81-322-2580-5
eBook Packages: EngineeringEngineering (R0)