Professional Documents
Culture Documents
com
ScienceDirect
IFAC-PapersOnLine 49-25 (2016) 431436
Abstract: This paper deals with the design and implementation of visualization monitoring application
for controlling operational and technical functions in the Smart Home, equipped with KNX bus system.
The practical part analyzes the implementation of desktop application of Universal Windows Platform
type for Windows 10. It describes communication of the application with the KNX bus system, the use of
MVVM (Model, View a ViewModel) architecture and application customizing for mobile phones.
2016, IFAC (International Federation of Automatic Control) Hosting by Elsevier Ltd. All rights reserved.
Keywords: Smart Home; Control; Visualization; Monitoring; Universal Windows Platform; KNX.
used in development for this operating system (Java, Python, The controls are depicted based on the configuration (Fig. 2)
C++); however, creation of applications for Windows is which will be described later. In the case of lighting, the
mostly connected with platform .Net and programming lights can be switched on and off. It is also possible to change
language C#. their brightness using buttons for dimming. As for
furnishings of sunblind type, the screen depicts a control
For using the .Net framework, there are several available which may include several functions. Another important
types of applications that can be created in the Windows screen serves for setting the application. Here, the users can
environment. These are Windows Forms, Windows adjust some application parameters in order to adapt it to
Presentation Foundation, Windows Store applications and their individual needs.
Windows Universal Platform. Applications of Windows
Forms and Windows Presentation Foundation type can run on It is possible to set the language (Czech or English).
any of the above versions of Windows system with a Furthermore, the users can choose from two color schemes,
compatible version of .Net Framework. Windows Store light and dark. The last setting allows them to change the font
applications are developed for Windows 8 and 8.1 and cannot size; this facilitates the work with the application mostly for
run on other versions of the system. Windows 10 introduced seniors. There are three font sizes to choose from small,
Universal Windows Platform enabling the creation of medium and large.
applications compatible with all versions of Windows 10.
Applications are executable on desktop devices, mobile
phones, tablets or IoT devices. This type of universal
application cannot run on earlier versions of the system.
Windows 10 should be the final / last version of Windows
system, which should be further only updated. According to
the statistical data above, it is possible to deduce that the
demand for Windows 10 will continue to rise, even on the
grounds that the transition to this system version is offered
for free.
Model
MVVM
MVVM is an architectural pattern that is used to separate the Fig. 5. Database model
user interface from the application logic. It consists of three
In addition to the above-mentioned classes, storing and
logically separated parts Model, View and ViewModel
retrieving data from XML file, the Model part includes class
(Fig. 4).
DataContext. This class provides ViewModels with
access to the list of devices and rooms. If some of
ViewModels requests data provided by DataContext,
the data are retrieved from the XML file and any changes are
then made only in DataContext. Permanent storage will
be done only upon the user request.
ViewModel
devices. In case of lighting devices, the list only shows the It is possible to use two methods of connection to the bus -
fields for editing the addresses of sunblind functions. In case KNX IP tunnelling and KNX IP routing. KNX IP tunnelling
of devices of sunblind type, the list only shows the fields for enables communication between one external device and the
editing the addresses for controlling the blinds. This can be KNX bus (unicast). This is similar to connection via USB or
achieved by implementing the IValueConvertor serial interface. KNX IP routing uses a multicast address to
interface (Listing 5). It contains two methods, Convert and which telegrams are sent. Multicast address 224.0.23.12 is
ConvertBack. The Convert method, based on the input reserved for the KNX association. Various KNX devices
value (i.e. device type), returns the corresponding listen to this address and eventually perform their specified
Visibility enumeration. In this case, the requirements. To communicate with the KNX bus in the .Net
ConvertBack method is meaningless and may not be framework, it is possible to use Falcon SDK which is
implemented. provided directly by the KNX association. However, this
library cannot be used in case of UWP development.
public class Therefore, another solution has been chosen
CategoryToVisibilityLightsConverter : KNXLib.Portable library. This library is designed
IValueConverter specifically for use in the UWP development. The library
allows connection to and disconnection from the bus, as well
{ as sending actions on the bus. Connection to the bus takes
public object Convert(object value, Type
place when switching on the application; on the contrary, it is
targetType, object parameter,
necessary to disconnect the application from the bus when
string language)
closing the application. Telegrams are sent on the bus using
{
the Action method,
return ((int)value ==
(int)DeviceCategory.Lights) ? Visibility. Parameter with the group address and parameter with data to
Visible : Visibility.Collapsed; be sent on the bus are transmitted to the method. For
} example, Boolean value of true is sent to the group address
} for lighting control when switching on the lights (Listing 7).
Listing 5: IValueConvertor implementation GlobalContext.KNX.Action(lDevice.LightsOnOffAddress,
CategoryToVisibilityLightsConverter class true);
can then easily be used directly in the Listing 7: Switching on the lights
ConfigurationView screen. Attribute of the
Visibility element, which is to be displayed according In addition to the Boolean data type, in the parameter for
to the device type, is set using the Converter. It receives data, it is also possible to send byte on the bus or use already
information about the device type from element pre-defined data types (DPTs) in the library, which
cmbSelectedCategory. LightsVisibility is a correspond to the official definition of the KNX association.
static source representing DPTs are used to convert the values from the input interval
CategoryToVisibilityLightsConverter class into data that can be processed by the bus.
(Listing 6).
The result is a universal application for Windows 10, which Vanus, J., Kucera, P. & Koziorek, J. (2014b) Visualization
can run on a desktop version of the Windows 10 operating Software Designed to Control Operational and
system. Technical Functions in Smart Homes, in Silhavy, R.,
Senkerik, R., Oplatkova, Z. K., Silhavy, P. &
The work describes the use of MVVM architectural pattern Prokopova, Z. (eds), Modern Trends and Techniques in
for UWP development (Universal Window Platform). The Computer Science. Advances in Intelligent Systems and
application includes several settings that facilitate the work Computing, 559-569.
with the application not only for seniors but also for other Vanus, J., Koziorek, J. & Hercik, R. (2013) The Design of the
residents of the Smart Home. Application functionality was Voice Communication in Smart Home Care.
verified using a simulation panel with KNX components Fig. Vanus, J., Martinek, R., Bilik, P., Koziorek, J. & Dracka, A.
6), in testing the control of lights and sun blinds. Compared (2015a) Smart Home Remote Monitoring Using PI
to other works dealing with the creation of environment for System Management Tools. Proceedings of the 8th
controlling intelligent buildings, the resulting application is International Scientific Symposium on Electrical Power
configurable and is therefore applicable to any building Engineering (Elektroenergetika 2015), 384-387.
equipped with KNX bus system. The application could be Vanus, J., Smolon, M., Martinek, R., Koziorek, J., Zidek, J.
further extended in order to visualize the status of controlled & Bilik, P. (2015b) Testing of the voice communication
devices. It would also be possible to implement complex in smart home care. Human-Centric Computing and
commands (e.g. to draw the sun blinds and then switch on the Information Sciences, 5.
lights in the room) or scheduled tasks (e.g. to draw all the sun Vanus, J. & Styskala, V. (2010) Application of optimal
blinds for 17 hours). Another extension could be a link with settings of the LMS adaptive filter for speech signal
cloud storage for storing the current configuration and processing, Proceedings of the International
implementation of logging into the application. This would Multiconference on Computer Science and Information
simplify the application configuration which would take Technology, IMCSIT 2010.
place only once and the application could run with the same Vanus, J. & Styskala, V. (2011) Application of variations of
configuration from more devices. the LMS adaptive filter for voice communications with
ACKNOWLEDGMENT control system. Tehnicki Vjesnik, 18(4), 555-580.
Dvorak, J., Berger, O. & Krejcar, O. (2014) Universal
This paper has been elaborated within the framework of the Central Control of Home Appliances as an Expanding
project SP2016/146 of the Student Grant System, VSB-TU Element of the Smart Home Concepts - Case Study on
Ostrava, Czech Republic. Low Cost Smart Solution, in Saeed, K. & Snasel, V.
(eds), Computer Information Systems and Industrial
REFERENCES Management, Cisim 2014. Lecture Notes in Computer
Science. Berlin: Springer-Verlag Berlin, 479-488.
Bonino, D. & Procaccianti, G. (2014) Exploiting semantic
technologies in smart environments and grids: Emerging
roles and case studies. Science of Computer
Programming, 95, 112-134.
Brumbulli, M. & Gaudin, E. (2016) Towards Model-Driven
Simulation of the Internet of Things, in Cardin, M. A.,
Fong, S. H., Krob, D., Lui, P. C. & Tan, Y. H. (eds),
Complex Systems Design & Management Asia: Smart
Nations - Sustaining and Designing, Csd&M Asia 2016.
Advances in Intelligent Systems and Computing, 17-29.
Lee, J. W., Cho, S., Liu, S., Cho, K. & Helal, S. (2015)
Persim 3D: Context-Driven Simulation and Modeling of
Human Activities in Smart Spaces. Ieee Transactions on
Automation Science and Engineering, 12(4), 1243-1256.
Seo, D. W., Kim, H., Kim, J. S. & Lee, J. Y. (2016) Hybrid
reality-based user experience and evaluation of a
context-aware smart home. Computers in Industry, 76,
11-23.
Synnott, J., Nugent, C. & Jeffers, P. (2015) Simulation of
Smart Home Activity Datasets. Sensors, 15(6), 14162-
14179.
Vanus, J., Kucera, P. & Koziorek, J. (2014a) The Software
Analysis Used for Visualization of Technical Functions
Control in Smart Home Care, in Silhavy, R., Senkerik,
R., Oplatkova, Z. K., Silhavy, P. & Prokopova, Z. (eds),
Modern Trends and Techniques in Computer Science.
Advances in Intelligent Systems and Computing, 549-
558.