the dog gateway - intro
DESCRIPTION
A short introduction to the Dog Gateway and its internal modules / logicTRANSCRIPT
![Page 1: The Dog Gateway - Intro](https://reader034.vdocument.in/reader034/viewer/2022042700/555b8621d8b42acd238b4812/html5/thumbnails/1.jpg)
The Domotic OSGi
Gateway A SHORT INTRODUCTION
A brief overview on the Dog gateway, starting from the design
principles and going deep into the gateway architecture and
modules, with some application sample
![Page 2: The Dog Gateway - Intro](https://reader034.vdocument.in/reader034/viewer/2022042700/555b8621d8b42acd238b4812/html5/thumbnails/2.jpg)
What? COMFORT
LIGHTING
SECURITY
HEATING AND
AIR CONDITIONING
NETWORKS ENTERTAINMENT
REMOTE
DEVICES
10/24/2013 The Domotic OSGi Gateway - Dario Bonino
![Page 3: The Dog Gateway - Intro](https://reader034.vdocument.in/reader034/viewer/2022042700/555b8621d8b42acd238b4812/html5/thumbnails/3.jpg)
How? HOW TO GET IT?
PLANTS / ARCHITECTURES / CONTROL / INTELLIGENCE
NETWORKS DEVICES
INTELLIGENCE
10/24/2013 The Domotic OSGi Gateway - Dario Bonino
![Page 4: The Dog Gateway - Intro](https://reader034.vdocument.in/reader034/viewer/2022042700/555b8621d8b42acd238b4812/html5/thumbnails/4.jpg)
However WIRELESS
WIRED
WIRED
MOST DIFFUSED NETWORKS
10/24/2013 The Domotic OSGi Gateway - Dario Bonino
![Page 5: The Dog Gateway - Intro](https://reader034.vdocument.in/reader034/viewer/2022042700/555b8621d8b42acd238b4812/html5/thumbnails/5.jpg)
Whishlist
10/24/2013 The Domotic OSGi Gateway - Dario Bonino
SINGLE POINT OF ACCESS
SINGLE LANGUAGE / PROTOCOL
FULLY INTEGRATED SYSTEM
FLEXIBILITY
EASY DEVELOPMENT
(EXTERNAL APPLICATIONS)
NETWORK-LEVEL
INDEPENDENCE
SUPPORT FOR MANY TECHNOLOGIES
![Page 6: The Dog Gateway - Intro](https://reader034.vdocument.in/reader034/viewer/2022042700/555b8621d8b42acd238b4812/html5/thumbnails/6.jpg)
Abstraction / Information hiding SEGREGATION OF THE “PARTS” THAT ARE MOST LIKELY TO CHANGE, THUS PROTECTING OTHER
COMPONENTS FROM EXTENSIVE MODIFICATION IF THE “PARTS” ARE CHANGED
10/24/2013 The Domotic OSGi Gateway - Dario Bonino
NETWORK CHANGES IN TIME
APPLICATION PROGRAMMING
INTERFACE
CHANGES IN FEATURES
CHANGES IN PARADIGMS
SINGLE
SLOWLY EVOLVING
INFORMATION HIDING
![Page 7: The Dog Gateway - Intro](https://reader034.vdocument.in/reader034/viewer/2022042700/555b8621d8b42acd238b4812/html5/thumbnails/7.jpg)
Natural Modeling Technology indepedent Home Modeling
Representing devices, appliances, furniture and home environments
in a technology independent, yet actionable manner.
![Page 8: The Dog Gateway - Intro](https://reader034.vdocument.in/reader034/viewer/2022042700/555b8621d8b42acd238b4812/html5/thumbnails/8.jpg)
Natural Modeling
10/24/2013 The Domotic OSGi Gateway - Dario Bonino
LAMP On Off
![Page 9: The Dog Gateway - Intro](https://reader034.vdocument.in/reader034/viewer/2022042700/555b8621d8b42acd238b4812/html5/thumbnails/9.jpg)
Natural Modeling
10/24/2013 The Domotic OSGi Gateway - Dario Bonino
Meter + Plug On Off
Power Energy
![Page 10: The Dog Gateway - Intro](https://reader034.vdocument.in/reader034/viewer/2022042700/555b8621d8b42acd238b4812/html5/thumbnails/10.jpg)
*10*1*1#
Natural Modeling
10/24/2013 The Domotic OSGi Gateway - Dario Bonino
*10*0*1#
Off On
![Page 11: The Dog Gateway - Intro](https://reader034.vdocument.in/reader034/viewer/2022042700/555b8621d8b42acd238b4812/html5/thumbnails/11.jpg)
A Device is...
10/24/2013 The Domotic OSGi Gateway - Dario Bonino
WHAT IT CAN DO UPON COMMAND (FUNCTIONALITIES)
WHAT IT CAN BE (STATES)
WHAT IT CAN DO AUTONOMOUSLY (NOTIFICATIONS)
![Page 12: The Dog Gateway - Intro](https://reader034.vdocument.in/reader034/viewer/2022042700/555b8621d8b42acd238b4812/html5/thumbnails/12.jpg)
DogOnt
10/24/2013 The Domotic OSGi Gateway - Dario Bonino
SEMANTIC WEB technologies: OWL, Reasoning, SPARQL
ONTOLOGY Formal model for representing devices, rooms, furniture, etc.
TECHNOLOGY INDEPENDENT Hides network-specific information (segregated in a single modeling tree)
![Page 13: The Dog Gateway - Intro](https://reader034.vdocument.in/reader034/viewer/2022042700/555b8621d8b42acd238b4812/html5/thumbnails/13.jpg)
Core modeling
10/24/2013 The Domotic OSGi Gateway - Dario Bonino
Thing
Building
Environment
Building
Thing Functionality
State
Notification
Command StateValue
Notification
Functionality
Query
Functionality
Command
Functionality
UnControllable
Controllable
hasState
hasFunctionality
isIn
hasCommand
hasCommand
generateCommand*
hasNotification
![Page 14: The Dog Gateway - Intro](https://reader034.vdocument.in/reader034/viewer/2022042700/555b8621d8b42acd238b4812/html5/thumbnails/14.jpg)
Device Modeling
10/24/2013 The Domotic OSGi Gateway - Dario Bonino
Lamp
House
Plant Electric
System
Controllable
Building
Thing Building
Environment
Building Apartment
Room
isIn /
contains
OnOff
Functionality
Control
Functionality
Functionality
hasFunctionality
Discrete
State
OnOff
State
State hasState
![Page 15: The Dog Gateway - Intro](https://reader034.vdocument.in/reader034/viewer/2022042700/555b8621d8b42acd238b4812/html5/thumbnails/15.jpg)
Device Modeling - Instances
10/24/2013 The Domotic OSGi Gateway - Dario Bonino
Sample Room
Lamp
Switch
OnOffFunctionality
OnNotification
OffCommand
OnOffNotification
Functionality
OffNotification
OnOffState
OnOffState
hasState OnCommand
hasFunctionality
hasCommand hasCommand
isIn isIn
hasState
hasFunctionality
hasNotification
hasNotification Generates
Command
generates
Command
OnStateValue
OffStateValue
OffStateValue
OnStateValue
![Page 16: The Dog Gateway - Intro](https://reader034.vdocument.in/reader034/viewer/2022042700/555b8621d8b42acd238b4812/html5/thumbnails/16.jpg)
Over 150 Controllables...
10/24/2013 The Domotic OSGi Gateway - Dario Bonino
![Page 17: The Dog Gateway - Intro](https://reader034.vdocument.in/reader034/viewer/2022042700/555b8621d8b42acd238b4812/html5/thumbnails/17.jpg)
Dog Domotic OSGi Gateway
Architecture, technology and APIs
![Page 18: The Dog Gateway - Intro](https://reader034.vdocument.in/reader034/viewer/2022042700/555b8621d8b42acd238b4812/html5/thumbnails/18.jpg)
General Architecture
10/24/2013 The Domotic OSGi Gateway - Dario Bonino
D D D D D D D A
GW GW
Application
Dog
IP-Network
Rest API
Wireless Protocol (e.g., ZigBee) Wired Protocol (e.g., KNX)
e.g., /devices/lamp1/commands/on
![Page 19: The Dog Gateway - Intro](https://reader034.vdocument.in/reader034/viewer/2022042700/555b8621d8b42acd238b4812/html5/thumbnails/19.jpg)
REST
• Representational State Transfer
– a stateless, client-server, cacheable communications protocol (over HTTP)
• HTTP requests to:
– post data (create and/or update),
– read data (e.g., make queries),
– and delete data.
10/24/2013 The Domotic OSGi Gateway - Dario Bonino
![Page 20: The Dog Gateway - Intro](https://reader034.vdocument.in/reader034/viewer/2022042700/555b8621d8b42acd238b4812/html5/thumbnails/20.jpg)
Dog RESTful API
• Quickly evolving / constantly updated
• Technology independent (based on DogOnt)
• Transfers XML / JSON data
• 3 main APIs
– Devices
– Environment
– Rules
10/24/2013 The Domotic OSGi Gateway - Dario Bonino
![Page 21: The Dog Gateway - Intro](https://reader034.vdocument.in/reader034/viewer/2022042700/555b8621d8b42acd238b4812/html5/thumbnails/21.jpg)
Device API
• Allows to manage connected devices:
– query the gateway about installed devices, their location, functionalities
and configurations;
– require execution of commands to existing devices;
– monitor device statuses and measures in real-time;
– add, modify or update the set of devices controlled through
the gateway;
10/24/2013 The Domotic OSGi Gateway - Dario Bonino
![Page 22: The Dog Gateway - Intro](https://reader034.vdocument.in/reader034/viewer/2022042700/555b8621d8b42acd238b4812/html5/thumbnails/22.jpg)
Device API - Query
10/24/2013 The Domotic OSGi Gateway - Dario Bonino
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<dhc:dogHomeConfiguration>
<dhc:controllables>
<dhc:device domoticSystem="ELITE" id="oven1" class="ElectricalOven">
<dhc:description>A ElectricalOven instance named oven1</dhc:description>
<dhc:isIn>kitchen</dhc:isIn>
<dhc:pluggedIn>MainsPowerOutlet_p12_kitchen</dhc:pluggedIn>
<dhc:controlFunctionality class="OnOffFunctionality">
<dhc:commands>
<dhc:command name="on" class="OnCommand"/>
<dhc:command name="off" class="OffCommand"/>
</dhc:commands>
Resource: /devices
![Page 23: The Dog Gateway - Intro](https://reader034.vdocument.in/reader034/viewer/2022042700/555b8621d8b42acd238b4812/html5/thumbnails/23.jpg)
Device API – Execute Commands
10/24/2013 The Domotic OSGi Gateway - Dario Bonino
PUT http://the.dog.address/devices
/lamp1/commands/on
Resource: /devices/{device-id}/commands/{command-name}
Off On
![Page 24: The Dog Gateway - Intro](https://reader034.vdocument.in/reader034/viewer/2022042700/555b8621d8b42acd238b4812/html5/thumbnails/24.jpg)
Device API – Status
10/24/2013 The Domotic OSGi Gateway - Dario Bonino
?
GET http://the.dog.address/devices/lamp1/status
Resource: /devices/status
Resource: /devices/{device-id}/status
{
“id" : “lamp1",
"description" : " The lamp over the closet near to the livingroom armchair",
"active" : true,
"status":[
{
“OnOffstate" : "on"
}
]
}
On
![Page 25: The Dog Gateway - Intro](https://reader034.vdocument.in/reader034/viewer/2022042700/555b8621d8b42acd238b4812/html5/thumbnails/25.jpg)
Device API - Update
10/24/2013 The Domotic OSGi Gateway - Dario Bonino
A lamp
The Lamp near to the armchair
PUT http://the.dog.address/devices/lamp1
{
"description" : "The Lamp
near to the armchair
"
}
![Page 26: The Dog Gateway - Intro](https://reader034.vdocument.in/reader034/viewer/2022042700/555b8621d8b42acd238b4812/html5/thumbnails/26.jpg)
Environment API
• Allows to manage information
about the environment:
– insert, update or delete rooms;
– insert, update or delete flats;
• E.g.,
– GET
http://www.mydog.com/environm
ent/flats/flat/rooms
10/24/2013 The Domotic OSGi Gateway - Dario Bonino
{
"rooms":[
{
"id" : "kitchen",
"class" : "Kitchen",
"description" : "The best room in the house“
},
{
"id" : "sam_bedroom",
"class": "Bedroom“,
"description" : "Sam's bedroom"
}
]
}
![Page 27: The Dog Gateway - Intro](https://reader034.vdocument.in/reader034/viewer/2022042700/555b8621d8b42acd238b4812/html5/thumbnails/27.jpg)
Rules API (under refinement)
10/24/2013 The Domotic OSGi Gateway - Dario Bonino
IF
WHEN
THEN
TRIGGER-EVENT
CONDITION (S)
ACTION(S)
OR-IF
WHEN
TRIGGER-EVENT
CONDITION (S)
![Page 28: The Dog Gateway - Intro](https://reader034.vdocument.in/reader034/viewer/2022042700/555b8621d8b42acd238b4812/html5/thumbnails/28.jpg)
Domotic OSGi Gateway
• Based on OSGi (formerly Open Services Gateway Initiative) which facilitates: – componentization of software modules and applications
– assures remote management and interoperability
– provides specifications, reference implementations (Eclipse Equinox, Apache Felix), test suites and certification
• Many interacting components organized in 4 layers: – Core
– Drivers
– Communication
– Addons
10/24/2013 The Domotic OSGi Gateway - Dario Bonino
Communication
Core Addons
Drivers
![Page 29: The Dog Gateway - Intro](https://reader034.vdocument.in/reader034/viewer/2022042700/555b8621d8b42acd238b4812/html5/thumbnails/29.jpg)
Architecture
10/24/2013 The Domotic OSGi Gateway - Dario Bonino
Communication
Core Addons
Drivers
Core functions: house
model, device model, unit of
measure support, device
management
Rest API
Rules,
Historic Storage
Support to different
technologies
![Page 30: The Dog Gateway - Intro](https://reader034.vdocument.in/reader034/viewer/2022042700/555b8621d8b42acd238b4812/html5/thumbnails/30.jpg)
Device Handling - Attachment
10/24/2013 The Domotic OSGi Gateway - Dario Bonino
Network Z-Wave
Dog
SimpleLamp(lamp1) Z-Wave nodeId: 1
Z-Wave Lamp Driver
Device Manager
Device Factory
Z-Wave Gateway Driver
Z-Wave Network Driver
Detection
Identification
Creation
Match & Attach
![Page 31: The Dog Gateway - Intro](https://reader034.vdocument.in/reader034/viewer/2022042700/555b8621d8b42acd238b4812/html5/thumbnails/31.jpg)
Device Handling – Attachment (2)
10/24/2013 The Domotic OSGi Gateway - Dario Bonino
Network
KNX
Dog
SimpleLamp(lamp1) KNX groupAddress: 1/1/1
KNX Lamp Driver
Device Manager
Device Factory
KNX Gateway Driver
KNX Network Driver Creation
Match & Attach
Configuration
![Page 32: The Dog Gateway - Intro](https://reader034.vdocument.in/reader034/viewer/2022042700/555b8621d8b42acd238b4812/html5/thumbnails/32.jpg)
Device Handling - Operation
10/24/2013 The Domotic OSGi Gateway - Dario Bonino
Network Z-Wave
Dog
Z-Wave Lamp Driver
Z-Wave Network Driver
Rest API
Executor
Application
SimpleLamp(lamp1) Z-Wave nodeId: 1
![Page 33: The Dog Gateway - Intro](https://reader034.vdocument.in/reader034/viewer/2022042700/555b8621d8b42acd238b4812/html5/thumbnails/33.jpg)
Device Handling - Operation
10/24/2013 The Domotic OSGi Gateway - Dario Bonino
Network KNX
Dog
KNX Lamp Driver
KNX Network Driver
Rest API
Executor
Application
SimpleLamp(lamp1) KNX groupAddress: 1/1/1
![Page 34: The Dog Gateway - Intro](https://reader034.vdocument.in/reader034/viewer/2022042700/555b8621d8b42acd238b4812/html5/thumbnails/34.jpg)
Questions? More details available on-line:
http:domoticdog.sourceforge.net