Endpreise in CHF – Versand inklusive Schweizer Unternehmen · 076 792 63 50 (WhatsApp/SMS)
Kurse › Raspberry Pi › Stufe 19
Raspberry Pi · Intermediate · Stufe 19 / 40

MQTT and Home Automation

Connect devices through an MQTT broker and automate them with a home-automation platform.

Intermediate freischalten · CHF 19.90 Stufen 14–26, einmalig, kein Abo

10 Lektionen in dieser Stufe

  1. Publish and Subscribe: How MQTT Decouples Devices
    Explain brokers, clients and topics and why this beats direct connections. · Lab: Draw the message flow for three devices before and after adding a broker.
  2. Running a Mosquitto Broker
    Install a broker and exchange messages with the command-line clients. · Lab: Start Mosquitto and send messages between two terminals with mosquitto_pub and mosquitto_sub.
  3. Designing a Topic Tree and JSON Payloads
    Name topics so a system stays understandable as it grows. · Lab: Design topics for a three-room house and subscribe with + and # wildcards.
  4. Publishing Sensor Data with paho-mqtt
    Send readings from a Python service and react to command topics. · Lab: Publish BME280 values every thirty seconds and switch a relay from a command topic.
  5. QoS, Retained Messages and Last Will
    Choose delivery guarantees and report when a device drops offline. · Lab: Add a retained status topic and a last-will message, then pull the power to test it.
  6. Broker Authentication and TLS
    Require credentials and encrypt traffic on the broker. · Lab: Add users with an access-control list and enable TLS with your own certificate.
  7. Running Home Assistant in a Container
    Deploy the platform with Compose and complete first-time setup. · Lab: Add Home Assistant to your Compose stack with a persistent config volume.
  8. MQTT Discovery: Making Your Devices Appear Automatically
    Publish discovery messages so entities create themselves. · Lab: Add discovery payloads for a sensor and a switch and watch them appear.
  9. Automations, Scenes and Notifications
    Build trigger-condition-action rules and send alerts. · Lab: Turn on a light on motion only when it is dark and notify a phone on high humidity.
  10. Adding Zigbee Devices with a USB Coordinator
    Bridge a Zigbee mesh into MQTT and pair a device. · Lab: Run a Zigbee-to-MQTT bridge container, pair a plug and control it from an automation.

Abschlussprojekt

A smart-room hub in which your own sensors and outputs appear automatically in Home Assistant, automations react to motion and climate, and a Zigbee device joins the same system.

Teile für diese Stufe

  • 1 × Raspberry Pi 5 or Pi 4 (4 GB or more recommended) set from Level 1
  • 1 × Sensor node hardware from Level 11
  • 1 × Relay module and LED strip from earlier levels
  • 1 × PIR motion sensor module
  • 1 × Zigbee USB coordinator dongle
  • 1 × Zigbee smart plug or sensor
  • 1 × Raspberry Pi Zero 2 W as a second node (optional)

In jeder Lektion legst du die passenden Teile direkt in den Warenkorb. Raspberry Pi →

Voraussetzung: Levels 11, 15 and 18: sensors, services and Docker Compose.

🔒 Sichere Zahlung · 3D Secure 🔐 SSL-verschlüsselt 🚚 Versand in die ganze Schweiz 🇨🇭 Schweizer Unternehmen