DemoCamps November 2013 Grenoble

Projets Eclipse pour l'IoT, le M2M et le SOHO

Didier Donsez Université de Grenoble LIG / ERODS [email protected]

25/11/13 D. Donsez, Projets Eclipse pour l'IoT, le M2M, le SOHO From Processing.org 1 Qui connait les acronymes IoT, M2M et SOHO ?

25/11/13 D. Donsez, Projets Eclipse pour l'IoT, le M2M, le SOHO 3 Remember

Average skill level of the end-user PhD e l Engineer a White collar c s

c i

m Teen Kid h t i Desperated r a g

o Housewife l Number of human end-users Senior

Number of Baby computers time

25/11/13 D. Donsez, Projets Eclipse pour l'IoT, le M2M, le SOHO 4 The Internet of (chatty) Things (IoT)

RFID / NFC phones sensor nodes

SCADA robot

Instrumentation Communication Mediation Decision Re-action Exploration

25/11/13 D. Donsez, Projets Eclipse pour l'IoT, le M2M, le SOHO 6 Big Picture of IoT Applications

Network categories

WAN

MAN

LAN WLAN WSN

PAN BAN

Smart Office & Smart Building Smart city Geographic Home scale SOHO 25/11/2013 7 25/11/13 D. Donsez, Projets Eclipse pour l'IoT, le M2M, le SOHO 7 Big Picture of IoT Applications

25/11/13 D. Donsez, Projets Eclipse pour l'IoT, le M2M, le SOHO 8 25/11/13 Les Services Machine-à-Machine (M2M): Nouvelle vague du "e-business" :  Services à valeur ajoutée basés sur les dispositifs enfouies  Intégration sécurisée et résiliente des environnements physiques / opérationnels et des infrastructures IT A

Extract Transform Load n a

Environnement l

Infrastructure IT y Physique s

Action e

● Support "temps réel" (just-in-time) à la prise de décision ● Intégration avec les applications IT ● Création de nouveaux services à valeur ajoutée ● Création de nouveaux modèles économiques

25/11/13 D. Donsez, Projets Eclipse pour l'IoT, le M2M, le SOHO 9 Présent : Solutions M2M ad-hoc

● Centré Domaine – Dédié (voir « fermé ») à un secteur d'activité – Un équipement → Un usage

● Faible mutualisation des infrastructures matérielles et logicielles

● Solutions multi-acteurs/opérateurs difficiles

● Perte d'opportunités inter-secteurs

→ Intergiciels, Méthodes Logicielles, … communes (indépendant de domaines)

25/11/13 D. Donsez, Projets Eclipse pour l'IoT, le M2M, le SOHO 10 Patrons d'architecture IoT

● Evénementiel – Publish – Subscribe

● QoS (determinist, reliable, elastic, ...) ● Médiation – ECA (Event Condition Action) – CEP (Complex Event Processing) – EST (Event Stream Processing)

● ETL (Extract – Transform - Load)

25/11/13 D. Donsez, Projets Eclipse pour l'IoT, le M2M, le SOHO 11 Publish-Subscribe Pattern Event/Data Event/Data Producters Consumers Publisher topic=topic= Subscriber "s10/geiger/pps""s10/geiger/pps" event.topics= {"#/location"}{"#/location"} E6 Publisher Subscriber topic="s11/hum"topic="s11/hum" E4 E1 event.topics= E1 E2 E4 {"#/temp","#/hum"}{"#/temp","#/hum"} PubSub E4 E3 E2 Broker E1 Subscriber Publisher event.topics= topic="s12/temp"topic="s12/temp" {"s11/#","s13/#"}{"s11/#","s13/#"}

E3 Subscriber = Publisher event.topics {"s14/#"}{"s14/#"} topic=topic= "s13/wind"

25/11/13 D. Donsez, Projets Eclipse pour l'IoT, le M2M, le SOHO 12 Market of PubSub Brokers

Into the JVM • OSGi Event Admin • OSGi Wire Admin • OSGi Monitor Admin Distributed • CORBA Data Distribution Service (DDS) • JMS • AMPQ • MQTT • STOMP • XMPP • ROS (Robot Operating System) • UPnP GENA • PubNub (PaaS) • PubSubHubbub • Siena • ...

25/11/13 D. Donsez, Projets Eclipse pour l'IoT, le M2M, le SOHO 13 MQ Telemetry Transport (MQTT) http://mqtt.org/

● Protocole léger de type Publish-Subscribe pour M2M et IoT – Hiérarchie de « topics » : /buildingF/sensors/s11/#

● Support de connectivité (TPC/IP) intermittente ou couteuse – Satellite, WSN, ...

● Faible overhead par paquet (2 octets)

● 3 niveaux de QoS pour livraison (fire-and-forget, fire-and-confirm)

● Sécurité par certificat (SSL/TLS)

● Nombreuses implémentations de clients et de serveurs concises – C, C++, Arduino, Java, Python, JS (Node.JS), Lua, … – 80 KB pour l’implémentation de référence (IBM)

● Proposé à la standardisation OASIS

● Projets : Mosquitto, Eclipse Paho (m2m.eclipse.org), Cloud providers of MQTT ...

25/11/13 D. Donsez, Projets Eclipse pour l'IoT, le M2M, le SOHO 14 Eclipse Projects

● Fondation Eclipse – Projets open-source – IDE (JDT, PDE, CDT) – RCP – Equinox – P2 – Marketplace (2^11 plugins)

25/11/13 D. Donsez, Projets Eclipse pour l'IoT, le M2M, le SOHO 15 Eclipse Projects

● 4 Projets et Working Group – Eclipse M2M (Benjamin Cabé)

● Paho (mqtt clients) , soon Mosquitto (mqtt servers),

● Minihi (platform), Koneki (IDE for LUA) – Eclipse Kura

● Low-level bundles for M2M gateways

● for Admin, Configuration and Deployment – Equinox Concierge (Jan Rellemeyer)

● OSGi R5 platform

● small-footprint and optimized for embedded devices and CDC 1.1 JVM – Eclipse Smart Home (2014)

● OpenHAB (Kai Kreuzer)

25/11/13 D. Donsez, Projets Eclipse pour l'IoT, le M2M, le SOHO 16 Eclipse Working Group M2M m2m.eclipse.org Technologies : MQTT, M3DA, OMA DM, REST, OSGi, ...

25/11/13 D. Donsez, Projets Eclipse pour l'IoT, le M2M, le SOHO 17 OpenHAB https://code.google.com/p/openhab

● open Home Automation Bus (openHAB)

● Universal integration platform for home automation things

● Based on OSGi Java (Equinox OSGi)

● Event bus (OSGi Event Admin)

● DSL for ECA Rules and HCI – Using Eclispe and Xtend

● Bindings with many SOHO protocols (enOcean, ZigBee, Hue ...)

● Now part of Eclipse Smart Home project – EPL licence

25/11/13 D. Donsez, Projets Eclipse pour l'IoT, le M2M, le SOHO 18 OpenHAB Demo http://demo.openhab.org:8080/greent

25/11/13 D. Donsez, Projets Eclipse pour l'IoT, le M2M, le SOHO 19 25/11/13 D. Donsez, Projets Eclipse pour l'IoT, le M2M, le SOHO 20 OpenHAB Event Bus

OSGi Event Admin

Bindings are delivered as OSGi bundles

25/11/13 D. Donsez, Projets Eclipse pour l'IoT, le M2M, le SOHO 21 OpenHAB IDE

25/11/13 D. Donsez, Projets Eclipse pour l'IoT, le M2M, le SOHO 22 Model : Items and Groups

● Items – Are SOHO-specific sensors & actuators

● Switch, Dimmer, RollerShutter, Color, Contact, Number, Text – Sensors emit « state » events – Actuators receive « command » events – Bound to protocols (enOcean, Serial, Hue, ModBus, MQTT ...)

● Groups – of Items – of Group – Logical, Physical, Device class, ... – can be active (command and state)

25/11/13 D. Donsez, Projets Eclipse pour l'IoT, le M2M, le SOHO 23 DSL for Items and Groups

25/11/13 D. Donsez, Projets Eclipse pour l'IoT, le M2M, le SOHO 24 DSL for HCI

25/11/13 D. Donsez, Projets Eclipse pour l'IoT, le M2M, le SOHO 25 DSL for HCI

25/11/13 D. Donsez, Projets Eclipse pour l'IoT, le M2M, le SOHO 26 DSL for ECA Rules

Condition

Xtend

25/11/13 D. Donsez, Projets Eclipse pour l'IoT, le M2M, le SOHO 27 Demo Smart Doll House OpenHAB + Arduino + MQTT

http://localhost:8080/openhab.app?sitemap=demo http://localhost:8080/greent/?sitemap=demo http://air.imag.fr/index.php/SDH

25/11/13 D. Donsez, Projets Eclipse pour l'IoT, le M2M, le SOHO 28 Demo Smart Doll House Rule to generate/collect values for temperature,energy comsumption, …

MQTT Connection Port 1883 OpenHAB Alice's home MQTT Connection Port 1883 MosquittoMosquitto ServerServer Python-based Python-based OpenHAB Bob's home

Temperature MQTT Energy Consumption hearbeat WebReportStorage Mongo ... Node.js DB (Node RED) OpenHAB Thomas's home MoquetteMoquette ServerServer Java--Based MQTT Java--Based MQTT Server Server

OpenHAB Didier's home

25/11/13 D. Donsez & T. Calmant, Cohorte demo 29 Node RED Mashup for IoT stream processing

http://localhost:1880

25/11/13 D. Donsez, Projets Eclipse pour l'IoT, le M2M, le SOHO 30 QQ && AA

25/11/13 D. Donsez, Projets Eclipse pour l'IoT, le M2M, le SOHO 31 BonusBonus TrackTrack

25/11/13 D. Donsez, Projets Eclipse pour l'IoT, le M2M, le SOHO 32