Smart-Home Environment to Support Homework Activities for Children

The Central Nervous System of humans continuously evolves when children engage in new activities. These activities are progressing from learning to eat as a baby over playing during childhood up to homework in all its dimensions. These activities, which are meaningful and relevant to everyone, constitute what occupational therapists call “occupations”. The successful execution of these occupations makes the development of new roles as well as the construction of a correct state of health possible. Due to these reasons, occupational performance is a fundamental part of development throughout childhood. Homework is complex and extends beyond the school context to the home. For many children, the performance of these homework items is a difficult challenge or even impossible to overcome without the help of an adult. This article presents the design, implementation, and functional validation of an intelligent home environment that uses homework activities as a support tool for children with or without attention disabilities. In this project, the Internet of Things (IoT) paradigm is combined with the development of robotic assistance to implement an intelligent home environment. In this environment, we have included intelligent things (where the usual study chairs and desks become smart objects) that determine in real-time the child’s behavior during the development of homework and a robotic assistant which interacts with the children providing the necessary accompaniment (supervision and guidelines) just as a therapist would do. This development has been functionally validated by tests on several school-aged children without pathologies. In a later phase of the study, the proposal will be validated with children with different pathologies with an impact on learning, including Attention Disorder Hyperactivity Disorder (ADHD). The goal is the generation of intelligent places for therapeutic purposes within the home as assistance for children having difficulties to work with their homework assignment due to ADHD.


I. INTRODUCTION
According to the World Health Organization, the concept of health is based on the ability of each person to participate in the occupations that are relevant to him or her. An important goal of occupational therapy is to encourage the clients' participation in daily life. The daily lives of children mainly take place in their homes and schools. Homework is an occupation whose performance affects the children's participation in both home and school [1]. achievement of the educational objectives and for dealing with existing conditions in the child.
Focusing on children with behavioral pathologies and their therapies, the capacity of observation and therapeutic intervention in the natural environment (usually at home) is strongly demanded by the academic and clinical context. Commonly, support activities require the child to move to clinical centers to carry out the interventions through monitoring and correcting the child's daily activities. A usual case of behavioral pathologies affecting academic activities at home can be observed in children who have been diagnosed with ADHD.
Occupational therapists can observe, analyze, and assist children with ADHD during the development of his/her activities. However, the therapy session is usually limited by the time and the available place for its development.
Moving the program to another environment allows applying the activities which the child performs at home or school. Besides, it would have several benefits such as involving the child's family in the therapy. In this way, it is possible to provide a more natural and friendly therapeutic method without the difficulties which would be present in a clinical environment. Additionally, children learn best when they can practice skills in setting up and developing activities in which they would normally use those same skills rather than in artificial learning situations that may not represent the real challenges or situations in life. Applying this method, we would be able to solve one of the major challenges of current therapies, transferring the general collection of information and learning about the patient from the therapeutic environment to the natural environment of the patient.
Family members and educators do not have precise guidelines and knowledge about how to motivate the child to participate in the therapy session by doing the homework, even less how to assess whether it is done correctly. Besides, most of them do not have the time to carry out the therapy session. For these reasons, the main challenge is implementing those therapies beyond the clinical environment, providing the therapists with the possibility to know in real-time whether the child is performing well in its activities and at the same time providing the necessary guidance for the child.
The implementation of smart-home environments enables pedagogical and therapeutic interventions in a child's daily activities at home. These smart-home environments are developed by IoT principles which allow therapists to receive and collect information in real-time about the child's behavior during the performance of his/her homework.

II. OBJECTIVE AND SCOPE
The main objective of this paper is to show the feasibility of the creation of a smart-home environment to support the remote monitoring and intervention of children during their homework activities to assess the level of performance achieved. This smart environment has been designed to serve as a tool for occupational therapists in the treatment of learning or attentional pathologies, especially ADHD.
ADHD is a neurobiological behavior disorder with a genetic component caused by the existence of an imbalance between two brain neurotransmitters: norepinephrine and dopamine [3]. These substances do not function adequately in the prefrontal cortex of the brain, directly affecting the self-control and avoidance of inappropriate behavior of the patient. This, in turn, leads to a lack of control in functions such as attention, hyperactivity, and impulsiveness [4].
-Lack of attention. The child abandons the activity, lacks persistence, has difficulty staying focused, and is disorganized. These problems do not necessarily only occur due to a lack of understanding [5]. -Hyperactivity. The child is constantly moving, even in situations where such behavior is not appropriate or necessary [5]. -Impulsiveness. The child performs hasty actions without thinking about what the consequences may be, it is intrusive [5].
Regarding this matter, a team of occupational therapists has been involved who have set the guidelines to create a solution that allows the implementation of the pervasive therapy concept: complementing standard therapy in different locations. This work is focused on the development of the first phase of a complete action plan, which includes the capture of requirements, implementation, and technical evaluation with healthy children. This phase, although not yet clinically significant, does allow us to offer a tool for informal caregivers showing the performance of children when doing homework. It is also a required step to address clinical trials which will evaluate its use as a therapeutic tool.
From a technical perspective, this proposal is focused on presenting the way of how to allow the home to become part of the interaction with the children during the homework activity. The smart desk, smart chair, and the robotic assistant are elements of this smart-home environment. Which in turn is part of a complete solution that, in addition to the interaction with the child, allows the data processing, creating knowledge from this data, while interacting with other actors at the same time. The full explanation and elaboration of the environment are out of the scope of this paper and will therefore not be mentioned further.

A. SMART TUTORING SYSTEMS
An adequate degree of motivation is one of the key elements of the correct engagement in carrying out a big part of human activities. Lack of motivation usually occurs in activities that require effort and do not offer an immediate reward. Hence, they can produce high amounts of frustration in the person who must perform them, be it a child, a teenager, or a person in adulthood. A clear example of that is in the performance of homework during the period of childhood and adolescence. On the other hand, performing homework is a training activity that helps improve performance when achieving an adequate degree of academic performance [2], [3].
The child's commitment to homework is a determining factor helping to achieve good school performance [3]. The link between school and home is essential to improve children's learning in general and to those with difficulties [4]. The brain can be intrinsically rewarded for novelty. Complexity, or other measures of information, in the framework of computational reinforced learning, can be used for modeling stories of curiosity mechanisms. Smart tutoring systems can be used to promote curiosity and learning, acting as a bridge between home and school [5], [6].

B. SMART-HOME
The Smart-Home can be considered as a specific application of the concept of Ambient Intelligence. There are several definitions in the scientific literature related to Ambient Intelligence. One of the most common defines Ambient Intelligence as ''a digital environment that proactively, but sensibly supports people in their daily lives'' [7], aligning Ambient Intelligence with Ambient Assisted Living. These fields provide different solutions to support the quality of life and longer permanence of the elderly community at home [8].
Smart-Homes, considered as an implementation of Ambient Intelligence to homes, have been applied to several different scenarios related to the quality of life, but also in the context with therapeutic applications, providing a significant potential concerning the diffusion of intelligent objects and innovative services [9]- [12]. The monitoring of activities of daily life is one of the leading technical challenges in the field [13]- [15]. This challenge must be faced at different levels: data models, data ingestion through sensors or interaction devices, data processing, etc. [13] presents the main challenges related to activity detection in a Smart Home for the elderly. Most of the challenges assume an environment with a high grade of uncertainty in actions, multiple inhabitants, and activities performed in parallel. In a physically controlled environment, with the activity identified and without carrying out other activities in parallel, as in the case of the study, most of these challenges would be eliminated.
From a therapeutic perspective, Smart-Homes could provide new methods for innovative treatments for people with different kinds of neurological disorders, [9] reviewed 116 studies that confirm this premise. The distribution of publications per year ( Figure 10 of the cited work) shows how the amount of studies in this field has increased over the last five years. Most of the devices analyzed were made to help resolve basic health problems, like heart rate monitoring, sleeping pattern, the number of calories lost during an exercise, or during physical activity [9], [13], [16]. Although most of the available research focuses on the elderly, the advantages provided by the information and communication technologies as well as allow monitoring young people's mobility and actions at home. These measures can be applied to the study of ADHD disorders also in young people. [17] studied the everyday life of young people with ADHD and autism spectrum disorder (ASD). This study aimed to describe how young people with ADHD and ASD function and how they manage their everyday life based on analyses of Internet-based chat logs. One of the conclusions was that dealing with problematic situations that occur daily requires personal strength and a desire to find adequate solutions, as well as to discover a role in society.
Furthermore, a work dated in 2016 proposes technical solutions based on IoT to support parents with ADHD and autism in their daily activities [18]. This work presents two prototypes that could work together. The first one measures the level of stress by a smart-watch, processing, and storing this information in a cloud platform. These different measured levels of stress could be interpreted as a type of experience. A mobile application allows interaction with the user by graphical content which enables the user to express this current experience. The second prototype represents a calendar tool where the user can add needed devices or things such as a wallet, a book, etc. for an event scheduled in the calendar. Devices are tagged with RFID components and scanned when leaving home. The scanning process checks the scanned items against the current calendar event, and in case a device is missing, a signal is sent to the smartphone.
Although devices have been developed to improve health in children [19], no specific devices have yet been made in Smart-Homes that help children, with or without ADHD, in carrying out their daily activities through IoT approaches, just like [17] raised in its review.

C. ROBOTIC ASSISTANTS
Robotic assistance is a broad field that covers several classifications according to their functionalities. In robotic assistants' terms, there is Assistive Robotics (AR). These robots have a principal function: assist users in locomotion and rehabilitation activities, and surgery [20]. The scientific community has started using assistant robots in pace and balance rehabilitation [21]; even using assistant robots to help improve the function of the upper limb in the development of activities of daily life [22]- [24].
In the case of children, there are studies of assistant robots for children with diabetes [5], [25] which have been used in their private or domestic environment (86.7%). In the work [5] one key result was highlighted: ''the development of a fully functional prototype and its end-to-end functionality. Furthermore, acceptability was successfully tested through a physician-led pilot study, which provides evidence that both patients and caregivers are receptive to the introduction of the proposed platform''.
Another kind of robotic assistants is Socially Assistive Robotics (SAR). This robot classification was developed as its functionalities are focused on providing a different kind of assistance to the vulnerable population through social interaction [26].
According to robotic assistants in the field of education, [27] presents PAT, a robotic assistant to support the process of teaching about accident prevention in different scenarios: prevention of transit accidents (to be hit by a car) as well as prevention of home accidents (burns and intoxications). This robot is equipped with an audiovisual user-friendly interface for the child and the teacher to be used in primary schools. It is focused on teaching children from ages three-six years old. The experiment's results show that the information provided by the robotic assistant during the teaching process is retained by the children over a long time, showing that this methodology provides a more interactive teaching process compared to traditional teaching methods.
As a previous related project, there is Kindergarten Assistive Robotics (KAR) [28]. This project uses Nao as a platform to design an assistive technology, which uses a toy/game robotic approach. The architecture of KAR focuses on research and training of children with ADHD. The results show that KAR improved the training of cognitive skills of children with ADHD, such as constructive learning and selective attention. Additionally, it provides feedback to the children on their performance while monitoring their progress over time. KAR does not focus on activities of daily life, both cognitive and motor training while at the same time not being integrated with its environment.
Another previous related work is ''Make it move'' [29]. This project describes the use of two types of robots to support the activities of children with different levels of cognitive and social disabilities such as ADHD. It performed similar play scenarios with each of the robots, monitoring their effects on the behavior of the children. The interaction with the robots provided a positive influence on the development of the children's attention and social skills.
There is a previous related work that presents the design and initial evaluation of Kip3, a social robotic device for students with ADHD. It provides immediate feedback for inattention or impulsiveness events. This project is based on the design of a platform consisting of a tablet-based Continuous Performance Test (CPT) that assess inattention and impulsiveness, and a socially expressive robotic device (Kip3) as feedback. The results show that 90% of participants felt that Kip3 helped them regain focus after an inattention event [30].
No works have been found during the scientific literature review, which would show the use of robotic assistants to support children's homework.

D. MAIN LIMITATIONS OF PREVIOUS WORKS
The robotic assistant helping with the management of Diabetes in Children [5] focuses its study on IoT applications, a humanoid robot (NAO) to support a multidimensional care approach for the treatment of diabetes. But for this treatment, it is necessary to take the child to the health care center while at the same time it would be very difficult for a child to use NAO without professional supervision.
The same limitations are presented by KAR [28]. The fact that a humanoid robot is used implies that it will be necessary to take the child to a health care center as a professional must be supervising the interaction, without even mentioning the cost of acquiring a robot of these characteristics.
The humanoid robot (KASPAR) and one mobile robotic platform (IROMEC) [29] are focused on the previously mentioned cause and effect game called ''Make it move''. Here the limitation is that all instructions are provided by a therapist, who also controls and limits the interactions with both robots, which in turn means that the child cannot use these robots freely by itself.
Kip3, however, is very similar to our work as it's only limitation is being a device that just regains the focus of a student when it detects distraction. It is necessary to use a tablet for its development, which in turn could be an additional source for distracting the student (in this case) [30].
Finally, PAT is a Robot that interacts with children to teach them how to avoid trauma accidents in several scenarios. Just like [5] and [28], this robot needs a supervisor as its functionalities are not automatic [27].
All these limitations have been studied, ensuring that the newly developed and here proposed system avoids all of them. It has been identified that the homework process is the most important activity for therapists, parents, and children as one of the most obvious signs of a child having ADHD is low school performance.

IV. METHODOLOGY
The creation of the intelligent environment is framed within a solution of continuous support of activities for children with ADHD in their different environments inside the home. For its analysis, design, and implementation, a multidisciplinary team including an electrical engineer, two telematics engineers, and two occupational therapists specialized in children with this pathology has been created. In Figure 1 the general outline of the entire solution can be found. As shown in Figure 1, the complete solution includes three stages: The creation of the prototype and its technical validation.

2) STAGE 2
Training the stakeholders and designing the experiment.

3) STAGE 3
The pilot phase for conducting clinical validation.
As discussed in the objectives, this work aims for and presents the creation of the smart environment, which interacts directly with children, following the requirements given by the therapists. A description of the used parts of the cloud environment is also included to understand how therapists will be able to access the information provided by the smart environment.
For the smart environment the same team as previously mentioned has been involved, while additionally, the development of the intelligent things and the robotic assistant follows a Do-It-Yourself approach. All the materials, including electromechanical components, can be easily found and are available at low costs. The structure of the assistant robot and intelligent things has been created with an open-source 3D printer, while the software used as well as open-source, with open and permissive licenses for use and distribution.
A. REQUIREMENTS FOR DESIGNING -The first step in designing the complete Smart-Home Environment is taken when the requirements provided by therapists allow the development of the architecture of the Smart-Home Environment by the engineers (Figure 2). -These requirements are focused on providing the children with an assistant to help him/her do his/her homework avoiding distractions and encouraging him/her to finish it. -The robotic assistant has been designed for children between 6 and 9 years old. It was necessary to allow just two ways of interaction, the touch screen, and speakers avoiding more elements that would cause more distractions than actual help. -The graphical interface provides an interactive user interface experience UIX with a compressive language for children at that age. The whole system had to be imperceptible by the child, which is done by avoiding wires to connect its elements. The system will ask about the child's mood before starting. The objective is to provide the child with help and assistance regarding the planning and carrying out of different activities depending on the subject, while always starting with the subjects considered most difficult, such as mathematics, English, and language. -It is necessary to provide the necessary actions for the child to prepare the needed materials and work area. The robotic assistant will remind the child to carry out all activities that require leaving the workplace before beginning with its work: such as going to the bathroom, going for water, etc. -The solution will provide physical exercise instructions between the homework sessions to help the child relax during the session. -The solution must stimulate small progress using motivational phrases, avoiding impulsive behavior, and giving some clear and specific instructions. It is important to use understandable (easy) language (adapted to the child). Furthermore, the solution must reduce the number of instructions and frequency over-time to remind the child of all guidelines in each of the tasks so that the child assimilates the procedure to follow. -Additionally, the information collected had to be stored being accessible through a friendly interface for its interpretation by parents and therapists.

B. SYSTEM DESIGNING
As previously mentioned, the solution includes several aspects related to continuous therapeutic support inside the home. It enables the interaction of children with his/her therapists and parents. Besides, the engineers or technicians who VOLUME 8, 2020 perform the support and evolution of the system also interact in this environment (in an indirect way). Figure 2 shows a scheme where the interactions between the different actors of the system and the interaction among them are reflected. Figure 2 shows how this project can provide the child with a complete accompaniment that involves parents, therapists, and the smart-home environment. Unlike previous related works, this proposal dissolves the need for parents to take the child to a health care center to be monitored by therapists.
* The robot identifies that the child is taking a long time for the homework, which he/she is carrying out, compared to the time which other children would need. Also, distractions from the child's side can be detected such as getting up, asking to go to the bathroom, or asking for help from his parents, even when the tasks are not too difficult.
* * The robot and intelligent things detect excessive movements, which is not common in children without ADHD. These children present lighter or lesser movements compared with the ADHD child's movements. According to Table 1, the particular symptoms of TDHA (presented in section I and the central column of Table 1) and the study previously carried out by an occupational therapist, the Smart-Home Environment designed by engineers must be able to identify abnormal behaviors, convert this information in an interpretation (like a therapist would do), and provide feedback that will be helpful to complement the treatment performed in the therapy center with details of the natural environment of the child. The therapists will obtain information related to TABLE 1. Description of a face-to-face therapy where the therapist identifies abnormal behaviors and provides a fast response or feedback to avoid them in the future. each homework (time, distractions, and pauses) which will allow a better and more detailed assessment of the child's performance.
Additionally, Figure 2 shows how the Smart-Home Environment deals with gathering, storing, and processing events generated by the interaction of the children with the environment. It sends the processed knowledge to the therapist and parents, allowing them to provide the child with additional feedback to support the therapeutic process.
As shown in Figure 3, at the technical level, there are four main subsystems with components and features in each of which develop some particular task in the system: This subsystem includes all the elements to feed the application with relevant data. It will be implemented mostly by intelligent spaces since one of the cornerstones of the system is to empower daily-life activities seamlessly. However, it is also possible to have mobile or web applications oriented to allow parents or therapists to include information in the system.

2) DATA PROCESSING AND INTEGRATION SUBSYSTEMS
The number and type of activities the system can handle is not established from the start. Therefore, the subsystem, in addition to efficiently and securely storing information, must define sufficiently generic data models to suit future scenarios.

3) KNOWLEDGE MANAGEMENT SUBSYSTEM
The information is treated and presented to ease the understanding of each of the actors in the system (specifically parents and therapists). This treatment is done through specific applications that are implemented with functionalities designed for each actor in the environment.
The robotic assistant, which is part of the smart-home environment, works in almost all subsystems (data acquisition, data integration, and knowledge management). The robot is not a passive element of the environment as it can carry out actions that allow altering the child's state and behavior. This requirement implies access to all the subsystems of the service.

C. HOMEWORK ACTIVITIES SUPPORT SERVICE
This section details the design of the management system for a homework activity. This is a specific instance of the general service described above (Figure 3). The activity to manage is chosen so it is possible to design the final smart-home environment to interact with the child.
The service design includes several components: -A smart-home environment that allows detecting relevant events for therapists and carrying out interactions with the child in case it is needed. The environment consists of intelligent things and an assistant robot working together to provide a new way of interaction with children (including the ones with ADHD). -A cloud-based information processing and storage subsystem. It corresponds with the ''Data processing and integration subsystem'' in Figure 3.
-An information display and parameter setting system was created through a mobile application. This corresponds to the ''knowledge management subsystem'' in Figure 3.
Following the design requirements, there was developed the intelligent things and the robotic assistant.

1) INTELLIGENT THINGS
Intelligent things are devices with WiFi connectivity and being part of the Data Acquisition Subsystem. These devices identify different distractions of the child during the development of his/her homework. They are integrated with daily life objects, constantly measuring parameters related to the actions developed by the child. The combination of daily-life objects and intelligent things is called an intelligent object.
In this case, the homework activity support service has defined two intelligent things: a movement detector to build intelligent chairs and a proximity detector to build intelligent desks.
The movement detector is located on the child's chair, returning the presence of relevant movements of the child with the chair. The proximity detector is attached to the inferior part of the desk, indicating if the child is having a good position concerning the desk or if the child is currently not present at the workstation. The information provided by the intelligent chair (motion detected/ no motion detected) combined with the information provided by the intelligent desk (In position / moved off) returns the actual state of the child regarding his/her workstation and if he/she keeps the focus and concentration during the work time. The following table details the possible combination of the acquired information and its interpretation. The relationship between the information (events) provided by the chair or the desk allows inferring the behavior of the child (knowledge).
The intelligent things include support which allows their anchoring in the target objects while at the same time these intelligent things can be taken to a different desk or chair.
All acquired data are uploaded through the home Wi-Fi connection to the cloud platform to be collected and processed. The new information shows the child's behavior during the development of his/her homework ( Table 2). The data processing and the newly acquired knowledge process is detailed in the Data Processing and Integration section.

2) ROBOTIC ASSISTANT
The robotic assistant is a little portable robot located on the desk. It provides an audiovisual interaction through its touchscreen and speakers. It is able to speak to the child and move on to the desk depending on the programmed interaction feedback. Its objective is to assist the child with audiovisual feedback according to the previously defined therapist's indications when intelligent things detect some signal of distraction.
Additionally, the robotic assistant provides an option menu for the child via its touchscreen. This menu helps the child to express her/his needs such as take a break for drinking water, VOLUME 8, 2020 go to the bathroom or ask for help from someone. Furthermore, it can send a notification at the end of the homework and turn the robotic assistant off. All these notifications are sent to the cloud to be registered in its database (DB).

D. INTELLIGENT THINGS IMPLEMENTATION 1) INTELLIGENT CHAIR ENABLER
The first intelligent thing detects events related to the movement of the chair occasioned by the child in the development of his/her homework. It integrates an accelerometer sensor (MMA8452). This sensor obtains acceleration values (m/s^2) and the angular orientation of the thing [31], which is connected to the NodeMCU (ESP-8266 v1) board by I2C communication port (SCL, SDA pins) [32].
This data is pre-processed by the microprocessor (ESP-8266) to identify when an event occurs. It deploys a code in C++ which takes the orientation value to compute the acceleration of the chair concerning each Cartesian axis. The event detention depends on the comparison of the acquired values and the established limitation values.
These limitation values establish the maximum allowed acceleration in each axis depending on the position of the intelligent thing in the chair. It is not necessary to modify these parameters if the thing is in a different position on the chair. The accelerometer returns the new orientation value and the configuration values are automatically computed again.
If it detects an event, the ESP-8266 board sends them to the cloud platform through the internet. These events are interpreted as twists of the child on the chair as well as the motion of the chair forward or back.
The internal and external structures are designed by Computer-Aided Design software (CAD) following the physical requirements. These parts are created by a 3D printer in Polylactic acid or polylactide (PLA) material.
The internal part is designed according to the electrical schema, supporting the electronic elements inside such as batteries, microprocessor, battery charger manager, and the sensor. The external structure surrounds the elements and is adapted to the internal structure. Additionally, its design allows an easy adaptation to the chair.
This intelligent thing is assembled and mounted on the inferior part of the chair to measure the movements of the child. It has a switch to turn it on/off and LED's which indicate the device's state (power on and charging) as well as a micro USB port for charging the device.
Its design and positioning allows the implementation of an external sensor in the chair such as a pressure sensor to detect the child's posture on the chair.

2) INTELLIGENT DESK ENABLER
The second intelligent thing measures the distance between the child and the desk. It is equipped with an inside ultrasonic proximity sensor (hc-sr04) [33] which is connected to the I/O digital pins on the ESP-8266 board. The acquired data is pre-processed to identify events such as reaching the maximum distance allowed. This maximum distance may be configurable because this limit value is stored in the Real-time database (DB) and can be modified by the mobile application at any point if necessary. The ESP-8266 sends these events to the cloud platform through the internet.
Like the previous intelligent thing, its external structure surrounds the electronic elements and is adapted to the internal structure as well as to the inferior part of the edge of the desk.
This intelligent thing is assembled and mounted on the inferior part of the desk to measure the proximity of the child to the workspace. It has a switch to turn it on/off, LED's which indicate the device's state (power on or charging status) and two micro USB ports: one for charging the device and the other one for programming the device.
The incorporated batteries in these intelligent things (Figure 7 and Figure 10) allow their continuous functionality for up to six hours (Table 2). However, a homework session does not need that much time. This means that intelligent things can be recharged after two homework sessions. More importantly, these devices manage the power consumption by software, allowing the sending of information to the internet only when an update of the child's behavior is detected ( Table 2).

E. ROBOTIC ASSISTANT
The robotic assistant is the third part of the smart-home environment for the home activity support service. Unlike the intelligent things, it acts as an actuator too, according to the processed information by the data processing subsystem. The robot receives commands from that subsystem when certain events occur. For example, if the environment detects that the child is playing with the chair (Table 2), the robot will receive a command to interact with the child trying to regulate or influence its action. The type of interaction can be found in chapter 3.2.
According to its hardware, it has the same process of designing and printing as the intelligent things, just with additional details regarding the assembling and space distribution ( Figure 13). 160258 VOLUME 8, 2020   Its internal structure supports some of the electronic modules inside, such as microprocessors, USB battery charger, DC motors, motor driver, wheels, batteries. This internal structure with the elements is mounted on the support structure of the robotic assistant (Figure 13).
At the same time, its external structure supports the internal structure with its electronic elements, and the reduced board computer (Raspberry Pi), LCD touchscreen, proximity sensor, speakers, audio amplifier, LED's, switches, and push buttons ( Figure 14).   This robotic assistant is easy to assemble and disassemble. If it is required to program more features, solely the lateral cover needs to be removed (white part on the right side), where the USB ports connected to the microprocessor are located. Like intelligent things, the robotic assistant has a sensor connected to the ESP-8266. It is an infrared distance sensor (sharp-gp2y0a21) to measure its proximity to the child [34]. This parameter allows knowing if the child is in/at the workstation.
This robotic assistant can move across the workplace by its wheels, allowing it to make several movements such as   walking/rolling, moving forward and back or turning to the left or right. These movements are controlled by a motor driver which is connected to the ESP-8266 board and they are part of some actions represented in the feedback.
According to its electrical schema, the battery board manager takes the energy provided by the batteries and returns the 5-volt output. The first one provides a current of 2.1 Amps to supply the Raspberry Pi and the touch screen mounted on it, the second one provides 1 Amp to supply the ESP8266. (Figure 14). This, in turn, supplies 3,3V to the rest of the components inside the robot such as an audio amplifier, motor driver, and the proximity sensor ( Figure 15). This robotic assistant has incorporated batteries ( Figure 14) which allow the continuous functionality of the robotic assistant up to two hours twenty minutes (See Table 2. in the Smart-home environment functional test subsection). To manage power consumption, some functionalities are carried out only when the system requires them such as movements and sound. Additionally, there is a push-button on the top of the robot to command the start and end of the homework session. This button changes a state in the database of the cloud platform ( Figure 16).
Both the intelligent things and the movement of the robotic assistant are programmed by Arduino IDE [35]. The Arduinos' programs are built on the base of several software libraries: -ESP8266WiFi.h (compatibility with the Board).   On the other hand, the touch screen with the Raspberry Pi provides an audiovisual interface that interacts with the child during the development of homework. This interface has incorporated animations based on an image sequence, which are created with a friendly appearance and show several expressions to highlight some interventions and actions. The animations are synchronized with recorded dialogues, all of which are provided by experts (therapists) working on the treatment of children with ADHD. The result is a robot ''speaking to the child'' with facial expressions like it is shown in the following figure, when a therapeutic action (intervention) is demanded.
The touch screen also provides the child with a menu of commands to pause the session and notify the reason to the cloud platform. These commands are buttons with icons that represent the action.
When pressed, the cloud real-time database updates the parameters of the current session (such as the number of pauses), registers the reason for the pause and computes new timeslots.  According to the motive, the robot responds with audiovisual feedback. All executed commands are stored in the real-time DB with a timestamp and a unique log identification. The program has been developed in Python language to be executed by the Raspberry Pi.
Finally, the robotic assistant is assembled and located on the desk, close to the workspace to assist the child during the development of the homework.

F. DATA INTEGRATION SUBSYSTEM
The data integration employs a NoSQL Real-Time database located in the cloud of Google. This DB uses a serverless service which provides very low latency for frequent state-syncing of the updates. Acquired events from the sensors inside the intelligent objects and the interactive commands caught by the touch screen in the robotic assistant are stored in this DB. This acquired data, the processed information, the user's authentication information such as sign up and sign-in credentials, and the configuration parameters of the Intelligent Things and the Robotic Assistant are stored and structured in a JSON file.
There are several ''branches'' sorted by alphabetical order, which grow with each homework session as it creates a new branch with every new session that stores and updates useful information to know how much time was invested to finish the homework. In the same way, data is saved on how many interruptions and breaks the session had, the invested time in each interruption, and break( Figure 20).

G. DATA PROCESSING SUBSYSTEM
In the cloud platform, there are several cloud functions programmed to run automatically a backend code in response to events triggered by the intelligent things and the robotic assistant. These functions take the data from the Real-Time Database to process them and make decisions. Each function takes data from the DB and updates them in the same branch of the data structure. The algorithm processes and transforms the data into new knowledge ( Table 2). The written code deploys the function and defines the conditions under which the function should be executed. If the function needs to create new information, it will add another branch to the tree as it occurs in the authentication process of new users [36].
When the event provider generates an event, the code is triggered in different ways as described here: -If the function is busy handling many events, the cloud creates more instances to handle work faster. -If there are updates in the function, all instances for the old version are cleaned up and replaced by new instances. -If a function is deleted, all instances are cleaned up, and the connection between the function and the event provider is removed [36].
In the Backend script, it is programmed with a code that implements Boolean logic to get new information based on the detected events in the smart objects (Table 2).
According to the newly processed information and the commands provided by the child, cloud functions update in   the Real-time DB leading to the robotic assistant executing specific feedback (programed audio-visual dialogue).
Regarding the authentication process, users can easily sign up for an account. The information stored has no personal user data, such as names, addresses, or any other additional information that reveals the identity of the child or his/her parents. We have provided users credentials to participants (username and password) to test the authentication process. In another cloud function, the credentials are compared with the saved sign up credentials, leading to a successful login if they match.
According to the configuration of Intelligent Things and the Robotic Assistant, there is a function which allows remote calibration of the limited parameters of the things and the robotic assistant (through the mobile application), such as the maximum distance between the child and the desk and a maximum allowed acceleration in the chair. This cloud function takes the updates and registers the changes in the DB.

H. MONITORING AND CONFIGURATION SUBSYSTEM
A developed Android application has a user-friendly interface to display the information processed and stored by the cloud platform about the child's behavior during the homework session. Additionally, it provides access to the stored information about previous sessions.
When the user opens the mobile application, three tabs are shown ( Figure 24). The real-time DB tab shows, as the name implicates, real-time information about the behavior of the child while sorting this information differently compared to the firebase platform.
The storage tab allows seeing stored information from previous sessions through a list of all sessions performed by the child. The parent/therapist could select one of them and find below a summary of the most relevant information about that specific session.
The settings tab allows modifying the configuration parameters of the intelligent things and the robotic assistant and therefore shows the three configuration parameters to be modified by sliders. Furthermore, parents and therapists can calibrate the intelligent things and sensor accuracy remotely.

A. THE SMART-HOME ENVIRONMENT WORKING
Once positioned in the work scenario, it is only necessary to turn on the intelligent things and the robotic assistant to connect them automatically to the internet by Wi-Fi. From that moment onwards these elements are able to provide information which then will be stored in the cloud. However, the smart environment will only start working once the child presses the red button on top of the robotic assistant starting the information transfer of the intelligent things and the robotic assistant to the cloud platform.
The child will be taught by the therapist how to use the robotic assistant correctly as this robot follows an operation mode and its manuals are provided by the engineers.
With the help of these things, it is possible to monitor and guide children with ADHD during the development of his/her homework. Therapists and parents can observe the behavior of the child on the chair and his/her position towards the desk in real-time. Even the presence of interruptions or distractions as well as their reasons (drink water, clean the desk, check the agenda, ask for help, etc.) is being displayed.
The expert (occupational therapist) involved in the project prepared the guidelines for the development of the sessions  with the robotic assistant according to the information provided by the intelligent things. These guidelines are made for children in a range between six to twelve years old and they are adapted to the behavior of the child and the interaction with the touch screen of the robot. Each instruction is designed to guide the child to perform his/her homework correctly. Additionally, the robotic assistant, if needed, allows integrating more dialogues and functionalities such as games and instructions for physical activities.

B. SMART-HOME ENVIRONMENT FUNCTIONAL TEST
The functionality of the intelligent things and the robotic assistant was tested with children who have not been diagnosed with ADHD. The tests were performed with ten children, five boys, and five girls, at the age of six. The therapist proposed a short and easy homework (7 min) about drawing something inside the room as well as a long task (25 min) for writing a letter, drawing an animal, and drawing the robotic assistant. The first task was designed to observe the behavior of the child during homework development, such as e.g. movement habits. An engineer prepared the workspace, attaching the devices to the inferior part of the chair and the desk. However, the child does not perceive them as they are not wired objects ( Figure 27). The accuracy of intelligent things depends on the sensitivity of the sensors, which can be calibrated by the mobile application according to the behavior of each child as each one has a different way to do their homework. The intelligent things were calibrated while the children performed the short task to get them ready for the long homework and future homework. These calibrations are necessary only the first time before using the devices and they are needed to generate a tolerance range to avoid false positive/negative events in the future.
The data were acquired and sent to the cloud without any kind of problem as the communication among intelligent things, robotic assistant, and mobile application were carried by a cloud platform (Figure 4). No interference occurs since these elements connect to Wi-Fi in an environment without any kind of noise or possible interference. If the connection with the internet fails, the devices store the information locally with timestamps until the connectivity to the cloud is restored.
The robotic assistant was positioned in front of the child in the workspace, having a friendly and easy to understand interface with most functionalities working automatically. The child just needs to follow the instructions while the robotic assistant would know the instruction is being followed by the information provided by the intelligent things in the chair and desk. Additionally, the child can provide instruction to the robotic assistant by the buttons on the screen.
The robotic assistant was designed to help children with ADHD carry out their homework at home on a table and sitting on a chair. First, the robot helps the child to organize his/her homework to avoid any kind of distractions while later performing the homework. During the performance of the homework, this solution defines brief intervals of physical activity to raise the level of concentration. This proposal is valid for all kinds of homework in which children must remain seated: pencil and paper homework, reading books or documents, or computer homework, among others.
Once the robot is turned on, it welcomes the child and encourages him/her to start with one task with a positive message. The proposal is accompanied by a brief message as to why he/she should start with this specific homework. This task should be more demanding in terms of attention since now at the beginning the child is the most rested. The reason for this procedure is based on the idea that with time the child will learn to plan and organize the homework without depending on the robot.
A friendly face appears on the touch screen to encourage the child as he or she perseveres in the activity and gives messages of encouragement. If the sensor on the chair and table registers that the child has gotten up, having previously spent a short time on the specific homework, the robot tries to redirect the child to sit down by a voice message. If the child has been sitting for a longer period, and the devices are detecting that the child is moving around a lot or has already gotten up, the robot encourages the child to do a short physical action, such as jumping or dancing to a short tune to raise his or her level of concentration. The data acquisition and set-up of the commands are fast while internally the functions of the Raspberry pi device and the cloud platform take time to deploy.
Additionally, a qualitative evaluation has been carried out with the same group of children in the functional test. This evaluation measures several aspects according to the use of Intelligent Things and the Robotic Assistant. Additionally, a short survey was done to know if their positioning, turning on and off process as well as charging operations are easy to understand for these children, ensuring they will be by default easy for parents as well.
The children accepted the presence of the robot and valued it as a positive aid. During the different homework sessions, the robot was interacting with the children, giving messages of encouragement, or redirecting them to the homework when necessary. The children and therapist both confirmed that the robot was not a distracting agent.

VI. DISCUSSION AND CONCLUSIONS
This project development has taken into account the knowledge of experts (occupational therapists) as well as engineers (electronic, and computer science specialized). This multidisciplinary team worked together to combine the principles of robotic assistance with IoT to provide the first version of a service to help improve independent occupational performance in children and adolescents on homework activity. The collaboration within the team of professionals has been very useful since the beginning, especially with the identification of children's necessities in his/her homework scenario. Furthermore, team collaboration was very important in the design stage to develop a functional prototype. The main result presented in this work is this first approximation (as a prototype) to the final service.
In a further development, we hope that the result of this solution developed in the framework of the smart home can help children with learning or attention difficulties to carry out (school-related) homework. Additionally, the smart-home environment will be able to provide these children's therapists and parents with the ability to observe them in their natural environment without any kind of disturbance.
The functional test of the service shows that the robotic assistant could be a useful object to assist with the development of the children's homework. It can detect when the child falls for a distraction and immediately catches the child's attention to provide him/her with instructions to keep the focus on the homework (feedback). The design of this prototype has been created to be appealing and simple at the same time to prevent unwanted distractions. The tests performed did not show any incorrect system behavior (for example, the robot suggests the child pays more attention when it is inappropriate). However, when evaluating the functioning of the robot in a group of children diagnosed with ADHD, it will be necessary to examine whether the children show such behavior, as it could influence the ability to use and the acceptance of the system, particularly in the long term and especially with ADHD.
On the other hand, this robot has an ergonomic design that allows adding more functionalities and features such as games, images, movement sequences, voices, expressions, etc. At the same time, intelligent objects could be equipped with more sensors inside, providing more information about the behavior of the child regarding the object. Moreover, more intelligent things could be developed to attach them to other objects (such as pens and hand bands) to retrieve even more data. The collected information could generate new useful knowledge for the therapists and parents. The design of the robotic assistant and the intelligent things allows applying the smart-home environment in any homework scenario as there is simply a need for a chair and a desk, which allows it to be used with and by any child with or without difficulties in the academic activities' achievement. The intelligent things and the robotic assistant could be configured according to the behavior of each child. For children with learning or attention difficulties, this can make the difference between being self-sufficient or always depending on an adult to supervise them.
The preliminary results of the functional tests show that the service is aligned with the requirements provided by therapists, meaning that the service is ready for a clinical pilot for becoming a therapeutic tool. Furthermore, this smart-home environment is a first approximation which would provide a new way for therapy with children with ADHD using IoT technology. This prototype allows showing its possibilities and functionalities to stakeholders and families to allow entering the next phases related to the experimental design and clinical validation.
There are several scenarios for applying a smart-home environment as a therapeutic method while the concept would remain the same. This project demonstrates the feasibility of applying this intelligent environment into the homework scenario. New scenarios would (for therapeutic use) require new intelligent things that should be specifically designed for these purposes. This first approach simply establishes the basis for the development of those new intelligent things since they will share the same methods and communication models.
The challenges of creating a smart-home environment have focused on translating the type of required interaction for pervasive therapy into intelligent things. Aspects such as the robot's level of communication, its aesthetics, the interaction with the child, or the degree of sensitivity of the intelligent things have been widely discussed during this development.
Although the authors consider that the current solution is adjusted to the therapeutic needs, the design of the complete environment reflects the need for adaptation to each child as well as to the type of therapy. Thus, it can be seen in the proposed overall architecture how deeply the smart-home environment is connected to the caregivers and therapists. Another important aspect is that although the aim is to extend the therapy to the domestic environment and allow the child greater autonomy in doing homework at home, it is an activity controlled by the parents. In this sense, it is not necessary to implement additional measures related to the set up of the environment (noise management, multiple inhabitants, etc.). This fact also avoids the need to face most of the technical challenges in the development of smart-home solutions as the physical environment is under the control of the parents and there is no uncertainty in the system. Activities have been the cornerstone to link the worlds of therapy and engineering. The term has facilitated the multidisciplinary approach, allowing the discussion of all the involved actors during the analysis, design, and functional validation stages. In this research group, she was involved with research on applied research projects on AAL and home building automation supported by regional and national funds. Her current research interests include serious games, intelligent systems and developing and validating them in e-health and telemedicine scenarios).