11. Name and Location Service
This chapter describes the usage of a common naming and location service for PAN nodes in the Unify system.
This functionality allows IoT Services to assign and readback a Name and a Location for each node/endpoint.
The Name and Location Service is a helper MQTT component that allows to perform book-keeping on text names and locations that have been assigned.
11.1. Overview
The Name and Location Service will operate on the NameAndLocation cluster (see the Unify_NameAndLocation.xml).
11.2. Name and Location Service mechanism
The Name and Location Service listens to publications to the following topic filters:
ucl/by-unid/+/State
ucl/by-unid/+/+/#
to determine a list of nodes (UNID) and endpoints in the network.
For each Node/Endpoint pair in the network, it will provide a NameAndLocation cluster on behalf of all nodes.
The Name and Location Service MUST monitor the presence of a State topic for
nodes before it provides a cluster for a node. i.e. there must be data published
at the ucl/by-unid/<unid>/State
topic for all nodes that it provides
the NameAndLocation cluster for.
If the State topic for a node is removed (empty retained publication), the
Name and Location Service MUST stop providing the NameAndLocation cluster
for all the endpoints for that UNID.
A simple example with only 1 endpoint is shown in the following diagram:
If an node has multiple endpoints with functionalities, the Name and Location Service will be able to detect publications under for additional endpoints.
The Name and Location Service SHOULD assume that endpoints do not disappear, even if they seem to temporarily loose application functionalities. For example, if endpoint 3 was detected but an re-interview makes it go away, the Name and Location Service SHOULD continue to provide the NameAndLocation for endpoint 3.
A multi-endpoint example is shown in the following diagram:
11.3. Endpoint ID list provided
If the entire list of Endpoint ID is published under the state cluster
(EndpointIdList
attribute), the name and location cluster SHOULD skip
monitoring existing endpoints based on publications under the
ucl/by-unid/+/+/#
topic filter, and rely exclusively on the value published
for the reported value of the EndpointIdList
attribute
11.4. Overlap with the Basic Cluster
Some PAN nodes are Basic Cluster Servers, and provide the LocationDescription
attributes. If such an attribute is supported by a Basic Cluster Server,
the Name and Location Service MUST proxy its Location Attribute to the
Basic Cluster attribute.
11.5. Pushing the information to the end node
The Name and Location Service is provided on behalf of all PAN nodes, meaning that PAN node will not be aware that they have a name assigned.
It is possible for Protocol Controllers to push the information down to PAN nodes, if they want to make sure that they would retain this information locally.
If a Protocol Controller intends to do so, it SHOULD subscribe to
the Reported Name
attribute in the NameAndLocation cluster and
assign it to the node when it is updated.
Protocol Controller MUST NOT try to push the Location
attribute to a
PAN node. It SHOULD show the PAN node with the LocationDescription
Attribute supported in the Basic Cluster.