Naming of identifiers, types and capabilities¶
Naming is one of the most important aspects when both building and using things.
Libraries that use
abstract-things are expected to follow a few conventions
to simplify use of the things they expose.
Libraries are expected to use a short and understandable namespace. Namespaces are used for things such as identifiers and to mark things with custom types.
The namespace should be connected to what the library interacts with. This can
be something like
hue for Philips Hue or
bravia for Sony Bravia TVs.
Every Thing is required to have an identifer. Identifiers should be stable and globally unique. An identifier needs a prefix, which is usually the namespace of the library.
For most implementations an identifier will usually be provided with the thing being interacted with. In those case it can simply be prefixed with the namespace to create a suitable identifier.
Example of identifiers:
As a convention things that bridge other networks such as Zigbee or Z-wave
include the keyword
bridge in their identifier, such as
The types defined by
abstract-things try to be short and descriptive.
Libraries may mark things with custom types, but those types are expected to
be namespaced or unique. Those custom types can be used to identify the
specific type of thing.
Example of custom types:
Capabilities follow the same rules as types, see the previous section.