From efb1a855e65a086a1f9a7d716cf45d78df2d0a71 Mon Sep 17 00:00:00 2001 From: sigmdel Date: Thu, 24 Feb 2022 21:14:13 -0400 Subject: [PATCH] Light cleanup for 0.5.0 release --- CHANGELOG.md | 14 ++++++++++++-- README.md | 15 ++++++++++++--- forms/main.lfm | 6 +++--- forms/main.pas | 6 ------ languages/lazmqttc.fr.po | 28 +++++++++++++++++++++++++++- languages/lazmqttc.pot | 23 ++++++++++++++++++++++- 6 files changed, 76 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d7279a..ccd6456 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,19 @@ # Change Log +## 0.5.0 + +- Updated the documentation +- Updated the translation +- Bumped up to version 0.5.0 +- Added a log window to display the mosquitto library log messages - works in Windows +- The connection status updated with TMQTTConnection OnConnect and OnDisconnect events +- Fixed a memory leak that occured when editing a broker definition + + ## 0.4.1 (7531d26, Release v0.4.1 with Linux and Windows binaries) -- Updated translations +- Updated the translation - Fixed cryptic error message when starting app with missing `options.json` file - Fixed limit of 100 shown messages in Windows version @@ -19,7 +29,7 @@ ## 0.3.4 (0fd1b4f) - Bumped up to version 0.3.4 -- Updated translations +- Updated the translation - If needed, automatically connects to a broker when the Publish button is pressed - Published topic can optionally be added to the Messages window - Added a temporary work directory in .hgignore diff --git a/README.md b/README.md index 8eee351..c666202 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # lazmqttc: Lazarus MQTT Client **Version 0.5.0** -A basic MQTT client written in Free Pascal/Lazarus that can publish messages to a broker while being subscribed to one or more topics with the same broker. It uses the [Eclipse mosquitto](https://mosquitto.org/) library to communicate with the MQTT broker. +A basic MQTT client written in Free Pascal/Lazarus that can publish messages to a broker while being subscribed to one or more topics with the same broker. It uses the [Eclipse mosquitto](https://mosquitto.org/) library to communicate with the MQTT broker. `lazmqttc` can be seen as the Eclipse utility `mosquitto_rr` with a graphical interface and some additional capabilities. ![screenshot](images/test_mosquitto.jpg) @@ -80,7 +80,16 @@ There is no requirement to install the mosquitto MQTT broker. >> It is left as an exercise for knowledgable Windows users to find a more elegant way of ensuring that the DLLs are found. -Ultimately, if a mosquitto MQTT broker is to be run on the system, it may make more sense to simply copy `lazmqttc.exe` into the `mosquitto` directory alongside the `mosquitto_pub.exe` and `mosquitto_sub.exe` utilities it emulates. +Ultimately, if a mosquitto MQTT broker is to be run on the system, it may make more sense to simply copy `lazmqttc.exe` into the `mosquitto` directory alongside the `mosquitto_rr.exe`, `mosquitto_pub.exe` and `mosquitto_sub.exe` utilities it emulates. + +Warning: The application seems to freeze when connecting to the localhost that is not running an MQTT broker. + + [MQTT] [mqttClient] INFO Connecting to [localhost:1884] - SSL:False + [MQTT] [mqttClient] INFO Broker disconnected: Connection lost + [MQTT] [mqttClient] INFO Next reconnection attempt in 60 seconds. + [MQTT] [mqttClient] INFO Reconnecting to [localhost:1884] - SSL:False + +The first log entry will be shown right away, but it will take a minute or so before the following two entries are shown and the application responds normally. This behaviour was not observed in Linux and it may not be present if an MQTT broker is running on the local machine. ## 2. Compiling @@ -162,7 +171,7 @@ Starting with version 0.5.0, the application log messages can be viewed. These a ![log screenshot](images/log.jpg) -Unlike the usual implementation, in Linux at least, setting a log level does not set all levels with higher priority. In other words, each level can be set or reset independently. It seems that some levels are not implemented; `subscribe` and `unsubscribe` do not generate messages for example. +Unlike the usual implementation, in Linux at least, setting a log level does not set all levels with higher priority. In other words, each level can be set or reset independently. It seems that some levels are not implemented. For example, no messages are generated when topics are changed when the `subscribe` and `unsubscribe` log levels are set. ## 9. National Language Support diff --git a/forms/main.lfm b/forms/main.lfm index 238ba62..fbeeb4e 100644 --- a/forms/main.lfm +++ b/forms/main.lfm @@ -10,6 +10,7 @@ object MainForm: TMainForm OnDestroy = FormDestroy OnShow = FormShow ShowHint = True + LCLVersion = '2.2.0.2' object TopPanel: TPanel AnchorSideTop.Control = Owner Left = 0 @@ -301,7 +302,6 @@ object MainForm: TMainForm ClientHeight = 171 ClientWidth = 605 TabOrder = 5 - OnClick = BottomPanelClick object QuitButton: TButton AnchorSideTop.Control = BottomPanel AnchorSideTop.Side = asrCenter @@ -401,7 +401,7 @@ object MainForm: TMainForm TabOrder = 4 object TabSheet1: TTabSheet Caption = 'Messages' - ClientHeight = 102 + ClientHeight = 99 ClientWidth = 595 object MessagesMemo: TMemo Left = 0 @@ -418,7 +418,7 @@ object MainForm: TMainForm end object TabSheet2: TTabSheet Caption = 'Log' - ClientHeight = 102 + ClientHeight = 99 ClientWidth = 595 object LogMemo: TMemo Left = 0 diff --git a/forms/main.pas b/forms/main.pas index 9dac181..e55dadb 100644 --- a/forms/main.pas +++ b/forms/main.pas @@ -86,7 +86,6 @@ TMainForm = class(TForm) TabSheet1: TTabSheet; TabSheet2: TTabSheet; TopPanel: TPanel; - procedure BottomPanelClick(Sender: TObject); procedure Button1Click(Sender: TObject); procedure LogMenuItemClick(Sender: TObject); procedure MenuItem1Click(Sender: TObject); @@ -275,11 +274,6 @@ procedure TMainForm.ShowTopicsCheckBoxChange(Sender: TObject); gvShowTopics := ShowTopicsCheckBox.Checked; end; -procedure TMainForm.BottomPanelClick(Sender: TObject); -begin - -end; - procedure TMainForm.Button1Click(Sender: TObject); begin if TOptionsEditForm.EditOptions(Options) then begin diff --git a/languages/lazmqttc.fr.po b/languages/lazmqttc.fr.po index 7d3e4b8..7de2b90 100644 --- a/languages/lazmqttc.fr.po +++ b/languages/lazmqttc.fr.po @@ -268,6 +268,10 @@ msgctxt "tbrokereditform.loadbutton.caption" msgid "&Load..." msgstr "&Charger..." +#: tbrokereditform.passwordedit.text +msgid "PasswordEdit" +msgstr "" + #: tbrokereditform.portedit.hint msgid "Default MQTT Port: 1883" msgstr "Port MQTT par défaut : 1883" @@ -277,6 +281,14 @@ msgctxt "tbrokereditform.pubretaincheckbox.caption" msgid "(false)" msgstr "(faux)" +#: tbrokereditform.pubtopicedit.text +msgid "PubTopicEdit" +msgstr "" + +#: tbrokereditform.qoscombobox.text +msgid "0 - at most once" +msgstr "" + #: tbrokereditform.reconnectbackoffcheckbox.caption msgctxt "tbrokereditform.reconnectbackoffcheckbox.caption" msgid "(false)" @@ -320,6 +332,14 @@ msgctxt "teditsubtopicform.label3.caption" msgid "Use" msgstr "Act." +#: teditsubtopicform.qoscombobox.text +msgid "0 - At most once" +msgstr "" + +#: teditsubtopicform.topicedit.text +msgid "TopicEdit" +msgstr "" + #: teditsubtopicform.usecheckbox.caption msgid "(subscribe to this topic)" msgstr "(se souscrire à ce sujet)" @@ -373,6 +393,10 @@ msgstr "Copier dans Messages" msgid "Edit" msgstr "Modifier" +#: tmainform.hostlabel.caption +msgid "" +msgstr "" + #: tmainform.label1.caption msgid "Broker:" msgstr "Agent :" @@ -417,7 +441,9 @@ msgid "Copy" msgstr "Copier" #: tmainform.menuitem3.caption -msgid "Log Levels:" +#, fuzzy +#| msgid "Log Levels:" +msgid "Log Level:" msgstr "Niveaux de journal :" #: tmainform.menuitem5.caption diff --git a/languages/lazmqttc.pot b/languages/lazmqttc.pot index 236599d..c39c0d4 100644 --- a/languages/lazmqttc.pot +++ b/languages/lazmqttc.pot @@ -267,6 +267,14 @@ msgctxt "tbrokereditform.pubretaincheckbox.caption" msgid "(false)" msgstr "" +#: tbrokereditform.pubtopicedit.text +msgid "PubTopicEdit" +msgstr "" + +#: tbrokereditform.qoscombobox.text +msgid "0 - at most once" +msgstr "" + #: tbrokereditform.reconnectbackoffcheckbox.caption msgctxt "tbrokereditform.reconnectbackoffcheckbox.caption" msgid "(false)" @@ -310,6 +318,14 @@ msgctxt "teditsubtopicform.label3.caption" msgid "Use" msgstr "" +#: teditsubtopicform.qoscombobox.text +msgid "0 - At most once" +msgstr "" + +#: teditsubtopicform.topicedit.text +msgid "TopicEdit" +msgstr "" + #: teditsubtopicform.usecheckbox.caption msgid "(subscribe to this topic)" msgstr "" @@ -363,6 +379,10 @@ msgstr "" msgid "Edit" msgstr "" +#: tmainform.hostlabel.caption +msgid "" +msgstr "" + #: tmainform.label1.caption msgid "Broker:" msgstr "" @@ -407,7 +427,7 @@ msgid "Copy" msgstr "" #: tmainform.menuitem3.caption -msgid "Log Levels:" +msgid "Log Level:" msgstr "" #: tmainform.menuitem5.caption @@ -523,3 +543,4 @@ msgstr "" #: toptionseditform.showtopicscheckbox.caption msgid "Show message topics" msgstr "" +