iotsys: a communication stack and integration...

33
10.09.2014 Institute of Computer Aided Automation Automation Systems Group Vienna University of Technology Vienna, Austria http://www.auto.tuwien.ac.at IoTSyS: A communication stack and integration middleware for the Internet of Things Markus Jung

Upload: others

Post on 30-Mar-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: IoTSyS: A communication stack and integration …files.meetup.com/14335402/markus_jung_iotsys.pdfIoTSyS: A communication stack and integration middleware for the Internet of Things

10.09.2014

Institute of Computer Aided Automation

Automation Systems Group

Vienna University of Technology

Vienna, Austria

http://www.auto.tuwien.ac.at

IoTSyS: A communication stack and integration middleware for the Internet of Things

Markus Jung

Page 2: IoTSyS: A communication stack and integration …files.meetup.com/14335402/markus_jung_iotsys.pdfIoTSyS: A communication stack and integration middleware for the Internet of Things

Part of computer science faculty at TU Vienna

Group lead by Ao. Univ. Prof. Dr. techn. Wolfgang Kastner

Research and teaching in the domain of automation

Industrial automation

Home- and building automation

Wireless Sensor Networks

Research areas

Deep integration

Security and Safety

Smart grids, Smart Cities, Internet of Things

Wireless sensor networks, Web of Things

Standardization (OASIS OBIX TC Member, Cooperation with KNX Association)

Automation Systems Group

IoTSyS

Page 3: IoTSyS: A communication stack and integration …files.meetup.com/14335402/markus_jung_iotsys.pdfIoTSyS: A communication stack and integration middleware for the Internet of Things

The Internet of Things – Interoperability Challenge

IoTSyS

Many application domains, a lot of (existing) technologies and protocols Interoperability Challenge!

Page 4: IoTSyS: A communication stack and integration …files.meetup.com/14335402/markus_jung_iotsys.pdfIoTSyS: A communication stack and integration middleware for the Internet of Things

Motivating application scenarios

IoTSyS

Smart Homes

Smart Buildings

Smart Grids

Page 5: IoTSyS: A communication stack and integration …files.meetup.com/14335402/markus_jung_iotsys.pdfIoTSyS: A communication stack and integration middleware for the Internet of Things

Heterogeneity is a problem

Existing Technologies

IoTSyS

Page 6: IoTSyS: A communication stack and integration …files.meetup.com/14335402/markus_jung_iotsys.pdfIoTSyS: A communication stack and integration middleware for the Internet of Things

State of the Art - Web services based integration of home and building automation:

DPWS

UPnP

OASIS Open Building Information Exchange

BACnet/WS

OPC UA

IoT related standards

Constrained RESTful environments (CoAP)

ETSI M2M

OMA Lightweight M2M Web objects

IPSO application profile

Popular Non-Web-Service technologies

Extensible Messaging and Presence Protocol (XMPP)

Message Queuing Telemetry Transport (MQTT)

Integration approaches

IoTSyS

Page 7: IoTSyS: A communication stack and integration …files.meetup.com/14335402/markus_jung_iotsys.pdfIoTSyS: A communication stack and integration middleware for the Internet of Things

We need a common standardized communication stack for the IoT

IoTSyS

• Open standard including the application layer service and information models

• Based on existing interoperable Web and Internet technologies

• Reusing existing standards as much as possible

Page 8: IoTSyS: A communication stack and integration …files.meetup.com/14335402/markus_jung_iotsys.pdfIoTSyS: A communication stack and integration middleware for the Internet of Things

Communication stack alternatives

IoTSyS

Feature Alternatives

Information Models & Application Layer Services

OASIS oBIX (or ETSI M2M)

OPC UA BACnet/ WS

OMA LWM2M

IPSO web objects

Custom

Information Encoding

XML JSON EXI Technology specific binary

Custom (text or binary-based)

Message exchange protocol

HTTP SOAP COAP XMPP Platform specific (DCOM, .NET Remoting, Java RMI, JMS)

Custom (TCP- or UDP-based)

Transport protocol

TCP UDP

Networking IPv4 IPv6

Page 9: IoTSyS: A communication stack and integration …files.meetup.com/14335402/markus_jung_iotsys.pdfIoTSyS: A communication stack and integration middleware for the Internet of Things

“Instead of running a control network specific building automation protocol such as BACnet/IP or KNX over 6LoWPAN, OBIX together with compression and UDP/IP binding may be a solution. Careful design of the OBIX objects and elements used would be important to keep packet sizes reasonable.”, 6LoWPAN: The Wireless Embedded Internet by Zach Shelby and Carsten Bormann, 2009

IoTSyS motivating idea

IoTSyS

Page 10: IoTSyS: A communication stack and integration …files.meetup.com/14335402/markus_jung_iotsys.pdfIoTSyS: A communication stack and integration middleware for the Internet of Things

IoTSyS technology choice

IoTSyS

Feature Alternatives

Information Models & Application Layer Services

OASIS OBIX OPC UA BACnet/ WS

OMA LWM2M

IPSO web objects

Custom

Information Encoding

XML JSON EXI Technology specific binary

Custom (text or binary-based)

Message exchange protocol

HTTP SOAP COAP XMPP Platform specific (DCOM, .NET Remoting, Java RMI, JMS)

Custom (TCP- or UDP-based)

Transport protocol

TCP UDP

Networking IPv4 IPv6

Page 11: IoTSyS: A communication stack and integration …files.meetup.com/14335402/markus_jung_iotsys.pdfIoTSyS: A communication stack and integration middleware for the Internet of Things

Internet of Things communication stack for „native“ IoT devices (e.g. 6LoWPAN devices based on Contiki) and integration middleware (BACnet, KNX, EnOcean, Wireless M-Bus, RFID, Weather Data)

OASIS OBIX used for a normalized device representation and M2M features like data points, histories and alarming

HTTP or better CoAP (async. comm. + group comm. + optional non-reliable) for RESTful interaction

Efficient encodings (JSON, EXI, schema-informed EXI)

IPv6 for addressing each device, datapoint

Peer-to-peer interaction for 6LoWPAN devices based on IPv6 multicast

HTML5 control interface at the gateway

Java based gateway (Raspberry PI), Contiki-based stack for 6LoWPAN devices

http://code.google.com/p/iotsys

IoTSyS

Page 12: IoTSyS: A communication stack and integration …files.meetup.com/14335402/markus_jung_iotsys.pdfIoTSyS: A communication stack and integration middleware for the Internet of Things

IoTSyS Stack

IoTSyS

Page 13: IoTSyS: A communication stack and integration …files.meetup.com/14335402/markus_jung_iotsys.pdfIoTSyS: A communication stack and integration middleware for the Internet of Things

IoTSyS Integration Middlware

IoTSyS

Page 14: IoTSyS: A communication stack and integration …files.meetup.com/14335402/markus_jung_iotsys.pdfIoTSyS: A communication stack and integration middleware for the Internet of Things

IoTSyS Gateway

Platform: Java 7

SCM: Mercurial

Build and Dependency Management: Gradle

Runtime: OSGi / Standalone

Protocol bundles: KNX, BACnet, EnOcean, W-Mbus, RFID, Weather data

Software: Tomcat 8, OBIX implementation with HTTP, CoAP, SOAP message exchange and XML, JSON, EXI, OBIX Binary message encoding, CouchDB

Security: SSL/TLS, username/password or certificate based client auth

Hardware: Raspberry PI + GPIO extension + USB comm. Modules

IoTSyS Devices

Contiki-based implementation

Prototype implementation for Z1 platform

Fact Sheet

IoTSyS

Page 15: IoTSyS: A communication stack and integration …files.meetup.com/14335402/markus_jung_iotsys.pdfIoTSyS: A communication stack and integration middleware for the Internet of Things

OBIX was designed around the REST paradigm from the very beginning.

Automation systems and datapoint orientation tends to be fitting better to REST oriented Web service than procedure or service oriented SOAP Web services

OBIX provides a simple object model + standardized representation of common features found in automation systems (datapoints, time series, alarming, watches, …)

OBIX 1.1 committee draft for public review (July, 2013) contains protocol binding to CoAP and message encodings for EXI and JSON.

Internet of Things and M2M: IPSO alliance advocates IP(v6) on smart objects relying on OBIX as object model + custom extension (c.f. IPSO application framework, Aug. 2012). ETSI oneM2M - TR 102966 advocates for using OBIX as common XML syntax for REST interaction with fieldbus protocols.

Why ?

IoTSyS

Page 16: IoTSyS: A communication stack and integration …files.meetup.com/14335402/markus_jung_iotsys.pdfIoTSyS: A communication stack and integration middleware for the Internet of Things

Tridium

main company behind OBIX

Tridium has been acquired by Honeywell

Niagara AX framework implementation > 398.788 instances operating world wide

http://www.tridium.com/cs/products_/_services/niagaraax

IBM Shaspa Bridge (IBM Germany now active member in OBIX TC)

Pacific controls

G-360 integrated controller based on OBIX http://www.pacificcontrols.net/news-media/g-360-router-integrated-controller.html

… and many more

OBIX industry adoption

IoTSyS

Page 17: IoTSyS: A communication stack and integration …files.meetup.com/14335402/markus_jung_iotsys.pdfIoTSyS: A communication stack and integration middleware for the Internet of Things

IoTSyS

Object model

Everything is modeled as object.

An object can have a set of standardized attributes and may contain an arbitrary number of children objects.

An object can be a basic value object having a „val“ attribute with a value based on XML schema data types, a list, operation or reference to any other object.

Page 18: IoTSyS: A communication stack and integration …files.meetup.com/14335402/markus_jung_iotsys.pdfIoTSyS: A communication stack and integration middleware for the Internet of Things

Standardized objects: Nil, Range, Weekday, Units, …

Standardized services:

Point semantic: writable point

Watches: observe datapoints

Histories: query historical values

Feeds: retrieve latest events

Alarming

OBIX contracts can be used to define templates and rules how to represent KNX datapoint types, group communication objects, devices and different views. OBIX contracts are exchanged out-of-band

Security:

Apply state-of-the art transport level security (HTTPS, SSL/TLS, DLTS)

Authorization implementation specific

OBIX 1.1 core library

IoTSyS

Page 19: IoTSyS: A communication stack and integration …files.meetup.com/14335402/markus_jung_iotsys.pdfIoTSyS: A communication stack and integration middleware for the Internet of Things

OBIX example object

REST interaction with HTTP:

OBIX 1.1 object interaction

IoTSyS

OBIX Request HTTP Method Target

Read GET Any object with an ref

Write PUT Any object with an href and writable=true

Invoke POST Any op object

Delete DELETE Any object with an href and writable=true

Page 20: IoTSyS: A communication stack and integration …files.meetup.com/14335402/markus_jung_iotsys.pdfIoTSyS: A communication stack and integration middleware for the Internet of Things

IoTSyS OBIX Contracts

IoTSyS

Page 21: IoTSyS: A communication stack and integration …files.meetup.com/14335402/markus_jung_iotsys.pdfIoTSyS: A communication stack and integration middleware for the Internet of Things

IPv6 multicast address on every oBIX basic data point (bool, real, int)

Group similar devices

Group sensors and actuators (e.g. push button and light switch actuator) allows to avoid single point of failure

IoTSyS Group Communication

IoTSyS

Page 22: IoTSyS: A communication stack and integration …files.meetup.com/14335402/markus_jung_iotsys.pdfIoTSyS: A communication stack and integration middleware for the Internet of Things

IoTSyS Obelix

IoTSyS

• HTML5 User Interface

• Generic OBIX browser

• AngularJS + jsPlumb

• Wire objects graphically together to assign group communication relationship

• Group communication is persisted directly on the IoTSyS devices and within a group address table at the gateway

Page 23: IoTSyS: A communication stack and integration …files.meetup.com/14335402/markus_jung_iotsys.pdfIoTSyS: A communication stack and integration middleware for the Internet of Things

Temperature Controller

Weather Controller

Binary numeric operations

+, -, *, /, %

Logical operations

AND, OR, XOR, NAND

==, <, <=, >=, >

IoTSyS Logic

IoTSyS

Page 24: IoTSyS: A communication stack and integration …files.meetup.com/14335402/markus_jung_iotsys.pdfIoTSyS: A communication stack and integration middleware for the Internet of Things

IoTSyS Gateway

IoTSyS

• Java-based gateway

• OSGI container

• For each technology a separate bundle

• Based on the OBIX abstraction services such as discovery, histories, group communication, etc. are provided.

Page 25: IoTSyS: A communication stack and integration …files.meetup.com/14335402/markus_jung_iotsys.pdfIoTSyS: A communication stack and integration middleware for the Internet of Things

Any Contiki-compatible hardware platform

E.g. Zolertia Z1 platform (TI MSP430 + CC 2430) + phidgets

IoTSyS Devices

IoTSyS

Page 26: IoTSyS: A communication stack and integration …files.meetup.com/14335402/markus_jung_iotsys.pdfIoTSyS: A communication stack and integration middleware for the Internet of Things

Any embedded PC platform supporting Java

E.g. Raspberry PI + extension boards + USB comm. Modules “Swiss army knife for building automation systems”

IoTSyS Gateway

IoTSyS

Page 27: IoTSyS: A communication stack and integration …files.meetup.com/14335402/markus_jung_iotsys.pdfIoTSyS: A communication stack and integration middleware for the Internet of Things

Comprehensive Lab for automation systems

IoTSyS Test lab @ Automation Systems Group

IoTSyS

Page 28: IoTSyS: A communication stack and integration …files.meetup.com/14335402/markus_jung_iotsys.pdfIoTSyS: A communication stack and integration middleware for the Internet of Things

IoTSyS demo suitcase - BACnet

IoTSyS

LEDs simulate HVAC system:

• Valves

• Ventilation

• Heat Register

• Cool Register

Potentiometer to simulate outside temperature

• PXC22-E.D. Compact Controller (BACnet/IP)

• Simulated HVAC system controlled through analog outputs (10V)

• Room is simulated through a virtual OBIX object

Page 29: IoTSyS: A communication stack and integration …files.meetup.com/14335402/markus_jung_iotsys.pdfIoTSyS: A communication stack and integration middleware for the Internet of Things

IoTSyS demo suitcase – KNX room model

IoTSyS

• KNX text display + alarm signal

• KNX Room thermostat

• Displays Comfort-Mode, Standby Mode

• Target value difference (+/- 3 Grad)

• KNX switching actuator

• KNX 3-fold push button

• Toggles light

• Manual alarm signal

• 3rd button dynamic configurable

Page 30: IoTSyS: A communication stack and integration …files.meetup.com/14335402/markus_jung_iotsys.pdfIoTSyS: A communication stack and integration middleware for the Internet of Things

IoTSyS demo suitcase– EnOcean

IoTSyS

• 6 LoWPAN temperature sensor

• EnOcean contact sensor

• If contact open standby mode

• In case of bad weather alarm

Page 31: IoTSyS: A communication stack and integration …files.meetup.com/14335402/markus_jung_iotsys.pdfIoTSyS: A communication stack and integration middleware for the Internet of Things

Zolertia WSN Gateway

Wifi AP

DHCP Server

6LoWPAN border router

IoTSyS Gateway on Raspberry Pi deployed

Java 7

OSGI based gateway

USB connectors and GPIO extensions to various bus systems

IoTSyS demo suitcase – internals

IoTSyS

Page 32: IoTSyS: A communication stack and integration …files.meetup.com/14335402/markus_jung_iotsys.pdfIoTSyS: A communication stack and integration middleware for the Internet of Things

IoTSyS demo suitcase – internals

IoTSyS

• USB connectors for Raspberry PI

• Ethernet plug for Internet-uplink and local DHCP clients

Page 33: IoTSyS: A communication stack and integration …files.meetup.com/14335402/markus_jung_iotsys.pdfIoTSyS: A communication stack and integration middleware for the Internet of Things

www.iotsys.org

IoTSyS