Skip to content
You Start with one site
Amounts in Start with one site
Engineering · Embedded Systems & Electronics

IoT Systems

Join sensor nodes, a broker, a database, alerts and an API into one system that keeps working when parts of it fail. Eight lessons, ending with a greenhouse of three nodes.

Found this useful?
The greenhouse system of the last lesson: an ESP32, a Pico W and an STM32 node send to a broker on the local host, which feeds Telegraf and InfluxDB for Grafana, Node-RED for Slack alerts, and an API. The broker also sends a copy to SiliconWit.io, outside the host.

A router restarts at night, and in the morning half the sensors are silent. A customer asks why the cold room was warm last Tuesday at 3 in the morning, and no reading was kept. A freezer fails, the chart shows it, and nobody is looking. A node loses power and sends nothing, so no rule on its readings ever fires.

In this course you build each part that answers one of these: firmware that connects again, a broker that only the right devices can use, stored history, alerts people trust, and a key for each device. The last lesson joins them in one system, then breaks it on purpose.

How each lesson goes
  1. 1Start from a faultPower is lost. The last reading was normal, and no rule fires.
  2. 2Name every messageOne topic tree, so each reading says where it came from.
  3. 3Store it and draw itTelegraf, InfluxDB and Grafana keep the history and show it.
  4. 4Break it on purposeUnplug a node and time how long until someone is told.
You will be able to
  1. Choose a protocol by measuring it, and write device firmware that connects again by itself
  2. Run a secure broker, store every reading and set alerts that people trust
  3. Join nodes, dashboards, alerts and an API in one system, and know how it fails

New to this? Know C and one microcontroller? Start with lesson 1: send one reading three ways and count the bytes.

You need An ESP32 and a BME280; a Pico W and an STM32 with an ESP-01 for the three-board lessons. A Linux machine for the broker and the services.

The engineering behind it

From a sensor to your phone, and every place along the way where data can be lost.

More about this course

Every number has a reason

An alert limit is not 7.5 °C because it sounds safe. Each number comes from the battery, the network or the time a person needs to act.

  • Protocolon the bench, MQTT adds 33 bytes to a 120-byte reading and HTTP about 350; on cellular every byte costsProtocols
  • Keepalive30 s; after 45 s of silence the broker publishes the node's last will, "offline"MQTT
  • Reconnect waitdoubles from 1 s to a 60 s limit, plus a random part, and never stops tryingFirmware
  • Alert limit5 °C, not 7.5: the room warms 0.1 °C a minute, and the stock is harmed at 8 °C before a technician arrives in 30 minutesAlerts
  • One key per devicea key copied from one stolen sensor then speaks for that sensor onlySecurity

The device decides. Outside it, someone is told.

On the device
Control
  • A fan keeps its own thermostat in firmware
  • A command outside its limits is refused
  • Works with no network

The test: does it still work when the broker is down?

Outside the device
History and alerts
  • Notices a node that went silent
  • Tells a person by Slack, email or SMS
  • Keeps every reading, to answer for last Tuesday

The test: does someone know, and can you prove what happened?

The tools

MosquittoThe broker, with passwords, topic rules and TLS.
Telegraf, InfluxDB, GrafanaCollect, store with the time, and draw.
Python and FlaskAn alert engine, a REST API and a webhook receiver.
Node-REDAutomation flows drawn as boxes and wires.
Three boardsESP32, Pico W and STM32 with an ESP-01, one message format.
Docker on LinuxA PC, a Raspberry Pi or a server runs the whole stack.

Honest limits. Every lesson works on servers you run yourself. Managed platforms are shown beside them as a choice, not a need.

Before you start

  • C and one microcontroller: ESP32, STM32 or Pico
  • IP addresses, ports, TCP and UDP
  • The Linux command line
  • An ESP32 and a BME280 sensor for lesson 1
The full course notes

A sensor that only logs to serial is not an IoT device. IoT means the data reaches a broker, gets stored, triggers alerts, appears on dashboards, and drives decisions, whether the operator is in the next room or on another continent. This course teaches you to build that entire pipeline, from wiring up a microcontroller with sensors to deploying a production monitoring system with dashboards, alerts, and automation. #IoT #MQTT #ConnectedDevices

Why a Dedicated IoT Course?

The embedded courses touched networking (ESP32 Wi-Fi, RPi Pico W, Embedded Linux MQTT bridge), but always as a side topic. Building a reliable, secure, production-grade IoT system requires its own set of skills:

Protocol Fluency

MQTT, CoAP, and HTTP each have trade-offs in bandwidth, latency, battery, and reliability. You need to know when to use each and why. Lesson 1 benchmarks all three with the same sensor data so you can make informed decisions.

Broker Infrastructure

A broker is the backbone of any MQTT system. You will set up Mosquitto from scratch with TLS, authentication, ACLs, and persistence. You will also connect to cloud platforms like SiliconWit.io, a connected operations platform that accepts MQTT connections and provides dashboards, alerts, automation, and REST API access. You will understand both self-hosted and managed options.

End-to-End Visibility

Raw sensor data is useless without visualization and alerting. You will build dashboards with Grafana and InfluxDB, configure threshold alerts that notify via email, SMS, or Slack, and design automation rules that act without human intervention.

Security From Day One

Most IoT tutorials skip security. This course dedicates an entire lesson to TLS, mutual authentication, certificate management, device provisioning, and firmware signing. Because an insecure IoT device is worse than no device at all.

Course Structure

Each lesson follows a consistent cycle:

  1. The IoT Problem A real connectivity, data, or operations challenge. Not “blink an LED over Wi-Fi” but “build a dashboard that alerts you when a greenhouse sensor goes offline.”

  2. Protocol and Architecture How the relevant protocol or pattern works: MQTT publish/subscribe, REST request/response, webhook push, TLS handshake.

  3. Build and Configure Set up the infrastructure (broker, database, dashboard) and write the firmware and backend code.

  4. Deploy and Test Flash MCUs, verify data flow end-to-end, simulate failures, and confirm recovery.

  5. Production Considerations What changes at scale: connection pooling, message queuing, retry logic, monitoring, and cost.

Lessons

Lesson 1: IoT Architecture and Protocol Comparison

IoT Architecture and Protocol Comparison. Survey IoT system architectures and compare MQTT, CoAP, and HTTP side by side. Send the same BME280 sensor data over all three protocols and measure bandwidth, latency, and power consumption. Build: Protocol comparison bench on ESP32. Parts: ESP32, BME280 (reuse).

Lesson 2: MQTT Broker Setup and Secure Connections

MQTT Broker Setup and Secure Connections. Install and configure Mosquitto with TLS, password authentication, and topic ACLs. Connect to both your self-hosted broker and the SiliconWit.io connected operations platform. Understand retained messages, last will, QoS levels, and persistence. Build: Production-ready Mosquitto broker with TLS. Parts: Raspberry Pi or any Linux machine.

Lesson 3: MQTT Clients on ESP32, Pico, and STM32

MQTT Clients on ESP32, Pico, and STM32. Write standard MQTT client firmware for three different MCU platforms. Design a consistent topic hierarchy, handle reconnection gracefully, and publish structured JSON payloads with QoS 1. Build: Three-MCU sensor network publishing to one broker. Parts: ESP32, RPi Pico W, STM32 + ESP01 (reuse).

Lesson 4: Real-Time Dashboards and Data Visualization

Real-Time Dashboards and Data Visualization. Store MQTT data in InfluxDB via Telegraf, build Grafana dashboards with live charts and gauges, and explore the SiliconWit.io dashboard as a managed alternative. Query historical data and export reports. Build: Grafana dashboard with live sensor data. Parts: No new hardware.

Lesson 5: REST APIs, Webhooks, and Device Integration

REST APIs, Webhooks, and Device Integration. Design RESTful APIs for device management and data retrieval. Implement webhook endpoints that receive real-time push notifications, validate payloads with HMAC signatures, and integrate with external services. Build: REST API server with webhook receiver. Parts: No new hardware.

Lesson 6: Alerts, Automation, and Rule Engines

Alerts, Automation, and Rule Engines. Configure threshold alerts that notify via email, SMS, Discord, Slack, and Telegram. Build automation flows with Node-RED that trigger actions based on sensor data. Compare self-hosted rule engines with the SiliconWit.io alert system. Build: Multi-channel alert system with automation flows. Parts: No new hardware.

Lesson 7: Device Security, TLS, and Provisioning

Device Security, TLS, and Provisioning. Generate and deploy X.509 certificates for mutual TLS authentication. Implement device identity and provisioning workflows. Secure firmware updates with signed images. Audit your IoT deployment against common attack vectors. Build: Mutual TLS connection with certificate provisioning. Parts: ESP32 (reuse).

Lesson 8: Production IoT Monitoring System

Production IoT Monitoring System. Combine everything from this course into a complete production system. Deploy multiple sensor nodes, a broker with TLS, a time-series database, live dashboards, automated alerts, and cloud forwarding. Handle node failures, broker restarts, and network outages gracefully. Build: Complete production IoT monitoring system. Parts: All reused from prior lessons.

Parts Kit

No new hardware required. Everything is reused from the embedded courses.

PartQuantityFirst UsedNotes
ESP32 dev board1Lesson 1Reuse from ESP32 course
RPi Pico W1Lesson 3Reuse from RPi Pico course
STM32 + ESP-01 (or STM32 with Wi-Fi)1Lesson 3Reuse from STM32 course
BME280 sensor module1Lesson 1Reuse
Raspberry Pi (any model) or Linux PC1Lesson 2For broker and dashboard hosting
USB webcam (optional)1Lesson 8Reuse from Embedded Linux course

Total estimated cost: 0 USD (if you have components from prior courses)

Skill Progression

SkillLessons 1-2Lessons 3-4Lessons 5-6Lessons 7-8
ProtocolMQTT vs CoAP vs HTTP, broker setupMulti-MCU MQTT clients, topic designREST API, webhooks, HMACMutual TLS, X.509, provisioning
InfrastructureMosquitto, TLS, ACLsInfluxDB, Telegraf, GrafanaNode-RED, webhook serversProduction deployment, monitoring
DataJSON payloads, QoS levelsTime-series storage, queriesAutomation rules, triggersEnd-to-end pipeline, failover
CloudSelf-hosted vs SiliconWit.ioDashboard comparisonAlert channels, integrationsFull production system

Prerequisites

Embedded programming experience required

You should be comfortable with:

  • C programming and at least one MCU platform (ESP32, STM32, or RPi Pico)
  • Basic networking concepts (IP addresses, ports, TCP/UDP)
  • Linux command line (for broker and dashboard setup)
  • At least one course from the embedded series

Helpful but not required:

  • Python (for backend scripts and API servers)
  • Docker (for running Grafana, InfluxDB, Node-RED)
  • The Embedded Linux with RPi course (for the edge gateway context)

Getting Started

  1. Ensure you have an ESP32 and a BME280 sensor. Lesson 1 uses these to compare protocols. If you completed the ESP32 course, you already have both.

  2. Set up a Linux machine for the broker. This can be your development PC, a Raspberry Pi, a VM, or a cloud VPS. Mosquitto, InfluxDB, and Grafana all run on any Linux distribution.

  3. Create a free SiliconWit.io account. Go to siliconwit.io and register. SiliconWit.io is a connected operations platform that accepts MQTT connections and provides dashboards, alerts, automation, remote control, and REST API access. The free tier gives you 3 devices with 7-day data retention, enough for all lessons.

  4. Start with Lesson 1. The protocol comparison gives you the mental model for every decision in the rest of the course.

  5. Work through lessons in order. Each lesson builds on the infrastructure from previous lessons.

© 2021-2026 SiliconWit®. All rights reserved.

8 lessons, in order.

SiliconWit makes these courses. We also run siliconwit.io, a monitoring service.