Skip to content

Publish entities, locations, and PLI

Use this workflow to publish an entity and its location under one canonical UUID. Position Location Information (PLI) is a location associated with that UUID. Publish it with the ordinary Location model and location wire; there is no separate PLI model, method, topic, or entity category.

These operations mutate the authorized MQTT target. Validate model construction offline first:

Terminal window
python examples/publish_entity.py --check
python examples/publish_location.py --check

The runnable scripts are publish an entity and publish a location.

For a broker-authorized publication, first set the common connection variables from authentication. Then publish one synthetic entity event for a caller-owned UUID:

Terminal window
export ECN_ENTITY_ID=00000000-0000-4000-8000-000000000001
export ECN_ENTITY_CATEGORY=detection
export ECN_ENTITY_TYPE=synthetic-detection
export ECN_ENTITY_NAME='Synthetic public-client entity'
export ECN_DISPLAY_NAME='Synthetic display label'
python examples/publish_entity.py

Publish one location for that same UUID with bounded synthetic coordinates:

Terminal window
export ECN_ENTITY_ID=00000000-0000-4000-8000-000000000001
export ECN_LATITUDE=0
export ECN_LONGITUDE=0
export ECN_ALTITUDE=100
export ECN_BEARING=0
export ECN_ACCURACY=1
export ECN_CONFIDENCE=1
export ECN_LOCATION_SOURCE=synthetic-public-client
python examples/publish_location.py

When the position is operationally described as PLI, use the same location command and authorize it as the same mutation:

Terminal window
export ECN_ENTITY_ID=00000000-0000-4000-8000-000000000001
export ECN_LATITUDE=0
export ECN_LONGITUDE=0
export ECN_ALTITUDE=100
export ECN_LOCATION_SOURCE=synthetic-public-client
python examples/publish_location.py

The entity’s integration is always the configured integration name. Set ECN_WIRE_FORMAT=json or ECN_WIRE_FORMAT=protobuf only when that supported wire format is authorized. PLI carries location fields on the supported location family; it does not invent a separate API or wire path.

For these QoS 1 operations, a PublicationReceipt means the broker returned a non-failure PUBACK. A negative PUBACK raises a typed public error. The receipt still does not assert that downstream consumers persisted, rendered, or accepted the message.

TRACK entity publications use QoS 0 and receive no broker acknowledgement. Local send completion therefore does not establish broker receipt, persistence, or downstream processing. Never use these scripts in a read-only validation session. For an end-to-end design, continue with Sensor integration.

Version 0.2.0 · branch main