This page is intended for public viewing and is attached to the submission page.


Note: This document serves as an initial software design draft. It also outlines future plans to fully automate device creation and registration through Azure IoT Hub. As of now, only individual control features such as C2D (Cloud-to-Device) and D2C (Device-to-Cloud) messaging have been implemented.

Project Overview

✅ Users can own and manage multiple IoT devices (ESP32)

✅ Backend provides APIs in Golang and communicates with IoT Hub

✅ IoT developers handle ESP32 device setup, MQTT communication, and sensor data processing

✅ DevOps manages Azure IoT Hub, Azure Functions, and API deployments

✅ All devices communicate through Azure IoT Hub using an MQTT-based Publish/Subscribe architecture


MQTT Communication

Azure IoT Hub Topic Structure

Azure IoT Hub supports both Device-to-Cloud (D2C) and Cloud-to-Device (C2D) messaging with the following topic structure:

Topic Type Topic Name Description
D2C (Device → Cloud) devices/{device_id}/telemetry ESP32 sends sensor data
D2C (Device → Cloud) devices/{device_id}/status ESP32 updates its current state
C2D (Cloud → Device) devices/{device_id}/commands Backend sends commands to a specific device

Overall System Structure

1. User Process (User → Backend → IoT)

1️⃣ The user clicks 'Add New Plant' in the web/mobile app

2️⃣ The backend requests Azure IoT Hub to register a new device