1---2name: iot3description: Create IoT architecture diagrams using PlantUML syntax with device and sensor stencil icons. Best for smart home, industrial IoT (IIoT), fleet management, edge computing, and sensor network layouts.4---5
6# IoT Architecture Diagram Generator
7
8**Quick Start:** Select device/sensor icons → Place edge gateways → Connect to cloud services → Group into zones → Wrap in ` ```plantuml ` fence.
9
10> ⚠️ **IMPORTANT:** Always use ` ```plantuml ` or ` ```puml ` code fence. NEVER use ` ```text ` — it will NOT render as a diagram.
11
12## Critical Rules
13
14- Every diagram starts with `@startuml` and ends with `@enduml`
15- Use `left to right direction` for typical IoT data flows (Device → Edge → Cloud)
16- Use `mxgraph.aws4.*` stencil syntax for IoT service and device icons
17- Default colors are applied automatically — you do NOT need to specify `fillColor` or `strokeColor`
18- Use `rectangle "Zone" { ... }` or `package "Site" { ... }` for grouping
19- Directed flows use `-->`, async/event-driven flows use `..>` (dashed)
20
21**Full stencil reference:** See [stencils/README.md](../uml/stencils/README.md) for 9500+ available icons.
22
23## Mxgraph Stencil Syntax
24
25```
26mxgraph.aws4.<icon> "Label" as <alias>
27```
28
29### Core IoT Stencils
30
31| Category | Stencils | Purpose |
32|----------|----------|---------|
33| IoT Platform | `iot_core`, `internet_of_things`, `iot_1click` | Central IoT hub / message broker |
34| Edge/Gateway | `greengrass`, `iot_device_gateway`, `freertos`, `iot_expresslink` | Edge computing & device gateway |
35| Greengrass | `iot_greengrass_component`, `iot_greengrass_nucleus`, `iot_greengrass_stream_manager` | Edge runtime components |
36| Device Mgmt | `iot_device_management`, `iot_device_defender`, `iot_device_tester`, `iot_over_the_air_update` | Fleet provisioning, security, OTA |
37| Analytics | `iot_analytics`, `iot_analytics_channel`, `iot_analytics_pipeline`, `iot_analytics_dataset`, `iot_analytics_data_store` | IoT data processing pipeline |
38| Events/Rules | `iot_events`, `iot_device_defender_iot_device_jobs` | Event detection & job execution |
39| Digital Twin | `iot_twinmaker`, `iot_sitewise`, `iot_sitewise_asset`, `iot_sitewise_asset_model` | Asset modeling & visualization |
40| Fleet | `iot_fleetwise`, `iot_device_management_fleet` | Vehicle & device fleet telemetry |
41
42### Device & Sensor Stencils
43
44| Category | Stencils |
45|----------|----------|
46| Sensors | `sensor`, `iot_thing_temperature_sensor`, `iot_thing_humidity_sensor`, `iot_thing_vibration_sensor`, `iot_thing_temperature_humidity_sensor`, `iot_thing_temperature_vibration_sensor` |
47| Actuators | `actuator`, `iot_thing_relay`, `iot_thing_stacklight` |
48| Industrial | `factory`, `iot_thing_industrial_pc`, `iot_thing_plc` |
49| Smart Home | `thermostat`, `alexa_enabled_device`, `alexa_smart_home_skill`, `camera`, `camera2` |
50| Protocols | `mqtt_protocol`, `iot_lorawan_protocol`, `iot_greengrass_protocol` |
51| Boats/Vehicles | `iot_sailboat`, `iot_fleetwise` |
52| Robotics | `robomaker`, `iot_roborunner` |
53
54### Connection Types
55
56| Syntax | Meaning | Use Case |
57|--------|---------|----------|
58| `A --> B` | Solid arrow | Sync API / data flow |
59| `A ..> B` | Dashed arrow | Async telemetry / MQTT publish |
60| `A -- B` | Solid line | Physical / bidirectional link |
61| `A --> B : "label"` | Labeled connection | Describe protocol or data |
62
63### Quick Example
64
65```plantuml
66@startuml
67left to right direction
68rectangle "Factory Floor" {
69 mxgraph.aws4.sensor "Temp\nSensor" as s1
70 mxgraph.aws4.iot_thing_plc "PLC" as plc
71}
72mxgraph.aws4.greengrass "Greengrass\nEdge" as gg
73mxgraph.aws4.iot_core "IoT Core" as core
74mxgraph.aws4.iot_analytics "IoT\nAnalytics" as analytics
75
76s1 --> gg : MQTT
77plc --> gg
78gg --> core
79core --> analytics
80@enduml
81```
82
83## IoT Architecture Types
84
85| Type | Purpose | Key Stencils | Example |
86|------|---------|--------------|---------|
87| Smart Factory | Industrial IoT monitoring | `sensor`, `iot_thing_plc`, `greengrass`, `iot_sitewise` | [smart-factory.md](examples/smart-factory.md) |
88| Smart Home | Home automation | `thermostat`, `alexa_enabled_device`, `camera`, `iot_core` | [smart-home.md](examples/smart-home.md) |
89| Fleet Telemetry | Vehicle fleet tracking | `iot_fleetwise`, `iot_core`, `iot_analytics` | [fleet-telemetry.md](examples/fleet-telemetry.md) |
90| Edge Computing | Local processing at edge | `greengrass`, `freertos`, `iot_greengrass_component` | [edge-computing.md](examples/edge-computing.md) |
91| Digital Twin | Asset modeling & simulation | `iot_twinmaker`, `iot_sitewise_asset_model`, `iot_sitewise` | [digital-twin.md](examples/digital-twin.md) |
92| Sensor Network | Distributed sensor mesh | `sensor`, `iot_lorawan_protocol`, `iot_device_gateway` | [sensor-network.md](examples/sensor-network.md) |
93| Device Management | Fleet provisioning & OTA | `iot_device_management`, `iot_device_defender`, `iot_over_the_air_update` | [device-management.md](examples/device-management.md) |
94| Robotics | Robot fleet orchestration | `robomaker`, `iot_roborunner`, `greengrass` | [robotics.md](examples/robotics.md) |