The Unified UDMI Functional Interface (UUFI) defines a standardized messaging mechanism for external applications (the Client) to integrate with a UDMI-managed system (the System). UUFI serves exclusively as an external-facing, application-side interface to UDMI, enabling management and control of devices.
As an external interface specification, this document focuses solely on the public-facing contract: the exchange message formats, connectivity schemas, and the tools available to start or stop test environments. It does not expose or document the underlying system internals or implementation mechanisms (such as process IDs, internal databases, or local host execution steps), which are treated as private implementation details.
This document details the application-facing Applications (UUFI) interface, which represents one of three core system interfaces into the UDMIS ecosystem:
- Devices (UDMI proper): Edge-side device-to-system interface used by physical or simulated on-premise hardware to report telemetry streams (
events) and dynamically receive or acknowledge operationalconfig. - Internal Tools (Reflector): Administrative database-to-system interface used by backend registration and synchronization tooling (such as
registrar) to manage site models, provision cryptographic keys, and reconcile device records. - Applications (UUFI): App-to-system messaging interface used by external applications, dashboards, and operators to query system state, update model specifications, and command devices.
UUFI utilizes a messaging transport where Clients and Systems interact via dedicated topics and subscriptions.
- Publish (to System): The Client publishes a UUFI-encapsulated UDMI message.
- Receive (from System): The System delivers UUFI-encapsulated UDMI messages to the Client.
Without adding any extra properties to schema/envelope.json, the tuple { source, principal, payload, control } deterministically classifies every Layer 2 UUFI message (Layer 1 session bootstrap continues to use /uufi/c/state/udmi → /uufi/c/config/udmi):
| Direction | principal |
payload |
control |
Payload Schema | Role & Receiver Behavior |
|---|---|---|---|---|---|
Client → System (source != "udmis") |
null |
null |
— | N/A | NOP / Invalid: Dropped and logged without reply. |
Client → System (source != "udmis") |
null |
!= null |
— | N/A | Invalid (Missing Principal): Dropped and logged without reply (principal is mandatory on all client messages). |
Client → System (source != "udmis") |
!= null |
null |
— | None (null) |
Query (Read): Fetch current (subType, subFolder) state/config/model and reply on the exact same channel. |
Client → System (source != "udmis") |
!= null |
!= null |
null |
<subType>_<subFolder>.json (or String) |
Write (Mutate): Validate and apply payload (or dispatch string sentinel to lower handler layer) and reply on the exact same channel. |
Client → System (source != "udmis") |
!= null |
!= null |
!= null |
N/A | Invalid (Client Control): Dropped and logged without reply (prevents control ping-pong loops). |
System → Client (source == "udmis") |
null |
null |
— | N/A | NOP / Invalid: Dropped and logged (System never emits a null payload). |
System → Client (source == "udmis") |
null |
!= null |
null |
<subType>_<subFolder>.json (or String) |
Stream (Broadcast): Unsolicited live telemetry, state, or model update (or string sentinel) with a fresh transactionId. |
System → Client (source == "udmis") |
null |
!= null |
!= null |
control_uufi.json |
Control Stream (Broadcast): Unsolicited broadcast control notice with a fresh transactionId. |
System → Client (source == "udmis") |
!= null |
null |
— | N/A | NOP / Invalid: Dropped and logged (System never emits a null payload). |
System → Client (source == "udmis") |
!= null |
!= null |
null |
<subType>_<subFolder>.json (or String) |
Success Ack: Applied/queried domain payload (or string sentinel from the lower layer); clears pending transactionId. |
System → Client (source == "udmis") |
!= null |
!= null |
!= null |
control_uufi.json |
Control Ack: Control-plane reply on transactionId (status.level < 500 interim progress keeps transactionId open; status.level >= 500 terminal error fails transactionId). |
- Control-Plane Discriminator (
schema/control_uufi.json): System control-plane replies (interim progress or terminal errors) are emitted on the exact same resource channel (subType,subFolder,deviceRegistryId,deviceId) with identical envelope attributes (source: "udmis", matchingprincipalandtransactionId) and a payload containing the unique top-level"control"object conforming toschema/control_uufi.json.control.status.level < 500(e.g.,200INFO,300NOTICE,400WARNING): interim progress or advisory notice; the client MUST keep the pendingtransactionIdopen.control.status.level >= 500(e.g.,500ERROR): terminal failure; the client MUST close and fail the pendingtransactionId.- Clients MUST NOT send payloads with a root
"control"key; any client-originated"control"message is dropped without reply.
- String Sentinel Transport: Because all standard UDMI message schemas (including
control_uufi.json) are strictly JSON objects, a bare JSONStringpayload is recognized at the UUFI transport layer as a sentinel value without overloadingnull. The UUFI protocol layer safely transports string sentinels between Client and System; specific token names and semantics are defined and validated by lower handler layers (unrecognized client strings fail fast with astatus.level = 500Control Ack). - Exclusion of
events/error: Internal error channels (subFolder: errorandsubType: errors) are excluded from both inbound and outbound UUFI paths. All client-visible request failures are reported on the originating resource channel viaschema/control_uufi.json.
UUFI interfaces use a URL-like connection string format. Supported schemes: mqtt://, mqtts://, and pubsub://.
Format: scheme://[user@]host[:port][/path]
- Default User:
unknown - User Separation: The
@character is required if auseris specified. - Default Port: Protocol-specific.
- Host: GCP Project ID.
- User: Maps to a subscription suffix and the
principalattribute. - Principal: The
usercomponent with a trailing@(e.g.,user@). - Path: First component maps to the root topic name (default:
udmi_uufi). - Subscription:
{topic}+{user}. - Filtering: Subscriptions should filter for messages where the
principalattribute matches the local identity or is absent. - Constraint:
:portis prohibited. - Authentication: Authentication and authorization for the
pubsub://transport is managed out-of-band using standard Cloud IAM and Application Default Credentials (ADC). The connection string specifies the project and topic routing coordinates, whereas credential resolution is a transport-level prerequisite.
- Host/Port: Standard network mapping.
- SSL/TLS & Mutual Authentication: When a secure connection is requested (via the
mqtts://scheme, or secure ports like8883):- The connection MUST utilize SSL/TLS with mutual certificate-based authentication (mTLS) where applicable.
- Implementations MUST treat
mqtts://with the same routing, parsing, and topic mapping rules asmqtt://, differing only in the enforcement of SSL/TLS.
- Topic Structure:
[/{prefix}]/uufi/[r/{deviceRegistryId}/[d/{deviceId}/]]c/{subType}/{subFolder}- Rigid Segment Presence: Every UUFI topic path MUST include both a subtype (
subType) and a subfolder (subFolder) segment without exception. Topic paths MUST be formatted strictly as[/{prefix}]/uufi/c/{subType}/{subFolder}(for common channels) or[/{prefix}]/uufi/r/{deviceRegistryId}/d/{deviceId}/c/{subType}/{subFolder}(for registry/device scoped channels). Omitting the subfolder segment or truncating suffixes (e.g./c/{subType}) is strictly prohibited. - Handshake Subfolder Suffix: For standard registry-less handshakes, the subfolder segment MUST be explicitly set to
"udmi". Thus, the handshake topics MUST be exactly[/{prefix}]/uufi/c/state/udmiand[/{prefix}]/uufi/c/config/udmi. - Prohibition of Alternative Topic Structures: Principal-scoped patterns (such as
[/{prefix}]/uufi/p/{principal}/...) and any other custom or arbitrary routing hierarchies are strictly prohibited. All system components MUST standardize exclusively on the common and registry-scoped topic channels to ensure interoperability.
- Rigid Segment Presence: Every UUFI topic path MUST include both a subtype (
- Prefix Isolation: The
prefixMUST be used to isolate different environments sharing the same broker. If provided, it MUST be the leading part of the topic path (e.g. matching all segments of the path provided in the connection string). Implementations MUST support multi-segment prefixes and MUST NOT omit the prefix if provided in the connection string. All active subscriptions MUST be scoped to the provided prefix to ensure environmental isolation. Prefix enforcement MUST be strict: implementations MUST NOT publish to or subscribe from topics outside their designated prefix tree. To avoid collisions and support standard broker authorization structures, implementations MUST construct unique MQTT Client IDs adhering to a standardized format:- Standardized Client ID Format: Client IDs MUST be formatted strictly as
[/{prefix}]/{registry_id}/{client_id}. If the registry is unknown or not applicable, the Client ID MUST be formatted as[/{prefix}]/{client_id}. - Uniqueness and Nonces: To ensure absolute uniqueness and prevent session hijacking or connection drops when multiple clients share a broker, implementations MAY append a random, unique alphanumeric suffix (e.g.,
_sess123or a secure random nonce) to the formatted Client ID.
- Standardized Client ID Format: Client IDs MUST be formatted strictly as
- Project Identity: For the MQTT transport, the
projectIdfield in the envelope SHOULD be treated as a general environment or project identifier. All components within a single UUFI session MUST use a consistentprojectId(default:vibrant) to avoid ambiguity in message processing. - Single-Channel Query Service (Config, State, System/Cloud Model):
- Query: Clients publish a
null-payload request ("payload": nullon MQTT;"null"or empty data on PubSub) with mandatoryprincipalandtransactionIddirectly on the target resource channel:- System Model:
[/{prefix}]/uufi/r/{deviceRegistryId}/d/{deviceId}/c/model/system - Cloud Model (non-secret metadata;
passwordandcredentialsremoved):[/{prefix}]/uufi/r/{deviceRegistryId}/d/{deviceId}/c/model/cloud - Cached State:
[/{prefix}]/uufi/r/{deviceRegistryId}/d/{deviceId}/c/state/{subFolder} - Active Config:
[/{prefix}]/uufi/r/{deviceRegistryId}/d/{deviceId}/c/config/{subFolder}
- System Model:
- Response: The System replies on the exact same channel with
source: "udmis", copying the caller'sprincipalandtransactionId, returning either the matching domain payload (conforming to<subType>_<subFolder>.json), a lower-layer string sentinel if the target resource is absent, or aschema/control_uufi.jsonControl Ack on error. If no response is received within 15 seconds, the Client SHOULD consider the query timed out. - Retirement of
subType: query: Channel-switchingquery/*topics (query/system,query/state) are retired on UUFI and MUST NOT be used.
- Query: Clients publish a
- Telemetry and Event Service:
- Telemetry (Pointset): Devices or clients publish pointset telemetry reports to
[/{prefix}]/uufi/r/{deviceRegistryId}/d/{deviceId}/c/events/pointset. - Discovery: Devices or clients publish discovery reports to
[/{prefix}]/uufi/r/{deviceRegistryId}/d/{deviceId}/c/events/discovery. - Structure: Event payloads MUST conform strictly to their respective authoritative UDMI schemas (
schema/events_pointset.jsonorschema/events_discovery.json) nested within the standardpayloadkey for MQTT or the root of the message data object for PubSub.
- Telemetry (Pointset): Devices or clients publish pointset telemetry reports to
- Control-Plane Progress & Error Service:
- Same-Channel Control Replies: The System reports request validation failures, processing errors (
status.level >= 500), and interim progress updates (status.level < 500) directly on the originating resource channel usingschema/control_uufi.json(root"control"block containing anEntryundercontrol.status), copyingprincipalandtransactionIdfrom the originating request. - Retention Prohibition: Transient UUFI
config/*requests, Success Acks, and Control Acks MUST NOT be published with the MQTTretainflag set.
- Same-Channel Control Replies: The System reports request validation failures, processing errors (
To ensure compatibility with MQTT topic parsing structures and PubSub attribute indexing, all identifier strings utilized in UUFI connection coordinates and paths MUST conform to the following character and length restrictions:
- Allowed Characters: Registry IDs (
{deviceRegistryId}) and Device IDs ({deviceId}) MUST contain only uppercase and lowercase alphanumeric characters, hyphens (-), and underscores (_). - Length Limit: Identifiers MUST be between 1 and 256 characters in length.
- Prohibited Characters: Spaces, slashes (
/), backslashes (\), wildcards (+,#), and special punctuation characters are strictly prohibited.
Handshake is Client-initiated. The System MUST NOT initiate a handshake unless acting as a Client.
The handshake has a 60-second timeout. On timeout, the Client should handle the failure and retry or fail-fast.
The UUFI interface separates network-level presence mapping from device-level operational control. Every component on the bus operates across two logical protocol layers:
- Layer 1: Service Handshake (Infrastructure-Level):
- Establishes communication presence and connection mapping on the bus between a Client and the Service.
- Upon startup, every client MUST perform this handshake to verify connection integrity and register its active routing coordinates and prefix.
- Layer 2: Application Orchestration (Application-Level):
- Represents functional interactions (such as cloud model queries, telemetry publishing, or software updates).
- These operations MUST only occur after the Layer 1 Service Handshaking of all participating components is complete.
To guarantee deterministic state transitions on shared handshake channels:
- Only the central Service processes handshake requests on
/uufi/c/state/udmiand publishes responses on/uufi/c/config/udmi. - Other application-layer services (such as coordinators, orchestrators like Butler, or compliance verifiers) MUST act strictly as handshake clients and MUST NOT publish handshake responses or act as responders on
/uufi/c/state/udmi.
All active application-layer clients (such as orchestrators, parsers, or compliance verifiers) MUST execute their own Layer 1 Service Handshake upon initialization. This ensures that:
- The Service registers their connection.
- Other observers or verification engines can verify that the client is fully initialized, connected, and subscribed before sending subsequent updates.
For any client initializing on the bus, the handshake sequence MUST follow the Request-Reply pattern below:
[ Client Entity ] [ The Service ]
│ │
│─── (1) Handshake Request (state/udmi) ────────────────────►│
│ Topic: [/{prefix}]/uufi/c/state/udmi │
│ Envelope: │
│ - transactionId: "UUID-A" │
│ - principal: "{implementation_id}.{entity_suffix}" │
│ Payload: │
│ - setup: { "transaction_id": "UUID-A" } │
│ │
│◄── (2) Handshake Config Reply (config/udmi) ───────────────│
│ Topic: [/{prefix}]/uufi/c/config/udmi │
│ Envelope: │
│ - transactionId: "UUID-A" (Symmetric Match) │
│ - source: "udmis" │
│ - principal: "{implementation_id}.{entity_suffix}" │
│ Payload: │
│ - setup: { "deviceRegistryId": "testing" } │
│ - reply: { "transaction_id": "UUID-A" } │
▼ ▼
To prevent packet collisions and support trace correlation across shared handshake channels:
- Symmetric Trace Propagation: The Service MUST copy the
transactionIdvalue from the incoming request envelope directly into thetransactionIdfield of the outgoing reply envelope. - Strict Request Gating: The client MUST discard any handshake replies whose envelope
transactionIddoes not match its original request'stransactionId. - Trace-Level Tracking: Clients and verifiers MUST track and propagate this
transactionIdacross subsequent configurations and states to support end-to-end correlation.
To guarantee parsing interoperability and avoid protocol timeouts, Handshake payloads and correlation MUST strictly adhere to the following rules:
-
Single, Strict, and Flattened Payload Structure:
- Step 1 (Handshake Request): The
"setup"payload block MUST reside directly at the payload root of the message (i.e. the root of the inner UDMI state payload). Nested or wrapped formats (e.g., nesting"setup"under a"udmi"key or any other custom outer wrapper) are strictly prohibited. - Step 2 (Handshake Response): The
"reply"payload block (along with the optional/mandatory"setup"block) MUST reside directly at the payload root of the message. Wrapping under a"udmi"root sub-object or any other custom outer wrapper is strictly prohibited.
- Step 1 (Handshake Request): The
-
Transaction Correlation: To ensure reliable request-response correlation on shared handshake channels (e.g.,
/uufi/c/config/udmi), the handshake configuration reply message's envelope MUST include a"transactionId"attribute matching the exact transaction ID from the client's handshake request envelope. Receivers MUST validate this correlation and reject mismatched responses. -
Functional Capability Negotiation (
functions_ver): Thefunctions_verinteger specified under thesetuppayload block represents the supported functional capability set of the client/system interface. If the System's maximum supported version is lower than the Client's requested version, the System MUST respond with its highest supported version in the Step 2 reply. Clients MUST gracefully handle this negotiation and determine whether to operate in fallback/degraded mode or terminate the session based on the negotiatedfunctions_ver.
The Client publishes a UDMI state message to /uufi/c/state/udmi.
- Payload: Must include
setupdirectly at the root (see Appendix A.1.1). - Addressing: Registry-less topic.
sourcein envelope contains Client identity.
The System publishes a UDMI config message to /uufi/c/config/udmi.
- Payload: Must include
setupandreplydirectly at the root (see Appendix A.1.1.a and A.1.2.a). - Addressing: Envelope
principalMUST match Client's identity (the static identity of the external application entity endpoints of the communication session). For handshake replies, the System MUST use theprincipalorsourcefrom the received state message to ensure the reply reaches the correct client. If the received message has aprincipal, it SHOULD be used; otherwise, thesourceSHOULD be used as a fallback. Senders MUST NOT setprincipalto"uufi"or a server instance ID. For broadcast messages with no specific receiver,principalMUST be left blank. The System MUST setsourceto"udmis"on outgoing messages for loopback prevention.
Retries: The Client SHOULD periodically republish the Step 1 state message (e.g., every 5 seconds) if a valid Step 2 confirmation has not been received, until the 60-second timeout.
Activation: The Client is Active when reply.transaction_id matches the original state.setup.transaction_id.
- Default:
default - Discovery: The System MAY provide a
deviceRegistryIdin theconfig.udmihandshake reply to the Client. To ensure interoperability, thedeviceRegistryIdSHOULD be placed within thesetupblock of the payload. The Client SHOULD use thisdeviceRegistryIdfor all subsequent registry-scoped topics. The System MUST NOT expect to discover its owndeviceRegistryIdfrom Client-initiated handshakes. To prevent collisions in multi-registry environments where device IDs may not be globally unique, the Client identity (sourcein envelope andmsg_sourcein setup payload) SHOULD be a structured identifier in the format{registry_id}/{device_id}if the client already has knowledge of its designated registry. Otherwise, if the registry is unknown, the Client identity is the bare{device_id}, and the System will assign a default registry ID (e.g.,default). (Note: UsedeviceRegistryIdcamelCase exactly as specified; case-insensitive or snake_case matching is NOT guaranteed).
All messages are wrapped in a UUFI Envelope.
Inner JSON object payload (for Writes, Streams, Success Acks, and Control Acks) MUST include:
timestamp: RFC 3339 (minimal precision).version: UDMI schema version.
Special non-object payload forms:
null(MQTT"payload": null, PubSub"null"or empty data): signifies a single-channel Query (Read).- Bare JSON
String: signifies a lower-layer String Sentinel value transported intact without object metadata injection.
| Transport | Envelope Location | Payload Location |
|---|---|---|
| PubSub | Message Attributes | Message Data (JSON object, "null", or JSON String) |
| MQTT | JSON Wrapper | Payload payload key (JSON object, null, or JSON String) |
- Envelope Consistency & Header Duplication Rule: Senders MUST populate and duplicate all defined envelope header fields (
subType,subFolder, and when applicabledeviceRegistryId,deviceId) within the JSON envelope payload object across all transport mechanisms. The envelope structure MUST be identical across both MQTT and PubSub transports. For MQTT transport, omitting any of these mandatory envelope header fields from the JSON payload object, or providing envelope fields that conflict with the topic path coordinates, MUST be treated as a validation error, and the message MUST be rejected. - Mandatory Envelope Fields:
- Outgoing Messages (System → Client): Outgoing messages MUST populate standard envelope fields (
subType,subFolder,deviceRegistryId,deviceId,projectId,transactionId,publishTime,source: "udmis", andpayload), settingprincipalto the caller's identity on Acks and omittingprincipalon broadcast Streams. - Incoming Messages (Client → System): All incoming client messages MUST contain mandatory envelope fields (
subType,subFolder,deviceRegistryId,deviceId,projectId,transactionId,publishTime,source, andprincipal). Client messages omittingprincipalMUST be dropped and logged without reply. If required routing coordinates are omitted or mismatch the topic path, the System rejects the request with aschema/control_uufi.jsonControl Ack (providedprincipalis present).
- Outgoing Messages (System → Client): Outgoing messages MUST populate standard envelope fields (
- Nesting: UDMI message data MUST be nested within the
payloadkey.
To ensure protocol compatibility, data integrity, and protection against replay attacks, the following metadata policies are codified for UUFI message envelopes and payloads:
-
Envelope Nonce Attribute: To support message deduplication and replay protection, clients and devices publishing state, event, or model messages SHOULD include a
"nonce"field in the envelope's root containing a secure, pseudorandomly generated hexadecimal string (minimum 32 characters, e.g., 16 bytes of entropy). All receivers MUST gracefully accept, parse, and process envelopes containing the"nonce"attribute without throwing schema errors or dropping the messages. -
Configuration Version Attribute: All configuration envelopes (at the envelope metadata level) and their inner payloads (at the payload root level) MUST include a standard
"version"attribute matching the UDMI version schema (e.g.,"1.5.2"). Receivers MUST parse and validate this version attribute to guarantee protocol compatibility. Any configuration message that lacks this attribute or contains an invalid or unparseable version schema MUST be treated as non-compliant, rejected immediately, and failed.
- Operation:
READ,CREATE,UPDATE,DELETE,BIND,UNBIND. - Addressing (Topic & Envelope Attributes):
To ensure consistent routing and avoid parsing complexity, all system model updates, queries, and replies MUST NOT use a nested JSON registries hierarchy (such as
"registries"or"devices") inside the payload. Instead, the registry ID and device ID MUST be specified strictly as message attributes (envelope level) or MQTT topic path segments:- MQTT Topic:
[/{prefix}]/uufi/r/{deviceRegistryId}/d/{deviceId}/c/model/system - PubSub Attributes: Envelope attributes MUST include
deviceRegistryIdanddeviceId(along withsubFolderset to"system"andsubTypeset to"model"). Queries send anullpayload on this same channel.
- MQTT Topic:
- Payload Structure:
The inner message payload MUST follow the flat, unnested
schema/model_system.jsonschema representing only the specified device. - Prohibited Formats:
- Nested payload hierarchies (e.g., nesting under a
"registries","devices", or"system"root key inside the JSON payload) are strictly prohibited. - Sourcing or publishing system model updates from
/uufi/c/config/systemor any other unscoped/registry-less topics is strictly prohibited.
- Nested payload hierarchies (e.g., nesting under a
Device model updates originate from the administrative registrar/reflector pipeline and are broadcast outbound to UUFI clients on model/system (source: "udmis", principal: null). Inbound client writes on model/* over UUFI are not yet implemented and are rejected with a status.level = 500 schema/control_uufi.json Control Ack. When write support is added, the UPDATE operation for the system subfolder will apply a partial merge at the device subsystem level without modifying omitted fields.
To configure a device's expected or desired software subsystem version, implementations MUST adhere to exactly ONE standard schema:
- Standard Expected Version Path: The expected version MUST be configured exclusively within the standard software dictionary structure under system configuration:
system.software.<subsystem> = "{version}"(where<subsystem>defaults to"system"). - Prohibition of Custom Properties: Any custom, flat, or alternative properties (such as
system.target_versionorsystem.software_target) are strictly prohibited and MUST NOT be accepted.
To report a device's actual or currently running software subsystem version, implementations MUST adhere strictly to the standard UDMI schema:
- Standard Actual Version Path: The actual running version MUST be reported exclusively within the software dictionary under the system state payload root:
system.software.<subsystem> = "{version}". - Prohibition of Non-Standard State Paths: Reporting actual running versions within alternative structures (such as trying to nest a
versionproperty underblobset.blobs.<subsystem_id>) is strictly prohibited.
| UDMI Operation | Envelope subType |
Envelope subFolder |
Direction | Payload & Role Note |
|---|---|---|---|---|
| Handshake State | state |
udmi |
Publish | Layer 1 flat UdmiState (Step 1) |
| Handshake Config | config |
udmi |
Receive | Layer 1 flat UdmiConfig (Step 2) |
| Config Write / Ack | config |
varies | Publish / Receive | Domain object (or sentinel) Write; same-channel Success Ack or control_uufi.json Control Ack |
| Config Query / Reply | config |
varies | Publish / Receive | payload: null Query; same-channel domain payload (or sentinel) Success Ack |
| State Stream | state |
varies | Receive | Broadcast Stream (principal: null) |
| State Query / Reply | state |
varies | Publish / Receive | payload: null Query; same-channel cached state (or sentinel) Success Ack |
| Telemetry Stream | events |
pointset |
Receive | Broadcast Stream (principal: null) |
| Discovery Stream | events |
discovery |
Receive | Broadcast Stream (principal: null) |
| System Model Query / Reply | model |
system |
Publish / Receive | payload: null Query; same-channel model_system.json (or sentinel) Success Ack |
| Cloud Model Query / Reply | model |
cloud |
Publish / Receive | payload: null Query; same-channel model_cloud.json with password/credentials removed |
| System Model Broadcast | model |
system |
Receive | Outbound model_system.json Broadcast (principal: null); inbound model/* writes currently return level-500 Control Ack |
| Blobset Config / Ack | config |
blobset |
Publish / Receive | config_blobset.json Write; same-channel Success Ack or Control Ack |
| Blobset State | state |
blobset |
Receive | Broadcast Stream (principal: null) |
| Control Progress / Error | matches request | matches request | Receive | control_uufi.json (status.level < 500 progress, >= 500 terminal error) |
- Requirement: QoS 1 (At Least Once) for all state and configuration messages.
- Transaction ID: MUST use a unique
transactionIdfor message identification. - Deduplication: Track
transactionIds for 5 minutes.
- Nesting: The
payloadobject contains the fields of the UDMI message corresponding to thesubFolderandsubType. - Subsystem Nesting: For
blobsetconfig and state payloads, data MUST be nested within a subsystem-id key (e.g.,system) to support multi-subsystem devices. Subsystem nesting is strictly required for all UUFI-compliant messages; unnested (flat) payloads are not supported. - Mandatory Fields:
timestampandversionMUST be at the root of thepayloadobject. - Metadata: The
makeandmodelfields are mandatory for allblobsetsubfolder payloads (state and config) within the subsystem nesting. - Blobset Config URL: The
urlfield in ablobsetconfig payload MUST be a valid URI. Implementations MUST support absolute and relative path mapping using thefile://scheme, as well as inline payloads using thedata:scheme:- Absolute Paths: If the URI has three leading slashes (e.g.,
file:///var/tmp/bundle.bin), the scheme is stripped and resolved as an absolute path (e.g.,/var/tmp/bundle.bin). - Relative Paths: If the URI has two leading slashes (e.g.,
file://relative/path/bundle.bin), the scheme is stripped and resolved as a path relative to the designated application or site-model root. - Inline Data Payloads: If the URI uses the
data:scheme (e.g.,data:text/plain;base64,MS4xLjA=ordata:application/json;base64,...), implementations MUST parse the MIME-type and decode the trailing base64 segment (the portion immediately following;base64,) to retrieve the raw bytes.
- Absolute Paths: If the URI has three leading slashes (e.g.,
- Format: RFC 3339 minimal precision (e.g.,
2026-05-01T22:32:17Z). - Timezone: UTC required (
Zsuffix). - Precision: System-originated messages SHOULD NOT include fractional seconds. Clients MAY include fractional seconds (microseconds), and all implementations MUST handle them gracefully by ignoring extra precision if necessary.
- Type Safety: Mandatory version strings (
current_version,target_version, etc.) MUST NOT benull. If a version is unknown, use a placeholder string like"0.0.0". Implementations MUST treat"0.0.0"as an uninitialized or lower-precedence state; a non-zero version string MUST NEVER be overwritten by"0.0.0"during automated synchronization. - Metadata Fallbacks: For mandatory string fields like
makeandmodel, if the value is unknown or uninitialized, implementations SHOULD use"unknown"as a standard fallback value.
- Envelope Header Duplication Rule: Implementations MUST duplicate all envelope header attributes (
subType,subFolder,deviceRegistryId,deviceId) inside the JSON payload object wrapper. The JSON envelope structure MUST be identical across MQTT and PubSub transports. If an incoming MQTT message omits these envelope fields from the JSON payload or if they mismatch the topic path parameters, it MUST be rejected as an error. - Leading Slash: For MQTT transport, all UUFI topics MUST start with a leading slash
/. Implementations MUST NOT accept or publish to topics lacking the leading slash.
This section specifies how external client developers (working outside the UDMI project codebase) can set up a local testing environment to build and verify custom UUFI Client implementations against a running System and Device Under Test (DUT).
To initialize the local System stack (Mosquitto broker, etcd, and UDMIS control plane), execute the local startup script with a designated target site model directory and connection spec:
bin/udmi start [site_model_dir] //mqtt/localhost:$portExample:
bin/udmi start sites/udmi_site_model //mqtt/localhost:46432- Format Constraint: The target connection spec MUST be provided in the format
//mqtt/localhost:$portto ensure correct port parsing and target identification by the local environment. - Shutdown & Lifecycle Provisions: Service processes are managed directly via the tooling rather than manual process matching or
kill/pkillcommands. To stop the local system infrastructure, executebin/udmi stop. Re-executingbin/udmi startautomatically stops and cleans up any existing background instances before starting fresh.
Upon successful startup, the local environment exposes the following connection parameters:
- Broker Endpoint:
mqtt://localhost:46432(orssl://localhost:46432for mTLS) - Authentication Credentials: Username
rocket, Passwordmonkey - mTLS Certificates:
- CA Certificate:
sites/udmi_site_model/reflector/ca.crt - Client Certificate:
sites/udmi_site_model/reflector/rsa_private.crt - Private Key:
sites/udmi_site_model/reflector/rsa_private.pem
- CA Certificate:
To emulate a managed device executing commands and reporting telemetry over UUFI, launch the DUT (Pubber) process targeting the site model and connection endpoint:
bin/start_dut <site_model_dir> //mqtt/localhost:$port [device_id] [serial_no]Example:
bin/start_dut sites/udmi_site_model //mqtt/localhost:46432 AHU-1 uufi-serial- Format Constraint: The second positional argument MUST begin with
//(e.g.//mqtt/localhost:$port). Omitting//or passing explicit schemes likemqtts://is not supported for local test execution and will result in a connection configuration error. - Function: Registers device
AHU-1(or specified device ID) with serial numberuufi-serialand begins standard message exchange between the DUT and the local System. - Shutdown Provision: To stop a running DUT process without manual process manipulation, invoke the
stopsubcommand with the target serial number:bin/start_dut stop <serial_no>
- Lifecycle Management: Launching
bin/start_dutwith the serial number of an active DUT automatically stops the existing instance before launching the new process.
Prior to test execution, the database synchronization step must be executed using the standard registrar tool in full online mode:
bin/registrar <site_model_dir> //mqtt/localhost:$portExample:
bin/registrar sites/udmi_site_model //mqtt/localhost:46432- Function: Synchronizes the site model database, generates
metadata_norm.json, populatesgenerated_config.json, and initializes tagabase entries for simulated devices.
To trigger automated database mutations or field updates during testing, execute bin/site_trigger using explicit connection syntax:
bin/site_trigger update <site_path> <device_id> <blob_id> <version> //mqtt/localhost:$portExample:
bin/site_trigger update sites/udmi_site_model AHU-1 system 1.0.0 //mqtt/localhost:46432- Format Constraint: Enforces
//mqtt/localhost:$portsyntax as the final argument to target custom ports correctly. - Expected Console Output: When executed successfully, the utility confirms the atomic update of the target device's metadata file on disk and reports publishing the model update to the device-scoped system channel:
Successfully updated expected version of system to '1.0.0' in sites/udmi_site_model/devices/AHU-1/metadata.json. Publishing model/system update to /uufi/r/ZZ-TRI-FECTA/d/AHU-1/c/model/system... Model update message triggered successfully. - Expected Wire-Level Message Output: The utility publishes a flat, device-scoped system model message directly to the topic path
[/{prefix}]/uufi/r/{deviceRegistryId}/d/{deviceId}/c/model/system(for example,/uufi/r/ZZ-TRI-FECTA/d/AHU-1/c/model/system). Because inboundmodel/*writes over UUFI are currently rejected, the System replies on the same channel with a level-500schema/control_uufi.jsonControl Ack. The published MQTT payload contains the standard envelope metadata and the flatschema/model_system.jsonstructure:{ "subType": "model", "subFolder": "system", "deviceRegistryId": "ZZ-TRI-FECTA", "deviceId": "AHU-1", "projectId": "vibrant", "transactionId": "TXN-a1b2c3d4", "publishTime": "2026-07-24T06:57:00Z", "source": "site_trigger", "principal": "site_trigger", "payload": { "version": "1.5.7", "timestamp": "2026-07-24T06:57:00Z", "software": { "system": "1.0.0" } } }
To tear down or stop running test infrastructure and DUT simulations in isolated or non-privileged environments, use the provided high-level tool commands:
- System Infrastructure Teardown: Stop all local infrastructure services (such as the broker, etcd, influxd database, and registry plane) using the stop subcommand on the local startup service:
bin/udmi stop
- DUT Simulation Teardown: Stop individual emulated devices using the stop subcommand followed by the device's unique identifier or serial number:
bin/start_dut stop <serial_no>
- Execution Policy: External test orchestrators MUST rely exclusively on these high-level stop commands to tear down the environment. Manual process termination or global system-wide commands are unsupported and may result in partial teardowns or configuration corruption.
- Trigger Mechanism: Non-privileged execution mode MUST be automatically enabled whenever an explicit, custom MQTT port is specified in the connection string (e.g.,
//mqtt/localhost:<port>). - Environment-Free Bypasses: The use of
UDMI_NO_SUDOis deprecated. Instead, any port specification other than system-default ports (or any explicit port for local execution) automatically instructs all scripts to run in user-space. - User-Space Relocation: When non-privileged mode is triggered, the system operates entirely in user-space without attempting system-wide directory modifications or system service management (e.g.,
systemctl). Instead, the broker is started as a local user background process utilizing configuration and log directories located inside the local workspace relative to the UDMI root.
- Permitted Utilities: Only utilities explicitly listed in the testing spec are allowed to be used by outside agents.
- Prohibition: The direct use of any other utility is prohibited and is not supported.
- Prohibition: For test compliance, it is forbidden to set any environment variable to try and influence or impact the UDMI implementation.
During development or for automated CI runners, the test infrastructure is managed via the Test Infrastructure MCP Server (bin/test_infra_mcp) or unified CLI (bin/test_setup). This abstracts away manual process management, PID tracking, and socket polling.
-
MCP Tools:
ensure_test_setup(test_id, [site_model], [dut_device_id], [dut_serial_no], [clean], [timeout_seconds]): Deterministically assigns an isolated port block, launches the service stack in an isolatedtmuxsession, verifies stack readiness, and returns the active connection URL (mqtt://rocket:monkey@localhost:<port>), available semantic window tags (["main", "dut"]), TLS certificates, and port mapping.terminate_test_setup(test_id, [clean_workspace]): Destroys thetmuxsession and purges per-instance runtime storage.list_test_setups(): Lists all active test sessions, active semantic windows, and connection endpoints.list_test_windows(test_id): Lists the available semantic window tags for an active test session.get_test_logs(test_id, [window], [lines]): Captures live console output from a named semantic tmux window (e.g.'main','dut'). Window identifiers must be semantic tags; numerical indices are rejected.
-
CLI Usage:
# Ensure infrastructure is ready and obtain connection URL CONN_URL=$(bin/test_setup ensure my_test_id sites/udmi_site_model) # Full JSON response (includes "windows": ["main"]) bin/test_setup ensure my_test_id sites/udmi_site_model --json # Query available semantic windows bin/test_setup windows my_test_id # Capture logs using semantic window tag bin/test_setup logs my_test_id main -n 50 # Terminate infrastructure bin/test_setup terminate my_test_id
This appendix references the formal JSON schemas and provides message examples for the UUFI protocol. The UDMI Schema Repository is the authoritative source for all message structures.
Attributes:
{
"subFolder": "udmi",
"subType": "state",
"transactionId": "UUFI:sess123:001",
"source": "client-id",
"principal": "client-id@"
}Data:
{
"version": "1.5.2",
"timestamp": "2026-04-29T10:00:00Z",
"setup": {
"functions_ver": 9,
"transaction_id": "UUFI:sess123:001",
"msg_source": "client-id"
}
}Attributes:
{
"subFolder": "udmi",
"subType": "config",
"transactionId": "UUFI:sess123:001",
"source": "udmis",
"principal": "client-id@"
}Data:
{
"version": "1.5.2",
"timestamp": "2026-04-29T10:00:05Z",
"setup": {
"functions_ver": 9,
"transaction_id": "UUFI:sess123:001",
"msg_source": "client-id"
},
"reply": {
"transaction_id": "UUFI:sess123:001"
}
}Topic: /uufi/c/state/udmi
Payload:
{
"subType": "state",
"subFolder": "udmi",
"projectId": "vibrant",
"transactionId": "UUFI:sess123:001",
"publishTime": "2026-04-29T10:00:00Z",
"source": "client-id",
"principal": "client-id",
"payload": {
"version": "1.5.2",
"timestamp": "2026-04-29T10:00:00Z",
"setup": {
"functions_ver": 9,
"transaction_id": "UUFI:sess123:001",
"msg_source": "client-id"
}
}
}Topic: /uufi/c/config/udmi
Payload:
{
"subType": "config",
"subFolder": "udmi",
"projectId": "vibrant",
"transactionId": "UUFI:sess123:001",
"publishTime": "2026-04-29T10:00:05Z",
"source": "udmis",
"principal": "client-id",
"payload": {
"version": "1.5.2",
"timestamp": "2026-04-29T10:00:05Z",
"setup": {
"functions_ver": 9,
"transaction_id": "UUFI:sess123:001",
"msg_source": "client-id"
},
"reply": {
"transaction_id": "UUFI:sess123:001"
}
}
}Attributes:
{
"subFolder": "pointset",
"subType": "config",
"transactionId": "UUFI:sess123:002",
"source": "client-id",
"principal": "client-id@",
"deviceRegistryId": "reg-1",
"deviceId": "dev-1"
}Data:
{
"version": "1.5.2",
"timestamp": "2026-04-29T10:05:00Z",
"points": {
"temp": { "set_value": 22.5 }
}
}Topic: /uufi/r/reg-1/d/dev-1/c/config/pointset
Payload:
{
"subType": "config",
"subFolder": "pointset",
"deviceRegistryId": "reg-1",
"deviceId": "dev-1",
"transactionId": "UUFI:sess123:002",
"principal": "client-id",
"payload": {
"version": "1.5.2",
"timestamp": "2026-04-29T10:05:00Z",
"points": {
"temp": { "set_value": 22.5 }
}
}
}Attributes:
{
"subFolder": "blobset",
"subType": "config",
"transactionId": "UUFI:sess123:003",
"source": "client-id",
"principal": "client-id@",
"deviceRegistryId": "reg-1",
"deviceId": "dev-1"
}Data:
{
"version": "1.5.7",
"timestamp": "2026-04-29T10:10:00Z",
"blobs": {
"system": {
"phase": "apply",
"url": "file:///path/to/bundle.bin",
"sha256": "abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
"generation": "2026-04-29T10:10:00Z"
}
}
}Topic: /uufi/r/reg-1/d/dev-1/c/config/blobset
Payload:
{
"subType": "config",
"subFolder": "blobset",
"deviceRegistryId": "reg-1",
"deviceId": "dev-1",
"transactionId": "UUFI:sess123:003",
"source": "client-id",
"principal": "client-id",
"payload": {
"version": "1.5.7",
"timestamp": "2026-04-29T10:10:00Z",
"blobs": {
"system": {
"phase": "apply",
"url": "file:///path/to/bundle.bin",
"sha256": "abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
"generation": "2026-04-29T10:10:00Z"
}
}
}
}Attributes:
{
"subFolder": "system",
"subType": "model",
"transactionId": "UUFI:sess123:004",
"source": "udmis",
"deviceRegistryId": "reg-1",
"deviceId": "dev-1"
}Data:
{
"version": "1.5.7",
"timestamp": "2026-04-29T10:15:00Z",
"software": {
"system": "2.1.0"
}
}Topic: /uufi/r/reg-1/d/dev-1/c/model/system
Payload:
{
"subType": "model",
"subFolder": "system",
"deviceRegistryId": "reg-1",
"deviceId": "dev-1",
"projectId": "vibrant",
"transactionId": "UUFI:sess123:004",
"publishTime": "2026-04-29T10:15:00Z",
"source": "udmis",
"payload": {
"version": "1.5.7",
"timestamp": "2026-04-29T10:15:00Z",
"software": {
"system": "2.1.0"
}
}
}PubSub Attributes (Data is "null"):
{
"subType": "state",
"subFolder": "pointset",
"deviceRegistryId": "reg-1",
"deviceId": "dev-1",
"transactionId": "UUFI:sess123:005",
"source": "client-id",
"principal": "client-id@"
}MQTT Topic: /uufi/r/reg-1/d/dev-1/c/state/pointset
{
"subType": "state",
"subFolder": "pointset",
"deviceRegistryId": "reg-1",
"deviceId": "dev-1",
"projectId": "vibrant",
"transactionId": "UUFI:sess123:005",
"publishTime": "2026-11-24T19:00:00Z",
"source": "client-id",
"principal": "client-id",
"payload": null
}PubSub Control Error Reply (projects/<proj>/topics/udmi_uufi):
Attributes:
{
"subType": "config",
"subFolder": "pointset",
"deviceRegistryId": "reg-1",
"deviceId": "dev-1",
"transactionId": "UUFI:sess123:006",
"source": "udmis",
"principal": "client-id@",
"publishTime": "2026-11-24T19:00:01Z"
}Data:
{
"version": "1.5.7",
"timestamp": "2026-11-24T19:00:01Z",
"control": {
"status": {
"message": "Invalid pointset payload",
"detail": "IllegalArgumentException: ...",
"category": "system.config.parse",
"level": 500,
"timestamp": "2026-11-24T19:00:01Z"
}
}
}MQTT Control Progress Reply (/uufi/r/reg-1/d/dev-1/c/config/pointset):
{
"subType": "config",
"subFolder": "pointset",
"deviceRegistryId": "reg-1",
"deviceId": "dev-1",
"projectId": "vibrant",
"transactionId": "UUFI:sess123:007",
"publishTime": "2026-11-24T19:00:01Z",
"source": "udmis",
"principal": "client-id",
"payload": {
"version": "1.5.7",
"timestamp": "2026-11-24T19:00:01Z",
"control": {
"status": {
"message": "Applying configuration (step 1/2)",
"category": "system.config.receive",
"level": 200,
"timestamp": "2026-11-24T19:00:01Z"
}
}
}
}UUFI implementations MUST adhere to the following schemas from the UDMI repository:
| UUFI Component | Authoritative UDMI Schema |
|---|---|
| Message Envelope | schema/envelope.json |
| Control-Plane Reply | schema/control_uufi.json |
| Handshake State | schema/state_udmi.json |
| Handshake Config | schema/config_udmi.json |
| System Model | schema/model_system.json |
| Pointset Config | schema/config_pointset.json |
| Discovery Config | schema/config_discovery.json |
| Blobset Config | schema/config_blobset.json |
| Blobset State | schema/state_blobset.json |