# NFC-Based User Interface for Smart Environments

Authors: Susanna Spinsante; Ennio Gambi
Journal: Advances in Human-Computer Interaction
 (2015)

---

## Abstract

The physical support of a home automation system, joined with a simplified user-system interaction modality, may allow people affected by motor impairments or limitations, such as elderly and disabled people, to live safely and comfortably at home, by improving their autonomy and facilitating the execution of daily life tasks. The proposed solution takes advantage of the Near Field Communications technology, which is simple and intuitive to use, to enable advanced user interaction. The user can perform normal daily activities, such as lifting a gate or closing a window, through a device enabled to read NFC tags containing the commands for the home automation system. A passive Smart Panel is implemented, composed of multiple Near Field Communications tags properly programmed, to enable the execution of both individual commands and so-calledscenarios. The work compares several versions of the proposed Smart Panel, differing for interrogation and composition of the single command, number of tags, and dynamic user interaction model, at a parity of the number of commands to issue. Main conclusions are drawn from the experimental results, about the effective adoption of Near Field Communications in smart assistive environments.


---

## Body

## 1. Introduction

Most of the developed countries are experiencing a demographic shift [1]: as an example, the life expectancy for males and females in Europe has increased from 45.7 and 49.6 to 75.0 and 79.9 years, respectively, in less than a century. Looking at long-term projections, the process of ageing is set to increase at an even faster pace; moreover, there is a growing concern about the low birth rate in industrialized countries. Demographic changes affect a wide range of economic and social fields, as well as policies concerned with health, social welfare, housing, and many other issues. Basically, most of the available research reports and studies claim that, despite a necessary significant financial investment at a first stage, the adoption of Ambient Assisted Living (AAL) technologies to support a safe and comfortable ageing process among population can really allow strong resource savings. As a matter of fact, population ageing will lead to an increase in the proportion of the population with physical or cognitive disabilities or chronic illnesses that, in turn, will lead to increasing expenses to cope with, by healthcare systems and social welfare, in general. With the adoption of AAL and related services [2, 3], elderly or disabled people will be able to stay longer in their home environment while being remotely supervised and possibly treated. In older people, the prevalence of chronic diseases generally increases with growing age. The natural ageing process is accompanied typically with a decay of the musculoskeletal system, with consequent reduction of mobility and resistance to effort. For this reason, it may be important to resort to the use of home automation technologies to avoid physical efforts during the normal daily life, replacing them by the appropriate action of actuator devices controlled by the home automation system. However, due to the comorbidity that typically affects elderly patients as a result of the ageing process, or impairments caused by partial disability, possible physical and/or cognitive limitations (loss of motor skills, or reduced hearing and visual capabilities) could prevent these users from efficiently performing some basic operations needed to interact with the technological platforms. Consequently, the design and implementation of effective user-system interaction modalities are of paramount importance, in order to really promote and boost the adoption of AAL technologies among users in real life scenarios.Near Field Communication (NFC) is a quite recent short-range, high-frequency, two-way communication technology based on the Radio Frequency Identification (RFID) principle. When two NFC-enabled devices (named Initiator and Target) are located near to each other, a peer-to-peer connection is established between them, and they both may send and receive information. Two operational modes, that is, active and passive, are possible for an NFC device. In the active mode, which is not possible in traditional RFID solutions, NFC peers may exchange messages; in the passive mode, one of the two nodes acts only as a passive tag. An NFC tag may store a given amount of information: a Universal Resource Locator (URL) addressing a specific resource on the web, the value of a specific measure, or figure [4]. NFC applications are gaining an increasing popularity [5], as many of the smart phones available in the market are now equipped with an NFC transceiver, which is used, as an example, in contactless transactions such as mobile payments and transit ticketing. Among the most widespread applications, smart posters and object tracking, based on the passive operational mode, may be cited. NFC may be also fruitfully employed to make pervasive computing environments more personalized, dynamic, and smart. NFC, as other contactless systems, is intended to be easy to use for everyday transactions, as the interaction is carried out with a simpletouch,swipe, ortap. By using these simple actions, NFC puts a sense of human control back into otherwise complex and unwieldy ubiquitous systems. Touch is a natural, expressive gesture and can be used to create satisfying interactions. The simple integration of tags into everyday objects and places, the low-cost of NFC components, and the adaptiveness of the NFC specifications are all examples of the ways in which this technology shows to be ubiquitous.The purpose of the research activity herein presented is to develop a solution, comprising both a software application and a hardware device, to enable NFC-based interaction between a specific class of users, that is, elderly with reduced physical performance or partially disabled people, and a home automation system, which represents the technological foundation for delivering AAL functionalities at the user’s premise. A rich amount of literature on user-system interface design exists, which presents a variety of solutions based on different combinations of physical devices and software applications. In the proposed solution, the main target of the user interface is to provide a simple though effective way to convey commands to the home automation system in order to replace the user’s actions required to, for example, open or close a shutter or a gate and relieve the user from performing physical efforts. Home automation systems shall react to commands in a very short time, so it is necessary to implement reliable and effective interfaces to limit as much as possible the processing time requested to elaborate a command. This motivates the suggested selection of the NFC technology that features easiness of use, flexibility, and very short interaction time, joined with a simplified graphical interface, which does not require any additional processing of the command issued by the user. With respect to control interfaces based on voice or gesture recognition, on one hand they usually require a significant processing capability to be robust and reliable and to adapt to each user’s specific features; on the other hand, they may be not suitable for users affected by motor impairments or limitations in the use of their body or limbs. On the contrary, researches show that the tapping capability declines later than other motor skills [6]. Previous works, such as the relevant papers by Prinz et al. [7] and Isomursu et al. [8], already showed the feasibility of NFC-based interaction for elderly or patients affected by impaired fine motor skills, despite the inherent complexity related to a huge variability in needs, requirements, and available residual capabilities. The design proposed for the Smart Panel described in the following sections makes it possible to implement it in different shapes, formats, and materials, thus giving the possibility to select the most suitable options according to older users’ needs. Further, the panel may be located in any possible comfortable location within the user’s home environment, as it does not need power supply or connection to the home automation system; it is possible to select the best position and location of the panel, following the user’s specific needs (e.g., a disabled user on a wheelchair) or preferences.The paper is organized as follows: Section2 provides an overview of the state of the art in the adoption of NFC for AAL. Section 3 discusses materials and methods adopted for project development and presents the NFC-based user interface solution, in either of its software or hardware components. Experimental tests and evaluations are discussed in Section 4; finally, Section 5 concludes the paper.


## 2. Related Work

While a number of works may be found in the scientific and technical literature, dealing with the adoption of the NFC technology in contactless transactions systems, or solutions for fast data transfer and access to online digital content [9, 10], not so many papers are available, at the authors’ best knowledge, about the use of NFC in Ambient Assisted Living applications.In [11], an innovative wearable, partially self-powered, health monitoring, and indoor localization shoe-mounted sensor module is presented. The system’s novel shoe role serves the double role of medical-grade temperature probe for human body monitoring and renewable energy scavenger, which transforms the human motion into electrical energy. Mounted on the shoe is also an NFC reader for proximity-based localization purposes. The reader interacts with NFC tags embedded into floor tiles to collect information useful for indoor localization of the subject and identification of the paths he is moving along. In [12], the authors propose novel application and framework that use an NFC phone to create a personalized digital home environment, that is, to set predefined personal preferences to control various home appliances. The feasibility of the framework is evaluated by simulations, but no specific settings or configurations are presented, targeted to elderly or disabled users.Köstinger et al. [13] developed a mobile ward round system, for use on Android platforms, which integrates and adopts NFC to perform automatic patient identification. The application is intended to improve medical workflows, so it does not directly apply to users in their home premises. Another example of a possible application based on NFC, in healthcare scenarios, is provided in [14] where a novel solution using a smartphone, integrated with an NFC reader and an NFC application, is developed to detect and update drug allergies and drug interactions for people with multimorbidity during medication administration.The architecture presented by Vergara et al. in [15] may be referred to as AAL, as it allows a person, who has partially lost the capability to live independently, to get prescribed medications directly at home, thus avoiding the need to go to the health center. This is done by inserting NFC tags in the packages of each drug; the tags carry both drug-specific information (such as name, code, and expiry date) and personal information, specific for each patient (such as dosage, way of assumption). The work presented in [16] aims at developing an application that allows blind elderly people to self-manage their daily medications, through the use of audio files. Each drug package contains an NFC tag: the user taps his phone near to the drug box, thus activating a text-to-speech application, which provides him with the instructions and information related to that drug. Finally, in [17], an NFC-based system is presented that should encourage elderly people to perform constant and daily outdoor activities, such as walking or jogging. Through a number of fixed NFC readers located in outdoor small towers, the architecture is able to monitor if the older adults really perform outdoor activities, as requested by their medical doctors, or not and automatically send related reports to medical operators.


## 3. Materials and Methods

### 3.1. The NFC Technology

NFC is a short-range radio communication technology that operates on the 13.56 MHz frequency, with data transfers from 106 up to 424 kbit/sec, in Amplitude Shift Keying (ASK) modulation. Transmission takes place over4÷10 cm distances, thus providing an almost intrinsic security of the communications. NFC-enabled smartphones were introduced to the market only in recent times, but a number of related commercial services have been soon developed. The technology is defined by a series of standards, provided by international standardization bodies such ISO/IEC and ECMA and by technical specifications provided by the Near Field Communication Forum [18], an association of companies that has the promotion, standardization, and implementation of NFC technology as its objective.As in RFID, the Near Field Communication takes place through an inductive coupling between the devices that have to exchange information. Besides active and passive operational modes, as discussed above, a third mode, calledcard emulation, is available. In the active communication mode, each device is powered and generates its own oscillating magnetic field that is used as a carrier on which data can be modulated. The communication is half-duplex, so the communicating devices enable or disable their own magnetic fields to transmit or receive data, respectively. In the passive mode of communication, one of the two devices, which need not be powered, does not generate its own magnetic field. In contrast, the second device generates a magnetic field modulated by the passive one, through variations in the magnitude of the field; they can be detected to collect the corresponding data. Finally, the card emulation mode allows NFC-enabled mobile phones to act as passive NFC tags, as in mobile ticketing applications, or services in which the NFC-enabled phone acts as an electronic card (access control).The adoption of NFC in AAL systems is motivated by a number of technical advantages. Since NFC does not require pairing of devices, in contrast to Bluetooth technology, users do not have to perform additional steps than just placing the NFC devices near to each other. The physical act of tapping the devices means the permission to establish a connection among them. Table1 summarizes a comparison between NFC, Bluetooth, and InfraRed technologies. Further advantages are the limited size of tags and the memory capacity, as well as the very low cost. NFC is not designed to transfer large amounts of data but rather to provide a quick and easy-to-implement type of wireless communication, which can serve as a bridge between already existing services, or may allow the creation of new type of services, specifically designed on NFC communication.Table 1
Comparison among NFC, Bluetooth, and InfraRed (IR) technologies.
Technology
Operating distance
Cost
Power consumption
Usability
Bluetooth
Small
Relatively high
Relatively high
Relatively complex
IR
Small
Relatively low
Relatively high
Simple
NFC
Very small
Low
Passive or very low
SimpleFor the purposes of the project herein presented, the NFC devices used are a commercial smartphone equipped with Android O.S. v.2.3, dual-core 1 GHz processor, NFC PN544 chip by NXP semiconductors, and a number of different passive tags, featuring a 64-byte memory, with a 46-byte payload dimension (39 bytes may be written; 7 bytes are used for message type definition and language); some of the tags have a physical diameter of27 mm, others 42 mm.The NFC Data Exchange Format (NDEF) protocol [19] describes the format to encapsulate data information inside NFC messages that are exchanged among NFC devices. When a tag is written by an NFC device for the first time, the field that defines the encoding type and the number of bytes for the language can be interpreted as a start-of-text, while, at the end of the message, there is a field that has the same but negative value of the former one, and this can be interpreted as an end-of-text flag. When the same tag is written for a second time, with an amount of data smaller than the previous payload, the oldest message is overwritten only in those bit positions necessary to store the new one. All the other bit positions remain unchanged. The NFC tag physically stores the value of those fields that are not overwritten.


### 3.2. The Reference Home Automation System

The home automation system we refer to in this paper is built upon a centralized framework, exploits common commercial hardware, and opens source software, suitably modified and adapted to the target application [20]. From a functional point of view, the system is composed of room control nodes, a module for handling in-the-room and external communications, and a module for the delivery of entertainment signals. Each room control node belongs to, and interfaces, a local network of sensors and actuators implemented over a Controller Area Network (CAN) bus. Local CAN nodes disseminated in each room provide sensing and command execution, such as presence monitoring and on/off light switching, but also sensing of external and internal light intensity variations. Room control nodes are also equipped with a WiFi transceiver to enable a wireless remote control of the system functionalities by means of a commercial tablet device. The device may be configured to work as an IP wireless phone, as a remote control, and as a video interphone receiver at the same time. The internal and external voice communications are handled by means of an IP Telephony Server, based on the Asterisk platform [21]. The multimedia and entertainment subsystem comprises the distribution of digital television channels to the active players on the basis of their requests. TCP connections are used for point-to-point streaming to enable congestion control by differentiating the bandwidth allocated to the various streams. A sketch of the home automation architecture considered is shown in Figure 1.Figure 1
The reference home automation system architecture.Peripheral CAN nodes (sensors and actuators), located in each room, transfer their data over a CAN bus to the room control module, where a CAN/Ethernet interface is located. CAN nodes exchange messages formatted according to a URL-like (Universal Resource Locator) syntax. Commands may be issued by means of simplehttp requests of the formhttp://BOARD:port/WorkingOut?parameters, whereparameters represents a text string having the formrid=2&id=2&pin=1&func=160&time=0. The requestedhttp resource identifies the command issued: in the example, the stringWorkingOut is associated with the activation of a given load controlled by a specific board (namedBOARD, in the example).Therid (requestID) parameter is a counter used to associate each request from a client with the corresponding response from the system;id represents the MAC address of the board which activates the specified load. Parameterpin locates the actuator to be activated among the three controlled by the same board;func is a three-valued parameter (0 = off, 255 = on, and 160 = Toggle command) that represents the state of the load, whereastime denotes the time validity of the command issued (time = 0 means immediate execution of the command). Further details about the management of system commands may be found in [20]. When the user activates a command through one of the available system interfaces (touchscreen, voice-based, and NFC-based), the underlying logic composes the correspondinghttp request by properly setting the required parameters (e.g., the MAC address of the board in the target room, which will activate the given load, or thepin necessary to locate the actuator to be activated). Once complete, eachhttp request is sent over the home data network.Figure2 shows a demo panel of the home automation system described above that has been used for experimental purposes in the development of the project. The demo panel provides the possibility of controlling the opening and closing of a shutter and a window and the on/off switching of the two lamps. The centralized control of the home automation system is enabled by connection to a WiFi capable switch that makes it possible to issuehttp commands to the system over a WiFi connection.Figure 2
Demo panel of the home automation system selected for experimental purposes.The home automation system requires a number of configuration files useful to describe the structure of the system deployed within a building. The files used in the experimental implementation are as follows:(i)
floors.dat: contains information about the floors in a building.(ii)
rooms.dat: contains information about rooms and areas in a floor.(iii)
lights.dat: contains data about the location of the lights in each room.(iv)
automatism.dat: contains information about the other automation elements located in each room.Figure 3 gives a pictorial representation of the home premise composition assumed for developing and testing purposes; the different configuration files have been populated accordingly.Figure 3
Home automation architecture assumed in the experimental development: one floor, several rooms (kitchen, dining room, bedrooms, bathroom, and corridor) equipped with different devices (lamps, windows, and shutters).


### 3.3. The Proposed NFC-Based Interaction System: Technical Components

#### 3.3.1. The Android Software Application

The software application designed for Android OS devices covers two main aspects of the NFC-based user-system interaction: the phase related to the configuration of the Smart Panel (consisting of writing commands into the tags) and the phase related to reading the tags present on the Smart Panel, their identification, and activation of the corresponding commands. The application is also designed to perform a number of checks on the information gathered from tags, during user’s interaction through NFC, in order to ensure that properly formatted commands are always delivered to the home automation system.The application, namedNFC-Home Control, is composed of seven so-calledactivities and a submenu for option management. From the main activity,HomeControlNFC.java, all the others may be called as shown in the diagram of Figure 4.Figure 4
Logic architecture of theNFC-Home Control software application: relationships amongactivities.The role and functionalities associated with each activity are as follows:(i)
ActivitiesSmartPanel1.java andSmartPanel3.java refer to the configuration of single control commands for different versions of the Smart Panel (1P and 3P), the details of which are provided in the following section; both activities, in their turn, may call theSce.java activity, dealing with the configuration of multiple commands to control the activation of different scenarios.(ii)
ActivityRead.java manages the tag reading operations performed through the NFC-enabled device.(iii)
ActivityAppProva2.java is used as a backup, when a manual control of the home automation system is requested, for example, for maintenance purposes.(iv)
ActivityPreferences.java manages theoption submenu that may be accessed from the general settings menu of the reading device.The graphical interface of the application, shown in Figure 5, allows selecting the desired activity to perform tag reading operations, to check the home automation system, or to configure commands. The application may be started manually by the user by selecting its icon on the Android device screen or automatically when the user taps an NFC tag to read and issue the associated command. In the latter case, theRead.java activity is launched.Figure 5
Graphical interface of theNFC-Home Control Android application.


#### 3.3.2. Management of Command-Related Data

The software application is designed in such a way as to be able to recognize and manage any possible message and command that may be issued to the home automation system. To do so, a specific method is executed as soon as the application is launched. The method allocates a 3-dimensional data structure, which will host the different fields composing a valid command for the home automation system. The data structure can be imagined as a matrix, with as many columns as the number of rooms equipped with home automation facilities, as many rows as the number of devices that may be controlled by the system, and a two-valued depth dimension, which takes the value “0” for the commandoff and the value “1” for the commandon. Each single cell of the matrix contains value “0” if the corresponding device is not present in the designed room. If the cell of the matrix corresponds to a light device that may be controlled through a single command, the value stored in the matrix is in the form(type, id, pin, value, time), where each parameter assumes the meaning discussed in Section 3.2; if the cell of the matrix corresponds to other automated devices (windows or shutters), the value stored in the matrix is in the form(type, id, pin, value, id, pin, value, time), wheretype may take the value “S” or “D” according to the type of command (single or double). The 3-dimensional data structure is populated at the time the application is launched, after the different configuration files of the home automation system have been downloaded from the web server the automation system is equipped with.


#### 3.3.3. Tag Writing: Message Formatting Protocol

The operation of writing commands into NFC tags is supported by the Android application through the proper activity according to the Smart Panel version selected (1P or 3P). When the Smart Panel version 1P is implemented, each tag contains a fully formed command, thus requiring a single tag reading operation. In this case, the command messages written on tags have the formats shown in Figures6(a) and 6(b) for light devices and other automated devices, respectively.Figure 6
Message fields format for Smart Panel version 1P: (a) command for light devices; (b) command for other automated devices.
(a)
(b)When the Smart Panel version 3P is implemented, the format of message fields changes as shown in Figure7: the last field identifies the specific coordinates of the cell element in the 3-dimensional data structure described above that hosts all the possible commands for the home automation system. In both cases, the value in the fieldpanel identifies the specific version of the Smart Panel in use. When the command refers to a fixed scenario, that is, one of the four discussed in Section 4.2, the last field of Figure 7 is replaced by a string which identifies the specific scenario to implement that includes several controls.Figure 7
Message fields format for Smart Panel version 3P.Once a tag is correctly written by the application, a haptic feedback is provided to the operator by exploiting the native vibration feature of the NFC-enabled device.


#### 3.3.4. Tag Reading Operations and Checks

As previously stated, the application is automatically launched as soon as a tag is read by the NFC-enabled device. In order to avoid the creation of several instances of the same activityRead.java, at each reading operation a proper software check is performed. Another important feature deals with the feedback generated by the application: at each step during the tag reading process, the application provides suitable notifications (visual, acoustic, and haptic ones) to the user to signal the correct execution of a given operation or the need to repeat it. In fact, apart from the case of 1P Smart Panel, for which a single reading operation is enough to issue a command, in the other cases, the user has to query several tags to build a properly formatted command message. Figure 8 shows a sequence of graphic notifications provided by the application during the process of single command composition for Smart Panel version 3P, which requires to query 3 different tags: the visual notifications provided by the application confirm the correct composition of the command message.Figure 8
Sequence of visual notifications provided by the application to signal the correct composition of a command for the case of Smart Panel version 3P.In case one of the steps requested to properly format a command message is not performed or gives errors, the application is able to save the information gathered up to that event and ask for repetition of the last step that generated an error. On the other hand, the application also checks the time needed by the user to complete the message construction: if more than a given amount of time (specified by a configurable parameterTimeOut) elapses, before the command generation has been completed, a notification message is output, asking for repetition of the procedure. This parameter may be tailored according to the intended user of the application, thus giving more time for message composition to elderly or impaired users. When the message composition procedure terminates successfully, the corresponding command is delivered to the home automation system in the requestedhttp format. Similar procedures and checks apply also to the generation of command messages to control scenarios and to the messages referred to other activities foreseen by the application.


## 3.1. The NFC Technology

NFC is a short-range radio communication technology that operates on the 13.56 MHz frequency, with data transfers from 106 up to 424 kbit/sec, in Amplitude Shift Keying (ASK) modulation. Transmission takes place over4÷10 cm distances, thus providing an almost intrinsic security of the communications. NFC-enabled smartphones were introduced to the market only in recent times, but a number of related commercial services have been soon developed. The technology is defined by a series of standards, provided by international standardization bodies such ISO/IEC and ECMA and by technical specifications provided by the Near Field Communication Forum [18], an association of companies that has the promotion, standardization, and implementation of NFC technology as its objective.As in RFID, the Near Field Communication takes place through an inductive coupling between the devices that have to exchange information. Besides active and passive operational modes, as discussed above, a third mode, calledcard emulation, is available. In the active communication mode, each device is powered and generates its own oscillating magnetic field that is used as a carrier on which data can be modulated. The communication is half-duplex, so the communicating devices enable or disable their own magnetic fields to transmit or receive data, respectively. In the passive mode of communication, one of the two devices, which need not be powered, does not generate its own magnetic field. In contrast, the second device generates a magnetic field modulated by the passive one, through variations in the magnitude of the field; they can be detected to collect the corresponding data. Finally, the card emulation mode allows NFC-enabled mobile phones to act as passive NFC tags, as in mobile ticketing applications, or services in which the NFC-enabled phone acts as an electronic card (access control).The adoption of NFC in AAL systems is motivated by a number of technical advantages. Since NFC does not require pairing of devices, in contrast to Bluetooth technology, users do not have to perform additional steps than just placing the NFC devices near to each other. The physical act of tapping the devices means the permission to establish a connection among them. Table1 summarizes a comparison between NFC, Bluetooth, and InfraRed technologies. Further advantages are the limited size of tags and the memory capacity, as well as the very low cost. NFC is not designed to transfer large amounts of data but rather to provide a quick and easy-to-implement type of wireless communication, which can serve as a bridge between already existing services, or may allow the creation of new type of services, specifically designed on NFC communication.Table 1
Comparison among NFC, Bluetooth, and InfraRed (IR) technologies.
Technology
Operating distance
Cost
Power consumption
Usability
Bluetooth
Small
Relatively high
Relatively high
Relatively complex
IR
Small
Relatively low
Relatively high
Simple
NFC
Very small
Low
Passive or very low
SimpleFor the purposes of the project herein presented, the NFC devices used are a commercial smartphone equipped with Android O.S. v.2.3, dual-core 1 GHz processor, NFC PN544 chip by NXP semiconductors, and a number of different passive tags, featuring a 64-byte memory, with a 46-byte payload dimension (39 bytes may be written; 7 bytes are used for message type definition and language); some of the tags have a physical diameter of27 mm, others 42 mm.The NFC Data Exchange Format (NDEF) protocol [19] describes the format to encapsulate data information inside NFC messages that are exchanged among NFC devices. When a tag is written by an NFC device for the first time, the field that defines the encoding type and the number of bytes for the language can be interpreted as a start-of-text, while, at the end of the message, there is a field that has the same but negative value of the former one, and this can be interpreted as an end-of-text flag. When the same tag is written for a second time, with an amount of data smaller than the previous payload, the oldest message is overwritten only in those bit positions necessary to store the new one. All the other bit positions remain unchanged. The NFC tag physically stores the value of those fields that are not overwritten.


## 3.2. The Reference Home Automation System

The home automation system we refer to in this paper is built upon a centralized framework, exploits common commercial hardware, and opens source software, suitably modified and adapted to the target application [20]. From a functional point of view, the system is composed of room control nodes, a module for handling in-the-room and external communications, and a module for the delivery of entertainment signals. Each room control node belongs to, and interfaces, a local network of sensors and actuators implemented over a Controller Area Network (CAN) bus. Local CAN nodes disseminated in each room provide sensing and command execution, such as presence monitoring and on/off light switching, but also sensing of external and internal light intensity variations. Room control nodes are also equipped with a WiFi transceiver to enable a wireless remote control of the system functionalities by means of a commercial tablet device. The device may be configured to work as an IP wireless phone, as a remote control, and as a video interphone receiver at the same time. The internal and external voice communications are handled by means of an IP Telephony Server, based on the Asterisk platform [21]. The multimedia and entertainment subsystem comprises the distribution of digital television channels to the active players on the basis of their requests. TCP connections are used for point-to-point streaming to enable congestion control by differentiating the bandwidth allocated to the various streams. A sketch of the home automation architecture considered is shown in Figure 1.Figure 1
The reference home automation system architecture.Peripheral CAN nodes (sensors and actuators), located in each room, transfer their data over a CAN bus to the room control module, where a CAN/Ethernet interface is located. CAN nodes exchange messages formatted according to a URL-like (Universal Resource Locator) syntax. Commands may be issued by means of simplehttp requests of the formhttp://BOARD:port/WorkingOut?parameters, whereparameters represents a text string having the formrid=2&id=2&pin=1&func=160&time=0. The requestedhttp resource identifies the command issued: in the example, the stringWorkingOut is associated with the activation of a given load controlled by a specific board (namedBOARD, in the example).Therid (requestID) parameter is a counter used to associate each request from a client with the corresponding response from the system;id represents the MAC address of the board which activates the specified load. Parameterpin locates the actuator to be activated among the three controlled by the same board;func is a three-valued parameter (0 = off, 255 = on, and 160 = Toggle command) that represents the state of the load, whereastime denotes the time validity of the command issued (time = 0 means immediate execution of the command). Further details about the management of system commands may be found in [20]. When the user activates a command through one of the available system interfaces (touchscreen, voice-based, and NFC-based), the underlying logic composes the correspondinghttp request by properly setting the required parameters (e.g., the MAC address of the board in the target room, which will activate the given load, or thepin necessary to locate the actuator to be activated). Once complete, eachhttp request is sent over the home data network.Figure2 shows a demo panel of the home automation system described above that has been used for experimental purposes in the development of the project. The demo panel provides the possibility of controlling the opening and closing of a shutter and a window and the on/off switching of the two lamps. The centralized control of the home automation system is enabled by connection to a WiFi capable switch that makes it possible to issuehttp commands to the system over a WiFi connection.Figure 2
Demo panel of the home automation system selected for experimental purposes.The home automation system requires a number of configuration files useful to describe the structure of the system deployed within a building. The files used in the experimental implementation are as follows:(i)
floors.dat: contains information about the floors in a building.(ii)
rooms.dat: contains information about rooms and areas in a floor.(iii)
lights.dat: contains data about the location of the lights in each room.(iv)
automatism.dat: contains information about the other automation elements located in each room.Figure 3 gives a pictorial representation of the home premise composition assumed for developing and testing purposes; the different configuration files have been populated accordingly.Figure 3
Home automation architecture assumed in the experimental development: one floor, several rooms (kitchen, dining room, bedrooms, bathroom, and corridor) equipped with different devices (lamps, windows, and shutters).


## 3.3. The Proposed NFC-Based Interaction System: Technical Components

### 3.3.1. The Android Software Application

The software application designed for Android OS devices covers two main aspects of the NFC-based user-system interaction: the phase related to the configuration of the Smart Panel (consisting of writing commands into the tags) and the phase related to reading the tags present on the Smart Panel, their identification, and activation of the corresponding commands. The application is also designed to perform a number of checks on the information gathered from tags, during user’s interaction through NFC, in order to ensure that properly formatted commands are always delivered to the home automation system.The application, namedNFC-Home Control, is composed of seven so-calledactivities and a submenu for option management. From the main activity,HomeControlNFC.java, all the others may be called as shown in the diagram of Figure 4.Figure 4
Logic architecture of theNFC-Home Control software application: relationships amongactivities.The role and functionalities associated with each activity are as follows:(i)
ActivitiesSmartPanel1.java andSmartPanel3.java refer to the configuration of single control commands for different versions of the Smart Panel (1P and 3P), the details of which are provided in the following section; both activities, in their turn, may call theSce.java activity, dealing with the configuration of multiple commands to control the activation of different scenarios.(ii)
ActivityRead.java manages the tag reading operations performed through the NFC-enabled device.(iii)
ActivityAppProva2.java is used as a backup, when a manual control of the home automation system is requested, for example, for maintenance purposes.(iv)
ActivityPreferences.java manages theoption submenu that may be accessed from the general settings menu of the reading device.The graphical interface of the application, shown in Figure 5, allows selecting the desired activity to perform tag reading operations, to check the home automation system, or to configure commands. The application may be started manually by the user by selecting its icon on the Android device screen or automatically when the user taps an NFC tag to read and issue the associated command. In the latter case, theRead.java activity is launched.Figure 5
Graphical interface of theNFC-Home Control Android application.


### 3.3.2. Management of Command-Related Data

The software application is designed in such a way as to be able to recognize and manage any possible message and command that may be issued to the home automation system. To do so, a specific method is executed as soon as the application is launched. The method allocates a 3-dimensional data structure, which will host the different fields composing a valid command for the home automation system. The data structure can be imagined as a matrix, with as many columns as the number of rooms equipped with home automation facilities, as many rows as the number of devices that may be controlled by the system, and a two-valued depth dimension, which takes the value “0” for the commandoff and the value “1” for the commandon. Each single cell of the matrix contains value “0” if the corresponding device is not present in the designed room. If the cell of the matrix corresponds to a light device that may be controlled through a single command, the value stored in the matrix is in the form(type, id, pin, value, time), where each parameter assumes the meaning discussed in Section 3.2; if the cell of the matrix corresponds to other automated devices (windows or shutters), the value stored in the matrix is in the form(type, id, pin, value, id, pin, value, time), wheretype may take the value “S” or “D” according to the type of command (single or double). The 3-dimensional data structure is populated at the time the application is launched, after the different configuration files of the home automation system have been downloaded from the web server the automation system is equipped with.


### 3.3.3. Tag Writing: Message Formatting Protocol

The operation of writing commands into NFC tags is supported by the Android application through the proper activity according to the Smart Panel version selected (1P or 3P). When the Smart Panel version 1P is implemented, each tag contains a fully formed command, thus requiring a single tag reading operation. In this case, the command messages written on tags have the formats shown in Figures6(a) and 6(b) for light devices and other automated devices, respectively.Figure 6
Message fields format for Smart Panel version 1P: (a) command for light devices; (b) command for other automated devices.
(a)
(b)When the Smart Panel version 3P is implemented, the format of message fields changes as shown in Figure7: the last field identifies the specific coordinates of the cell element in the 3-dimensional data structure described above that hosts all the possible commands for the home automation system. In both cases, the value in the fieldpanel identifies the specific version of the Smart Panel in use. When the command refers to a fixed scenario, that is, one of the four discussed in Section 4.2, the last field of Figure 7 is replaced by a string which identifies the specific scenario to implement that includes several controls.Figure 7
Message fields format for Smart Panel version 3P.Once a tag is correctly written by the application, a haptic feedback is provided to the operator by exploiting the native vibration feature of the NFC-enabled device.


### 3.3.4. Tag Reading Operations and Checks

As previously stated, the application is automatically launched as soon as a tag is read by the NFC-enabled device. In order to avoid the creation of several instances of the same activityRead.java, at each reading operation a proper software check is performed. Another important feature deals with the feedback generated by the application: at each step during the tag reading process, the application provides suitable notifications (visual, acoustic, and haptic ones) to the user to signal the correct execution of a given operation or the need to repeat it. In fact, apart from the case of 1P Smart Panel, for which a single reading operation is enough to issue a command, in the other cases, the user has to query several tags to build a properly formatted command message. Figure 8 shows a sequence of graphic notifications provided by the application during the process of single command composition for Smart Panel version 3P, which requires to query 3 different tags: the visual notifications provided by the application confirm the correct composition of the command message.Figure 8
Sequence of visual notifications provided by the application to signal the correct composition of a command for the case of Smart Panel version 3P.In case one of the steps requested to properly format a command message is not performed or gives errors, the application is able to save the information gathered up to that event and ask for repetition of the last step that generated an error. On the other hand, the application also checks the time needed by the user to complete the message construction: if more than a given amount of time (specified by a configurable parameterTimeOut) elapses, before the command generation has been completed, a notification message is output, asking for repetition of the procedure. This parameter may be tailored according to the intended user of the application, thus giving more time for message composition to elderly or impaired users. When the message composition procedure terminates successfully, the corresponding command is delivered to the home automation system in the requestedhttp format. Similar procedures and checks apply also to the generation of command messages to control scenarios and to the messages referred to other activities foreseen by the application.


## 3.3.1. The Android Software Application

The software application designed for Android OS devices covers two main aspects of the NFC-based user-system interaction: the phase related to the configuration of the Smart Panel (consisting of writing commands into the tags) and the phase related to reading the tags present on the Smart Panel, their identification, and activation of the corresponding commands. The application is also designed to perform a number of checks on the information gathered from tags, during user’s interaction through NFC, in order to ensure that properly formatted commands are always delivered to the home automation system.The application, namedNFC-Home Control, is composed of seven so-calledactivities and a submenu for option management. From the main activity,HomeControlNFC.java, all the others may be called as shown in the diagram of Figure 4.Figure 4
Logic architecture of theNFC-Home Control software application: relationships amongactivities.The role and functionalities associated with each activity are as follows:(i)
ActivitiesSmartPanel1.java andSmartPanel3.java refer to the configuration of single control commands for different versions of the Smart Panel (1P and 3P), the details of which are provided in the following section; both activities, in their turn, may call theSce.java activity, dealing with the configuration of multiple commands to control the activation of different scenarios.(ii)
ActivityRead.java manages the tag reading operations performed through the NFC-enabled device.(iii)
ActivityAppProva2.java is used as a backup, when a manual control of the home automation system is requested, for example, for maintenance purposes.(iv)
ActivityPreferences.java manages theoption submenu that may be accessed from the general settings menu of the reading device.The graphical interface of the application, shown in Figure 5, allows selecting the desired activity to perform tag reading operations, to check the home automation system, or to configure commands. The application may be started manually by the user by selecting its icon on the Android device screen or automatically when the user taps an NFC tag to read and issue the associated command. In the latter case, theRead.java activity is launched.Figure 5
Graphical interface of theNFC-Home Control Android application.


## 3.3.2. Management of Command-Related Data

The software application is designed in such a way as to be able to recognize and manage any possible message and command that may be issued to the home automation system. To do so, a specific method is executed as soon as the application is launched. The method allocates a 3-dimensional data structure, which will host the different fields composing a valid command for the home automation system. The data structure can be imagined as a matrix, with as many columns as the number of rooms equipped with home automation facilities, as many rows as the number of devices that may be controlled by the system, and a two-valued depth dimension, which takes the value “0” for the commandoff and the value “1” for the commandon. Each single cell of the matrix contains value “0” if the corresponding device is not present in the designed room. If the cell of the matrix corresponds to a light device that may be controlled through a single command, the value stored in the matrix is in the form(type, id, pin, value, time), where each parameter assumes the meaning discussed in Section 3.2; if the cell of the matrix corresponds to other automated devices (windows or shutters), the value stored in the matrix is in the form(type, id, pin, value, id, pin, value, time), wheretype may take the value “S” or “D” according to the type of command (single or double). The 3-dimensional data structure is populated at the time the application is launched, after the different configuration files of the home automation system have been downloaded from the web server the automation system is equipped with.


## 3.3.3. Tag Writing: Message Formatting Protocol

The operation of writing commands into NFC tags is supported by the Android application through the proper activity according to the Smart Panel version selected (1P or 3P). When the Smart Panel version 1P is implemented, each tag contains a fully formed command, thus requiring a single tag reading operation. In this case, the command messages written on tags have the formats shown in Figures6(a) and 6(b) for light devices and other automated devices, respectively.Figure 6
Message fields format for Smart Panel version 1P: (a) command for light devices; (b) command for other automated devices.
(a)
(b)When the Smart Panel version 3P is implemented, the format of message fields changes as shown in Figure7: the last field identifies the specific coordinates of the cell element in the 3-dimensional data structure described above that hosts all the possible commands for the home automation system. In both cases, the value in the fieldpanel identifies the specific version of the Smart Panel in use. When the command refers to a fixed scenario, that is, one of the four discussed in Section 4.2, the last field of Figure 7 is replaced by a string which identifies the specific scenario to implement that includes several controls.Figure 7
Message fields format for Smart Panel version 3P.Once a tag is correctly written by the application, a haptic feedback is provided to the operator by exploiting the native vibration feature of the NFC-enabled device.


## 3.3.4. Tag Reading Operations and Checks

As previously stated, the application is automatically launched as soon as a tag is read by the NFC-enabled device. In order to avoid the creation of several instances of the same activityRead.java, at each reading operation a proper software check is performed. Another important feature deals with the feedback generated by the application: at each step during the tag reading process, the application provides suitable notifications (visual, acoustic, and haptic ones) to the user to signal the correct execution of a given operation or the need to repeat it. In fact, apart from the case of 1P Smart Panel, for which a single reading operation is enough to issue a command, in the other cases, the user has to query several tags to build a properly formatted command message. Figure 8 shows a sequence of graphic notifications provided by the application during the process of single command composition for Smart Panel version 3P, which requires to query 3 different tags: the visual notifications provided by the application confirm the correct composition of the command message.Figure 8
Sequence of visual notifications provided by the application to signal the correct composition of a command for the case of Smart Panel version 3P.In case one of the steps requested to properly format a command message is not performed or gives errors, the application is able to save the information gathered up to that event and ask for repetition of the last step that generated an error. On the other hand, the application also checks the time needed by the user to complete the message construction: if more than a given amount of time (specified by a configurable parameterTimeOut) elapses, before the command generation has been completed, a notification message is output, asking for repetition of the procedure. This parameter may be tailored according to the intended user of the application, thus giving more time for message composition to elderly or impaired users. When the message composition procedure terminates successfully, the corresponding command is delivered to the home automation system in the requestedhttp format. Similar procedures and checks apply also to the generation of command messages to control scenarios and to the messages referred to other activities foreseen by the application.


## 4. Results and Discussion

A number of experimental tests have been carried out in the laboratory, in order to check the correct behavior of the NFC solution presented above, in terms of proper delivery of commands to the home automation system, suitable design of the Smart Panel adopted as the user-system physical interface, precision of the NFC reader in detecting and collecting data from NFC tags, and power consumption due to the software application execution on the smartphone equipped with the NFC reader. This section presents the main results obtained and discusses a number of issues which emerged during the experimental validation of the proposed NFC-based solution for AAL applications.


### 4.1. Functional Tests

Functional tests have been executed in a laboratory facility, by exploiting the demo home automation prototype previously presented, to verify the correct execution of any possible command foreseen by the system and to eventually correct and improve the application implemented. In addition, the delay affecting command delivery, which is almost always less than 3 seconds, has been verified as adequate for ensuring correct execution by the home automation system. Figures9 and 10 show two sample experiments, dealing with the control of a single light and of a set of home equipment items by means of a scenario activation, respectively.Figure 9
NFC interaction to control a single light in the home automation system: a magnified view of the Smart Panel and the application interface is provided.Figure 10
NFC interaction to control several equipment items in the home automation system, by means of a scenario command. A magnified view of the Smart Panel and the application interface is provided.


### 4.2. Smart Panel Design Options

The role of the Smart Panel is to provide a pictorial and instantaneous representation of the commands that may be issued to the home automation system by simply tapping the NFC reader close to the panel itself. Each graphic element corresponds to a tag; the panel is totally passive, so it does not need power supply and may be easily moved and implemented in different shapes and formats. Irrespective of the specific format chosen for the panel, it always supports both single and multiple commands: a single command (single control) causes a state change in a single device of the home automation syste, and may be composed of either single or multiple tag readings; a multiple command (scenery control) implements a so-calledscenario; that is, it causes a state change in several devices and equipment managed by the home automation system up to a whole room or the whole building.The Smart Panel has been designed in three different versions, shown in Figures11(a), 11(b), and 11(c). Each version supports the same set of multiple commands for scenery control, evidenced by a box, whereas they differ for the section related to single commands. The supported multiple (scenery) commands are the following:(i)
Goodbye Home turns off all the lights and closes all the shutters and windows. It pilots common actions performed when a user leaves the house.(ii)
Welcome Home-Night turns on the lights of the hall, the living room, and the kitchen. It pilots common actions carried out when a user comes back home during the night.(iii)
Welcome Home-Day raises all dampers. It pilots habitual actions carried out when a user enters the home during the day.(iv)
Good Morning turns up the shutters in the kitchen, the bathroom, and the dining room. It pilots habitual actions performed when a user wakes up in the morning.All the versions of the panel also provide an information tag, which allows the reader to connect to a help page describing how to use the home automation system.Figure 11
Three versions for the Smart Panel: (a) 1P, (b) 2P, and (c) 3P. The framed areas show the common scenery-commands section of the panels.
(a)
(b)
(c)Each version of the panel provides a different way to manage single commands. In Panel 1P (Figure11(a)), the minimum number of tag readings necessary to issue a command equals 1. In fact, the number of single devices present in the home automation system is named D and the number of tags in the panel is  T1P; we have T1P=2·D, as, for each device, both theon andoff commands shall be provided. For simplicity, tags are collected into groups referred to each room. In Panel 2P (Figure 11(b)), the minimum number of tag readings necessary to issue a command equals 2. In fact, in this case, T2P=D+2+1: for each device in the home automation system, a corresponding tag is present in the panel, plus a couple of tags corresponding toon andoff commands. Another tag shall be added to enable thecancel operation in case the user performs an erroneous reading and the procedure has to be repeated. This way, first the user has to tap a tag to select the specific device he wants to control and then a second tag to issue the command. Finally, Panel 3P (Figure 11(c)) requires at least 3 tag readings to issue a command: the user has to first select the room where the device he wants to control is located, then the type of device, and finally the command to issue. Table 2 summarizes a comparison among 1P, 2P, and 3P, at a parity of the home automation system configuration, in terms of number of tags and number of reading operations the user has to perform, to issue a specific command. Given the target of the proposed project, that is, AAL applications and services, the preferred option should be given by 1P, which features the simplest user-system interaction. For the purposes of the project, both 1P and 3P versions were implemented and tested.Table 2
Comparison among panel versions: 1P, 2P, and 3P.
Feature
1P
2P
3P
Total # tags
41
27
20
# info. tags
1
1
1
# cancel tags
0
1
1
# single control tags
34
19
12
# scenery control tags
6
6
6
# reading operations
1
2
3


### 4.3. Issues in User Interaction with the Smart Panel

Despite the advantages of the simple and intuitive interaction enabled by NFC, some technical issues related to the use of the Smart Panel exist that could affect the correct delivery of commands to the home automation system. They can be managed through suitable verification steps, implemented by the code of the software application running on the NFC capable device.


#### 4.3.1. The NFC Tag Is Partially Detected or Not Detected at All

If the tag is read or written incorrectly, or partially, because the proper action is not completed, the software application must raise a warning to the user, as an example, by a particular sound feedback, thus giving him the opportunity to finish the reading or writing action previously undertaken. To do so, according to the type of panel, the application checks the correct syntactic construction of the command message as long as the user interacts with the NFC tags.


#### 4.3.2. The NFC Tag Contains a Noncompliant Message

If the tag is successfully read but contains a message which is not recognized by the application, the user is alerted about the noncompliance of the message and given the opportunity to finish the action.


#### 4.3.3. Checking the Proper Composition of the Command

This control applies to the Smart Panel version 3P and guides the user along the correct composition of the commands addressed to home automation system. The actions required to correctly compose a command message are the following: first, read the tag “room”; second, read the tag “device”; and finally, read the tag “command.” If the user mistakes the procedure, the application warns him of the incorrect reading and gives him the possibility of continuing the reading action from the last correct step.


#### 4.3.4. Timeout in Message Composition

In case the reading of a tag is suspended for an unknown amount of seconds during the composition of a message, a timeout occurs, which brings back the user to the initial step in the message composition procedure.Other checks are automatically performed by the application when it is used to write information on the tags; as an example, it is possible to start a new tag writing operation only after the previous one has been confirmed, thus avoiding undesired writing events. As a final remark, if the Smart Panel is implemented on a metallic surface, suitable tags shall be applied that are able to counteract the disturbances arising during RF interactions with the NFC reader.


### 4.4. NFC Tag Detection Performance

In order to evaluate the efficacy and reliability of the interaction between NFC reader and tags, a preliminary test has been performed related to the maximum acceptable vertical distance between the reader and the tag and the minimum distance among different tags located on the same plane with respect to the reader or piled one over the other. The former test allows estimating the supported range of RF interaction between reader and tag, that is, how much close to the Smart Panel the user should interact; the latter evaluates the minimum separating distance among tags to avoid interference from their responses, causing erroneous command readings. This information is important in order to evaluate the suitability of the Smart Panel design to the user’s specific requirements, due, for example, to a reduced control of hand movements. Two commercial smartphones equipped with NFC transceiver have been used for test purposes, featuring different dimensions (116×59mm2 for smartphone S1, 136.6×70.6mm2 for smartphone S2) and different location of the onboard NFC transceiver. The results obtained by experimental tests are summarized in Table 3. It is clear that different devices may provide different performance: smartphone S2 is able to interact with NFC tags at a longer distance than S1, without any problems in separating signals modulated by different tags located in adjacent positions. In any case, even the performance provided by S1 is more than acceptable, for the purposes of the present work.Table 3
Performance of NFC reader-tag interaction.
Interaction
S1
S2
Maximum height reader-tag
2.4–2.8 cm
3.3 cm
Minimum distance tag-tag
2.5–3 cm
Adjacent
Minimum height tag-tag
1 cm
Adjacent


### 4.5. Power Consumption due to NFC Interactions

The analysis of power consumption due to NFC interactions aims at estimating, in percentage terms, the actual battery consumption due to tag reading operations and to the NFC module itself and the current consumption of the NFC controller the reading device is equipped with. To evaluate the actual consumption due to NFC tag reading operations, several tests have been performed, at a parity of the reading device (a commercial smartphone), by varying the way the device was used. In each test of 1-hour duration, 15 tag readings’ operation is executed; the WiFi transceiver is switched off, and the initial battery level is 100%. Power consumption is estimated by means of thebattery usage tool, natively provided by the Android OS. This tool provides, in percentage terms, the level of battery use due to the various processes, such as display, standby, and Android System. By contrast, the tool does not provide directly the figure for the process that manages the NFC module, because it is embedded into the general Android System process figure. Table 4 summarizes the experimental results obtained in three different conditions of smartphone usage within an hour, that is, high usage level, low usage level, and medium usage level. The results show how the percentage value of the figure Android System (that embeds the NFC-related figure), for a fixed number of readings, strongly depends on the phone usage profile.Table 4
Estimated percent of power consumption due to NFC tag reading operations.
Figure
Test 1
Test 2
Test 3
Usage level
High
Low
Medium
Battery level reduction in 1 hour
7%
2%
3%
Display consumption
82%
66%
69%
Standby consumption
5%
15%
6%
Android assistant consumption
4%
2%
2%
Android OS
4%
5%
7%
Inactive phone
3%
9%
3%
Android System
2%
3%
1%In order to evaluate the power consumption due to the NFC module, irrespective of the number of reading operations performed, the duration of a discharge cycle of the battery (from 100% to 5% level) has been evaluated, with the NFC module switched on and off. A number of conditions have been imposed in order to reduce the uncontrollable effects due to other processes, that is,(i)
WiFi interface off;(ii)
Internet connection off;(iii)
maximum display brightness;(iv)
display on for 30 minutes (every 28 minutes the display was reactivated);(v)
phone SIM removed;(vi)
phone ringtone off, phone vibration on, and display rotation on.Table 5 shows that, on average, the duration of the discharge cycle of the smartphone battery is reduced by an amount of 9.12% when the NFC module is switched on. Finally, according to the PN544 NFC controller datasheet [22, 23], the amount of current absorption in RF active mode and power down mode differs at about four orders of magnitude, from 3 μA to 60 mA.Table 5
Battery discharge cycle duration due to NFC controller.
Discharge cycle duration (hh:mm:ss)
Discharge cycle duration in seconds
NFC on
04:37:31
16651
NFC off
05:05:22
18322


### 4.6. Validation of the Proposal

With the aim of a first and preliminary evaluation of the user acceptance of the proposed system interface based on NFC, several tests have been carried out at the Telecommunications Lab of the Marche Polytechnic University, where the demo panel of the home automation system shown in Figure2 is located. Due to the need of testing the NFC-based interface together with the underlying home automation system, and the impossibility of gathering elderly users in the lab environment, the tests discussed within this section were carried out by resorting to users that could be enrolled in tests, that is, students present in the lab. The authors are well aware about the huge differences between the target users envisioned for the proposed system and the ones involved in real tests. However, tests were primarily intended to identify possible serious flaws in the technology which are able to prevent even younger users from getting the expected results. Secondarily, we tried to select, as much as possible, test users who were not familiar with home automation technologies and the use of NFC for the purposes foreseen by the project, thus trying to emulate the condition of a nonskilled user. Finally, the tests aimed to assess the perceived usefulness of the proposed technology in fulfilling the expected actions. As a matter of fact, several studies, like the one by Ryu et al. [24], showed that although elderly users are less inclined to accept new technology than younger people, they are motivated to use it, if deemed compatible with their current lifestyle and routines and if they are sure that the benefits clearly outweigh the effort of learning something new [25]. Age alone does not predict technology acceptance; on the other hand, rejection of technology might stem from a lack of trust in one’s technological capabilities or self-efficacy.A total group of twenty undergraduate students participated in the experiment (10 female and 10 male): they were provided with a brief explanation of the home automation functions, the use of NFC, and how to operate the software application and the NFC-equipped smartphone over the Smart Panel provided both as versions 1P and 3P. All the students owned a smartphone; four students out of twenty had previously used the NFC technology for file transfer functions. Each user had to perform three actions by means of the two Smart Panels: (A1) switch on a light; (A2) switch off a light; (A3) open a window. The corresponding functionalities were made available by the demo home automation system. Once the test was finished, the users had to answer a small questionnaire related to the experience over all the three actions they were requested to perform. The following questions were provided to be evaluated between 1 (very low) and 5 (very high):Q1:
It is easy to use the Smart Panel P1.Q2:
It is easy to use the Smart Panel P3.Q3:
I could effectively complete the tasks using the Smart Panel P1.Q4:
I could effectively complete the tasks using the Smart Panel P3.Q5:
I could quickly complete the tasks using the Smart Panel P1.Q6:
I could quickly complete the tasks using the Smart Panel P3.Q7:
I had no problem using the Smart Panel P1.Q8:
I had no problem using the Smart Panel P3.Q9:
I felt comfortable using the Smart Panel P1.Q10:
I felt comfortable using the Smart Panel P3.Table6 reports the average score obtained for each question, using a 5-point Likert scale (Completely Disagree: 1, Disagree: 2, Neutral: 3, Agree: 4, and Completely Agree: 5).Table 6
Average score for user experience evaluated as Completely Disagree: 1, Disagree: 2, Neutral: 3, Agree: 4, and Completely Agree: 5.
Question
Average score
Q1
5
Q2
3.8
Q3
5
Q4
4.1
Q5
5
Q6
2.9
Q7
5
Q8
3.9
Q9
5
Q10
3.9It is evident that the Smart Panel 1P provides a much easier and comfortable interaction than the version 3P, despite the fact that young users tested the two solutions; it is reasonable to assume that even greater difference in the average score would be obtained by testing the different Smart Panels with older adults. In any case, users were able to perform successfully the requested tasks, irrespective of the Smart Panel used, even if version 1P allows performing any task in a quicker way. This preliminary evaluation has a limited significance, due to the very small number of users who tested the two Smart Panels and to their young age; however it is possible to say that the functional effectiveness of the NFC-based interface has been attained, irrespective of the specific Smart Panel adopted. Additional tests are obviously needed, with older users and for a greater number of actions, to truly validate the proposed interface in a real scenario.


## 4.1. Functional Tests

Functional tests have been executed in a laboratory facility, by exploiting the demo home automation prototype previously presented, to verify the correct execution of any possible command foreseen by the system and to eventually correct and improve the application implemented. In addition, the delay affecting command delivery, which is almost always less than 3 seconds, has been verified as adequate for ensuring correct execution by the home automation system. Figures9 and 10 show two sample experiments, dealing with the control of a single light and of a set of home equipment items by means of a scenario activation, respectively.Figure 9
NFC interaction to control a single light in the home automation system: a magnified view of the Smart Panel and the application interface is provided.Figure 10
NFC interaction to control several equipment items in the home automation system, by means of a scenario command. A magnified view of the Smart Panel and the application interface is provided.


## 4.2. Smart Panel Design Options

The role of the Smart Panel is to provide a pictorial and instantaneous representation of the commands that may be issued to the home automation system by simply tapping the NFC reader close to the panel itself. Each graphic element corresponds to a tag; the panel is totally passive, so it does not need power supply and may be easily moved and implemented in different shapes and formats. Irrespective of the specific format chosen for the panel, it always supports both single and multiple commands: a single command (single control) causes a state change in a single device of the home automation syste, and may be composed of either single or multiple tag readings; a multiple command (scenery control) implements a so-calledscenario; that is, it causes a state change in several devices and equipment managed by the home automation system up to a whole room or the whole building.The Smart Panel has been designed in three different versions, shown in Figures11(a), 11(b), and 11(c). Each version supports the same set of multiple commands for scenery control, evidenced by a box, whereas they differ for the section related to single commands. The supported multiple (scenery) commands are the following:(i)
Goodbye Home turns off all the lights and closes all the shutters and windows. It pilots common actions performed when a user leaves the house.(ii)
Welcome Home-Night turns on the lights of the hall, the living room, and the kitchen. It pilots common actions carried out when a user comes back home during the night.(iii)
Welcome Home-Day raises all dampers. It pilots habitual actions carried out when a user enters the home during the day.(iv)
Good Morning turns up the shutters in the kitchen, the bathroom, and the dining room. It pilots habitual actions performed when a user wakes up in the morning.All the versions of the panel also provide an information tag, which allows the reader to connect to a help page describing how to use the home automation system.Figure 11
Three versions for the Smart Panel: (a) 1P, (b) 2P, and (c) 3P. The framed areas show the common scenery-commands section of the panels.
(a)
(b)
(c)Each version of the panel provides a different way to manage single commands. In Panel 1P (Figure11(a)), the minimum number of tag readings necessary to issue a command equals 1. In fact, the number of single devices present in the home automation system is named D and the number of tags in the panel is  T1P; we have T1P=2·D, as, for each device, both theon andoff commands shall be provided. For simplicity, tags are collected into groups referred to each room. In Panel 2P (Figure 11(b)), the minimum number of tag readings necessary to issue a command equals 2. In fact, in this case, T2P=D+2+1: for each device in the home automation system, a corresponding tag is present in the panel, plus a couple of tags corresponding toon andoff commands. Another tag shall be added to enable thecancel operation in case the user performs an erroneous reading and the procedure has to be repeated. This way, first the user has to tap a tag to select the specific device he wants to control and then a second tag to issue the command. Finally, Panel 3P (Figure 11(c)) requires at least 3 tag readings to issue a command: the user has to first select the room where the device he wants to control is located, then the type of device, and finally the command to issue. Table 2 summarizes a comparison among 1P, 2P, and 3P, at a parity of the home automation system configuration, in terms of number of tags and number of reading operations the user has to perform, to issue a specific command. Given the target of the proposed project, that is, AAL applications and services, the preferred option should be given by 1P, which features the simplest user-system interaction. For the purposes of the project, both 1P and 3P versions were implemented and tested.Table 2
Comparison among panel versions: 1P, 2P, and 3P.
Feature
1P
2P
3P
Total # tags
41
27
20
# info. tags
1
1
1
# cancel tags
0
1
1
# single control tags
34
19
12
# scenery control tags
6
6
6
# reading operations
1
2
3


## 4.3. Issues in User Interaction with the Smart Panel

Despite the advantages of the simple and intuitive interaction enabled by NFC, some technical issues related to the use of the Smart Panel exist that could affect the correct delivery of commands to the home automation system. They can be managed through suitable verification steps, implemented by the code of the software application running on the NFC capable device.


### 4.3.1. The NFC Tag Is Partially Detected or Not Detected at All

If the tag is read or written incorrectly, or partially, because the proper action is not completed, the software application must raise a warning to the user, as an example, by a particular sound feedback, thus giving him the opportunity to finish the reading or writing action previously undertaken. To do so, according to the type of panel, the application checks the correct syntactic construction of the command message as long as the user interacts with the NFC tags.


### 4.3.2. The NFC Tag Contains a Noncompliant Message

If the tag is successfully read but contains a message which is not recognized by the application, the user is alerted about the noncompliance of the message and given the opportunity to finish the action.


### 4.3.3. Checking the Proper Composition of the Command

This control applies to the Smart Panel version 3P and guides the user along the correct composition of the commands addressed to home automation system. The actions required to correctly compose a command message are the following: first, read the tag “room”; second, read the tag “device”; and finally, read the tag “command.” If the user mistakes the procedure, the application warns him of the incorrect reading and gives him the possibility of continuing the reading action from the last correct step.


### 4.3.4. Timeout in Message Composition

In case the reading of a tag is suspended for an unknown amount of seconds during the composition of a message, a timeout occurs, which brings back the user to the initial step in the message composition procedure.Other checks are automatically performed by the application when it is used to write information on the tags; as an example, it is possible to start a new tag writing operation only after the previous one has been confirmed, thus avoiding undesired writing events. As a final remark, if the Smart Panel is implemented on a metallic surface, suitable tags shall be applied that are able to counteract the disturbances arising during RF interactions with the NFC reader.


## 4.3.1. The NFC Tag Is Partially Detected or Not Detected at All

If the tag is read or written incorrectly, or partially, because the proper action is not completed, the software application must raise a warning to the user, as an example, by a particular sound feedback, thus giving him the opportunity to finish the reading or writing action previously undertaken. To do so, according to the type of panel, the application checks the correct syntactic construction of the command message as long as the user interacts with the NFC tags.


## 4.3.2. The NFC Tag Contains a Noncompliant Message

If the tag is successfully read but contains a message which is not recognized by the application, the user is alerted about the noncompliance of the message and given the opportunity to finish the action.


## 4.3.3. Checking the Proper Composition of the Command

This control applies to the Smart Panel version 3P and guides the user along the correct composition of the commands addressed to home automation system. The actions required to correctly compose a command message are the following: first, read the tag “room”; second, read the tag “device”; and finally, read the tag “command.” If the user mistakes the procedure, the application warns him of the incorrect reading and gives him the possibility of continuing the reading action from the last correct step.


## 4.3.4. Timeout in Message Composition

In case the reading of a tag is suspended for an unknown amount of seconds during the composition of a message, a timeout occurs, which brings back the user to the initial step in the message composition procedure.Other checks are automatically performed by the application when it is used to write information on the tags; as an example, it is possible to start a new tag writing operation only after the previous one has been confirmed, thus avoiding undesired writing events. As a final remark, if the Smart Panel is implemented on a metallic surface, suitable tags shall be applied that are able to counteract the disturbances arising during RF interactions with the NFC reader.


## 4.4. NFC Tag Detection Performance

In order to evaluate the efficacy and reliability of the interaction between NFC reader and tags, a preliminary test has been performed related to the maximum acceptable vertical distance between the reader and the tag and the minimum distance among different tags located on the same plane with respect to the reader or piled one over the other. The former test allows estimating the supported range of RF interaction between reader and tag, that is, how much close to the Smart Panel the user should interact; the latter evaluates the minimum separating distance among tags to avoid interference from their responses, causing erroneous command readings. This information is important in order to evaluate the suitability of the Smart Panel design to the user’s specific requirements, due, for example, to a reduced control of hand movements. Two commercial smartphones equipped with NFC transceiver have been used for test purposes, featuring different dimensions (116×59mm2 for smartphone S1, 136.6×70.6mm2 for smartphone S2) and different location of the onboard NFC transceiver. The results obtained by experimental tests are summarized in Table 3. It is clear that different devices may provide different performance: smartphone S2 is able to interact with NFC tags at a longer distance than S1, without any problems in separating signals modulated by different tags located in adjacent positions. In any case, even the performance provided by S1 is more than acceptable, for the purposes of the present work.Table 3
Performance of NFC reader-tag interaction.
Interaction
S1
S2
Maximum height reader-tag
2.4–2.8 cm
3.3 cm
Minimum distance tag-tag
2.5–3 cm
Adjacent
Minimum height tag-tag
1 cm
Adjacent


## 4.5. Power Consumption due to NFC Interactions

The analysis of power consumption due to NFC interactions aims at estimating, in percentage terms, the actual battery consumption due to tag reading operations and to the NFC module itself and the current consumption of the NFC controller the reading device is equipped with. To evaluate the actual consumption due to NFC tag reading operations, several tests have been performed, at a parity of the reading device (a commercial smartphone), by varying the way the device was used. In each test of 1-hour duration, 15 tag readings’ operation is executed; the WiFi transceiver is switched off, and the initial battery level is 100%. Power consumption is estimated by means of thebattery usage tool, natively provided by the Android OS. This tool provides, in percentage terms, the level of battery use due to the various processes, such as display, standby, and Android System. By contrast, the tool does not provide directly the figure for the process that manages the NFC module, because it is embedded into the general Android System process figure. Table 4 summarizes the experimental results obtained in three different conditions of smartphone usage within an hour, that is, high usage level, low usage level, and medium usage level. The results show how the percentage value of the figure Android System (that embeds the NFC-related figure), for a fixed number of readings, strongly depends on the phone usage profile.Table 4
Estimated percent of power consumption due to NFC tag reading operations.
Figure
Test 1
Test 2
Test 3
Usage level
High
Low
Medium
Battery level reduction in 1 hour
7%
2%
3%
Display consumption
82%
66%
69%
Standby consumption
5%
15%
6%
Android assistant consumption
4%
2%
2%
Android OS
4%
5%
7%
Inactive phone
3%
9%
3%
Android System
2%
3%
1%In order to evaluate the power consumption due to the NFC module, irrespective of the number of reading operations performed, the duration of a discharge cycle of the battery (from 100% to 5% level) has been evaluated, with the NFC module switched on and off. A number of conditions have been imposed in order to reduce the uncontrollable effects due to other processes, that is,(i)
WiFi interface off;(ii)
Internet connection off;(iii)
maximum display brightness;(iv)
display on for 30 minutes (every 28 minutes the display was reactivated);(v)
phone SIM removed;(vi)
phone ringtone off, phone vibration on, and display rotation on.Table 5 shows that, on average, the duration of the discharge cycle of the smartphone battery is reduced by an amount of 9.12% when the NFC module is switched on. Finally, according to the PN544 NFC controller datasheet [22, 23], the amount of current absorption in RF active mode and power down mode differs at about four orders of magnitude, from 3 μA to 60 mA.Table 5
Battery discharge cycle duration due to NFC controller.
Discharge cycle duration (hh:mm:ss)
Discharge cycle duration in seconds
NFC on
04:37:31
16651
NFC off
05:05:22
18322


## 4.6. Validation of the Proposal

With the aim of a first and preliminary evaluation of the user acceptance of the proposed system interface based on NFC, several tests have been carried out at the Telecommunications Lab of the Marche Polytechnic University, where the demo panel of the home automation system shown in Figure2 is located. Due to the need of testing the NFC-based interface together with the underlying home automation system, and the impossibility of gathering elderly users in the lab environment, the tests discussed within this section were carried out by resorting to users that could be enrolled in tests, that is, students present in the lab. The authors are well aware about the huge differences between the target users envisioned for the proposed system and the ones involved in real tests. However, tests were primarily intended to identify possible serious flaws in the technology which are able to prevent even younger users from getting the expected results. Secondarily, we tried to select, as much as possible, test users who were not familiar with home automation technologies and the use of NFC for the purposes foreseen by the project, thus trying to emulate the condition of a nonskilled user. Finally, the tests aimed to assess the perceived usefulness of the proposed technology in fulfilling the expected actions. As a matter of fact, several studies, like the one by Ryu et al. [24], showed that although elderly users are less inclined to accept new technology than younger people, they are motivated to use it, if deemed compatible with their current lifestyle and routines and if they are sure that the benefits clearly outweigh the effort of learning something new [25]. Age alone does not predict technology acceptance; on the other hand, rejection of technology might stem from a lack of trust in one’s technological capabilities or self-efficacy.A total group of twenty undergraduate students participated in the experiment (10 female and 10 male): they were provided with a brief explanation of the home automation functions, the use of NFC, and how to operate the software application and the NFC-equipped smartphone over the Smart Panel provided both as versions 1P and 3P. All the students owned a smartphone; four students out of twenty had previously used the NFC technology for file transfer functions. Each user had to perform three actions by means of the two Smart Panels: (A1) switch on a light; (A2) switch off a light; (A3) open a window. The corresponding functionalities were made available by the demo home automation system. Once the test was finished, the users had to answer a small questionnaire related to the experience over all the three actions they were requested to perform. The following questions were provided to be evaluated between 1 (very low) and 5 (very high):Q1:
It is easy to use the Smart Panel P1.Q2:
It is easy to use the Smart Panel P3.Q3:
I could effectively complete the tasks using the Smart Panel P1.Q4:
I could effectively complete the tasks using the Smart Panel P3.Q5:
I could quickly complete the tasks using the Smart Panel P1.Q6:
I could quickly complete the tasks using the Smart Panel P3.Q7:
I had no problem using the Smart Panel P1.Q8:
I had no problem using the Smart Panel P3.Q9:
I felt comfortable using the Smart Panel P1.Q10:
I felt comfortable using the Smart Panel P3.Table6 reports the average score obtained for each question, using a 5-point Likert scale (Completely Disagree: 1, Disagree: 2, Neutral: 3, Agree: 4, and Completely Agree: 5).Table 6
Average score for user experience evaluated as Completely Disagree: 1, Disagree: 2, Neutral: 3, Agree: 4, and Completely Agree: 5.
Question
Average score
Q1
5
Q2
3.8
Q3
5
Q4
4.1
Q5
5
Q6
2.9
Q7
5
Q8
3.9
Q9
5
Q10
3.9It is evident that the Smart Panel 1P provides a much easier and comfortable interaction than the version 3P, despite the fact that young users tested the two solutions; it is reasonable to assume that even greater difference in the average score would be obtained by testing the different Smart Panels with older adults. In any case, users were able to perform successfully the requested tasks, irrespective of the Smart Panel used, even if version 1P allows performing any task in a quicker way. This preliminary evaluation has a limited significance, due to the very small number of users who tested the two Smart Panels and to their young age; however it is possible to say that the functional effectiveness of the NFC-based interface has been attained, irrespective of the specific Smart Panel adopted. Additional tests are obviously needed, with older users and for a greater number of actions, to truly validate the proposed interface in a real scenario.


## 5. Conclusions

The paper presented an NFC-based interface, named Smart Panel, designed to allow elderly and disabled people affected by physical limitations to live safely and comfortably at home, by facilitating the autonomous execution of daily life tasks requiring physical efforts, with the support of a home automation system and a simplified user-system interaction. Experimental tests, though performed on a limited number of young users, demonstrated the effectiveness and reliability of the NFC-based solution, in terms of proper delivery of commands to the home automation system, suitable design of the Smart Panel adopted as the user-system physical interface, and precision of the NFC reader in detecting and collecting data from NFC tags. Issues related to power consumption have been also investigated, thus showing the practical feasibility of the proposed solution. Future activities will be mainly focused on extensive test campaigns of the Smart Panel prototype in a field test by elderly users to whom Ambient Assisted Living services are primarily addressed. The technical feasibility, implementation details, and performance have been discussed in this paper.



---

*Source: 854671-2015-08-26.xml*