Skip to content

Commit 552f51a

Browse files
Merge pull request #1 from golluroSICKAG/main
Release 0.4.1
2 parents 7f1e37a + 585b798 commit 552f51a

File tree

5 files changed

+27
-15
lines changed

5 files changed

+27
-15
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4+
## Release 0.4.1
5+
6+
### Improvements
7+
- Updated docu and added "Known issues" in README that data of registered events to be forwarded via MQTT are always published as converted data type "string".
8+
9+
### Bugfix
10+
- Did not convert data of registered events to strings before trying to publish them via MQTT
11+
412
## Release 0.4.0
513

614
### Improvements

CSK_Module_MQTTClient/project.mf.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ Configure a WillMessage via "setWillMessageConfig" (via script) or "setWillMessa
417417
</serves>
418418
</crown>
419419
<meta key="author">SICK AG</meta>
420-
<meta key="version">0.4.0</meta>
420+
<meta key="version">0.4.1</meta>
421421
<meta key="priority">low</meta>
422422
<meta key="copy-protected">false</meta>
423423
<meta key="read-protected">false</meta>

CSK_Module_MQTTClient/scripts/Communication/MQTTClient/MQTTClient_Model.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,9 @@ end
155155
MQTTClient.register(mqttClient_Model.mqttClient, 'OnReceive', handleOnReceive)
156156

157157
local function publish(topic, data, qos, retain)
158-
_G.logger:info(nameOfModule .. ": Publish data '" .. data .. "' to topic '" .. topic .. "' with QoS '" .. qos .. "' and '" .. retain .. "'")
159-
addMessageLog("Publish data '" .. data .. "' to topic '" .. topic .. "' with QoS '" .. qos .. "' and '" .. retain .. "'")
160-
MQTTClient.publish(mqttClient_Model.mqttClient, topic, data, qos, retain)
158+
_G.logger:info(nameOfModule .. ": Publish data '" .. tostring(data) .. "' to topic '" .. topic .. "' with QoS '" .. qos .. "' and '" .. retain .. "'")
159+
addMessageLog("Publish data '" .. tostring(data) .. "' to topic '" .. topic .. "' with QoS '" .. qos .. "' and '" .. retain .. "'")
160+
MQTTClient.publish(mqttClient_Model.mqttClient, topic, tostring(data), qos, retain)
161161
end
162162
Script.serveFunction('CSK_MQTTClient.publish', publish)
163163
mqttClient_Model.publish = publish

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ Module to provide MQTT client functionality.
88
The app includes an intuitive GUI to setup the MQTTClient configuration.
99
For further information check out the [documentation](https://raw.githack.com/SICKAppSpaceCodingStarterKit/CSK_Module_MQTTClient/main/docu/CSK_Module_MQTTClient.html) in the folder "docu".
1010

11+
## Known issues
12+
13+
Data of registered events to be forwarded via MQTT are always published as converted data type "string".
14+
1115
## Information
1216

1317
Tested on:

docu/CSK_Module_MQTTClient.html

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<meta name="viewport" content="width=device-width, initial-scale=1.0">
77
<meta name="generator" content="Asciidoctor 2.0.12">
88
<meta name="author" content="SICK AG">
9-
<title>Documentation - CSK_Module_MQTTClient 0.4.0</title>
9+
<title>Documentation - CSK_Module_MQTTClient 0.4.1</title>
1010
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
1111
<style>
1212
/* Stylesheet for CodeRay to match GitHub theme | MIT License | http://foundation.zurb.com */
@@ -615,11 +615,11 @@
615615
</head>
616616
<body class="article toc2 toc-left">
617617
<div id="header">
618-
<h1>Documentation - CSK_Module_MQTTClient 0.4.0</h1>
618+
<h1>Documentation - CSK_Module_MQTTClient 0.4.1</h1>
619619
<div class="details">
620620
<span id="author" class="author">SICK AG</span><br>
621-
<span id="revnumber">version 0.4.0,</span>
622-
<span id="revdate">2023-06-15</span>
621+
<span id="revnumber">version 0.4.1,</span>
622+
<span id="revdate">2023-09-19</span>
623623
</div>
624624
<div id="toc" class="toc2">
625625
<div id="toctitle">Table of Contents</div>
@@ -765,11 +765,11 @@ <h2 id="_document_metadata">Document metadata</h2>
765765
</tr>
766766
<tr>
767767
<th class="tableblock halign-left valign-top"><p class="tableblock">Version</p></th>
768-
<td class="tableblock halign-left valign-top"><p class="tableblock">0.4.0</p></td>
768+
<td class="tableblock halign-left valign-top"><p class="tableblock">0.4.1</p></td>
769769
</tr>
770770
<tr>
771771
<th class="tableblock halign-left valign-top"><p class="tableblock">Date</p></th>
772-
<td class="tableblock halign-left valign-top"><p class="tableblock">2023-06-15</p></td>
772+
<td class="tableblock halign-left valign-top"><p class="tableblock">2023-09-19</p></td>
773773
</tr>
774774
<tr>
775775
<th class="tableblock halign-left valign-top"><p class="tableblock">Author</p></th>
@@ -830,7 +830,7 @@ <h4 id="_short_description_2">Short description</h4>
830830
<strong>4) Publish</strong><br>
831831
It is possible to publish MQTT messages via "publish" (via script) or "publishViaUI (via UI) to use preset values (check "presetPublish&#8230;&#8203;"-functions)<br>
832832
Additionally it is possible to configure the module to listen / wait for specific events of other modules/apps and to forward their content to predefined topics with predefined QoS/Retain.<br>
833-
This can be used e.g. to listen to "OtherModule.OnNewResult"-events and to forward the results via MQTT.<br>
833+
This can be used e.g. to listen to "OtherModule.OnNewResult"-events and to forward the results via MQTT (data will be forwarded to data type 'string').<br>
834834
To do so make use of "addPublishEvent" (via script) or the "presetPublish"-functions (incl. "presetPublishEvent") and "addPublishEventViaUI".<br>
835835
<br>
836836
<strong>5) WillMessage</strong><br>
@@ -1124,7 +1124,7 @@ <h5 id="API:Function:CSK_MQTTClient.addPublishEvent"><span class="breadcrumb">CS
11241124
<div class="sect5">
11251125
<h6 id="_short_description_3">Short description</h6>
11261126
<div class="paragraph">
1127-
<p>Function to add an event to listen to and forward content if notified with configured MQTT publish message.</p>
1127+
<p>Function to add an event to listen to and forward content (as string) if notified with configured MQTT publish message.</p>
11281128
</div>
11291129
</div>
11301130
<div class="sect5">
@@ -1188,7 +1188,7 @@ <h5 id="API:Function:CSK_MQTTClient.addPublishEventViaUI"><span class="breadcrum
11881188
<div class="sect5">
11891189
<h6 id="_short_description_4">Short description</h6>
11901190
<div class="paragraph">
1191-
<p>Function to add a preset event with preset configuration (topic, QoS, Retain) to listen to and to forward content via MQTT publish.</p>
1191+
<p>Function to add a preset event with preset configuration (topic, QoS, Retain) to listen to and to forward content (as string) via MQTT publish.</p>
11921192
</div>
11931193
</div>
11941194
<div class="sect5">
@@ -5286,8 +5286,8 @@ <h3 id="API:Enum:CSK_MQTTClient.TLSVersion"><span class="api-enum">CSK_MQTTClien
52865286
</div>
52875287
<div id="footer">
52885288
<div id="footer-text">
5289-
Version 0.4.0<br>
5290-
Last updated 2023-06-15 09:03:01 +0200
5289+
Version 0.4.1<br>
5290+
Last updated 2023-09-19 11:19:46 +0200
52915291
</div>
52925292
</div>
52935293
<script type="text/javascript">

0 commit comments

Comments
 (0)