From a1035c3f39c0952e09571be076bf6a4cb2fb966c Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Fri, 20 Apr 2018 09:44:25 +0200 Subject: wip --- what-is-iot-reveal.html | 150 +++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 143 insertions(+), 7 deletions(-) (limited to 'what-is-iot-reveal.html') diff --git a/what-is-iot-reveal.html b/what-is-iot-reveal.html index cf0d641..3a5698e 100644 --- a/what-is-iot-reveal.html +++ b/what-is-iot-reveal.html @@ -277,20 +277,149 @@

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

-

Lecture: ESP8266 aka NodeMCU aka ESP-12

+

Lecture: ESP8266 aka NodeMCU aka ESP-12

+

ESP8266 software layers

+ +

Lecture: MQTT

MQTT

-
-

MQTT Implementations

+ +
+

MQTT - The protocol

+

Agents have one of two roles:

+
    +
  • Client +
      +
    • Publishes messages
    • +
    • Subscribes / unsubscribes to topics
    • +
  • +
  • Broker (aka Server) +
      +
    • Handles network connections
    • +
    • Keeps subscription state
    • +
    • Manages client +
        +
      • Disconnects
      • +
      • (last) will
      • +
    • +
    • Persistence
    • +
  • +
+ +
+

MQTT - The protocol - MQTT Topic

+
    +
  • Topic name: foo/bar/baz
  • +
  • Topic filter +
      +
    • foo/bar/?
    • +
    • foo/#
    • +
  • +
+
+

MQTT - The protocol - MQTT Topic

+

The temperature sensor:

+
    +
  • Publishes on: +
      +
    • myapp/$device-id/temperature
    • +
    • myapp/$device-id/humidity
    • +
    • myapp/$device-id/altert
    • +
  • +
  • Subscribes to: +
      +
    • myapp/$device-id/command
    • +
  • +
+

The central application:

+
    +
  • Subscribes to: +
      +
    • myapp/#/temperature
    • +
    • myapp/#/humidity
    • +
  • +
  • Publishes on: +
      +
    • myapp/$device-id/command
    • +
  • +
+ +
+

MQTT - The protocol - MQTT Packet

+
    +
  • Size oriented
  • +
  • Flags indicate type of remaining bytes +
      +
    • Packet type
    • +
    • Topic name
    • +
    • Payload
    • +
  • +
+ +
+

MQTT - The protocol - MQTT Topic - more

+

Enten må den holdes rett etter “## MQTT - The protocol - MQTT Topic” ellers kanskje flyttes etter “patterns”.

+

The central application is split:

+
    +
  • An aggregating agent: +
      +
    • myapp/#/temperature
    • +
    • myapp/#/humidity
    • +
  • +
  • Emailing agent +
      +
    • myapp/$device-id/altert
    • +
  • +
  • Publishes on: +
      +
    • myapp/$device-id/command
    • +
  • +
+ +
+

MQTT - The protocol

+
+

MQTT - Patterns

+

Må utvides

+

Explain:

+
    +
  • Message sizes with MQTT
  • +
  • “will” messages
  • +
  • Push vs pull, central applications can push to clients
  • +
  • mostly mqtt, some http
  • +
+
+

MQTT - Implementations

  • Mosquitto
  • Eclipse Paho
  • -
  • Redis with MQTT connector
  • +
  • RabbitMQ
  • +
  • ActiveMQ
+

MQTT Cloud Connectors

    @@ -315,11 +444,18 @@
-

Notes

-

Assignments

+

Notes

+

Assignments

+

Assignment 2: Connect to Wi-Fi

+
+

Assignment 3: Connect to MQTT broker

+
+

Assignment 4: Network play time

  • Measure round trip time/latency. Measure UDP, TCP. Measure when the packet size is greater than the MTU

  • -
  • Measure ISR timing

  • +
  • Notice variations in RTT

-- cgit v1.2.3