Skip to content

Commit

Permalink
Light cleanup for 0.5.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
sigmdel committed Feb 25, 2022
1 parent 6c4810b commit efb1a85
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 16 deletions.
14 changes: 12 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
Expand Down
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down Expand Up @@ -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.

<b>Warning:</b> 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

Expand Down Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions forms/main.lfm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -301,7 +302,6 @@ object MainForm: TMainForm
ClientHeight = 171
ClientWidth = 605
TabOrder = 5
OnClick = BottomPanelClick
object QuitButton: TButton
AnchorSideTop.Control = BottomPanel
AnchorSideTop.Side = asrCenter
Expand Down Expand Up @@ -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
Expand All @@ -418,7 +418,7 @@ object MainForm: TMainForm
end
object TabSheet2: TTabSheet
Caption = 'Log'
ClientHeight = 102
ClientHeight = 99
ClientWidth = 595
object LogMemo: TMemo
Left = 0
Expand Down
6 changes: 0 additions & 6 deletions forms/main.pas
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down
28 changes: 27 additions & 1 deletion languages/lazmqttc.fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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)"
Expand Down Expand Up @@ -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)"
Expand Down Expand Up @@ -373,6 +393,10 @@ msgstr "Copier dans Messages"
msgid "Edit"
msgstr "Modifier"

#: tmainform.hostlabel.caption
msgid "<host name>"
msgstr ""

#: tmainform.label1.caption
msgid "Broker:"
msgstr "Agent :"
Expand Down Expand Up @@ -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
Expand Down
23 changes: 22 additions & 1 deletion languages/lazmqttc.pot
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down Expand Up @@ -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 ""
Expand Down Expand Up @@ -363,6 +379,10 @@ msgstr ""
msgid "Edit"
msgstr ""

#: tmainform.hostlabel.caption
msgid "<host name>"
msgstr ""

#: tmainform.label1.caption
msgid "Broker:"
msgstr ""
Expand Down Expand Up @@ -407,7 +427,7 @@ msgid "Copy"
msgstr ""

#: tmainform.menuitem3.caption
msgid "Log Levels:"
msgid "Log Level:"
msgstr ""

#: tmainform.menuitem5.caption
Expand Down Expand Up @@ -523,3 +543,4 @@ msgstr ""
#: toptionseditform.showtopicscheckbox.caption
msgid "Show message topics"
msgstr ""

0 comments on commit efb1a85

Please sign in to comment.