# IoT Middleware Platforms for Smart Energy Systems: An Empirical Expert Survey
## 2 Background
### Semantic Interoperability and Data Models  
Semantic interoperability problems typically arise from ambiguities caused by missing standardization in the metadata schemata employed by the components of a heterogeneous system. The schemata most commonly found in the context of building automation are:  
_eXtensible Markup_ Language (XML) [29]: which is a hierarchically structured data model, where comparison with a XML Schema Definition (XSD) is used to verify its structure. Information about things (concepts) discussed by the data model is generally fully contained within a single XML document. _Semantic Web Technologies_[28]: The Resource Description Framework (RDF) and RDF schema (RDFS) constitute a graph-structured data model that is designed as a distributed knowledge-based system. RDF uses shared resource identifiers, which allows for expanding knowledge by defining entities that are linked to each other. The Web Ontology Language (OWL) RDF extends the RDF capability to organize concepts in a more object-oriented fashion and a more formalized description logic (cardinality and allowable relationships--OWL). _JavaScript Object Notation (JSON)_[30]: is a lightweight, data-interchange, language independent format which uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl and Python. JSON is built on two structures: a collection of name/value pairs, such as objects, structs and associative arrays in usual programming languages; and an ordered list of values similar to arrays, vectors and lists. Significant effort has been devoted to introducing universal standards for a metadata schema in building automation by several non-commercial initiatives, such as Project Haystack [31], the Brick Schema [32], the IPSO smart object data model [33], the oneM2M specifications [34] and the Smart Appliance REFerence ontology (SAREF) [35], developedby the European Telecommunications Standards Institute (ETSI). The three most popular projects are:  
_Project Haystack_ is a suite of open-source technologies. The main concept in Haystack is the use of \"tags,\" which are pieces of information that document the attributes of any entity. Haystack defines data types (an extended version of JSON, to facilitate data exchange), file types (text format definitions to exchange the Haystack data types), an HTTP API protocol (for data exchange between servers and devices), an ontology (with a specific focus on buildings and districts) and so called \"Defs\" that can be used to define an extend the Haystack's ontology. Practitioners can use each of these definitions on their own or as a complete stack. The technologies and semantic data models provided by Project Haystack can be used in a wide variety of applications, including automation and control in energy, HVAC and lighting systems. The _Brick Schema_ provides an extensible open-source dictionary with terms, concepts and relationships needed for modeling buildings and districts. Flexible data models are designed to seamlessly integrate with existing systems. Brick applies a tagging system similar to Project Haystack; However, Brick provides formal semantic rules to ensure consistency and modeling support for spacial information, control relationships and operational relationships [36]. The _SAREF_ ontology explicitly specifies core concepts in the smart applications domain, the main relationships between these concepts and axioms to constrain the usage of these concepts and relationships. The basic concept in SAREF is a device, which is defined as any tangible object that provides functions in a building. Functions are associated with commands and devices can change states. Devices can offer their functions as services to other devices via network. SAREF provides building blocks for each of these concepts and allows practitioners to separate and recombine the ontology based on individual needs. SAREF models can be seamlessly integrated with the Brick Schema.