UDMI / Docs / Specs / Tech Stack
The complete UDMI specification (super set of the base schema), specifies a complete technology stack for compliant IoT devices.
Type | Category | subFolder | MQTT Topic Suffix | Schema File |
---|---|---|---|---|
state | state | n/a | {topic_prefix}/state |
state.json |
config | config | n/a | {topic_prefix}/config |
config.json |
pointset | event | pointset | {topic_prefix}/events/pointset |
pointset.json |
system | event | system | {topic_prefix}/events/system |
system.json |
For GCP implementations the full topic would be /devices/{device_id}/{suffix}
Any backend system (in a GCP project) should adhere to the following guidelines:
udmi_target
and
udmi_state
example cloud functions for details.device_config
shows how PubSub can be used to update the Cloud IoT configuration.A config push can be tested with something like:
gcloud pubsub topics publish target \
--attribute subFolder=config,deviceId=AHU-1,projectId=bos-daq-testing,cloudRegion=us-central1,deviceRegistryId=registrar_test \
--message '{"version": 1, "timestamp": "2019-01-17T14:02:29.364Z"}'
The reason for the redirection of any data through a PubSub topic is so that the Cloud IoT registry, if necessary, can be housed in a different cloud project from the backend applications.
When using the GCP Cloud IoT Core MQTT Bridge there are multiple ways the specific schema used during validation is chosen.
.../attributes.json
schema. These attributes are
automatically defined server-side by the MQTT Client ID and Topic, and are not explicitly included in any message payload.subFolder
. E.g., the MQTT
topic /devices/{device-id}/events/pointset
will be validated against .../pointset.json
..../state.json
schema on /devices/{device-id}/state
MQTT topic./devices/{device-id}/config
topic.)