Διαδίκτυο των Αντικειμένων - IoT sdima@ece.upatras.gr
ΑΠΟΚΤΗΣΗ ΑΚΑΔΗΜΑΪΚΗΣ ΔΙΔΑΚΤΙΚΗΣ ΕΜΠΕΙΡΙΑΣ ΣΕ ΝΕΟΥΣ ΕΠΙΣΤΗΜΟΝΕΣ ΚΑΤΟΧΟΥΣ ΔΙΔΑΚΤΟΡΙΚΟΥ ΣΤΟ ΠΑΝΕΠΙΣΤΗΜΙΟ ΠΑΤΡΩΝ (ΦΚ/MIS) Ε.655/ 5001184. sdima@ece.upatras.gr
MQTT Protocol Lightweight publish/subscribe protocol M2M communications Andy Stanford-Clark (IBM) και Arlen Nipper (1999) Απαιτεί τη χρήση κεντρικού broker O publisher και ο subscriber never δεν συνδέονται και δεν γνωρίζουν ο ένας τον άλλον Radio/TV broadcast. H broadcast μετάδοση θα γίνει ακόμα και αν δεν υπάρχει κάποιος listener
ΜQTT Διάγραμμα Διασυνδεσιμότητας
MQTT Client Μqtt Client =>publish data => Mqtt broker στέλνει τα data σε όσους Mqtt clients έχουν κάνει subscribe Mqtt Client: Publisher,Subscriber Mqtt Client: δεν έχουν διευθύνσεις, χρησιμοποιούν topics Tα topics (UTF-8 strings) δημιουργούνται από τους publishers και δεν είναι preassigned από τον broker
Mqtt Topics Tα topics μπορούν να έχουν ιεραρχική δομή με τη χρήση του / topic = bulb1, topic = bulb2 topic =bulbs/ bulb1, topic =bulbs/ bulb2 Wildcard Single level (+)
Mqtt topics Wildcard Multi Level (#) Topics ($) $SYS/broker/clients/connected $SYS/broker/clients/disconnected $SYS/broker/clients/total $SYS/broker/messages/sent $SYS/broker/uptime
Mqtt Conenction State Diagram Clean Session: persistent, non-persistent connection Persistent Connection: αποθήκευση subscriptions, undelivered messages Tα μηνύματα που έχουν σταλεί διαγράφονται από τον broker QoS: At most once (0) At least once (1) Exactly once (2).
MQTT QoS
MQTT Clean Sessions
MQTT Clean Sessions
MQTT retain message O publisher μπορεί να πει στον broker να κρατήσει το τελευταίο μήνυμα σε ένα συγκεκριμένο topic θέτωντας το retained message flag.
MQTT retain message Mόνο ένα per topic Aντικαθίσταται από νέο μήνυμα
ΜQTT Retain Message, Clean Session, QoS Q- If I subscribe to a topic and receive the retained message does the broker/server then delete that message?
LWM2M Overview
LWM2M ΑΡΧΙΤΕΚΤΟΝΙΚΗ M2M Applications Application abstraction μέσω REST API Resource Discovery and Linking LWM2M Server Επαναχρησιμοποιεί IETF technologies, όπως CoAP protocol, DTLS, Resource Directory. Deployable σε gateways και στο cloud LWM2M Clients are Devices Device abstraction μέσω CoAP LWM2M Clients είναι CoAP Servers Any IP network connection
Bootstrap Interface LWM2M Interfaces Configure Servers & Keys & ACLs CoAP REST API Registration Interface RFC 6690 and Resource Directory Management Interface Using Objects Management Objects and Resources CoAP REST API Reporting Interface Object Instances and Resources Report Asynchronous notification using CoAP Observe
Object Model Ένας LWM2M Client έχει ένα ή περισσότερα Object Instances Ένα Object είναι ένα collection από Resources Ένα Resource είναι ένα ατομικό κομμάτι πληροφορίας που έχει τα ακόλουθα rights Read, Written ή Executed Sensinode 2013
Object Model Τα Resources μπορεί να έχουν πολλαπλά instances Τα Objects και τα Resources χαρακτηρίζονται από ένα 16-bit Integer, και τα Instances από έναν 8-bit Integer Objects/Resources προσπελαύνονται μέσω των ακόλουθων URIs: /{Object ID}/{Object Instance}/{Resource ID} Example: /3/0/1 = 3 = Device Object, 0 = Object Instance #0, 1 = Manufacturer Resource
Standard Device Management Objects Object Name ID Multiple Instances? Description LWM2M Security 0 Yes This LWM2M Object provides the keying material of a LWM2M Client appropriate to access a specified LWM2M Server. LWM2M Server 1 Yes This LWM2M objects provides the data related to a LWM2M server. Device 3 No This LWM2M Object provides a range of device related information which can be queried by the LWM2M Server, and a device reboot and factory reset function. Connectivity Monitoring 4 No This LWM2M objects enables monitoring of parameters related to network connectivity. Firmware 5 No This Object includes installing firmware package, updating firmware, and performing actions after updating firmware. Location 6 No The GPS location of the device. Sensinode 2013
Object Example LWM2M Location Object Sensinode 2013
Interface Flows Sensinode 2013
Registration Sensinode 2013
Object Access Sensinode 2013
Notification Sensinode 2013
PROJECTS http://developer.smartthings.com/ https://developers.nest.com/ https://www.ibm.com/cloudcomputing/bluemix/internet-of-things https://azure.microsoft.com/en-us/services/iot-hub/ https://aws.amazon.com/iot/ LWM2M + MQTT Cooperation Protocol XMPP + MQTT Cooperation Protocol Telos B to Gateway Communication Protocol Facebook Graph API + IoT Application