# Home Automation System Based on Intelligent Transducer Enablers
## 5 HASITE: Self-Configuring Intelligent Transducer System
### Intelligent Transducer Enablers  
On the left of Figure 4 is depicted a representation of all of the ITNs included in HASITE at a given moment. They are represented as a response from the API. We chose JSON to represent the information due to its simplicity and parsing capabilities. In order to build an ontology around the ITNs and ITEs, other notations could be used, such as XML or Resource Description Framework (RDF) [43] (e.g., JavaScript Object Notation for Linked Data (JSON-LD), Turtle). On the right side of Figure 4, the complete ITE information of the first ITN listed can be seen. This information is related to a light regulator ITN. In this case, only the essential information for transducer identification and communication is present. Additional information, such as calibration parameters or the physical ITN location, could be included. The first fields of the data include parameters that univocally define the ITN, like the database internal ID, the serial number or the IP currently assigned to the ITN. Next, the ITE of the transducer is represented, including a descriptive name, the ITE type and version and the list of sensors and actuators present. In the case shown, the ITN only has one actuator, the one that allows the regulation of the light intensity. For such an actuator, four parameters are defined: a descriptive name, the Uniform Resource Identifier (URI) of the transducer and two additional fields. The first additional field (\"json_req\") includes the data related to an ITN that can be read or written by using PUT or GET requests. In this case, the request must include a JSON object with a field called \"ActuatorValue\". The data type of this field is \"Unsigned Int\", and it supports a range from \"0\" to \"100\" with a resolution of \"1.0\". The second field (\"json_res\") presents the message format of the response that an ITN will send when a PUT request is issued. A Boolean field will indicate whether the request was successfully processed or not (in case the message was malformed or the values were out of the specified range). ITEs, like TEDS, can be stored locally (i.e., on the ITN) or remotely (i.e., on the Internet, in a machine in the local area network or even in the home automation gateway). In HASITE's implementation, each ITN stores only a unique identifier, formed by the ITE identifier and the ITN serial number. This unique identifier is used by the home automation gateway to fetch the ITE when the self-configuring and self-registration mechanisms take place or when the information about an ITN is accessed through the API. For instance, in the implementation whose results are presented in Section 8, the unique identifier is a group of three numbers that follow the structure shown in Table 2. Using this type of identifier, there are 16,777,216 types of ITN, 4,294,967,296 serial numbersand 256 possible revisions of an ITN. A more complex identifier could be created and easily obtained by using the unique MAC address of the network interfaces of the ITN. The following are the most important benefits of using ITEs:  
* An ITE enables transducer self-identification. Thanks to the information carried by an ITE, every transducer can be identified and described by the host. * An ITE provides long-term self-documentation. For instance, the ITE of a sensor can be updated to store information such as the location of the sensor, its re-calibration data, repair records or maintenance-related data. * The automatic transfer of ITE data to the network avoids entering sensor parameter values by hand, which might be affected by human errors. * An ITE eases the maintenance, upgrade and field deployment of the sensors. This helps to reduce the total life-cycle cost of the system. * The plug-and-play capability offered by an ITE allows the nodes to be connected with other standardized physical communications media and to keep on operating without requiring any software change. * The transducer information and its messages are auto-descriptive.