node-red-contrib-aedes 0.15.1 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,7 +9,7 @@ jobs:
9
9
 
10
10
  strategy:
11
11
  matrix:
12
- node-version: [20.x, 22.x]
12
+ node-version: [22.x, 24.x]
13
13
  node-red: [3.x, 4.x]
14
14
 
15
15
  steps:
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # node-red-contrib-aedes Changelog
2
2
 
3
+ ## Feb 19, 2026, Version 1.2.0
4
+ ### Notable changes
5
+ - Added file-based snapshot persistence with automatic recovery on Node-RED restart
6
+
7
+ ## Feb 15, 2026, Version 1.1.0
8
+ ### Notable changes
9
+ - Improved help documentation
10
+ - Improved UI
11
+ - Added German locale (de)
12
+
13
+ ## Feb 14, 2026, Version 1.0.0
14
+ ### Notable changes
15
+ - Update aedes to version 1.0.0
16
+
3
17
  ## Jul 22, 2025, Version 0.15.0
4
18
  ### Notable changes
5
19
  - TLS configuration with local filess
package/README.md CHANGED
@@ -30,8 +30,9 @@ Just put this node on Node-RED and hit the deploy button. The MQTT Broker will r
30
30
  - Standard TCP Support
31
31
  - WebSocket Support via port or path
32
32
  - SSL / TLS
33
- - Message Persistence (In-memory, LevelDB or MongoDB)
34
-
33
+ - Message Persistence (In-memory or MongoDB)
34
+ - File-based snapshot persistence
35
+
35
36
  For more information see [Aedes](https://github.com/moscajs/aedes/blob/master/README.md#features).
36
37
 
37
38
  ## Server without public IP or behind firewall
@@ -43,7 +44,14 @@ You can also bind the WebSocket to the root `"/"` path and having `wss://yourser
43
44
 
44
45
  ## Version Compatibility
45
46
 
46
- The current version requires **Node.js >= 20** and **Node-RED >= 3.0**.
47
+ The current version is based on **Aedes version 1.0**, which introduces several breaking changes. If your environment requires Aedes version 0.51, you can switch to version 0.15.x of this package.
48
+
49
+ To install the compatible version using the `version-15` dist-tag:
50
+ ```sh
51
+ npm install node-red-contrib-aedes@version-15
52
+ ```
53
+
54
+ The current version and version 0.15.x require **Node.js >= 20** and **Node-RED >= 3.0**.
47
55
 
48
56
  If you are running an older Node.js version (e.g. on locked-down or legacy hardware), please use version **0.11.x** of this package.
49
57
 
package/aedes.html CHANGED
@@ -25,27 +25,28 @@
25
25
  <div id="node-config-aedes-broker-tabs-content" style="min-height:150px;">
26
26
  <div id="aedes-broker-tab-connection" style="display:none">
27
27
  <div class="form-row">
28
- <label for="node-input-mqtt_port"><i class="fa fa-globe"></i> <span
28
+ <label for="node-input-mqtt_port"><i class="fa fa-plug"></i> <span
29
29
  data-i18n="aedes-mqtt-broker.label.mqtt_port"></span></label>
30
30
  <input type="text" id="node-input-mqtt_port"
31
31
  data-i18n="[placeholder]aedes-mqtt-broker.placeholder.mqtt_port">
32
32
  </div>
33
33
  <div class="form-row">
34
- <label for="node-input-mqtt_ws_bind"><i class="fa fa-globe"></i> WS bind</label>
35
- <select id="node-input-mqtt_ws_bind" type="text" style="width:30%" text-center>
34
+ <label for="node-input-mqtt_ws_bind"><i class="fa fa-exchange"></i> <span
35
+ data-i18n="aedes-mqtt-broker.label.mqtt_ws_bind"></span></label>
36
+ <select id="node-input-mqtt_ws_bind" type="text" style="width:30%; text-align:center;">
36
37
  <option value="path" default>path</option>
37
38
  <option value="port">port</option>
38
39
  </select>
39
40
  </div>
40
41
  <div class="form-row" id="node-input-mqtt_ws_path-label">
41
- <label for="node-input-mqtt_ws_path"><i class="fa fa-globe"></i> <span
42
- data-i18n="aedes-mqtt-broker.label.mqtt_ws_path"></label>
42
+ <label for="node-input-mqtt_ws_path"><i class="fa fa-link"></i> <span
43
+ data-i18n="aedes-mqtt-broker.label.mqtt_ws_path"></span></label>
43
44
  <input type="text" id="node-input-mqtt_ws_path"
44
45
  data-i18n="[placeholder]aedes-mqtt-broker.placeholder.mqtt_ws_path">
45
46
  </div>
46
47
  <div class="form-row" id="node-input-mqtt_ws_port-label">
47
- <label for="node-input-mqtt_ws_port"><i class="fa fa-globe"></i> <span
48
- data-i18n="aedes-mqtt-broker.label.mqtt_ws_port"></label>
48
+ <label for="node-input-mqtt_ws_port"><i class="fa fa-plug"></i> <span
49
+ data-i18n="aedes-mqtt-broker.label.mqtt_ws_port"></span></label>
49
50
  <input type="text" id="node-input-mqtt_ws_port"
50
51
  data-i18n="[placeholder]aedes-mqtt-broker.placeholder.mqtt_ws_port">
51
52
  </div>
@@ -58,7 +59,7 @@
58
59
  <input type="checkbox" id="node-input-uselocalfiles"
59
60
  style="display: inline-block; width: auto; vertical-align: top;">
60
61
  <label for="node-input-uselocalfiles" style="width: 70%;"><span
61
- data-i18n="aedes-mqtt-broker.label.use-local-files"></label>
62
+ data-i18n="aedes-mqtt-broker.label.use-local-files"></span></label>
62
63
  </div>
63
64
 
64
65
  <div class="form-row">
@@ -122,19 +123,26 @@
122
123
  </div>
123
124
  <div id="aedes-broker-tab-persistence" style="display:none">
124
125
  <div class="form-row">
125
- <label for="node-input-persistence_bind"><i class="fa fa-globe"></i> <span
126
- data-i18n="aedes-mqtt-broker.label.persistence_bind"></label>
127
- <select id="node-input-persistence_bind" type="text" style="width:30%" text-center>
126
+ <label for="node-input-persistence_bind"><i class="fa fa-hdd-o"></i> <span
127
+ data-i18n="aedes-mqtt-broker.label.persistence_bind"></span></label>
128
+ <select id="node-input-persistence_bind" type="text" style="width:30%; text-align:center;">
128
129
  <option value="memory" data-i18n="aedes-mqtt-broker.label.persistence_memory" default></option>
129
130
  <option value="mongodb" data-i18n="aedes-mqtt-broker.label.persistence_mongodb"></option>
130
131
  <!-- <option value="level" data-i18n="aedes-mqtt-broker.label.persistence_level"></option> -->
131
132
  </select>
132
133
  </div>
133
- <div class="form-row" id="node-row-dburl" class="hide">
134
+ <div class="form-row hide" id="node-row-dburl">
134
135
  <label for="node-input-dburl"><i class="fa fa-database"></i> <span
135
- data-i18n="aedes-mqtt-broker.label.dburl"></label>
136
+ data-i18n="aedes-mqtt-broker.label.dburl"></span></label>
136
137
  <input type="text" id="node-input-dburl" data-i18n="[placeholder]aedes-mqtt-broker.placeholder.dburl">
137
138
  </div>
139
+ <div class="form-row hide" id="node-row-persist-to-file">
140
+ <input type="checkbox" id="node-input-persist_to_file"
141
+ style="display: inline-block; width: auto; vertical-align: top;">
142
+ <label for="node-input-persist_to_file" style="width: auto"
143
+ data-i18n="aedes-mqtt-broker.label.persist_to_file"></label>
144
+ <div class="form-tips" data-i18n="aedes-mqtt-broker.tip.persist_to_file" style="margin-top: 4px;"></div>
145
+ </div>
138
146
  </div>
139
147
  <div id="aedes-broker-tab-security" style="display:none">
140
148
  <div class="form-row">
@@ -157,9 +165,16 @@
157
165
  category: 'network',
158
166
  defaults: {
159
167
  name: { value: '' },
160
- mqtt_port: { value: 1883, validate: RED.validators.number() },
168
+ mqtt_port: { value: 1883, validate: function (v) {
169
+ var n = parseInt(v, 10);
170
+ return !isNaN(n) && n >= 1 && n <= 65535;
171
+ }},
161
172
  mqtt_ws_bind: { value: 'port', required: true },
162
- mqtt_ws_port: { value: null, required: false, validate: RED.validators.number(true) },
173
+ mqtt_ws_port: { value: null, required: false, validate: function (v) {
174
+ if (v === '' || v === null || v === undefined) return true;
175
+ var n = parseInt(v, 10);
176
+ return !isNaN(n) && n >= 1 && n <= 65535;
177
+ }},
163
178
  mqtt_ws_path: { value: '', required: false },
164
179
  cert: {
165
180
  value: '',
@@ -187,6 +202,7 @@
187
202
  caname: {value:""},
188
203
  persistence_bind: { value: 'memory', required: true },
189
204
  dburl: { value: '', required: false },
205
+ persist_to_file: { value: false },
190
206
  usetls: { value: false }
191
207
  },
192
208
  credentials: {
@@ -256,31 +272,38 @@
256
272
 
257
273
  const persistenceInput = $('#node-input-persistence_bind');
258
274
  const dburlRow = $('#node-row-dburl');
275
+ const persistFileRow = $('#node-row-persist-to-file');
259
276
  const dburl = this.dburl;
260
277
  persistenceInput.on('change', function () {
261
278
  switch ($(this).val()) {
262
279
  case 'memory':
263
280
  dburlRow.hide();
281
+ persistFileRow.show();
264
282
  break;
265
283
  case 'mongodb':
266
284
  dburlRow.show();
285
+ persistFileRow.hide();
267
286
  break;
268
287
  case 'level':
269
288
  dburlRow.hide();
289
+ persistFileRow.hide();
270
290
  break;
271
291
  case null:
272
292
  if (dburl) {
273
293
  this.persistence_bind = 'mongodb';
274
294
  persistenceInput.val('mongodb');
275
295
  dburlRow.show();
296
+ persistFileRow.hide();
276
297
  } else {
277
298
  this.persistence_bind = 'memory';
278
299
  persistenceInput.val('memory');
279
300
  dburlRow.hide();
301
+ persistFileRow.show();
280
302
  }
281
303
  break;
282
304
  }
283
305
  });
306
+ persistenceInput.trigger('change');
284
307
 
285
308
  if (typeof this.usetls === 'undefined') {
286
309
  this.usetls = false;
@@ -331,7 +354,7 @@
331
354
  $('#tls-button-key-clear').on('click', function () {
332
355
  clearNameData('key');
333
356
  });
334
- $("#tls-config-button-ca-clear").on("click", function() {
357
+ $("#tls-button-ca-clear").on("click", function() {
335
358
  clearNameData("ca");
336
359
  });
337
360
 
@@ -360,9 +383,11 @@
360
383
  $('#node-input-tls').val('');
361
384
  }
362
385
  if ($("#node-input-uselocalfiles").is(':checked')) {
363
- clearNameData("ca");
364
- clearNameData("cert");
365
- clearNameData("key");
386
+ ['ca', 'cert', 'key'].forEach(function (prop) {
387
+ $('#tls-' + prop + 'name').text('');
388
+ $('#node-input-' + prop + 'data').val('');
389
+ $('#node-input-' + prop + 'name').val('');
390
+ });
366
391
  } else {
367
392
  $("#node-input-ca").val("");
368
393
  $("#node-input-cert").val("");