Topic structure
TEXT
topic.txt
PROJECT_ID/DEVICE_ID/telemetry/VARIABLE
PROJECT_ID/DEVICE_ID/command/VARIABLE
PROJECT_ID/DEVICE_ID/status/VARIABLE
Examples
| Purpose | Topic |
|---|---|
| Send temperature | PROJECT_ID/esp32-01/telemetry/temperature |
| Control a relay | PROJECT_ID/esp32-01/command/relay |
| Relay status | PROJECT_ID/esp32-01/status/relay |
Topic rules
- Use the matching Project ID and Device ID.
- Don't add a leading or trailing slash.
- The variable must match the one registered in the project.
- Avoid wildcards when publishing from a device.
QoS and retained messages
Use the QoS level that fits your needs. Use retained messages only when new subscribers really must receive the last status; avoid retained messages for high-frequency telemetry.