extension with a slide for community building and enrichment of meta information

This commit is contained in:
Sebastian Wendel 2023-09-28 11:35:27 +02:00
parent 7693aed71b
commit 383338fd60

View file

@ -1,50 +1,63 @@
--- ---
marp: true marp: true
title: IoT & Dashboard Workshop
description: Including examples Sensors for Energy Management
author: Oliver Ochs, Sebastian Wendel
class: invert class: invert
paginate: true
--- ---
# IoT-Workshop # <!--fit--> IoT & Dashboard Workshop
![bg](https://curious.bio/wp-content/uploads/2023/09/image.png) ![bg](./images/image.png)
--- ---
# [Matrix Chat](https://matrix.org/)
To exchange information digitally during and after the workshop we use [Matrix as a chat solution](https://matrix.org/). You don't know this yet? Don't be hesitant and join us!
[https://matrix.to/#/#iot-platform:curious.bio](https://matrix.to/#/#iot-platform:curious.bio)
![bg right](./images/qrcode-chat.svg)
---
# Fab City Dashboard # Fab City Dashboard
This is a prototype of data management platform for Fab City Hamburg based on existing open source solutions. This is a prototype of data management platform for Fab City Hamburg based on existing open source solutions.
![width:100pxy](https://code.curious.bio/curious.bio/iot-backend/raw/branch/main/docs/workshop/images/architecure.svg) ![width:100pxy](./images/architecure.svg)
--- ---
# Features # Features
* Eclipse Mosquitto: MQTT broker - [Eclipse Mosquitto](https://mosquitto.org/): MQTT broker
* Node-RED: Flow-based development tool for visual programming and data flow automation - [Node-RED](https://nodered.org/): Flow-based development tool for visual programming and data flow automation
* InfluxDB: High-performance data storage - [InfluxDB](https://www.influxdata.com/): High-performance data storage
* Grafana: Real-time data visualization and monitoring dashboard - [Grafana](https://grafana.com/): Real-time data visualization and monitoring dashboard
--- ---
# Today's Goal # Today's Goal
* install the stack - install the stack
* configure one or two data sources - configure one or two data sources
* transform data and store them in a database - transform data and store them in a database
* visualize data stored in the database - visualize data stored in the database
--- ---
# Architecture # Architecture
* Data is collected by IoT devices, e.g. an ESP32 based power monitor. These devices publish their data via MQTT into a topic in a message broker. We use Eclipse Mosquitto as a MQTT message broker. - Data is collected by IoT devices, e.g. an ESP32 based power monitor. These devices publish their data via MQTT into a topic in a message broker. We use Eclipse Mosquitto as a MQTT message broker.
* Node-RED is used to read and transform or combine data and to implement more sophicsticated use cases like notifications or worksflow. Node-RED subscribes to topics in Mosquitto and can be used to save transformed data into a database. - Node-RED is used to read and transform or combine data and to implement more sophicsticated use cases like notifications or worksflow. Node-RED subscribes to topics in Mosquitto and can be used to save transformed data into a database.
* As our data is bases on time, we are using a time series database to store information. We used InfluxDB as this database. - As our data is bases on time, we are using a time series database to store information. We used InfluxDB as this database.
* Dashboards can already be created in Node-RED, but to be more flexible (and include more options) we are using Grafana. Grafana reads data from our database and other sources (like CSV files on the Internet) and displays them in a nice dashboard.
- Dashboards can already be created in Node-RED, but to be more flexible (and include more options) we are using Grafana. Grafana reads data from our database and other sources (like CSV files on the Internet) and displays them in a nice dashboard.
--- ---
@ -52,64 +65,63 @@ This is a prototype of data management platform for Fab City Hamburg based on ex
Sensors can be build or bought: Sensors can be build or bought:
* Sensor head - Sensor head
* ESP32 or equivalent
* OpenHardware or COTS (commercially of the self)
* Analog/Digital acquisition
* Communication gateway via WLAN / MQTT
* Examples measurements - ESP32 or equivalent
* Energy measurement - OpenHardware or COTS (commercially of the self)
* Temperature sensor -> temperature measurement - Analog/Digital acquisition
* Pulse sensor -> incremental measurement of filament - Communication gateway via WLAN / MQTT
- Examples measurements
- Energy measurement
- Temperature sensor -> temperature measurement
- Pulse sensor -> incremental measurement of filament
--- ---
# Example sensor - Open Engergy Monitor # Example sensor - Open Engergy Monitor
![[bg contain]](https://code.curious.bio/curious.bio/smart-energy-monitor/media/branch/main/docs/images/breadboard.png) ![[bg]](./images/breadboard.png)
--- ---
# Example sensor - Open Engergy Monitor # Example sensor - Open Engergy Monitor
![bg left](https://code.curious.bio/curious.bio/smart-energy-monitor/media/branch/main/docs/images/clamp1.jpeg) ![bg left](./images/clamp1.jpeg)
--- ---
# Example sensor - Shelly Plug # Example sensor - Shelly Plug
![bg right](https://code.curious.bio/curious.bio/smart-energy-monitor/media/branch/main/docs/images/shelly_plug_s_1-1.jpg) ![bg right](./images/shelly_plug_s_1-1.jpg)
--- ---
# Example sensor - GCode Sender # Example sensor - GCode Sender
![bg left](https://pad.fabcity.hamburg/uploads/586181bc-6de2-46b8-9eba-8a11fbb59a5f.png)
![bg left](./images/gcode-sender.png)
--- ---
# MQTT (Message Queuing Telemetry Transport) # MQTT (Message Queuing Telemetry Transport)
* publish-subscribe, machine to machine network protocol - publish-subscribe, machine to machine network protocol
* designed for connections with remote locations - designed for connections with remote locations
* devices with resource constraints - devices with resource constraints
* limited network bandwidth - limited network bandwidth
* Internet of Things (IoT) - Internet of Things (IoT)
* runs on top of TCP/IP, QUIC (UDP) or Bluetooth - runs on top of TCP/IP, QUIC (UDP) or Bluetooth
--- ---
# MQTT - Components # MQTT - Components
* one message broker (Mosquitto) and many clients - one message broker (Mosquitto) and many clients
* broker receives published messages from clients - broker receives published messages from clients
* routes them to subcribed clients - routes them to subcribed clients
* clients subscribe to topic patterns - clients subscribe to topic patterns
![bg right](https://upload.wikimedia.org/wikipedia/commons/8/82/MQTT_protocol_example_without_QoS.svg)
![bg right](./images/MQTT_protocol_example_without_QoS.svg)
--- ---
@ -117,11 +129,12 @@ Sensors can be build or bought:
The idea behind it is to make it very easy to connect APIs, hardware devices, and anything else accessible over some type of network connection. The idea behind it is to make it very easy to connect APIs, hardware devices, and anything else accessible over some type of network connection.
![bg left](https://nodered.org/images/nr-image-1.png) ![bg left](./images/nr-image-1.png)
* open-source
* low-code - open-source
* visual programming tool - low-code
* flow-based development - visual programming tool
- flow-based development
--- ---
@ -129,16 +142,16 @@ The idea behind it is to make it very easy to connect APIs, hardware devices, an
Nodes are the important part of Node-RED, they: Nodes are the important part of Node-RED, they:
* are triggered by either receiving a message object from a previous node or an external event like an MQTT event - are triggered by either receiving a message object from a previous node or an external event like an MQTT event
* process messages or events and then passes them on to the next node - process messages or events and then passes them on to the next node
A node can: A node can:
* Inject: Starts a flow by injecting a message or a payload. - Inject: Starts a flow by injecting a message or a payload.
* Change: Here you can do basic transformation or modification on the message object. - Change: Here you can do basic transformation or modification on the message object.
* Debug: Can be used to help developing flows by sending messages to the side bar. - Debug: Can be used to help developing flows by sending messages to the side bar.
* Switch: Here you can add logic (like sending the message to different nodes). - Switch: Here you can add logic (like sending the message to different nodes).
* Function: Add custom JavaScript for uses cases where simple nodes do not do the trick. - Function: Add custom JavaScript for uses cases where simple nodes do not do the trick.
--- ---
@ -146,15 +159,15 @@ A node can:
Node-RED uses plugins: Node-RED uses plugins:
* extend functionality (like dashboard) - extend functionality (like dashboard)
* connectors (like influxdb) - connectors (like influxdb)
* libraries (like aggregating watts and transform them to khw) - libraries (like aggregating watts and transform them to khw)
--- ---
# Node-RED - Simple Flow # Node-RED - Simple Flow
![](https://code.curious.bio/curious.bio/iot-backend/media/branch/main/docs/flow/docs/images/influx-flow.png) ![height:600](../flow/docs/images/influx-flow.png)
--- ---
@ -162,56 +175,57 @@ Node-RED uses plugins:
InfluxDB is a database for any time series data. Time series data is everywhere, since time is a constituent of everything that is observable. As our world gets increasingly instrumented, sensors and systems are constantly emitting a relentless stream of time series data. For example: InfluxDB is a database for any time series data. Time series data is everywhere, since time is a constituent of everything that is observable. As our world gets increasingly instrumented, sensors and systems are constantly emitting a relentless stream of time series data. For example:
* Electrical activity in the brain - Electrical activity in the brain
* Rainfall measurements - Rainfall measurements
* Monthly subscribers - Monthly subscribers
* Heartbeats per minute - Heartbeats per minute
* Electricity consumed by a chain saw - Electricity consumed by a chain saw
---- ---
# Database - InfluxDB # Database - InfluxDB
![height:600](https://code.curious.bio/curious.bio/iot-backend/media/branch/main/docs/flow/docs/images/influx-data-explorer.png) ![height:600](../flow/docs/images/influx-data-explorer.png)
--- ---
# Dashboard - Grafana # Dashboard - Grafana
Grafana is an open source analytics and interactive visualization tool. Grafana is an open source analytics and interactive visualization tool.
* charts - charts
* graphs - graphs
* alerts for the web when connected to supported data sources. - alerts for the web when connected to supported data sources.
As a visualization tool, Grafana is a popular component in monitoring stacks, often used in combination with time series databases such as InfluxDB. As a visualization tool, Grafana is a popular component in monitoring stacks, often used in combination with time series databases such as InfluxDB.
--- ---
# Dashboard - Example # Dashboard - Example
![bg left](https://code.curious.bio/curious.bio/iot-backend/raw/branch/main/docs/workshop/images/sampledashboard.png)
![bg left](../workshop/images/sampledashboard.png)
--- ---
# Let's start # Let's start
* Check installation requirements - Check installation requirements
* 64bit environment (AMD64, ARM64) - 64bit environment (AMD64, ARM64)
* Docker - [Docker](https://docs.docker.com/engine/install/)
* Docker-Compose - [Docker-Compose](https://docs.docker.com/compose/install/)
* Checkout the repository: - Checkout the repository:
* https://code.curious.bio/curious.bio/iot-backend - [https://code.curious.bio/curious.bio/iot-backend](https://code.curious.bio/curious.bio/iot-backend)
* Let's follow the README, together! - [https://code.curious.bio/curious.bio/smart-energy-monitor](https://code.curious.bio/curious.bio/smart-energy-monitor)
- Let's follow the README, together!
--- ---
# 🫵 Hands on
# <!--fit--> 🫵 Hands on
--- ---
# Where can I find this presentation? # Where can I find this presentation?
![](https://code.curious.bio/curious.bio/iot-backend/raw/branch/main/docs/workshop/images/qrcode.png)
https://code.curious.bio/curious.bio/iot-backend/src/branch/main/docs/workshop https://code.curious.bio/curious.bio/iot-backend/src/branch/main/docs/workshop
![bg right](./images/qrcode-slides.svg)