Keywords

1 Introduction

The present paper was developed as a result of the previous (“Low Cost Smart Home for Elders”) [1]. It focuses mainly on the topic of physical security of the elderly, from the monitoring to the warning system to the trustees, in the event of an incident or anomaly. Following a brief assessment of the framework of the Internet of Things (IoT- Internet of Things), a great revolution is expected in the way we live and act. In a few years, the IoT technologies will be present on a daily basis, meaning that even if people do not interact directly with this type of technology, they will have some sort of impact on their lives [2].

These technologies will be present in several areas of technology companies: health, industry, economics, among others. Highlighting the enormous potential that these technologies have, with a set of sensors and actuators, connected by the data networks computing systems, centralized and easy information access, it is possible to effectively manage and monitor the physical security of the elderly [3].

The use of the IoT technologies facilitates the monitoring of people, equipment and animals, allowing a thorough analysis of all data captured. When the user is connected to the sensors, the communication of vital signs, biometric information or the emergence of problems are diagnosed and transmitted in good time, enabling faster assistance, as well as a more efficient health and safety service [4].

As mentioned in the earlier paper, developed by this team (Low Cost Smart Home for Elders) [1], the number of elderly people is increasing at a great rate in many countries, particularly in Portugal [5] and this type of population has great propensity to suffer accidents, with the aggravating factor that a vast majority live alone, whether for cultural reasons, for family or other reasons [6]. Therefore, we urgently need to find strategies to combat or minimize this problem, ensuring improved care for the elderly, so that even those living on their own have access to technological mechanisms that guarantee safer living conditions [7].

In addition to all the problems associated with the isolation of the elderly, the reality is that not everyone has the financial ability to pay for the support of a professional at all times. Therefore, we can use technology to monitor the physical security of the elderly, providing other caregivers with a variety of informational tools that facilitate the contact with users and allow for quick action in case of emergency [8]. For this reason, the use of these technologies makes perfect sense, especially in countries where the aging trend is quite high, as in Portugal [5]. The team have focused efforts on developing a solution that would provide houses with cybernetic technology to monitor the elderly, while responding to other requirements [9].

We present some examples of the application of the IoT with regard to the physical safety of the elderly and demonstrate its feasibility. Ex.: with the system installed at home, an elderly person requiring strict medication adherence may be prompted, at certain times, to take the corresponding medication in order to eradicate the disease [9]. Another very useful feature is the detection of falling accidents which occur quite often among people of this age group. A sensor that detects sudden and anomalous movements by the elderly generates an immediate warning message to alert family or the caregiver. This way, it is possible to provide quick and efficient aid, as well as to avoid accidents with potentially serious consequences [10].

IoT technologies present two very important features for users of these technologies, though more directly related to the elderly: Wearable Technology and data generated by monitoring patients [11]. The Wearables have a key role in remote monitoring of the elderly, since it is through these that the communication link is established with the monitoring platforms. On the other hand, the data generated by monitoring the behavior of the elderly are a valuable and fundamental source of information, since it is by studying and manipulating it that algorithms (analytics – big data) are developed to better monitor these behaviors [12].

The rest of the paper is organized as follows: Sect. 2 presents some studies related to the assistive home systems. The general architecture of the proposed smart home for the elderly is described in Sect. 3. In Sect. 4, the implementation of a functional scaled model of a smart home for the elderly is presented. Also, in this section, the performance of the developed prototype is evaluated. Finally, in Sect. 5, the conclusions are drawn and some ideas for future work are presented.

2 Background

The work presented by Chan et al. [13] reviews how the elderly and disabled can be monitored with numerous intelligent devices. Their article presents an international selection of leading smart home projects, as well as the associated technologies of wearable/implantable monitoring systems and assistive robotics. The latter are often de-signed as components of the larger smart home environment.

Nait-Charif and McKenna [14] tracked the person using an ellipse and analyzed the resulting trajectory to detect inactivity outside the normal zones of inactivity like chairs or sofas. However, they both used a camera mounted on the ceiling and therefore did not have access to the vertical motion of the body, which provides useful information for fall detection.

Fall detection and prevention systems have been designed using either external sensors or wearable sensors. External sensors are deployed in the vicinity of the elderly person to be monitored, and wearable sensors are attached to him [15]. There have also been other approaches that use a combination of both types of sensors, known as hybrid systems. These types of systems will not be covered in this review. Camera-based sensors are perhaps the most common types of sensors used in external sensing. One or multiple cameras are placed in predefined fixed locations where the person of interest will perform his/her daily activity. The main drawback of these sensors is their inability to track the user out of the cameras’ range of visibility. Another important factor related to external sensing is its high cost, as multiple sensors must be purchased to increase the system’s coverage [15].

The work presented by Gaddam et al. [16] uses intelligent sensors with cognitive ability to implement a home monitoring system for elderly care application. These used sensors can detect the usage of electrical devices, bed usage patterns and flow of water. Besides that, the system also incorporates a panic button. The cognitive sensors provide information that can be used to monitor the elderly person’s status by detecting any abnormal pattern in their daily home activities.

Lee and Mihailidis [17] detected falls by analyzing the silhouette and the 2-D velocity of the person, with special thresholds for inactivity zones, such as the bed.

The smart home for elderly care presented in [18], which is based on a wireless sensor network, demonstrates that ZigBee is well suited for smart homes and automation systems. ZigBee is a low cost, low power and low complexity wireless standard [19].

The studies presented above are significant in the area of the smart homes for the elderly and the concepts reported on those works are very useful and can be used as a base reference for the defining characteristics of lower cost solutions, as the one proposed and described in this paper.

3 System Architecture

In terms of architecture, the project relies mainly on sensor network, responsible for the readings according to the configured sensor type. Each sensor is connected to a microcontroller that is responsible for the communication of the data received from the respective sensor to the platform installed in the gateway.

All Communications between the sensor and microcontroller are direct and wired. All other communications are established using a wireless network or by low power Blue-tooth, ensuring the modularity. It should be noted that the protocol used for the transmission of data between the microcontroller and the platform is the MQTT (Message Queuing Telemetry Transport) [20].

The MQTT broker is installed and configured in the gateway and is responsible for sending the received messages on a given topic through the sensors to an aggregated platform, where the received data is processed. The managing platform can then act according to the situation, providing all the available data from sensor and actuator for consultation and management by the user.

The following image shows a generic architecture form of our solution. It shows the various components of the solution. We can still identify the various types of communications (Fig. 1).

Fig. 1.
figure 1

System architecture

With this type of architecture, we guarantee the implementation of modularity, where the great advantage is to be able to adapt this type of solution to most existing IoT projects in the market. In addition to that, it is easier to add new modules within the solution at any time. In most cases, each sensor will be added to a single microcontroller, for optimization and performance issues. However, there are cases where a microcontroller can aggregate more than one sensor, whenever the sensors work together, thus optimizing the structure of the solution.

The actuators are also aggregated to a microcontroller receiving the instructions of activity coming from the sensors. An actuator can receive instructions from one or more sensors, such as the LCD display (Liquid Crystal Display), which shows various types of information from different sensors.

All this data processing is performed at the gateway of the solution, a microcomputer Raspberry Pi3, responsible for the data processing, control and monitoring, thus ensuring a high level of safety to the solution, as well as a more streamlined system.

The following Fig. 2 shows how the sensors communicate with the actuators, giving a more precise notion of how the information flow is processed between the sensor and the respective actuator, and it also highlights the important role that microcontrollers play in this architecture.

Fig. 2.
figure 2

Sensors communication

The home automation and the assistive sensors send all the relevant information to the gateway to be managed and processed, as mentioned previously. When an abnormal situation occurs, the system detects it and activates the right support services. The presented solution is an integrated one that should be provided to elderly people who live all by themselves, since it gives them a better quality of life, with a real sense of security.

4 Implementation

This section presents and describes the development and implementation of a functional prototype in order to demonstrate the technical and economic feasibility of the proposed elderly assistive security system.

Figure 3 shows the devices of the implemented system by category,. which are essential for the implementation of this prototype. Some of the functionalities presented in Sect. 3 were implemented. All these sub systems are relevant to the wellbeing and sense of security of the elders.

Fig. 3.
figure 3

Device category

The goal of the security module is to provide the house protection and security of the home occupants. For that, it incorporates several types of sensors and, consequently, several sub systems. To detect house floods, a water level monitor sub system, which is very useful in kitchens, bathrooms and laundries, was implemented. This sub system monitors the water level and when it reaches a given value, the solution activates an alarm and sends a warning to the web platform.

There is also another security and prevention module activated in the solution. If one or more taps of the bathroom are open and it doesn’t detect movement of home users in that division, it sends an alarm message and turns off the tap that triggered the alarm. Another security feature is the fire detection sub system. The smart home uses a sensor that detects any kind of fire, triggering an alert and a warning to the platform. Another security subsystem is gas detection, as gas leaks tend to be very common causes of accidents nowadays. We use a sensor that detects any abnormal gas leak and then triggers an alarm, sending a warning message to the platform. The last security feature implemented in the prototype is the intrusion detection. Here, simple switches that simulate the magnetic doors and windows sensors were used. Every time each switch is activated, simulating an intrusion, the home control board (Raspberry Pi3 [21]) can get a small video of the place where the intrusion is taking place and send it to the platform along with the corresponding warning. The house alarm is also turned on.

In addition, the solution has a feature to remind the elderly to take their medicine. This system can be useful in the event of there being anyone home, especially the elderly, who needs to take some type of medication at a specific time of day, and it can be set as many times as needed. Also, the house has a panic button implemented. If a person is in an emergency, they can request support from their caregiver. To do this, simply press the button for two seconds, which sends an email and triggers a sound message in the house.

The maintenance of the data in the web servers allows the user to access it anytime and anywhere. The management and control of every aspect of the system features by the client is always performed through the communications module.

In the implemented solution prototype, the main devices responsible for managing the comfort and security features are the Raspberry Pi3 [21] with has platform installed with MQTT broker.

The website is one of the places where the clients can access and manage their information and collected data, as mentioned before. The website is structured with one page where you can access all the data. The website contains useful general information, the procedures for monitoring and controlling a smart home, the contacts of the service provider, emergency numbers and all the collected values of the home sensors. Since data is acquired in real time the client can always check if something abnormal is happening.

A photo of the implemented prototype is presented in Fig. 4. This photo shows the model of our smart home. Figure 5 shows the website. As it can be seen, the sensor values are available to each client (Fig. 6).

Fig. 4.
figure 4

Solution prototype

Fig. 5.
figure 5

Web frontend platform

Fig. 6.
figure 6

Test example

5 Tests Conducted to Analyze the Behavior of the Solution

To assess the performance of all electronic parts (hardware and firmware), several tests were conducted. The methodology used was the following: First, each sensor or actuator was tested independently of all the others. The information gathered by each sensor was displayed on the LCD screen and on the platform dashboard. This way, the performance was inferred by the operating status of the respective sensor. After the operation validation of all the sensors, the alarm associated to each sensor was tested. For that, abnormal situations were imposed to verify if the alarm would be triggered. A buzzer was used to simulate the alarm operation.

The next picture shows an example of the inflicted procedures on the house sensor system to evaluate the abnormal situations, as wells as testing the corresponding alarm message warnings, either on LCD Display and on the platform dashboard.

After confirming the right operation for each sensor and respective alarm, the communication with the server was evaluated, confirming all alarm messages were shown both on LCD display and on the platform dashboard.

To test the “flood detection sub system”, a cup of water was used. The sensor was submerged below the limit defined in the configuration script, forcing an abnormal value, which caused an alarm (buzzer sound). There was also a new notice on the LCD display and an update of the home status on the house platform (the message “FLOOD” was sent). To test the “prevent flood detection sub-system” a flowmeter was installed before the tap together with a motion sensor in the same room of the tap. If there is flow and nobody is in the room, the alarm is activated (buzzer sound), a new notice appears in the LCD display and there is an update of the home status on the house platform (the message “PREVENT FLOOD” is sent). To test the fire detection sub-system, a lighter was used, sparkling a flame inside the kitchen house mockup, which forced an abnormal value, simulating fire. This will cause an alarm (buzzer sound), a new notice on the LCD display and an update of the home status on the house platform (the word “FIRE” was sent). To test the gas detection sub-system, a lighter was used, releasing gas inside the kitchen house mockup, which forced an abnormal value, simulating a gas leak. This caused an alarm (buzzer sound), a new notice on the LCD display and an update of the home status on the house platform (the message “GAS DETECTED” was sent).

Finally, we set the alarm for the house and then opened a window with a magnetic sensor, which forced an abnormal value, simulating an intruder. This will create a new notice on the LCD display and an update of the home status on the house platform (changed the window state from 0 to 1).

6 Conclusion and Future Work

The paper proposes and describes a security monitoring system in low cost smart homes for the elderly, which integrates home automation systems with assistive ones in order to fulfill the needs of the elderly. It provides the elderly who live alone in their home with the security they require and, simultaneously, a sense of tranquility to their family. The proposed system architecture allows the users to control all the home features anytime and anywhere, by using the system app on any mobile device or through the system online platform. The elderly’s relatives (family members responsible for the elderly) are always informed of their health and status situation by receiving an alarm when an abnormal situation occurs.

An operational scaled model is also presented and described in the paper in order to demonstrate the feasibility of the solution. Many of the proposed functionalities were implemented in the mockup house. The scaled model uses a Raspberry Pi3 as the gateway to control all the deployed sensors, to acquire all the sensors’ data and to send it to the system cloud servers. On the other hand, we used ESP-8266 [22] microcontroller to send the sensor’s data wirelessly to the gateway. Several functional tests that replicate daily situations were performed to assess the system. The results obtained show that the proposed solution is functional.

One major improvement since the last low cost smart home project [1] was the inclusion of wireless communication between the microcontrollers and the gateway, improving the system’s flexibility and functionality. All the cabled parts of the infrastructure were replaced by the wireless microcontroller ESP-8266 [22] connected to the sensors. Another major feature added was the implementation of an ambient assisted living, capable of detecting abnormal or unusual s behavior patterns and health problems in the elderly, generating warnings or alarms to the care givers and the elderly’s relatives. The ambient assisted living will be based on the behavior analysis algorithms that have the ability to process all the data collected from each sensor (deployed in the home and wearable).