glp/0/{SID}/(rq|fb)/con/{Handle}/{object} |
...
See Type Translation for information on type conversions between source and destination types.
MQTT-created connections do not show up in the CMS Connection Connections widget. If you need connections to show in the connection widget, then you will have to use the REST API to create, change, or delete connections instead of using MQTT.
Connection Implementation
...
Field Name | Type | Description | |||||||||||||||||||||||||||||||||
sources | list of strings | (Required) Connections can specify local sources as topic strings. Sources must reference the feedback channel item. Example: | |||||||||||||||||||||||||||||||||
destinations | list of strings | (Required) Connections can specify destinations as topic strings. Destinations must reference request channel items. A connection can use a unique interchange with unique access credentials. However, when multiple connections span the same participating segments, a shared interchange with shared credentials but connection-specific endpoints, is generally more efficient to maintain. For example, an interchange might be described as The connection interchange point topics can follow the IAP/MQ topic format using a virtual unique segment identifier starting with an ampersand as shown in these examples. Central management can also select another format, as long as it is unique. This format can simplify connections to other MQTT-based systems. Example: The Interchange Object
The Interchange object describes the interchange, but does not contain access credentials. These credentials are submitted with the connection object’s create or update actions (described in the Do Action Arguments section below), and are not stored in the connection's status or configuration objects.
| |||||||||||||||||||||||||||||||||
policy | string | (Optional) Either strict or smart. A strict implementation policy requires a connection in the most efficient manner possible. For example, if an edge protocol supports true peer-to-peer connections, a strict peer-to-peer datapoint connection request fails if required resources are unavailable to implement the datapoint connection. A smart implementation policy permits an automatic roll-over to a less efficient datapoint connection. Typically to a point-to-point connection using the datapoint connection manager as an active relay agent in the data transfer. | |||||||||||||||||||||||||||||||||
prio | Number | (Optional) Priority level used for writing a source value to a destination. A source value can be propagated by writing the value without a priority level, or by writing the value with prio:17. The destination datapoint value can be relinquished if no other connections object has the datapoint in one of its destinations with the same priority level. ExampleConsider two connections: connection rule #1 and connection rule #2. Both connections have priority level prio:6, and the datapoint When connection rule #1 is deleted, the datapoint value Connection Rule #1:
Connection Rule #2:
| |||||||||||||||||||||||||||||||||
map | object | (Optional) Guided transcoding of complex types is based on an optional map, which connects elements of a source properties to destination properties. This map can connect source and destination fields of different names, and provide simple explicit data transformations. See Type Translation for more information on maps. There is one map for the connection. Sources and destinations of peer-to-peer connections must all share the same datatype. Sources and destinations in point-to-point connections only have to be assignment-compatible without a transformation map, or assignment-compatible after transformation with the map. Multiple distinct connections may be required to implement truly heterogenous datapoint connections. The map is an associative array using destination property names for keys. The corresponding values are objects that describe the source property. Example: | |||||||||||||||||||||||||||||||||
presets
Presets is available with SmartServer 2.8 and higher. | List. Items are sources and destinations presets | (Optional) The datapoints presets are based on an optional presets map, which connects elements of a source properties to destination properties. A preset is a string that represents a specific native for a datapoint. The datapoint preset value can connect the source and the destinations fields. There is one presets map definition for each datapoint source and destination. For additional information and examples, see Datapoint Presets.
| |||||||||||||||||||||||||||||||||
localization
Localization is available with SmartServer 2.8 and higher. | List. Items are sources and destinations localization. | (Optional) The datapoints localization is based on optional transformation rules, which connects elements of source properties to destination properties. For additional information and examples, see Datapoint Localization.
|
...
Action | Description |
---|---|
create | Creates a connection. Accepts the arguments listed below in the table Do Action Arguments. |
provision | provision requires no arguments. Once a connection is created, it can be provisioned. A provisioned connection is fully operational. Once a connection has been provisioned, it is active and data flow is possible across the connection. |
deprovision | deprovision requires no arguments. Once a connection is provisioned, it can be deprovisioned. It changes the connection status to unprovisioned, and prevents data flow across the connection. |
update | Updates an existing connection. Accepts the arguments listed below in the table Do Action Arguments, except all arguments are optional. The update action can update parts of the connection. For example, by submitting only the sources list with the update, leaves the destinations unchanged. Also, update might temporarily deprovision and re-provision the connection. |
repair | repair requires no arguments. Repairs an existing connection. It triggers an attempt to analyze and repair a previously provisioned connection. Edge servers can treat this as a sequence of deprovision, provision requests, but a specific edge protocol may have other repair tools available. |
delete | Deletes an existing connection. |
Do Action Arguments
The create and update actions accept the following arguments (except for update, all arguments are optional):
Field Name | Type | Description | |
sources | list of strings | (Required) Connections can specify source items by referring to their feedback channel topics. See sources description in the connection configuration table above. | |
[ "glp/0/DT-2/fb/dev/cm/12/if/occ/0/state/value"] | |||
destinations | list of strings | (Required) Connections can specify destinations by referring to their request channel topics. See the destinations description in the Connection Configuration table above. | |
[ "glp/0/DT-2/rq/dev/lon/0/if/light/0/scene/value" ] | |||
policy | string | (Optional) Either strict or smart. Defaults to “smart” See thepolicydescription in the Connection Configuration table above. | |
map | object | (Optional) See the map description in the Connection Configuration table above. | |
{ “$”:"value" } | |||
credentials | object | (Optional) Credentials for interchanges. Every interchange has a broker address and a subscription listed in the interchange object. Both are keys into the credentials object, using the broker address as the outer, the subscription as the inner key to username and password properties. For example, consider an interface with broker
The MQTT protocol is supported unsecured and secure (“mqtt” and “mqtts”, respectively). MQTT over secure Web Sockets is supported with the “wss” protocol identifier, MQTT over unsecured Web Sockets is supported with the “ws” protocol. The broker reference used with the interchange object always includes the protocol identifier and port number, even if the standard ports are used. See the Interchange Object in the Connection Configuration Object table above. Other protocol types may be added over time. Unsupported protocols yield an error and prevent the connection object from being provisioned successfully. | |
presets | List. Items are sources and destinations presets. | See presets description in the Connection Configuration Properties table above. Presets is available with SmartServer 2.8 and higher. | |
localization | List. Items are sources and destinations localization. | See localization description in the Connection Configuration Properties table above. Localization is available with SmartServer 2.8 and higher. |
...