StackHub Bulletin BoardAdvertise your announcements here!

pahoMqttExt

Paho MQTT Connector Extension
pahoMqttExtCustom tags

Registered StackHub users may elect to receive email notifications whenever a new package version is released.

There are 0 watchers.

v1.0.6

pahoMqttBroker
Uri

The URI of the MQTT Broker used by the PahoMqtt Connector. If the broker connection is SSL, this must start with ssl. Default MQTT SSL port is 8883.

pahoMqttCleanSession
Bool

Configures whether the PahoMqtt Connector uses cleanSession true or false. Defaults to false. See MQTT documentation for more details.

pahoMqttConn
Marker

Marker tag for PahoMqtt connector record which stores the configuration for connectivity to an MQTT broker. The connector must also define a pahoMqttBroker, username, and encoded password tag.

pahoMqttConnRef
Ref

Used on a proxy object to reference its parent pahoMqttConn

pahoMqttConstructor
Str

Configures the message payload constructor to use when publishing a message to update a point value. There are three built in constructors which can be configured by name:

  • VAL
  • KURA
  • JSON

If you need a custom constructor, you can use your own Axon function. The contract for a payload constructor (in Fantom syntax) is:

Str myAxonConstructor(ConnPoint pt, Dict val, Dict? params := null)

The signature is shown in Fantom syntax to highlight the parameter types passed to the function. The function must return a Str. The pt param can be accessed as a Dict to extract any Point tags needed. The val Dict will at a minimum contain writeLevel. If the val being set on the point is not null, it will contain writeVal.

{writeVal:true, writeLevel:8}

An example of a custom constructor configuration in pahoMqttConstructor tag is:

myCsvConstructor {colOrder:["curVal", "curLevel"]}
pahoMqttCur
Str

The topic on the MQTT Broker that this point subscribes to for its current val

pahoMqttParser
Str

Configures the parser to use to parse the message payload containing point current val(s) There are four built-in parsers which can be configured by name:

  • VAL
  • CSV
  • JSON
  • KURA

If you need a custom parser, you can use your own Axon function. The contract for a payload parser (in Fantom syntax) is:

Dict myAxonParser(Str msg, Dict? params := null)

The signature is shown in Fantom syntax to highlight the parameter types passed to the function. The function must return a Dict with a minimum of 2 tags:

{curVal:1034, curStatus:"ok"}

An example of a custom parser configuration in the pahoMqttParser tag is:

myCsvParser {colOrder:["curVal", "curStatus"]}
pahoMqttPointName
Str

For Current Points this tag is required if the MQTT message payloads can contain values for more than one point or if more than one point can subscribe to the same topic for their curVal. It is a key by which the correct val can be assigned to the correct point.

Also for Writable Points, this tag is required if the publish topic is used by more than one point to publish write vals. The external system that receives messages from the write topic must know which point the write val is for.

pahoMqttQos
Number

Configures whether publications or subscriptions on the MQTT connection use a QOS of 0, 1 or 2. These values equate to

  • (0) Fire & Forget
  • (1) At Least Once
  • (2) At Most Once

Defaults to 1. See MQTT documentation for more details.

pahoMqttWrite
Str

The topic on the MQTT Broker that this point publishes to when it wishes to change its current val

Published by Crowley Carbon

Packages by Crowley Carbon

Free packages