node-red-contrib-modbus-modpackqt 3.3.18 → 3.3.19

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,18 @@ 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.19] — 2026-05-10
8
+
9
+ ### Changed
10
+
11
+ - **Master-probe is now standalone — no Target Device picker.** The
12
+ dialog has just three fields: **Name**, **Account Key**, and
13
+ **My Connections**. The Account Key loads your saved connections
14
+ from modpackqt.com directly into the picker; choosing one fills
15
+ in host / port / unit ID behind the scenes. No more probe-config
16
+ middleman, no duplicate field, no "Save first then reopen the
17
+ config to enter your key" detour.
18
+
7
19
  ## [3.3.18] — 2026-05-10
8
20
 
9
21
  ### 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.18';
21
+ const PALETTE_VERSION = '3.3.19';
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;
@@ -3,13 +3,14 @@
3
3
  category: 'ModPackQT',
4
4
  color: '#f97316',
5
5
  defaults: {
6
- name: { value: '' },
7
- server: { value: '', type: 'modpackqt-probe-config', required: true },
8
- // Legacy per-node fields kept hidden so old flows keep working.
9
- targetHost: { value: '' },
10
- targetPort: { value: 0, validate: function (v) { return v === '' || v === 0 || RED.validators.number()(v); } },
11
- unitId: { value: 0, validate: function (v) { return v === '' || v === 0 || RED.validators.number()(v); } },
12
- timeoutMs: { value: 0, validate: function (v) { return v === '' || v === 0 || RED.validators.number()(v); } }
6
+ name: { value: '' },
7
+ targetHost: { value: '' },
8
+ targetPort: { value: 502, validate: RED.validators.number() },
9
+ unitId: { value: 1, validate: RED.validators.number() },
10
+ timeoutMs: { value: 3000, validate: RED.validators.number() }
11
+ },
12
+ credentials: {
13
+ apiKey: { type: 'password' }
13
14
  },
14
15
  inputs: 0,
15
16
  outputs: 0,
@@ -22,22 +23,12 @@
22
23
  const node = this;
23
24
  let runtimeInfo = {};
24
25
 
25
- const getCfgTarget = () => {
26
- const cfgId = $('#node-input-server').val();
27
- const cfg = cfgId ? RED.nodes.node(cfgId) : null;
28
- return {
29
- host: (cfg && cfg.targetHost) || '',
30
- port: (cfg && cfg.targetPort) || 502,
31
- unitId: (cfg && cfg.unitId) || 1
32
- };
33
- };
34
-
35
26
  const buildLink = () => {
36
27
  const probeHost = runtimeInfo.host || '127.0.0.1';
37
28
  const probePort = runtimeInfo.port || 8502;
38
- const tHost = $('#node-input-targetHost').val() || node.targetHost || getCfgTarget().host;
39
- const tPort = $('#node-input-targetPort').val() || node.targetPort || getCfgTarget().port;
40
- const tUnit = $('#node-input-unitId').val() || node.unitId || getCfgTarget().unitId;
29
+ const tHost = $('#node-input-targetHost').val() || node.targetHost || '';
30
+ const tPort = $('#node-input-targetPort').val() || node.targetPort || 502;
31
+ const tUnit = $('#node-input-unitId').val() || node.unitId || 1;
41
32
  const name = $('#node-input-name').val() || node.name || '';
42
33
  const url = 'https://modpackqt.com/master'
43
34
  + '?probe=' + encodeURIComponent(node.id)
@@ -55,18 +46,17 @@
55
46
  .done((info) => { runtimeInfo = info || {}; buildLink(); })
56
47
  .fail(() => buildLink());
57
48
 
58
- // ── My Connections picker — uses the selected Target Device's Account Key
49
+ // ── My Connections picker — uses this node's own Account Key
59
50
  const $sel = $('#node-input-modpackqt-conn-picker');
60
51
  const $hint = $('#modpackqt-conn-picker-hint');
61
52
  const reload = () => {
62
53
  $sel.empty().append('<option value="">— Loading… —</option>');
63
- const cfgId = $('#node-input-server').val();
64
- if (!cfgId) {
65
- $sel.empty().append('<option value="">— Pick a Target Device below first —</option>');
66
- $hint.text('Pick a Target Device first — its Account Key is used to load your saved connections.');
54
+ if (!node.id) {
55
+ $sel.empty().append('<option value="">— Save this node first, then reopen —</option>');
56
+ $hint.text('Click Done once to save the node, then reopen to load your connections.');
67
57
  return;
68
58
  }
69
- $.getJSON('modpackqt/connections?probe=' + encodeURIComponent(cfgId))
59
+ $.getJSON('modpackqt/connections?probe=' + encodeURIComponent(node.id))
70
60
  .done((rows) => {
71
61
  $sel.empty().append('<option value="">— Manual entry —</option>');
72
62
  (rows || []).forEach((c) => {
@@ -87,7 +77,7 @@
87
77
  .fail((xhr) => {
88
78
  const msg = (xhr.responseJSON && xhr.responseJSON.error) || ('HTTP ' + xhr.status);
89
79
  $sel.empty().append($('<option>').val('').text('— ' + msg + ' —'));
90
- $hint.text('Could not load connections — check the Account Key on the Target Device.');
80
+ $hint.text('Could not load connections — check the Account Key above.');
91
81
  });
92
82
  };
93
83
  $('#modpackqt-conn-picker-refresh').on('click', (e) => { e.preventDefault(); reload(); });
@@ -100,7 +90,6 @@
100
90
  if (!$('#node-input-name').val() && c.name) $('#node-input-name').val(c.name);
101
91
  buildLink();
102
92
  });
103
- $('#node-input-server').on('change', () => { reload(); buildLink(); });
104
93
  reload();
105
94
  }
106
95
  });
@@ -111,6 +100,16 @@
111
100
  <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
112
101
  <input type="text" id="node-input-name" placeholder="(optional, e.g. Inverter A)">
113
102
  </div>
103
+
104
+ <div class="form-row">
105
+ <label for="node-input-apiKey"><i class="fa fa-key"></i> Account Key</label>
106
+ <input type="password" id="node-input-apiKey" placeholder="Paste your ModPackQT tunnel key">
107
+ </div>
108
+ <div class="form-tips" style="font-size:11px;color:#6b7280;margin:-8px 0 12px 105px">
109
+ Generate at <a href="https://modpackqt.com/settings" target="_blank" rel="noopener">modpackqt.com → Settings → Cloud Gateways</a>.
110
+ Loads your saved connections in the picker below.
111
+ </div>
112
+
114
113
  <div class="form-row">
115
114
  <label for="node-input-modpackqt-conn-picker"><i class="fa fa-cloud-download"></i> My Connections</label>
116
115
  <select id="node-input-modpackqt-conn-picker" style="width:65%"></select>
@@ -120,14 +119,6 @@
120
119
  Picks one of your saved connections from modpackqt.com — auto-fills host, port, and unit ID.
121
120
  </div>
122
121
 
123
- <div class="form-row">
124
- <label for="node-input-server"><i class="fa fa-plug"></i> Target Device</label>
125
- <input type="text" id="node-input-server">
126
- </div>
127
- <div class="form-tips" style="font-size:11px;color:#6b7280;margin:-8px 0 12px 105px">
128
- Runtime config that holds your <b>Account Key</b>. The key powers the picker above and lets the web console attach to this probe.
129
- </div>
130
-
131
122
  <input type="hidden" id="node-input-targetHost">
132
123
  <input type="hidden" id="node-input-targetPort">
133
124
  <input type="hidden" id="node-input-unitId">
@@ -139,7 +130,7 @@
139
130
  </div>
140
131
  <div class="form-row" style="margin-top:18px;padding-top:14px;border-top:1px solid #e5e7eb;text-align:center;">
141
132
  <a id="modpackqt-probe-link" href="https://modpackqt.com" target="_blank" rel="noopener noreferrer"
142
- style="display:inline-block;padding:10px 24px;background:#7c3aed;color:#fff;
133
+ style="display:inline-block;padding:10px 24px;background:#f97316;color:#fff;
143
134
  text-decoration:none;border-radius:6px;font-weight:600;font-size:14px;
144
135
  box-shadow:0 1px 2px rgba(0,0,0,0.08);">
145
136
  Open in ModPackQT Console <i class="fa fa-external-link" style="margin-left:6px;"></i>
@@ -149,7 +140,7 @@
149
140
  </div>
150
141
  <div style="margin-top:10px;font-size:12px;">
151
142
  <a href="https://modpackqt.com/settings#connections" target="_blank" rel="noopener noreferrer"
152
- style="color:#7c3aed;text-decoration:none;font-weight:500;">
143
+ style="color:#f97316;text-decoration:none;font-weight:500;">
153
144
  <i class="fa fa-pencil" style="margin-right:4px;"></i>Edit IP / port / unit ID on modpackqt.com →
154
145
  </a>
155
146
  </div>
@@ -157,19 +148,20 @@
157
148
  </script>
158
149
 
159
150
  <script type="text/html" data-help-name="modpackqt-master-probe">
160
- <p>Live tester / commissioning probe for the Modbus device defined by the
161
- chosen runtime config. Click <b>Open in ModPackQT Console</b> to launch
162
- the web tester live-attached to that device.</p>
151
+ <p>Live tester / commissioning probe for a single Modbus device.
152
+ Click <b>Open in ModPackQT Console</b> to launch the web tester
153
+ live-attached to it.</p>
163
154
 
164
155
  <h3>Account Key</h3>
165
- <p>Paste your ModPackQT tunnel key here — generate one at
156
+ <p>Paste your ModPackQT tunnel key — generate one at
166
157
  <a href="https://modpackqt.com/settings" target="_blank" rel="noopener">modpackqt.com → Settings → Cloud Gateways</a>.
167
- The key lets the web console authenticate to this probe. All Modbus traffic stays local.</p>
158
+ The key loads your saved connections into the picker AND lets the web console authenticate to this probe.
159
+ All Modbus traffic stays local.</p>
168
160
 
169
161
  <h3>Multiple devices</h3>
170
- <p>Create one runtime config per device, then drop one master-probe per
171
- runtime. The web console aggregates all probe nodes from this Node-RED
172
- instance into a single sidebar — switch between devices with one click.</p>
162
+ <p>Drop one master-probe per device. The web console aggregates all probes
163
+ from this Node-RED instance into a single sidebar switch between
164
+ devices with one click.</p>
173
165
 
174
166
  <h3>Network access</h3>
175
167
  <p>The runtime binds to <code>127.0.0.1</code> by default — only browsers on
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red-contrib-modbus-modpackqt",
3
- "version": "3.3.18",
3
+ "version": "3.3.19",
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",