Académique Documents
Professionnel Documents
Culture Documents
4, NOVEMBER 2008
1656
I. INTRODUCTION
Domotic systems, also known as home automation systems,
have been available on the market for several years, however
only in the last few years they started to spread also over residential buildings, thanks to the increasing availability of low cost
devices and driven by new emerging needs on house comfort,
energy saving, security, communication and multimedia services.
Current domotic solutions suffer from two main drawbacks:
they are produced and distributed by various electric component manufacturers, each having different functional goals and
marketing policies; and they are mainly designed as an evolution of traditional electric components (such as switches and
relays), thus being unable to natively provide intelligence beyond simple automation scenarios. The first drawback causes
interoperation problems that prevent different domotic plants
or components to interact with each other, unless specific
gateways or adapters are used. While this was acceptable in
the first evolution phase, where installations were few and
isolated, now it becomes a very strong issue as many large
buildings are mixing different domotic components, often
1
D. Bonino et al.: The DOG Gateway: Enabling Ontology-based Intelligent Domotic Environments
1657
connected or smart devices able to provide complex functionalities and to control (or be controlled by) other devices, through
a specific, often IP-based, communication protocol.
The Home Gateway is the key component for achieving interoperation and intelligence in IDEs; it is designed to respond
to different requirements, ranging from simple bridging of network-specific protocols to complex interaction support. These
requirements are grouped in 3 priority levels (Table I): priority 1
requirements include all the features needed to control different
domotic systems using a single, high-level, communication protocol and a single access point, priority 2 requirements define all
the functionalities needed for defining inter-network automation
scenarios and to allow inter-network control, e.g., to enable a
Konnex switch to control an OpenWebNet light, and priority 3
requirements are related to intelligent behaviors, to user modeling and to adaptation.
A domotic home equipped with a Home Gateway is defined
an Intelligent Domotic Environment if the gateway satisfies at
least priority 1 and priority 2 requirements. Priority 3
requirements can be considered advanced functionalities and
may impose tighter constraints on the gateway, both from the
software architecture and from the computational power
points of view.
While priority 1 requirements basically deal with architectural and protocol issues, requirements listed in priorities 2
and 3 imply the adoption of sophisticated modeling techniques. In fact, the cornerstone of intelligent behaviors and
applications is a suitable House Modeling methodology and
language (R2.1). In DOG, we chose to adopt a semantic approach and to adopt technologies developed in the Semantic
Web community, to solve this knowledge representation problem and enable DOG to host or support intelligent applications.
Modeling the house structure, its domotic components, their
states and functionalities is achieved by defining a custom
ontology, called DogOnt [7]. According to the classical Grubers definition [8] an ontology is an explicit specification of
a conceptualization, which is, in turn, the objects, concepts,
and other entities that are presumed to exist in some area of
interest and the relationships that hold among them. Todays
W3C Semantic Web standard suggests a specific formalism
for encoding ontologies (OWL), in several variants that vary
in expressive power [9].
1658
Priority
R1 Interoperability
R2 Automation
R3 Intelligence
TABLE I
REQUIREMENTS FOR HOME GATEWAYS IN IDES.
Requirement
Description
R1.1 Domotic network connection
Interconnection of several domotic networks.
R1.2 Basic Interoperability
Translation / forwarding of messages across different networks.
R1.3 High level network protocol
Technology independent, high-level network protocol for allowing neutral access to
domotic networks.
R1.4 API
Public API to allow external services to easily interact with home devices.
R2.1 Modeling
Abstract models to describe the house devices, their states and functionalities, to support
effective user interaction and to provide the basis for home intelligence.
R2.2 Complex scenarios
Ability to define and operate scenarios involving different networks / components.
R3.1 Offline Intelligence
Ability to detect misconfigurations, structural problems, security issues, etc.
R3.2 Online Intelligence
R3.3 Adaptation
R3.4 Context based Intelligence
DOG is a home gateway designed to transform new or existing domotic installations into IDEs by fulfilling the requirements defined in Section II. Design principles include
versatility, addressed through the adoption of an OSGi based
architecture, advanced intelligence support, tackled by formally modeling the home environment and by defining suitable reasoning mechanisms, and accessibility to external applications, through a well defined, standard API also available
through an XML-RPC [10] interface. OSGi [11] is an Universal Middleware that provides a service-oriented, componentbased environment for developers and offers standardized
ways to manage the software life cycle. It provides a generalpurpose, secure, and managed framework that supports the
deployment of extensible service applications known as bundles.
D. Bonino et al.: The DOG Gateway: Enabling Ontology-based Intelligent Domotic Environments
Ring 1 encompasses the DOG bundles that provide an interface to the various domotic networks to which DOG can be
connected. Each network technology is managed by a dedicated driver, which abstracts network-specific protocols into a
common, high-level representation that allows to uniformly
drive different devices (thus satisfying requirement R1.1).
Ring 2 provides the routing infrastructure for messages traveling across network drivers and directed to DOG bundles. Ring
2 also hosts the core intelligence of DOG, based on the
DogOnt ontology, that is implemented in the House Model
bundle (R1.2, R1.3, R2.1 and, partially, R2.23).
Ring 3 hosts the DOG bundles offering access to external
applications, either by means of an API bundle, for OSGi applications, or by an XML-RPC endpoint for applications
based on other technologies (R1.4).
In the following, services and functionalities of each bundle
are described in more detail.
A. Ring 0
DOG library This bundle acts as a library repository for all
other DOG bundles. In particular, it defines the interfaces
(listed in Table II) through which bundles can interact. Interaction of different bundles is based on exchanging DogMessage objects, also defined here. DogMessages are composed
by a type declaration, that identifies the type of content, and a
3
In the currently implemented version, external applications can control
many domotic networks as a single home automation system, while networkto-network integration is still being implemented.
1659
1660
TABLE II
INTERFACES DEFINED BY THE DOG LIBRARY BUNDLE
Interface
ApiConnector
Configurable
CommandExecutor
HouseModeling
StateAndCommandChecker
StateListener
StateProvider
Configurator
DevicesListUpgrade
Description
Allows OSGi bundles to control the domotic environment through a technology independent set of functionalities. More precisely, it allows to get the IDE configuration, to send commands to connected devices, to query the device states and to receive
state-change notifications.
Supports runtime configuration of bundles. Every Configurable bundle can be tuned by external applications, that can adjust the
parameters exposed through this interface.
Provides means to propagate commands to the proper bundles.
Provides access to the house formal model (DogOnt). It is used to retrieve the house configuration, which is propagated to
network drivers, to get device re-mapping, allowing to automatically recognize new devices, to semantically check commands
and notifications, and to resolve group commands (scenarios).
Defines methods for validating commands and states in DOG. Validation is both syntactic, ensuring that received messages (in
XML) are well formed and valid, and semantic, thus guaranteeing that every device is driven by using the appropriate commands according to the HouseModeling interface.
Allows bundles to be notified when managed devices change their states.
Provides information about the current state of devices.
Defines a repository of start-up bundle configurations. Each bundle accesses the services exposed through this interface in the
start-up phase, to retrieve the needed configuration parameters.
Permits to update the routing tables and the list of devices currently managed by DOG. In conjunction with the Configurable
interface, it allows runtime changes of the DOG configuration, supporting dynamic scenarios where new devices / networks can
be hot-plugged into the system.
C. Ring 2
Message Dispatcher This bundle acts as an internal router,
delivering messages to the correct destinations, be they the
network drivers (commands and state polls) or other DOG
bundles (notifications). Routing is driven by a routing table
where network drivers are associated to high-level device
identifiers, enabling DOG to deliver commands to the right
domotic network. For example, if a high-level DogMessage
specifies that the kitchen light must be lit, and if the House
Model reports that the light belongs to Konnex plant, then the
message dispatcher routes the message to the Konnex network
driver. The routing table, dynamically built through the DevicesListUpgrade service, is initially provided by the Configurator bundle during the start up phase and constantly updated
by Network Drivers.
D. Ring 3
API Services provided by DOG are exposed to external
OSGi-based applications by means of the API bundle. Four
main functionalities are provided according to the ApiConnector interface:
getConfiguration. The ability to request the house
configuration, including the possible states and the
allowed commands of each device managed by
DOG.
setCommand. The ability to send single and multiple
commands to devices managed by DOG, independently from the domotic network to which they are
connected (thus supporting inter-network scenarios).
setListener. The possibility to register an application
as event listener, thus enabling event-based interaction with IDEs, even if managed networks natively
require a polling-based interaction.
getDeviceStatus. The ability to directly check the
state of house devices, bypassing the internal cache
hosted by the Status bundle.
D. Bonino et al.: The DOG Gateway: Enabling Ontology-based Intelligent Domotic Environments
1661
1662
?l owl:hasValue ?h}
Fig. 7 The SPARQL query needed to retrieve the commands that can be
issued to a DimmerLamp.
Interoperation can be of two main kinds: network-tonetwork and application-to-network. In the former, devices
belonging to a given domotic system, e.g., a Konnex button,
communicate with devices connected to another network, e.g.
a OpenWebNet Lamp. The latter, instead, is required whenever an application (either OSGi-based or XML-RPC enabled)
needs to interact with devices belonging to different domotic
systems, at the same time. DOG currently supports application-to-network interoperation by exploiting SPARQL queries
on the ontology and automatic DogMessage generation.
Example Consider a sample interoperation scenario where all
the lights of a given domotic home must be switched off (allOFF). Some rooms of the sample home have lights controlled
by a Konnex plant while the remaining are managed through a
BTicino MyHome plant (OpenWebNet).
To activate the allOFF scenario, external applications send
to DOG a message stating that all Lamps must be turned off.
The DOG API bundle reacts by querying the DogOnt ontology for all devices of class Lamp. The transitive closure of
DogOnt, performed by the HouseModel during start-up, ensures that all sub-types of Lamp (e.g., dimmer lamps, flashing
lamps, etc.) are retrieved by the query process (Figure 8), too.
SELECT ?lamp WHERE
{?lamp rdf:type dog:Lamp}
Fig. 8 The SPARQL query that retrieves all Lamps, independently from
the domotic system they are connected to.
After retrieving all involved devices (in a networkindependent manner), the API bundle automatically generates
a set of DogMessages, one per each discovered lamp, and
forwards them to the CommandExecutor bundle. Messages
are then validated and propagated to the MessageDispatcher
D. Bonino et al.: The DOG Gateway: Enabling Ontology-based Intelligent Domotic Environments
1663
Count
28
30
1664
Table IV shows the degree with which DOG, and the related works described in this section, satisfy requirements for
IDE domotic gateways (listed in Table I).
VII. CONCLUSIONS
This paper proposed the DOG platform as a means to
smoothly evolve simple, isolated domotic networks into comprehensive, home-wide Intelligent Domotic Environments.
Several issues have been addressed related to network interoperation, to flexible integration and to cost affordability.
Based on a sound, dynamic framework such as OSGi, DOG
allows to manage different networks in a light-weigth manner,
exploiting the DogOnt ontology to support complex interoperation, generalization and validation tasks. Many interesting
research streams stem from this first work on semantics-based
domotic interoperation; the authors are currently using the
DogOnt model to perform structural and functional reasoning
on the environment controlled by DOG and, at the same time,
they are developing semantic-based autonomic policies for
DOG to intelligently handle device failures.
REFERENCES
[1]
[2]
[3]
[4]
[5]
[6]
[7]
[8]
[9]
[10]
[11]
[12]
[13]
[14]
[15]
[16]
[17]
[18]
[19]
[20]