Gateway A SHORT INTRODUCTION A brief overview on the Dog gateway, - - PowerPoint PPT Presentation

gateway
SMART_READER_LITE
LIVE PREVIEW

Gateway A SHORT INTRODUCTION A brief overview on the Dog gateway, - - PowerPoint PPT Presentation

T he Dog 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 http://dog-gateway.github.io/ WIRELESS


slide-1
SLIDE 1

The Dog 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

http://dog-gateway.github.io/

slide-2
SLIDE 2

Protocol Jungle

WIRELESS WIRED WIRED

4/3/2014 The Dog Gateway - Dario Bonino

slide-3
SLIDE 3

Open Horizontal AmI Architectures

2013/2014 Ambient intelligence: technology and design 3

D D D D D D D D D D D D Application Application Application Application Neutral representation Basic services API Protocol interfaces/drivers Data exchange Real time processing Intelligence Application (service, agent) Intelligence

slide-4
SLIDE 4

The Dog Gateway

2013/2014 Ambient intelligence: technology and design 4

D D D D D D D D

Domotic devices (switches, buttons, relays, sensors, meters, …) Domotic bus (wired, wireless)

GW

Bus-to-IP gateway Bus-to-serial gateway

GW

Ethernet, Wi-Fi, USB

User Interface

Mobile, Web, Home Display, Multi Touch, Accessibility, Natural language, …

Data analysis

ERP, Web services, Stream processors, Datawarehouse Dog Bundles Device abstraction, Event abstraction, State abstraction, Rules engine, …

User Interface User Interface Smart Applianc e

slide-5
SLIDE 5

Design objectives

4/3/2014 The Dog 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

slide-6
SLIDE 6

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

4/3/2014 The Dog Gateway - Dario Bonino

NETWORK CHANGES IN TIME APPLICATION PROGRAMMING INTERFACE CHANGES IN FEATURES CHANGES IN PARADIGMS SINGLE SLOWLY EVOLVING

INFORMATION HIDING

slide-7
SLIDE 7

Natural Modeling

TECHNOLOGY INDEPEDENT HOME MODELING Representing devices, appliances, furniture and home environments in a technology independent, yet actionable manner.

slide-8
SLIDE 8

Natural Modeling

4/3/2014 The Dog Gateway - Dario Bonino

LAMP

On Off

slide-9
SLIDE 9

Natural Modeling

4/3/2014 The Dog Gateway - Dario Bonino

Meter + Plug

On Off Power Energy

slide-10
SLIDE 10

*10*1*1#

Natural Modeling

4/3/2014 The Dog Gateway - Dario Bonino

*10*0*1#

Off On

slide-11
SLIDE 11

A Device is...

4/3/2014 The Dog Gateway - Dario Bonino

WHAT IT CAN DO UPON COMMAND (FUNCTIONALITIES) WHAT IT CAN BE (STATES) WHAT IT CAN DO AUTONOMOUSLY (NOTIFICATIONS)

slide-12
SLIDE 12

Device types…

4/3/2014 The Dog Gateway - Dario Bonino

slide-13
SLIDE 13

Device Modeling - Instances

4/3/2014 The Dog 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 OnStateValue OffStateValue OffStateValue OnStateValue

slide-14
SLIDE 14

Example Device description (XML)

4/3/2014 The Dog Gateway - Dario Bonino

slide-15
SLIDE 15

Dog

THE GATEWAY

Architecture, technology and APIs

slide-16
SLIDE 16

General Architecture

4/3/2014 The Dog 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

slide-17
SLIDE 17

Dog

  • 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

4/3/2014 The Dog Gateway - Dario Bonino

Communication Core Addons Drivers

slide-18
SLIDE 18

Architecture

4/3/2014 The Dog Gateway - Dario Bonino

Communication: Rest API Core functions: house model, device model, unit of measure support, device management Addons: Rules, Historic Storage, … Drivers: Support to different technologies

slide-19
SLIDE 19

Architecture

4/3/2014 The Dog Gateway - Dario Bonino

Rest API Web Socket API Core Library Measure Library Stream Library Log Helper House Model Device Manager Monitor Admin Clock JAXB Library RXTX Rule Engine Event Store Xively Client KNX Z-Wave Echelon MyHome Texas ZigBee EnOcea n

slide-20
SLIDE 20

Dog Vet: the Admin UI

4/3/2014 The Dog Gateway - Dario Bonino

http://dog.example.com:8080/admin/ui/index.html

slide-21
SLIDE 21

Dog REST API

PROGRAMMING DOG

Architecture, technology and APIs

slide-22
SLIDE 22

Dog RESTful API

  • Quickly evolving / constantly updated
  • Technology independent (based on DogOnt)
  • Transfers XML / JSON data
  • 3 main APIs

– Devices – Environment – Rules

  • Documentation:

http://dog-gateway.github.io/rest-api.html

  • REST endpoint: http://dog:8080/api/v1/

4/3/2014 The Dog Gateway - Dario Bonino

slide-23
SLIDE 23

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

4/3/2014 The Dog Gateway - Dario Bonino

slide-24
SLIDE 24

Device API - Query

4/3/2014 The Dog 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

slide-25
SLIDE 25

Device API – Execute Commands

4/3/2014 The Dog Gateway - Dario Bonino

PUT

http://dog/devices /lamp1/commands/on

Resource: /devices/{device-id}/commands/{command-name}

Off On

slide-26
SLIDE 26

Device API – Status

4/3/2014 The Dog Gateway - Dario Bonino

?

GET

http://dog/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

slide-27
SLIDE 27

Device API - Update

4/3/2014 The Dog Gateway - Dario Bonino

A lamp The Lamp near to the armchair

PUT

http://dog/devices/lamp1 { "description" : "The Lamp near to the armchair " }

slide-28
SLIDE 28

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/en vironment/flats/flat/rooms

4/3/2014 The Dog Gateway - Dario Bonino

{ "rooms":[ { "id" : "kitchen", "class" : "Kitchen", "description" : "The best room in the house“ }, { "id" : "sam_bedroom", "class": "Bedroom“, "description" : "Sam's bedroom" } ] }

slide-29
SLIDE 29

Rules API (under refinement)

4/3/2014 The Dog Gateway - Dario Bonino

IF WHEN THEN TRIGGER-EVENT CONDITION (S) ACTION(S) OR-IF WHEN TRIGGER-EVENT CONDITION (S)

slide-30
SLIDE 30

Dog REST API

HANDS-ON

Architecture, technology and APIs