UNIHH-IOTUNIHH-IOT
Home
Guide
Manual
  • 简体中文
  • English
GitHub
Home
Guide
Manual
  • 简体中文
  • English
GitHub
  • Reference

    • API Overview
    • MQTT Topic Reference
    • FAQ

MQTT Topic Reference

All interaction between southbound drivers and the admin/data centers flows through the EMQX message bus, following MQTT 5.0. Custom drivers and third-party integrations can talk directly using the topics below.

Bus Access

ItemDefault
Addresstcp://localhost:1883 (TLS on 8883)
Account / passwordunihh / unihh
BrokerEMQX 5.x, shared subscriptions and retained messages supported

Topic Table

CategoryTopicPublisherConsumerDescription
Driver registrationiot/driver/registerDriverAdmin centerDriver broadcasts its metadata and HTTP endpoint at startup
Driver heartbeatiot/driver/heartbeatDriverAdmin centerEvery 5s by default, with active channel metrics
Driver status / last-williot/driver/{driverCode}/statusDriver / EMQXAdmin centerOnline/offline notices; the broker publishes the LWT will on crash (retained=true)
Device config synciot/device/config/updateAdmin centerAll driversGlobal hot notice for device or point changes
Dedicated device configiot/driver/{driverCode}/device/configAdmin centerTarget driverDirected push of connection and point definitions
Point data uploadiot/driver/{driverCode}/dataDriverData centerPeriodic acquisition results, consumed via shared subscription
Write-back commandiot/driver/{driverCode}/cmdAdmin centerTarget driverPoint write (WRITE) or service invocation (SERVICE)
Device channel stateiot/device/statusDriverAdmin centerPhysical link drop/recovery; platform updates device state

Consumption Patterns

  • Shared subscriptions: the iot/driver/+/data stream is consumed with an MQTT 5.0 shared subscription, so multiple data-center instances can split the throughput;
  • Dedicated topics: config sync and commands use {driverCode}-scoped topics, so unrelated drivers never process extra traffic;
  • Retained messages: driver status is retained, so late subscribers learn the latest state immediately.

Reliability Mechanisms

MechanismDescription
LWT last-willDrivers register a will on connect; EMQX publishes the offline message if the process dies
Heartbeat watchdogPlatform-side safety net: a driver is declared offline after 15s without a heartbeat
Channel mutexDrivers apply a fair lock per device channel — commands arriving concurrently on MQTT still execute serially on the wire

Integration Advice

Third-party systems (e.g. an MES) that only consume data can share-subscribe to iot/driver/+/data directly. For issuing control, prefer the platform REST API (/api/v1/devices control endpoints) over publishing raw MQTT: you get authentication, parameter snapshots and the complete execution audit trail for free.

Edit this page on GitHub
Last Updated: 11/13/26, 3:34 AM
Contributors: sunqi
Prev
API Overview
Next
FAQ