# The Effects of Augmented Reality Companion on User Engagement in Energy Management Mobile App
## 3 Materials and Methods
### System Architecture  
We had the following three entities for serving notification messages to our mobile apps: (1) the participants' residences with IoT sensors installed for measuring temperature and CO2, (2) the PHOENIX server that recorded indoor condition data and sent notification messages, and (3) Firebase server worked for our mobile apps. Figure 1 depicts the overall system architecture. First, each residence installed an IoT sensor on a radiator in each room and one CO2 sensor to check the residence's CO2 level. Every IoT sensor on a radiator had an actuator; thus, the participant could control room temperature by changing the value of the radiator through the actuator. On the other hand, the CO2 sensor could only measure the indoor CO2 level without controlling the ventilation system. On average, 11 IoT sensors were installed in each apartment. All IoT sensors were connected remotely to the PHOENIX server for data recording and data analysis for producing notification messages (a in Figure 1). Second, the PHOENIX server received IoT sensor data from the participants' apartments every five minutes. When the room temperature needed to be updated, the participant sent a control command for the sensor actuator in the target room through the mobile app. The sequence order (a-b-c-d) is highlighted by the purple lines in Figure 1. The PHOENIX server stored the IoT sensor data and the requests for changing a radiator temperature (c in Figure 1) created by a participant through a mobile device (b in Figure 1). The control command of the sensor actuator was also archived in the Firestore database (d in Figure 1). The PHOENIX server had several algorithms to calculate when to send a notification message to inform advice that could be useful to a receiver for managing energy consumption while maintaining a proper indoor condition for their living. The information in the notification message differed depending on the time and temperature, which was labeled with different notification types. For example, if the room temperature was maintained at a higher degree than the room's average, the type of notification message was a heating alert. In the opposite case, a cooling alert was the type of notification message. In addition, when the period that energy prices become expensive in the near future or when the room temperature changes frequently during the high energy price period, a flexibility recommendation message is sent. Accordingly, each notification message contained a type of  
Figure 1: The system architecture of the PHOENIX solution consists of the PHOENIX server, Firebase server, and our mobile apps. notification, a time the notification message was issued, a room that triggered the notification, and a message on how to behave to achieve an ideal temperature while reducing energy consumption and maintaining the quality of residents' comfort level. Once the notification message was issued, it was stored in the Realtime database within the Firebase server (e in Figure 1). Third, the Realtime database only stored incoming notification messages from the PHOENIX server. When the PHOENIX server issued a notification message, the Firebase function processed it to deliver to a rightful participant's device. The sequence order (e-f-g-d-b) is drawn by the red lines in Figure 1. The Firebase function monitored the Realtime database to check when it received a notification message (f in Figure 1). When the Realtime database received the notification message, the Firebase function also stored the notification message in the Firestore database (g in Figure 1). The notification message was organized based on the receiver. In order to identify the receiver, the receiver's information was collected when the participants opened our mobile apps with their accounts. On the first connection with their account on our mobile apps, the device access token used to identify the destination of notification messages from the Realtime database was stored (b and d represented with the blue lines in Figure 1).