Skip to content

About this article

  • Audience: Integrators wiring edge shadows to a central SOC or Phantom proxy
  • Goal: Understand the hierarchical topic namespaces before implementing publishers or subscribers
  • Type: Concept

Summary

Ghost Protocol shadows publish on devices/{device_id}/… with a parallel shadow/{device_id}/… telemetry mirror. The Phantom proxy subscribes to fleet wildcards, caches latest payloads, and exposes them over HTTP. This page describes namespace intent; field-level schemas live in the MQTT reference.

Prerequisites

  • MQTT broker reachable from edge and proxy (default port 1883 on the Phantom host stack)
  • Device IDs as role labels (site-role-a, site-role-b)
  • Glossary for device_id and precomp

Namespace model

devices/{device_id}/
  ├── status          (retained lifecycle)
  ├── health          (periodic fleet summary)
  ├── telemetry       (~10 Hz precomp + die temp)
  ├── dets            (RF-DETR detection batches)
  ├── data_manifest   (recording index)
  ├── responses       (command acknowledgements)
  ├── events/{type}   (incidents, automation, plugin)
  └── cmd/…           (ingress commands)

shadow/{device_id}/   (telemetry mirror for legacy consumers)
casper/{device_id}/   (LED and accessory telemetry)

Direction convention: Edge → SOC for telemetry and events; SOC → Edge for commands under cmd/.

Core lifecycle topics

TopicDirectionPurpose
devices/{id}/statusEdge → SOCRetained online/offline with firmware version; LWT on disconnect
devices/{id}/healthEdge → SOCCPU, RAM, DSP temperature, storage health summary
devices/{id}/telemetryEdge → SOCHigh-frequency die temp, fps, embedded detection list

Status and health establish fleet presence before alert pipelines consume dets.

AI and event streams

TopicDirectionPurpose
devices/{id}/detsEdge → SOCRF-DETR precomp batches (~10 Hz)
devices/{id}/events/threat_detectedEdge → SOCVLM-classified incidents with clip reference
devices/{id}/events/incidentEdge → SOCProxy-triggered video-understanding pulls
devices/{id}/eventsEdge → SOCPlugin and automation events (door, relay, custom)

Detection payloads use compact keys (c, p, b, optional track_id and spatial x/y/z). Threat events carry analysis text and a chunk filename reference — not raw video bytes.

Recording and manifest workflow

TopicDirectionPurpose
devices/{id}/cmd/get_manifestSOC → EdgeRequest scan of local recording directory
devices/{id}/data_manifestEdge → SOCAvailable chunk catalog response
devices/{id}/commandsSOC → EdgeUpload triggers (cmd: upload, filename)

This pairs with the justified recording contract: the proxy pulls or streams chunks after manifest negotiation.

OTA and model updates

TopicDirectionPurpose
devices/{id}/model/updateSOC → EdgeModel URL and hash for hot-swap
devices/{id}/upgrade/statusEdge → SOCDownload and flash progress
devices/{id}/upgrade/resultEdge → SOCSuccess or failure with new version string

Aligns with A/B rollback policy in requirements.

Accessories and automation

TopicDirectionPurpose
casper/{id}/led/colorSOC → EdgeRGB status LED control
casper/{id}/led/effectSOC → EdgeStrobe and timed effects
casper/{id}/telemetry/canEdge → SOCM8 CAN adapter decoded frames
casper/{id}/telemetry/wifiEdge → SOCWLAN fallback RSSI and state
casper/{id}/telemetry/controllerEdge → SOCM8 GPIO and relay state

Plugin commands also use devices/{id}/cmd/plugins and devices/{id}/cmd/m8 — see plugin system.

Next steps

Operator depth

Live topic captures, TAP traces, and broker ACL configs live in private operator handoff (not published).