You are on page 1of 2

2017 IEEE 7th International Conference on Consumer Electronics - Berlin (ICCE-Berlin)

Collection and Analysis of System Usage Data in


Smart Home Automation Systems

Sandra Ivanović, Sunčica Milivojša, Tatjana Erić Milan Vidaković


Faculty of Technical Sciences Faculty of Technical Sciences
University of Novi Sad University of Novi Sad
Serbia Serbia

Abstract—In this paper, we implement a basic solution for end users. For example, by storing and analyzing device
collection and retrieval of usage data within the existing home consumption and sensor data in the smart home environment,
automation system. Data collection modules are implemented, the system learns about user’s daily habits. Based on the
which run on the home automation gateway and within the home detected patterns, the system can suggest actions or HA
automation cloud, and allow us to connect to the already existing
system settings for the user. Irregular behaviors can also be
big data middleware platform. This represents the initial step in
building the extensive data storage and analysis component for detected, and interpreted as emergency situations. Also,
the existing home automation solution. The recorded data can be recorded HA system history can simply be replayed within the
used to enable various scenarios interesting for the end users, given time frame (days/weeks). This allows building scenarios
such as detection of emergency situations and irregularities that mimic regular user behavior in cases when the household
within the system. is empty, in order to prevent intrusions.
As the first step towards building the extensive data
Keywords—data collection, big data, smart home automation analysis framework, and enabling various scenarios mentioned
above, we want to add the cloud data collection service to the
I. INTRODUCTION existing HA system. The implemented data collection service
Nowadays, the industries in possession of information and needs to perpetually monitor all the events within the
data have significant advantage over competition. Therefore, environment, and store them to the database. Over time, large
various mechanisms to collect and store system usage data are amounts of data will be stored and analyzed, in order to enable
developed and deployed. But, in the world where information functionalities like automatic adaptation of the system to user
is not that of a challenge to obtain, it is often difficult to habits, or detection of emergency situations. For the time
differentiate between relevant and irrelevant data. After being, we will limit the analysis of data to simple monitoring
deciding which data should be collected, and implementing of the history within the given timeframe.
data collection mechanisms, the next step in the process would In this paper, we first present the architecture of the
be the analysis of this vast amount of data. This is where the existing HA system [1]-[3]. Then, we implement a basic data
real challenge lies. Data processing and analysis tools must be collection and analysis solution, based on the existing big data
extremely reliable, efficient, and secure, but still fairly fast. technologies [4]-[7], and the already available IoT middleware
Data is usually stored across various clusters and replicated for platform [8]. Finally, we verify the functionality of the
security and efficiency reasons. solution.
In this paper, we focus on data collection and analysis for
II. HOME AUTOMATION SYSTEM ARCHITECTURE
the purpose of the existing home automation (HA) system [1]-
[3]. Devices within the HA system can be divided in two In this section, we first describe the architecture of the
categories: actuators and sensors. Actuators are the devices existing HA system. Then, we identify the points within the
that can be controlled by the system users, such as lights, system, where the interface towards data collection service can
dimmers, plugs, etc. On the other hand, properties of sensor be implemented.
devices can only be monitored by the user: temperature, The architecture of the existing system is showed in Fig. 1.
humidity, motion, smoke and more. The sensor devices within As already said, devices within the HA system can be sensors
HA system generate immense amount of data, as they are or actuators. We refer to all of the devices within the HA
constantly gathering new information. Actuators give us more system as nodes. All of the nodes in the system are connected
information about the user daily habits and routines, since they to the gateway [1]. Communication between the devices and
do not only monitor environmental parameters, but are directly the gateway is mostly accomplished by IP, Z-Wave and
controlled by the user. Therefore, distinguishing between ZigBee protocols [2]. The HA gateway controls all of the
relevant and insignificant information is essential. devices within the local network, and communicates with the
Our goal is to store data about the system usage, in order to HA cloud [3]. HA cloud enables remote control of the HA
analyze it and enable some of the scenarios interesting for the system, through the web interface and mobile applications.
This project has received funding from the European Union’s Horizon
2020 research and innovation programme under grant agreement No 689947

978-1-5090-4014-8/17/$31.00 ©2017 IEEE 65


2017 IEEE 7th International Conference on Consumer Electronics - Berlin (ICCE-Berlin)

Our goal is to build a cloud-based data collection service, Log upload strategy is set in a way that HA cloud
which can be accessed by all of the system users. As the nodes communicates with Kaa server.
within the HA system are produced by various manufacturers, LIGHT SENSOR
SMART

it is not possible to extend their functionality and enable them PLUG

DATA COLLECTION CLOUD


to communicate directly with the data collection service. Also, DATA COLLECTION
HA GATEWAY
CASSANDRA
this would be highly inefficient. Therefore, either the HA MODULE
C++ SDK KAA
DB

gateway or the HA cloud should collect all of the system STRUCTURED DATA SERVER

ZEPPELIN INSTANCE
usage information, format it, and transfer to the data collection DASHBOARD

service. In particular, it is better to offload this task to the HA


cloud, as the gateway device operates with low internal HA CLOUD

storage and memory. STRUCTURED DATA

DATA COLLECTION MODULE

REMOTE NETWORK NODE.JS SDK

Desktop
Computer
HA CLOUD Mobile
Device

User
Fig. 2 – HA system with data collection and analysis cloud

IV. TESTING
HOME NETWORK NODE

NODE
To validate the implementation, we performed the simple
test of logging the temperature from sensor. The HA cloud
Mobile
NODE
based data collection module periodically checked the
temperature from the sensor, and sent it to data collection
HA Gateway
User Device NODE

NODE
cloud. Besides the actual sensor reading, all logs contained the
timestamp, information about the user, and the unique ID of
Fig. 1 – Architecture of the existing HA system the sensor device within the HA system. Logs were
successfully delivered, and the log history could be observed
III. IMPLEMENTATION in Zeppelin dashboard. Log delivery time ranged between 5
In this section, we introduce the implementation of the data ms and 9 ms, with the 6.05 ms average.
collection service within the existing HA system.
V. CONCLUSION
The diagram of the implementation is presented in Fig. 2.
We implemented the data collection service within data By using the Kaa middleware platform, we managed to
collection cloud, which runs independently from the existing quickly enable data collection mechanism within the existing
HA cloud. The implemented data collection cloud uses HA system, and validate its functionality. Further work will be
KaaIoT platform as middleware [8]. This platform provides us focused on building the extensive data collection and analysis
with the customizable and highly reliable server, which can component of the existing HA system.
run within a cluster. The server handles the communication
REFERENCES
with the database, and provides interface towards Cassandra,
MongoDB, MariaDB and PostgreSQL. Since HA data is of [1] M. Tucic, R. Pavlovic, I. Papp and Dj. Saric, “Networking layer for
unifying distributed smart home entities”, Proc of IEEE Telfor, 2014
variable length and structure, we decided to use a NoSQL [2] V. Moravcevic, M. Tucic, R. Pavlovic and A. Majdak, “An approach for
database. In particular, we chose Cassandra over MongoDB, uniform representation and control of ZigBee devices in home
due to its higher throughput [4], [5]. To perform simple data automation software”, Proc. of IEEE 2015 ICCE– Berlin, 2015
retrieval and monitor logs from the desired timeframe, we [3] M.Sekulic, I. Lazarevic, M.Bjelica and V. Pekovic, “Asynchronous
application programming interface library for distributed home
used Zeppelin [8]. automation software”, Proc. of IEEE 2015 ICCE– Berlin, 2015
To enable the communication of endpoints with Kaa [4] A.Chebotko, A. Kashlev and S. Lu, “A Big Data Modeling
server, it was necessary to implement the data collection Methodology for Apache Cassandra”, Proc. of IEEE 2015 International
modules within every endpoint. In our case, we did not want Congress on Big Data – New York, 2015.
[5] J. Klein, I. Gorton, N. Ernst, P. Donohoe, K. Pham, C. Matser,
single home network nodes to communicate with Kaa server “Performance Evaluation of NoSQL Databases: A Case Study”, Proc. of
individually. Instead, we implemented data collection modules ACM/SPEC ICPE, 2015.
only within HA cloud that communicates with HA gateway, as [6] H. Dai, S. Zhang, L. Wang and Y. Ding, “Research and implementation
depicted in Fig. 2. of big data preprocessing system based on Hadoop”, Proc. of IEEE 2016
ICBDA, 2016.
By default, Kaa platform provides SDKs for C, C++, Java [7] X. Lin, P. Wang, B. Wu, “Log analysis in cloud computing environment
and Objective C endpoint applications. The existing HA cloud with Hadoop and Spark”, Proc. of IEEE IC-BNMT, 2013.
is written in Node.js. In order to build the data collection [8] Apache Zeppelin [Online] Available: https://zeppelin.apache.org/
module for HA cloud, we created a Node.js add-on, exposing [9] Kaa Project, [Online] https://www.kaaproject.org/overview
[10] C++ Addons, [Online] Availabe: https://nodejs.org/api/addons.html
the C++ SDK functionality, according to [10].

978-1-5090-4014-8/17/$31.00 ©2017 IEEE 66

You might also like