초기 커밋
This commit is contained in:
25
app/communication/mqtt/topics.py
Normal file
25
app/communication/mqtt/topics.py
Normal file
@@ -0,0 +1,25 @@
|
||||
from __future__ import annotations
|
||||
|
||||
# ── Device → Server ──────────────────────────────────
|
||||
DEVICE_TELEMETRY = "devices/{device_uid}/telemetry"
|
||||
DEVICE_STATUS = "devices/{device_uid}/status"
|
||||
DEVICE_LOG = "devices/{device_uid}/log"
|
||||
DEVICE_RESPONSE = "devices/{device_uid}/response"
|
||||
|
||||
# ── Server → Device ──────────────────────────────────
|
||||
DEVICE_COMMAND = "devices/{device_uid}/command"
|
||||
DEVICE_CONFIG = "devices/{device_uid}/config"
|
||||
DEVICE_OTA = "devices/{device_uid}/ota"
|
||||
|
||||
# ── Wildcard subscriptions ───────────────────────────
|
||||
SUB_ALL_TELEMETRY = "devices/+/telemetry"
|
||||
SUB_ALL_STATUS = "devices/+/status"
|
||||
SUB_ALL_LOG = "devices/+/log"
|
||||
SUB_ALL_RESPONSE = "devices/+/response"
|
||||
|
||||
SUBSCRIBE_TOPICS = [
|
||||
SUB_ALL_TELEMETRY,
|
||||
SUB_ALL_STATUS,
|
||||
SUB_ALL_LOG,
|
||||
SUB_ALL_RESPONSE,
|
||||
]
|
||||
Reference in New Issue
Block a user