node-red-contrib-modbus-modpackqt 3.3.10 → 3.3.11

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,20 @@ 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.11] — 2026-05-10
8
+
9
+ ### Changed
10
+
11
+ - **Config dialog is now picker-only.** Hand-edited Target Device
12
+ (IP / Port / Unit ID), Transport (Mode / Serial / Baud / Parity /
13
+ Timeout) and the collapsible embedded-slave-server section have all
14
+ been removed from the runtime config dialog. Everything is set by
15
+ the **My Connections** picker, which auto-fills hidden fields the
16
+ runtime still uses. Same dialog appears regardless of whether you
17
+ open it from a master-read, master-write, or master-probe node.
18
+ To run an embedded Modbus TCP slave, drop a `modpackqt-slave-server`
19
+ node onto the canvas (it has its own My Slaves picker).
20
+
7
21
  ## [3.3.10] — 2026-05-10
8
22
 
9
23
  ### Removed
@@ -18,7 +18,7 @@
18
18
  const http = require('http');
19
19
  const { URL } = require('url');
20
20
 
21
- const PALETTE_VERSION = '3.3.10';
21
+ const PALETTE_VERSION = '3.3.11';
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;
@@ -28,20 +28,6 @@
28
28
  return this.name && this.name !== 'ModPackQT Device' ? `${this.name} (${t})` : `${t}${s}`;
29
29
  },
30
30
  oneditprepare: function () {
31
- const toggleRtu = () => {
32
- const isRtu = $('#node-config-input-masterMode').val() === 'rtu';
33
- $('.modpackqt-rtu-only').toggle(isRtu);
34
- $('.modpackqt-tcp-only').toggle(!isRtu);
35
- };
36
- const toggleSlave = () => {
37
- const on = $('#node-config-input-slaveEnabled').is(':checked');
38
- $('.modpackqt-slave-only').toggle(on);
39
- };
40
- $('#node-config-input-masterMode').on('change', toggleRtu);
41
- $('#node-config-input-slaveEnabled').on('change', toggleSlave);
42
- toggleRtu();
43
- toggleSlave();
44
-
45
31
  // ── My Connections picker
46
32
  const nodeId = this.id;
47
33
  const $sel = $('#node-config-input-modpackqt-conn-picker');
@@ -79,26 +65,9 @@
79
65
  if (c.host) $('#node-config-input-targetHost').val(c.host);
80
66
  if (c.port) $('#node-config-input-targetPort').val(c.port);
81
67
  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
- }
68
+ $('#node-config-input-masterMode').val(c.connectionType === 'rtu' ? 'rtu' : 'tcp');
85
69
  });
86
70
  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
71
  }
103
72
  });
104
73
  </script>
@@ -127,86 +96,27 @@
127
96
  Picks a saved connection from modpackqt.com — auto-fills Host, Port, and Unit ID below.
128
97
  </div>
129
98
 
130
- <h4 style="margin-top:18px">Target Device</h4>
131
- <div class="form-row modpackqt-tcp-only">
132
- <label for="node-config-input-targetHost"><i class="fa fa-plug"></i> IP Address</label>
133
- <input type="text" id="node-config-input-targetHost" placeholder="e.g. 192.168.1.10 — IP/hostname of the Modbus device">
134
- </div>
135
- <div class="form-tips modpackqt-tcp-only" style="font-size:11px;color:#6b7280;margin:-8px 0 12px 105px">
136
- The IP address (or hostname) of the target Modbus device on your network.
137
- </div>
138
- <div class="form-row modpackqt-tcp-only">
139
- <label for="node-config-input-targetPort"><i class="fa fa-hashtag"></i> Port</label>
140
- <input type="number" id="node-config-input-targetPort" min="1" max="65535" placeholder="502 (Modbus TCP default)">
141
- </div>
142
- <div class="form-row">
143
- <label for="node-config-input-unitId"><i class="fa fa-id-card"></i> Unit ID</label>
144
- <input type="number" id="node-config-input-unitId" min="1" max="247" placeholder="1 (slave address on the bus)">
145
- </div>
146
-
147
- <h4 style="margin-top:18px">Transport</h4>
148
- <div class="form-row">
149
- <label for="node-config-input-masterMode"><i class="fa fa-cogs"></i> Mode</label>
150
- <select id="node-config-input-masterMode">
151
- <option value="tcp">Modbus TCP</option>
152
- <option value="rtu">Modbus RTU (Serial)</option>
153
- </select>
154
- </div>
155
- <div class="form-row modpackqt-rtu-only">
156
- <label for="node-config-input-serialPort"><i class="fa fa-plug"></i> Serial Port</label>
157
- <input type="text" id="node-config-input-serialPort" placeholder="/dev/ttyUSB0 or COM3">
158
- </div>
159
- <div class="form-row modpackqt-rtu-only">
160
- <label for="node-config-input-baudRate"><i class="fa fa-tachometer"></i> Baud</label>
161
- <input type="number" id="node-config-input-baudRate" placeholder="9600">
162
- </div>
163
- <div class="form-row modpackqt-rtu-only">
164
- <label for="node-config-input-parity"><i class="fa fa-list"></i> Parity</label>
165
- <select id="node-config-input-parity">
166
- <option value="none">None</option>
167
- <option value="even">Even</option>
168
- <option value="odd">Odd</option>
169
- </select>
170
- </div>
171
- <div class="form-row modpackqt-rtu-only">
172
- <label for="node-config-input-dataBits"><i class="fa fa-hashtag"></i> Data Bits</label>
173
- <select id="node-config-input-dataBits">
174
- <option value="8">8</option><option value="7">7</option>
175
- </select>
176
- </div>
177
- <div class="form-row modpackqt-rtu-only">
178
- <label for="node-config-input-stopBits"><i class="fa fa-hashtag"></i> Stop Bits</label>
179
- <select id="node-config-input-stopBits">
180
- <option value="1">1</option><option value="2">2</option>
181
- </select>
182
- </div>
183
- <div class="form-row">
184
- <label for="node-config-input-timeoutMs"><i class="fa fa-clock-o"></i> Timeout (ms)</label>
185
- <input type="number" id="node-config-input-timeoutMs" placeholder="3000">
186
- </div>
187
-
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>
99
+ <!-- All connection details (host/port/unit/mode/timeout/embedded-slave) are
100
+ set by the My Connections picker above. They live as hidden inputs so
101
+ the runtime still has them, but they are no longer hand-edited here. -->
102
+ <input type="hidden" id="node-config-input-targetHost">
103
+ <input type="hidden" id="node-config-input-targetPort">
104
+ <input type="hidden" id="node-config-input-unitId">
105
+ <input type="hidden" id="node-config-input-masterMode">
106
+ <input type="hidden" id="node-config-input-serialPort">
107
+ <input type="hidden" id="node-config-input-baudRate">
108
+ <input type="hidden" id="node-config-input-parity">
109
+ <input type="hidden" id="node-config-input-dataBits">
110
+ <input type="hidden" id="node-config-input-stopBits">
111
+ <input type="hidden" id="node-config-input-timeoutMs">
112
+ <input type="hidden" id="node-config-input-slaveEnabled">
113
+ <input type="hidden" id="node-config-input-slaveHost">
114
+ <input type="hidden" id="node-config-input-slavePort">
207
115
 
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.
116
+ <div class="form-tips" style="margin-top:14px">
117
+ <b>One device per config.</b> Use the picker above to choose which saved
118
+ Modbus device this config talks to. For more devices, create another
119
+ config and pick a different one.
210
120
  </div>
211
121
  <div class="form-row" style="margin-top:18px;padding-top:14px;border-top:1px solid #e5e7eb;text-align:center;">
212
122
  <a href="https://modpackqt.com" target="_blank" rel="noopener noreferrer"
@@ -233,16 +143,12 @@
233
143
  only need to know the function code, address, and quantity.
234
144
  </p>
235
145
 
236
- <h3>Master mode</h3>
237
- <ul>
238
- <li><b>Modbus TCP</b> — connects to the configured Host/Port.</li>
239
- <li><b>Modbus RTU</b> — opens the configured serial port. Host/Port are ignored; only Unit ID matters.</li>
240
- </ul>
241
-
242
- <h3>Embedded slave server</h3>
146
+ <h3>Where do the connection details come from?</h3>
243
147
  <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.
148
+ Paste your <b>Account Key</b>, then pick a saved device from <b>My
149
+ Connections</b>. The host, port, unit ID, and transport mode are all
150
+ pulled from your modpackqt.com profile no hand-editing needed here.
151
+ To run an embedded Modbus TCP slave server, drop a
152
+ <code>modpackqt-slave-server</code> node onto the canvas instead.
247
153
  </p>
248
154
  </script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red-contrib-modbus-modpackqt",
3
- "version": "3.3.10",
3
+ "version": "3.3.11",
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",