1 Introduction

According to the European Union (EU) definition [1], a smart city is “a place where traditional networks and services are made more efficient with the use of digital solutions for the benefit of its inhabitants and business.”

The term “smart” is increasingly being used to describe the use of innovative digital technologies to reduce complexity, maximize efficiency, and increase functionality in sectors such as urban transportation, water distribution, waste management, energy consumption, public security, as well as services aimed towards senior citizens. This last point is linked to the well-known demographic issues that foresee for many European countries (including Italy) the inversion of the demographic pyramid, with the most populous age group becoming that of the elderly [2].

The recent pandemic crisis, due to Covid-19, revealed the potential impact (and, to some extent, the need) of new digital technologies in the field of assistance, health, rehabilitation, and remote monitoring services. This holds true in the case of care activities, where technologies may support and optimize the work of operators, and allows for personalized, safer, and better-quality treatments, deliverable at the user’s home. But it also holds true in the much wider scenario of prevention, where technologies may be exploited to incentivize healthier lifestyles, to motivate people in complying with medical advice and to check for symptoms of diseases as early as possible. Prevention practices, however, need to be framed in usual daily life activities and places, not necessarily limited to a clinic environment, but encompassing the whole living space, including homes, offices, leisure places.

The effectiveness of deployment of such technologies, however, relies on the user’s perception of their accessibility, usefulness, ease of use, and invasiveness. From this point of view, Internet of Things (IoT) technologies may play a strategic role: IoT devices, indeed, inherently lend themselves to non-conventional human interaction schemes, requiring to the end-user little technological skill, or no skill at all.

IoT technologies have thus found many different applications in the assistive field [3].

In this paper, we briefly elaborate on the deployment of services based on IoT technologies in the real-life context. Some perspectives of IoT-enabled service are illustrated in Sect. 2 below. Use cases are then discussed in Sections  3 and  4, with reference to recent projects. Conclusions are finally drawn in Sect. 5.

2 The Role of IoT Technologies

From a technical point of view, smart services come from the capability of inferring, measuring and evaluating human actions: to this purpose, sensors of many kinds can be connected through internet communication, resulting in a heterogeneous perception layer feeding a wide knowledge base. Sensor technology improvement makes inexpensive and accurate sensors increasingly available, this resulting in rich, multi-dimensional data pictures. Once gathered at the cloud level, such data, however, need to be converted into relevant information, suitable for powering useful services. Sensible data processing is needed to convert raw data into sound information: depending on the specific aim, much personalization could be needed.

Telemedicine

Conventional IT-based health services may include, for instance, well-known telemedicine services, in which specific medical conditions can be monitored from remote, by relying on the acquisition of given physiological information through patient (or caregiver) self-management. For example, simple devices can be used to measure parameters such as heartbeat frequency, blood pressure, blood oxygen concentration, etc. and to transmit them over the network to the general practitioner or to the healthcare system specialist. Data trends are monitored, looking for anomalies or disease symptoms: this avoids the need of having the patient meet the doctor for measurements and allows for much more continuous monitoring, thus resulting in prompter and more perceptive evaluation. Physiological data most often are given specific reference ranges. Although possibly adapted to the patient age and health conditions, the availability of such ranges may allow for straightforward assessment. Telemedicine is supported by mature technologies, and has been proved to be quite effective in many different fields. Nevertheless, it is not diffused yet as its great potentials may imply: the most relevant obstacles, apart from cultural issues, come from a couple of main factors: first, equipment needs to be simple enough to be operated by the patient himself (or by his informal caregivers), who possibly lack specific technology skills. This actually narrows significantly the range of parameters suitable for self-management and thus limits the dimensionality of the remote picture. Second, the effectiveness of such remote monitoring inherently also relies on the diligent compliancy with the prescribed schedules and modes. This compliance can often be overlooked, due to boredom, inattention or even to cognitive impairment (relatively more frequent at older ages). In short, telemedicine performance may greatly depend on user’s awareness and skill, which, in some cases, may pose a limit to its full exploitability.

Behavioral monitoring

IoT technology may help in overcoming these limits, both by allowing for simpler management techniques by introducing less-intrusive, complementary monitoring techniques, based on behavioral analysis. Many medical conditions, in fact, may manifest themselves with changes in some behavioral features: e.g., reduced physical activity, wake/sleep cycle disturbances, changes of daily life habits. Relevant examples include congestive heart failure (CHF), chronic obstructive pulmonary disease (COPD), cognitive decline, just to name a few chronic conditions that feature relatively high prevalence in elderly population. Behavioral tracking may rely on simple information, such as presence sensors, bed/chair occupancy sensors, door opening, etc. Such kind of sensors, indeed, lend themselves to continuous monitoring, at the same time requiring virtually no skill from the end-user. Behavioral monitoring can effectively complement the remote management of physiologic parameters indeed, increasing time-continuity and dimensionality of the monitoring. Extracting reliable information from behavioral patterns, however, is a delicate process, inherently depending on very individual features. Apart from gross anomalies, in fact, a “reference” behavior is hard to be assumed, the “normal” conditions largely varying based on personal habits and needs. This implies “smarter” data processing, capable of assessing meaningful changes and trends based on the knowledge of personalized behaviors, thus calling explicitly for machine-learning and artificial-intelligence techniques.

Fig. 1
figure 1

Activation density plot, referring to a presence sensor (PIR) deployed for automatic lighting (a). Sensor activation detail, referring to a cross-section of density plot above, at a given (8 a.m.) time of the day (b)

A simple example of the relevance of behavioral analysis is given in Fig. 1a, which represents the density plot of activation pattern of a passive-infrared (PIR) presence sensor, located close to the bathroom in a sheltered house flat, where a then 85-years-old lady was living. Color maps the activity intensity, with warmer colors indicating more activity. The plot spans over a three-year period (horizontal axis) and describes daily activity (vertical axis), showing a quite regular daily habits pattern, with activity in the dressing room mostly occurring at wake-up time and at bedtime, represented by the two lighter bands. But, by checking along subsequent days, a relative decrease of activity is made evident by the color fading. In Fig. 1b, a cross-sectional density plot is shown, highlighting the decline in physical activity, which eventually resulted in a fall. Although consisting of a merely retrospective analysis (i.e., no prediction process was in place at that time), this example makes it evident how even inexpensive and non-intrusive techniques such as a PIR sensor (which was originally installed for automatic lighting, and then given IoT communication capabilities) can provide relevant information, if data are suitably processed.

So simple a concept can be extended to include many different IoT sensors, providing a more articulated picture, capable of deeper insights (at the expense of smarter processing), to account for effective fusion of heterogeneous data. An example of this approach is given in Sect. 3 below.

IoT technology spans over a much wider application range: although a comprehensive review of such applications goes far beyond the scope of this paper, we shall pick a few examples here which best fit the Active and Healthy Aging paradigm, potentially impacting on the quality of life, well-being and health of elderly people.

Many simple health practices may indeed take advantage of the distributed intelligence made available by IoT technology.

Conventional devices exploited in telemedicine frameworks, to measure physiological parameters such as temperature, body weight, blood pressure, blood oxygen and glucose concentration, etc. can be connected to the cloud, allowing for data storage in a coherent and safe space, to provide the user with reminders, and to alert the healthcare service in case of anomalies. Also, delivery of medicines can be controlled by smart, cloud-connected pill dispensers, also enabling remote checks from caregivers.

Assisted living and active aging

Thanks to the integration of different kinds of devices in the same cloud ecosystem, further channels can be shared for the interaction with end-users, possibly more suitable for their specific skill and needs. Most notably, the development and diffusion of Voice Assistants (VA) enables, also thanks to embedded Artificial Intelligence features, much more natural and personalized interaction with technology, almost completely overcoming the need of training for specific skill. Reminding of health-related tasks, such as taking medications or measuring parameters, comes in a fairly natural and intuitive fashion. At the same time, VA enables further functions supporting safe and independent life, such as automation of home controls including lighting, motorized rolling shutters, HVAC systems, as well enabling much easier communication with relatives and caregivers, thus contributing to safety.

The combination of smart devices, TV, and voice assistants can also be exploited to implement memory and cognitive training through games and pastimes, also providing healthcare specialists and caregivers with a continuous assessment procedure [4,5,6]. Besides mental health, physical activity plays a key role in slowing down ageing decline: in this case, too, support from (video) communication and VA may provide support and guidance in pursuing physical activity goals. Besides that, IoT technology may introduce feedback paths, by exploiting suitable sensors, which provide the system with information about the activity actually carried out and its compliancy with prescriptions. Physical activity may be assessed by wearable sensors [7], as well as by sensors suitably deployed in the living environment [8]. Environmental sensors have the advantage of being much less intrusive, yet allowing for quite expressive insights.

Figure 2 shows the schematic setup of a non-intrusive approach to heart activity continuous monitoring. It consists of a smart bed sensor, featuring a highly-sensitive 3D accelerometer and a microcontroller board, suitable for the acquisition of sensor data, their local processing, and the transmission of synthesized data over the internet. The device is fixed to the bed frame, requiring no contact with the patient body, and, by analyzing the acceleration patterns, can recognize the user presence in bed (which is relevant for assessing wake/sleep cycles and for preventing night falls) and to evaluate the heartbeat frequency and variability. By means of balistocardiographic techniques, managed by the onboard processor, it provides a continuous monitoring of heartbeat and can detect some kind of arrhythmia. The accuracy of this device compares well with simultaneous ECG-based assessment, featuring average sensitivity and precision across subjects and positions of 98.2% and 98.0%, respectively; similarly, a correlation \(R^2\) of 98.2% was achieved between BCG and reference ECG measurements, while Mean Absolute Error and Root Mean Squared Error are as low as 3.9 and 5.6 ms [9]. The system can thus be profitably used for continuous, low-intensity monitoring of heart function, causing virtually no bother to the user, effectively complementing Holter techniques, which provide much more detailed information, but are unsuitable for prolonged periods of usage.

Fig. 2
figure 2

Sketch of a non-intrusive balistocardiographic heartbeat sensor, suitable for continuous monitoring during sleep. Obtained BalistoCardioGram (BCG) is compared with reference ElectroCardioGram (ECG).

The IoT paradigm opens up to a number of similar applications, in which simple sensors are empowered by processing power coming from distributed, ubiquitous intelligence. In the following sections, a couple of experiences are described.

3 The ACTIVAGE Project

The first example refers to the ACTIVAGE project [10], funded by the EU under the Horizon2020/IoT-LSP call. ACTIVAGE was a large-scale, multi-centre European pilot project, aimed at building the first European IoT ecosystem with specific aim to the support of active and healthy ageing policies. Different IoT technologies were integrated withing the project, and deployed at nine Deployment Sites (DS), distributed over seven European countries and dedicated to the building of intelligent and assistive environments. Particular emphasis was placed on interoperability, by means of the AIOTES framework [11]. Within the ACTIVAGE framework, one among the DS pilot trials was implemented in Parma, including behavioral monitoring into the follow-up strategy for patients who returned home after having suffered a cerebral stroke event. The project was carried out in cooperation with the regional health service, by involving neurologists, general practitioners and formal, as well as informal, caregivers. The overall system architecture is shown in Fig. 3: a layer of sensors was deployed at each user’s home, straightforwardly connected, through Wi-Fi networking, to the system cloud. Here, data processing was carried out, by using several AI-based strategies, to infer relevant information and detect anomalies. Information was fed back to users and stakeholders, by exploiting the electronic health record platform. Different interfaces were used: end-users were enabled to access information through the “Fascicolo Sanitario Elettronico” (FSE, which is the patient-oriented access to health data), whereas doctors and caregivers exploited the SOLE network (the professional-oriented interface).

Fig. 3
figure 3

ACTIVAGE system architecture and information flow

The sensor kit was designed and developed on purpose, and included:

  • Presence sensors, based on passive infrared technology;

  • Door/window sensors, based on magnetic switches;

  • Bed/chair occupancy sensors, exploiting sensitive mats of different sizes;

  • Toilet sensor, based on proximity sensor;

  • Smart-pill dispenser (based on commercially available hardware) capable of reminding the need of taking a medication and checking if the medication was actually taken from the pill box.

A common hardware platform [12] was designed for most sensors, based on TI- CC3220 SoC and capable of managing both the local data processing and the cloud communication, based on the MQTT (Message Queue Telemetry Transport) communication protocol. At the cloud level, data are stored and processed: data privacy and transmission safety are duly accounted for by encryption and anonymization strategies.

Information was sought for, related to the specific use-case: stroke recovery is actually quite an articulated process, the assessment of which can be effectively supported by behavioral monitoring. IoT sensors were thus exploited to monitor common user patterns, including bed/rest routines, toilet usage, prescription compliance, kitchen activity, etc. A suite of analytics tools was implemented, to check for behavioral changes (either slow or abrupt) and for meaningful trends: besides real-time processing, aimed at providing alarms on immediate anomalies, statistics- and AI-based algorithms were exploited for off-line data analysis to provide more accurate insights. A complete description of the analysis strategy goes beyond the scope of this paper, and can be found elsewhere [13]. Here, we shall content ourselves with a couple of suggestive examples. First, we might consider the sleep pattern, which is strongly connected to health conditions: however, sleep habits may differ a lot among different persons, and even individually change over time: so, defining a reference pattern as a benchmark in order to assess anomalies in not practical and personalized solutions should come into play. User-specific activity profiles can be assessed by means of a training period, thus working out a typical behavior, which can be assumed as a personal reference: then, current activity can be matched against the reference profile, assuming statistically meaningful confidence intervals, to assess relevant changes. In Fig. 4a, activity profiles of the bed sensor and of the living-room chair sensor are shown, expressing the time-dependent activation probability. Based on the distribution of activation profiles, a customary behavioral profile can be extracted and associated to statistic confidence interval: data (repeatedly) falling off this region may indicate a behavioral change. This is not interpreted in a diagnostic way, but just highlighted and reported to care professionals for assessment of its clinical relevance: nevertheless, such flagging procedure may allow to discover meaningful changes well before they become evident to the caregivers. From Fig. 4a, it is also evident that habits may not be univocal: in the simple example at hand, it is clearly visible that in the early afternoon, the user may decide to have an after-lunch nap in bed, or to have some rest in the armchair. Both behaviors are statistically relevant, and neither can be considered “abnormal”. Thus, multi-modal analysis is carried out, extracting from initial training and subsequent observation more than one reference profile: all of them are considered customary, and anomalies are tracked when not matching any of them. Similar processing can be carried out for each sensor in the home kit. However, further information can be obtained by fusing data coming from different sensors and looking for combined profiles: a Multivariate Habit Clustering (MHC) has been implemented, by exploiting different neural networks and deep learning approaches. From such processing, data coming from a manifold of sensors can be combined into a lower-dimensionality, abstract representation of daily behavior, suitable for recognizing overall deviations.

Fig. 4
figure 4

Behavioral sensor profiles (a) and Multivariate Habits Clustering (MHC, b)

In Fig. 4b a representation of this compact representation is given: in particular, six sensor-derived quantities were compressed in the 2D representation shown in the figure. Each marker position refers to the abstract combination of behavioral features on a given day. Different markers refer to different users participating in the trial. Markers actually quite nicely cluster into homogeneous groups, indicating effective representativity of individual habits. By implementing a backward classification scheme (just to check for data meaningfulness) we found 97% accuracy in recognizing the correct individual based on the compressed habit representation, showing how this representation effectively describes individual behaviors. By analyzing single-individual time series of such data, thus, overall deviations from customary behavior can be effectively identified, calling for the attention of health professionals. It is worth underlining how this approach requires from the end-user neither any awareness, nor proactive action, nor to wear intrusive devices: it is therefore a meaningful example of the opportunities provided by ubiquitous IoT sensing.

4 The PLEINAIR Project

A second example refers to prevention activities, and more specifically to technologies aimed at incentivizing physical activity, as a component of a healthier lifestyle. The PLEINAIR project was co-funded in the framework of the regional framework POR-FESR2014-2021, and focused on implementing IoT-enabled exercise equipment suitable for outdoor contexts, using devices called OSO (Outdoor Smart Objects) that serve the purpose of introducing gaming and remote monitoring components into conventional physical activity tools. IoT gear allows for user identification, thus enabling personalization of the user experience. The user may indeed receive guidance and feedback calibrated on his specific age, health and personal performance track; this fosters his motivation and engagement, at the same time allowing for continuous monitoring and assessment, linked to his personal health record and to medical and physiotherapist prescriptions. A prominent example of the OSO concept is given by the smart flooring [10] developed in the PLEINAIR framework: to this purpose, standard anti-trauma rubber tiles, usually found in outdoor parks and children playgrounds, were equipped with weight sensors and LED actuators, enabling bi-directional communication with the cloud-based system. The flooring itself is thus both an input device, providing information about presence and location of the user, and as an output interface, displaying color light patterns guiding the exercise game. A modular, scalable architecture was devised, shown in Fig. 5. Each tile (0.5\(\,\times \,\)0.5 m\(^2\)) embeds 4 piezoresistive sensors (Tekscan Flexiforce A201) and a chain of 40 individually addressable WS2812B LEDS. Distributed control is implemented by local I/O controllers called RIO (Remote Input Output board). Each RIO board communicates with the main flooring controller by means of an I2C bus. The control board, based on a B-L475E-IOT01A Discovery kit from STMicroelectronics, mounts and Arm®Cortex®M4 processor (STM32L4) and an Inventek Systems ISM43362-M3G-L44 module providing Wi-Fi connectivity. Thus, the whole flooring, regardless of its actual size and geometry, is regarded as a unique IoT device: the system is capable of self-configuration, discovering the actual set of modules connected to the bus, and managing the game strategy and execution accordingly. Internet connection is exploited for tracking and recording user performance, to provide feedbacks on user’s personal devices (through smartphone/tablet apps) and to check compliance with medical prescriptions (if any). For instance, the classical hopscotch game can be implemented in a digital version, or the user may be prompted to walk along a random path on the flooring by following the light sequence. Errors can be detected, and a score can be given based on accuracy and timing. Challenges are calibrated on the user’s age and skill, so that the experience may fit needs of users of different ages and physical fitness. Different games can be managed, by downloading new games from the cloud server, adapting to specific needs and allowing for dynamically changing user experience. In spite of the inherent simplicity of the basic concept, several challenges had to be faced: high performance of the sensorized tiles was obtained, both in term of spatial resolution and in terms of weight sensitivity: loads as light as 300 g can be actually detected, thus making the tile suitable for different purposes. For instance, a test game was implemented, training coordination of people with motion impairments by challenging them to touch with their hands different parts of a single tile, following color pattern indications. The PLEINAR system was demonstrated and tested in a public environment (Museo dell Civiltá Contadina, Bentivoglio, BO, Italy) where it was open to public access for a few months, to provide technical validation and for assessing user satisfaction and acceptance. As shown in Fig. 6, four OSOs were available there: apart from the smart flooring, the sensitive table introduced above and a sensorized squat bench were implemented, together with an additional device, based on the same IoT control architecture, dealing with remote management of a plant cultivation (lighting and possibly irrigation). User from different age classes and physical ability were involved, and interviewed about their experience. The overall reaction was quite positive, with users mostly liking the smart floor experience and appreciating its motivational impact.

Fig. 5
figure 5

PLEINAIR Smart flooring system architecture.

Fig. 6
figure 6

PLEINAIR demo site setup

5 Conclusions

In this paper, some thoughts about the impact of IoT technology on the implementation of smart environments were discussed. IoT availability may result in ubiquitous distribution of intelligence, as well as innovative formats of human-machine interaction, possibly suitable for overcoming access barriers related to specific digital skills.

A couple of examples were discussed, coming from recent projects carried out at both European and regional levels. These projects dealt with both care and prevention strategies: long-term monitoring of stroke patients follow-up was managed by introducing behavioral monitoring techniques, effectively complementing current care practices with no additional burden on the patient. Incentivization of physical activity was instead pursued by implementing smart park equipment, suitable for enriching the user experience, fostering better motivation. At the same time, smart components of these tools enabled adaption and health-oriented monitoring of physical activity, effectively achieving personalization of care and prevention strategies.

Although still needing more extensive trials and engineering efforts, both examples proved relevant concepts, highlighting potential benefits of IoT deployment in the living environment with respect to health and wellbeing management. The rapid development of IoT technology will, in the near future, open up to many further opportunities.