cpMqttExt icon

cpMqttExt

Cool Planet MQTT Connector Extension
cpMqttExt

Registered StackHub users may elect to receive email notifications whenever a new package version is released or a comment is posted on the forum.

There are 0 watchers.

v2.1.3

Overview

The CpMqtt Extension implements MQTT client subscription and publication to topics on an MQTT broker where messages on those topics contain current point values. It uses the Haxall Fantom MQTT Extension for all MQTT Broker communication. This is a direct port of the pahoMqttExt with just the MQTT transport layer replaced. Functionally it is identical.

A migration function cpMqttMigrateFromPaho has been provided to convert any existing Paho based connectors and points to CP based.

Discovery and learn are not supported functions. As a result, brokers are not discoverable from within the Connectors app and from within the Builder app, the Connectors panel will not show the CpMqtt Connector.

All CpMqtt proxy points must be manually bound.

Main Configuration

The minimum configuration required to set up an CpMqtt connector is:

Broker Authentication

If username is entered, then a password is also expected. These will be supplied to the broker on connection. If you have a non-authenticating broker, just leave username and password blank.

Password is stored in password db for connector's record id

The connector also supports Client Cert based authentication as used by AWS IOT Core when establishing the SSL/TLS connection. To use this feature, leave the username blank and instead use the cpClientCertFile and cpClientKeyFile tags on the connector folio record. These should be the names of the cert and private key pem files as provided by the cert creation tool in AWS IOT Core. e.g. 8588187bbe-certificate.pem.crt and 8588187bbe-private.pem.key

The values for these tags should be the filename only, and the files must be placed in var/proj/<myProj>/data/mqtt/

The use of client certs only applies when connecting over SSL (i.e. when the cpMqttBroker starts with mqtts:// )

The MQTT SSL port number normally used is 8883, but AWS also supports the ALPN feature such that you can connect to port 443 (HTTPS) but still use the MQTTS protocol. This connector supports the use of this feature.

Payload Structure

As message payload is largely undefined, this connector allows the user to decide how the payload should be parsed to extract point values and how to construct a payload for setting a point value.

You can configure at the connector level what the default payload parser and constructor should be for any points managed by this connector. Even if configured at this level it's possible to override it at the point level.

Points and Topics

The connector allows for more than one point being subscribed to the same topic for its curVal. If the messages received from the topic only contain a single value, then all subscribed points will be updated to the same curVal. But if the message payloads contain multiple values, you need to also configure the cpMqttPointName tag on each point. The value for the cpMqttPointName tag will be used to extract from the Dict returned from the configured message payload parser.

Current Points

CpMqtt proxy points are configured with cpMqttCur tag, which maps to a topic at the MQTT Broker:

Writable Points

CpMqtt proxy points are configured to write to remote system points via the cpMqttWrite tag, which maps to a topic at the MQTT Broker:

History

History synchronization is not supported by CpMqtt. You will need to use collection to store history.

Packages by Cool Planet Clarity Ltd

Free packages

Package details
Version2.1.3
Licensen/a
Build date2 years ago
on 11th Oct 2022
Requirements SkySpark v3.1
Depends on
File namecpMqttExt.pod
File size36.18 kB
MD570da5ac917bef171b9d3bcc973d1653e
SHA1 387c0e59c9d8b139ab4cc62bd6827c388becd80e
Published by
Cool Planet Clarity LtdDownload now
Also available via SkyArc Install Manager
Tags
Pod File