node-red-contrib-modbus-modpackqt 3.3.12 → 3.3.14

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.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,25 @@ All notable changes to **node-red-contrib-modbus-modpackqt** are documented
4
4
  here. This project follows [Semantic Versioning](https://semver.org/) — pin a
5
5
  major version (`^2.0.0`) in production.
6
6
 
7
+ ## [3.3.14] — 2026-05-10
8
+
9
+ ### Removed
10
+
11
+ - **Account Key + My Connections gone from `modpackqt-config`** (the
12
+ master-read / master-write config). Those belong only on the
13
+ `modpackqt-probe-config` used by master-probe. Read/write configs
14
+ are now pure manual entry: Name + Target Device + Transport.
15
+
16
+ ## [3.3.13] — 2026-05-10
17
+
18
+ ### Removed
19
+
20
+ - **Embedded slave server section gone from the master config dialog.**
21
+ Redundant — the standalone `modpackqt-slave-server` canvas node already
22
+ owns its own port, register store, and My Slaves picker. Existing
23
+ legacy slave settings on a config node are preserved on disk so older
24
+ flows won't lose data, just hidden from the editor.
25
+
7
26
  ## [3.3.12] — 2026-05-10
8
27
 
9
28
  ### Changed
@@ -18,7 +18,7 @@
18
18
  const http = require('http');
19
19
  const { URL } = require('url');
20
20
 
21
- const PALETTE_VERSION = '3.3.12';
21
+ const PALETTE_VERSION = '3.3.14';
22
22
  const DEFAULT_PORT = parseInt(process.env.MODPACKQT_PROBE_PORT, 10) || 8502;
23
23
  const BIND_HOST = process.env.MODPACKQT_PROBE_HOST || '127.0.0.1';
24
24
  const PORT_RETRY = 5;
@@ -1,9 +1,6 @@
1
1
  <script type="text/javascript">
2
2
  RED.nodes.registerType('modpackqt-config', {
3
3
  category: 'config',
4
- credentials: {
5
- apiKey: { type: 'password' }
6
- },
7
4
  defaults: {
8
5
  name: { value: 'ModPackQT Device' },
9
6
  targetHost: { value: 'localhost' },
@@ -33,72 +30,8 @@
33
30
  $('.modpackqt-rtu-only').toggle(isRtu);
34
31
  $('.modpackqt-tcp-only').toggle(!isRtu);
35
32
  };
36
- const toggleSlave = () => {
37
- const on = $('#node-config-input-slaveEnabled').is(':checked');
38
- $('.modpackqt-slave-only').toggle(on);
39
- };
40
33
  $('#node-config-input-masterMode').on('change', toggleRtu);
41
- $('#node-config-input-slaveEnabled').on('change', toggleSlave);
42
34
  toggleRtu();
43
- toggleSlave();
44
-
45
- // ── My Connections picker
46
- const nodeId = this.id;
47
- const $sel = $('#node-config-input-modpackqt-conn-picker');
48
- const loadConnections = function () {
49
- $sel.empty().append('<option value="">— Loading… —</option>');
50
- if (!nodeId) {
51
- $sel.empty().append('<option value="">— Save this config first, then reopen —</option>');
52
- return;
53
- }
54
- $.getJSON('modpackqt/connections?probe=' + encodeURIComponent(nodeId))
55
- .done(function (rows) {
56
- $sel.empty().append('<option value="">— Manual entry —</option>');
57
- (rows || []).forEach(function (c) {
58
- const label = (c.name || '(unnamed)') + (c.connectionType === 'rtu'
59
- ? ' — RTU'
60
- : ' — ' + (c.host || '?') + ':' + (c.port || 502) + ' #' + (c.unitId || 1));
61
- $('<option>').val(c.id).text(label).data('conn', c).appendTo($sel);
62
- });
63
- })
64
- .fail(function (xhr) {
65
- const msg = (xhr.responseJSON && xhr.responseJSON.error) || ('HTTP ' + xhr.status);
66
- $sel.empty().append($('<option>').val('').text('— ' + msg + ' —'));
67
- });
68
- };
69
- $('#modpackqt-conn-picker-refresh').on('click', function (e) {
70
- e.preventDefault();
71
- loadConnections();
72
- });
73
- $sel.on('change', function () {
74
- const c = $(this).find('option:selected').data('conn');
75
- if (!c) return;
76
- if (!$('#node-config-input-name').val() || $('#node-config-input-name').val() === 'ModPackQT Device') {
77
- $('#node-config-input-name').val(c.name || '');
78
- }
79
- if (c.host) $('#node-config-input-targetHost').val(c.host);
80
- if (c.port) $('#node-config-input-targetPort').val(c.port);
81
- if (c.unitId) $('#node-config-input-unitId').val(c.unitId);
82
- if (c.connectionType === 'rtu') {
83
- $('#node-config-input-masterMode').val('rtu').trigger('change');
84
- }
85
- });
86
- loadConnections();
87
-
88
- // ── Embedded slave server section (collapsed by default)
89
- const $slaveSection = $('.modpackqt-slave-section');
90
- const $slaveToggle = $('.modpackqt-slave-section-toggle');
91
- const setSlaveOpen = (open) => {
92
- $slaveSection.toggle(open);
93
- $slaveToggle.html(open
94
- ? '▾ Hide embedded slave server'
95
- : '▸ Embedded slave server (only for modpackqt-slave-read / -write nodes)');
96
- };
97
- setSlaveOpen(this.slaveEnabled === true || this.slaveEnabled === 'true');
98
- $slaveToggle.off('click.modpackqt').on('click.modpackqt', (e) => {
99
- e.preventDefault();
100
- setSlaveOpen($slaveSection.is(':hidden'));
101
- });
102
35
  }
103
36
  });
104
37
  </script>
@@ -109,24 +42,6 @@
109
42
  <input type="text" id="node-config-input-name" placeholder="e.g. Inverter A">
110
43
  </div>
111
44
 
112
- <div class="form-row">
113
- <label for="node-config-input-apiKey"><i class="fa fa-key"></i> Account Key</label>
114
- <input type="password" id="node-config-input-apiKey" placeholder="Paste your ModPackQT tunnel key">
115
- </div>
116
- <div class="form-tips" style="font-size:11px;color:#6b7280;margin:-8px 0 4px 105px">
117
- Generate at <a href="https://modpackqt.com/settings" target="_blank" rel="noopener">modpackqt.com → Settings → Cloud Gateways</a>.
118
- Loads your saved connections in the picker below.
119
- </div>
120
-
121
- <div class="form-row">
122
- <label for="node-config-input-modpackqt-conn-picker"><i class="fa fa-cloud-download"></i> My Connections</label>
123
- <select id="node-config-input-modpackqt-conn-picker" style="width:65%"></select>
124
- <button type="button" id="modpackqt-conn-picker-refresh" class="red-ui-button" title="Reload" style="margin-left:4px"><i class="fa fa-refresh"></i></button>
125
- </div>
126
- <div class="form-tips" style="font-size:11px;color:#6b7280;margin:-8px 0 12px 105px">
127
- Picks a saved connection from modpackqt.com — auto-fills Host, Port, and Unit ID below.
128
- </div>
129
-
130
45
  <h4 style="margin-top:18px">Target Device</h4>
131
46
  <div class="form-row modpackqt-tcp-only">
132
47
  <label for="node-config-input-targetHost"><i class="fa fa-plug"></i> IP Address</label>
@@ -185,28 +100,18 @@
185
100
  <input type="number" id="node-config-input-timeoutMs" placeholder="3000">
186
101
  </div>
187
102
 
188
- <div class="form-row" style="margin:14px 0 4px 0;border-top:1px solid #e5e7eb;padding-top:10px">
189
- <a href="#" class="modpackqt-slave-section-toggle" style="font-size:12px;color:#6b7280;text-decoration:none;cursor:pointer">▸ Embedded slave server (only for modpackqt-slave-read / -write nodes)</a>
190
- </div>
191
- <div class="modpackqt-slave-section" style="display:none">
192
- <div class="form-row">
193
- <label for="node-config-input-slaveEnabled" style="width:auto">
194
- <input type="checkbox" id="node-config-input-slaveEnabled" style="width:auto;vertical-align:middle">
195
- Enable embedded Modbus TCP slave server
196
- </label>
197
- </div>
198
- <div class="form-row modpackqt-slave-only">
199
- <label for="node-config-input-slaveHost"><i class="fa fa-globe"></i> Bind Host</label>
200
- <input type="text" id="node-config-input-slaveHost" placeholder="0.0.0.0 (all interfaces)">
201
- </div>
202
- <div class="form-row modpackqt-slave-only">
203
- <label for="node-config-input-slavePort"><i class="fa fa-hashtag"></i> Slave Port</label>
204
- <input type="number" id="node-config-input-slavePort" placeholder="1502">
205
- </div>
206
- </div>
103
+ <!-- Embedded slave server lives on the standalone modpackqt-slave-server
104
+ canvas node now. These hidden inputs preserve any legacy values on
105
+ existing flows so re-saving doesn't wipe them. -->
106
+ <input type="hidden" id="node-config-input-slaveEnabled">
107
+ <input type="hidden" id="node-config-input-slaveHost">
108
+ <input type="hidden" id="node-config-input-slavePort">
207
109
 
208
- <div class="form-tips">
209
- <b>One runtime = one device.</b> For multiple devices, create one runtime config per device — the read/write nodes then just pick which device to talk to.
110
+ <div class="form-tips" style="margin-top:14px">
111
+ <b>One runtime = one device.</b> For multiple devices, create one runtime
112
+ config per device — the read/write nodes then just pick which device to
113
+ talk to. To run an embedded slave server, drop a
114
+ <code>modpackqt-slave-server</code> node onto the canvas.
210
115
  </div>
211
116
  <div class="form-row" style="margin-top:18px;padding-top:14px;border-top:1px solid #e5e7eb;text-align:center;">
212
117
  <a href="https://modpackqt.com" target="_blank" rel="noopener noreferrer"
@@ -239,10 +144,10 @@
239
144
  <li><b>Modbus RTU</b> — opens the configured serial port. Host/Port are ignored; only Unit ID matters.</li>
240
145
  </ul>
241
146
 
242
- <h3>Embedded slave server</h3>
147
+ <h3>Want to run a slave?</h3>
243
148
  <p>
244
- When enabled, this config opens a Modbus TCP server on the configured port (default
245
- <code>1502</code>). Use the <code>modpackqt-slave-write</code> node to push values into
246
- its register store; external Modbus masters read whatever you last wrote.
149
+ Drop a <code>modpackqt-slave-server</code> node onto the canvas. It owns its
150
+ own port, its own register store, and its own My Slaves picker for loading
151
+ saved slave profiles from modpackqt.com.
247
152
  </p>
248
153
  </script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red-contrib-modbus-modpackqt",
3
- "version": "3.3.12",
3
+ "version": "3.3.14",
4
4
  "description": "Modbus commissioning, testing & analysis tools for Node-RED. Embedded Modbus TCP/RTU master + slave server, FC1/FC2/FC3/FC4 reads, FC5/FC6/FC15/FC16 writes, built-in slave register store, and a passive traffic monitor for debugging. 100% free, MIT, no usage limits. By ModPackQT — open the matching web console at modpackqt.com for register decoding, simulation and AI assistance.",
5
5
  "keywords": [
6
6
  "node-red",