## 3 System Architecture
### Application Layer  
As discussed in Section 1, one of the trends in the world of technology is the connected TV. The television has evolved from being \"the boob tube\" to be an Internet-connected hybrid device capable of running applications that use that connection, employing user interfaces adapted to screen size and interactive interfaces through devices such as remote distance or pointing devices. Although standards such as HbbTV seem to be the future option for interactive television, where producers offer interactive content independent from the device manufacturer, today SmartTV covers most market shares, despite being a manufacturer-dependent platform without regard to any type of standard. Neither technologies are mutually exclusive, since the same device can integrate a SmartTV platform dependent on the manufacturer and be compatible with the HbbTV standard for interactive content consumption. The dependence of a SmartTV platform of specific standards of each manufacturer causes technical fragmentation between the different platforms, so the standard development applications are clearly affected. For this reason, more and more users choose to use external devices such as Set Top Box (STB) that converts a conventional TV into a smart TV. Within this sector various TV manufacturers platforms can be differentiated (Apple TV, Google TV, etc.), that offer applications through their own portals or generic devices based on a particular platform, e.g., Android.  
In the proposed architecture, although the data stored in the logical layer are accessible from any device and application, it intends to use the television as the main access device. The TV is a device that exists in most houses, runs longer than any other appliance throughout the day, and is an accessible means to a great deal of user profiles. The running of applications on television requires certain peculiarities that are different from running on other platforms, due to features such as the size  
Figure 3: Interaction between SmartResidents actors.  
and orientation of the screen and the limitations of user interaction. On a television, screen orientation is always horizontal and larger than other devices, and users are placed at a much larger visualization distance. This influences the design of the user interface so that navigation is usually established from left to right, based on the horizontal orientation of the screen (where the available actions are always visible through simple menus). In addition, the user always marks the active choice not to lose focus and the elements are at a distance that allows a perfect differentiation.  
The objective of the application is to take advantage of the size of the television screen, typically above 32-inches, to visualize an overview of the urbanization, where the exact location of each of the sensors and actuators can be observed. Google Maps [27] provides a set of APIs that let you embed the functionality of Google Maps into a website or application. The goal is to use this tool to display a satellite map geo-located at the urbanization. On this map, using the API mentioned and the longitude and latitude data over its real sensor situation on the ground, a number of markers associated with each of the deployed sensors are strategically placed, showing, at all times, the last data read, as well as the date/time of reading. This mechanism offers clear advantages from the point of view of application functionality, as the user sees the exact location of the sensors and has access to real time information on the map itself. On the other hand, it is worth mentioning the advantages of using an open, flexible, and updated mapping system, where all maps are in the cloud providing fast, efficient, and highly available access.