# Changelog

All notable changes to **node-red-contrib-modbus-modpackqt** are documented
here. This project follows [Semantic Versioning](https://semver.org/) — pin a
major version (`^2.0.0`) in production.

## [3.3.26] — 2026-05-23

### Added

- **Cloud profile pickers — no more typing IPs manually.**
  Paste your **Cloud Gateway Key** (generate one at
  modpackqt.com → Settings → Cloud Gateways) into the runtime config node and
  a **My Connections** dropdown instantly loads all your saved Modbus devices,
  auto-filling Host, Port, Unit ID, and transport mode. The slave-server and
  slave-probe nodes gain a matching **My Slaves** picker that auto-fills Port
  and Unit ID from your saved slave configs.

- **Server-side proxy — key never reaches the browser.**
  `modpackqt-config.js` registers two Node-RED admin endpoints
  (`GET /modpackqt/connections` and `GET /modpackqt/slaves`) that look up the
  stored credential on the config/probe node and proxy the request to
  modpackqt.com with the `X-Tunnel-Key` header. The browser only sees the
  JSON result — credentials stay in the Node-RED process.

- **Reuses existing auth — no new mechanism.**
  Uses the same `X-Tunnel-Key` header the Electron gateway already sends to
  modpackqt.com. The cloud server now accepts this header on
  `GET /api/connections` and `GET /api/slaves`, so no new endpoints or tokens
  were introduced.

### Fixed

- **slave-probe node relabelled "Account Key" → "Cloud Gateway Key"** in
  both the editor dialog and the help panel, consistent with the master-probe
  and slave-server nodes (fixed in v3.3.24 for those nodes; now consistent
  everywhere).

### Unchanged

- Manual host/port entry is always available as a fallback — no Cloud Gateway
  Key is required for any Modbus master/slave operation. All Modbus traffic
  remains 100% local regardless of whether a key is set.

## [3.3.25] — 2026-05-10

### Changed

- **Icon now uses the actual ModPackQT brand PNG** instead of the
  earlier hand-drawn SVG approximation. Pixel-identical to the
  modpackqt.com logo.

## [3.3.24] — 2026-05-10

### Changed

- **Renamed "Account Key" → "Cloud Gateway Key"** in the master-probe and
  slave-server node dialogs. Same field, clearer name — matches the
  "Cloud Gateways" section in modpackqt.com → Settings where the key
  is created.

## [3.3.23] — 2026-05-10

### Changed

- **Icon now matches the full ModPackQT brand mark** — green rounded
  square with the white "M" wave inside, instead of just the bare
  chart line. Identical to the favicon on modpackqt.com.

## [3.3.22] — 2026-05-10

### Fixed

- **Logo icon now actually displays** on every ModPackQT node. In v3.3.21
  the icon file was at the package root, where Node-RED could not find
  it; moved to `nodes/icons/` (adjacent to the node files) so Node-RED
  resolves it correctly.

## [3.3.21] — 2026-05-10

### Changed

- **All ModPackQT nodes now use the ModPackQT logo as their icon**
  (the white chart-line mark) instead of generic Font Awesome icons.
  Easier to spot ModPackQT nodes at a glance in any flow.

## [3.3.20] — 2026-05-10

### Fixed

- **Slave-read / slave-write Slave Server dropdown now actually
  finds the slave-server nodes on the canvas.** The picker walks
  three Node-RED APIs (`eachNode`, `eachConfig`, `filterNodes`)
  and dedupes — robust against the API quirks that left the list
  empty even with deployed slave-server nodes present.
- Added a refresh button next to the dropdown so you can reload
  without closing the dialog after dropping a new slave-server.
- Hint text now reports how many slave servers were found, or
  tells you what to do if none.

## [3.3.19] — 2026-05-10

### Changed

- **Master-probe is now standalone — no Target Device picker.** The
  dialog has just three fields: **Name**, **Account Key**, and
  **My Connections**. The Account Key loads your saved connections
  from modpackqt.com directly into the picker; choosing one fills
  in host / port / unit ID behind the scenes. No more probe-config
  middleman, no duplicate field, no "Save first then reopen the
  config to enter your key" detour.

## [3.3.18] — 2026-05-10

### Changed

- **Master-probe and slave-server nodes are now orange** (`#f97316`)
  instead of violet — easier to spot at a glance and visually
  distinct from other ModPackQT nodes on the canvas.

## [3.3.17] — 2026-05-10

### Changed

- **Master-probe dialog: one Account Key, not two.** The duplicate
  Account Key field on master-probe is gone — the key now lives only
  on the Target Device (probe-config) where it always belonged.
- **My Connections picker is now front-and-center on master-probe.**
  Pick a saved connection right from the master-probe dialog —
  no more drilling into the Target Device config to choose host /
  port / unit ID. The picker reuses the Target Device's Account Key.

## [3.3.16] — 2026-05-10

### Added

- **Slave server now has a single output port** that emits one message
  per external Modbus client read/write — `{ direction, type, address,
  values, port, unitId, ts }`. Wire to a Debug node to watch live
  traffic from PLCs / SCADA / HMIs hitting the slave. The output port
  also makes the node render visibly chunkier on the canvas (matching
  the size of other contrib server nodes).
- **"Edit on modpackqt.com" CTAs** in both master-probe and
  slave-server dialogs — quick link to the saved-profile editor on
  the web for changing IP / port / unit ID / register layout without
  leaving Node-RED.

## [3.3.15] — 2026-05-10

### Changed

- **Slave server node renders bigger on the canvas.** Uses
  `align: 'right'` (server-anchored icon, the same convention as
  the MQTT broker / Modbus server nodes from other palettes) and a
  longer descriptive label like `Modbus TCP Slave Server  :1502 #1`,
  which Node-RED auto-widens to fit. Easier to spot at a glance.

## [3.3.14] — 2026-05-10

### Removed

- **Account Key + My Connections gone from `modpackqt-config`** (the
  master-read / master-write config). Those belong only on the
  `modpackqt-probe-config` used by master-probe. Read/write configs
  are now pure manual entry: Name + Target Device + Transport.

## [3.3.13] — 2026-05-10

### Removed

- **Embedded slave server section gone from the master config dialog.**
  Redundant — the standalone `modpackqt-slave-server` canvas node already
  owns its own port, register store, and My Slaves picker. Existing
  legacy slave settings on a config node are preserved on disk so older
  flows won't lose data, just hidden from the editor.

## [3.3.12] — 2026-05-10

### Changed

- **Two separate config node types now.** Master-read and master-write
  use the original `modpackqt-config` (full editable Target Device,
  Transport, embedded slave server) — restored after v3.3.11.
  Master-probe uses a new minimal `modpackqt-probe-config` —
  Name + Account Key + My Connections only, no manual fields. Existing
  flows that wired master-probe to a `modpackqt-config` need to pick
  a probe-config instead (the dropdown will only show valid types).

## [3.3.11] — 2026-05-10

### Changed

- **Config dialog is now picker-only.** Hand-edited Target Device
  (IP / Port / Unit ID), Transport (Mode / Serial / Baud / Parity /
  Timeout) and the collapsible embedded-slave-server section have all
  been removed from the runtime config dialog. Everything is set by
  the **My Connections** picker, which auto-fills hidden fields the
  runtime still uses. Same dialog appears regardless of whether you
  open it from a master-read, master-write, or master-probe node.
  To run an embedded Modbus TCP slave, drop a `modpackqt-slave-server`
  node onto the canvas (it has its own My Slaves picker).

## [3.3.10] — 2026-05-10

### Removed

- **`modpackqt-traffic` node removed.** The matching modpackqt.com web
  console already surfaces a live, decoded view of every Modbus op for
  any device a master or slave node is attached to — the in-flow
  passive sniffer was redundant. Existing flows referencing
  `modpackqt-traffic` will show an "unknown node type" warning and can
  be deleted.

## [3.3.9] — 2026-05-10

### Added

- **Master Write** now has a **Quantity** field — fixes how many registers
  the write covers. Payload arrays longer than this are truncated; shorter
  ones are padded with the last value (or 0 if empty). For FC5 / FC6
  (single-register writes) Quantity is forced to 1.

## [3.3.8] — 2026-05-10

### Changed

- **Plain-language labels in master nodes.** The dropdown that selects a
  config is now labelled **Target Device** (was "Runtime") in master-read,
  master-write, and master-probe, with clearer helper text.
- **Config dialog: "Device" section renamed to "Target Device".**
- **Config dialog: Host field renamed to "IP Address"** with an example
  placeholder (`e.g. 192.168.1.10`) and an inline hint explaining what to
  enter. Port and Unit ID placeholders also clarified.

## [3.3.7] — 2026-05-10

### Added

- **Slave Write** now has a **Quantity** field — fixes how many registers
  the node writes. Payload arrays longer than this are truncated; shorter
  ones are padded with the last value (or 0 if empty).
- **Slave Write** now has an **Update Interval (ms)** field — when set,
  the node re-writes the most recently received `msg.payload` at this
  interval. Useful for keeping a value fresh against external readers.

## [3.3.6] — 2026-05-10

### Added

- **Account Key + My Connections picker on the runtime config node.**
  Paste your ModPackQT tunnel key into the config dialog — the
  **My Connections** dropdown loads your saved devices from
  modpackqt.com and auto-fills Host, Port, and Unit ID. Manual entry
  still works as a fallback.
- Config node credentials are now registered so the admin proxy
  (`/modpackqt/connections`) can look up the key without exposing it
  to the browser.

## [3.3.5] — 2026-05-10

### Changed

- **Port and Unit ID fields removed from slave server dialog.** They are now
  hidden — the only way to set them is by picking from the **My Slaves**
  profile picker. This enforces the cloud-driven config workflow and removes
  manual entry that could conflict with the saved profile.

## [3.3.4] — 2026-05-10

### Changed

- **`modpackqt-slave-server` is now a visible palette node** (was a hidden
  config node). Drop it on the canvas like any other node — it shows up in
  the ModPackQT section of the palette as **modbus slave server**.
- **`slave-read` and `slave-write`** now have a **Slave Server** dropdown
  that lists all `modbus slave server` nodes on the canvas. Select one to
  point at its register store.
- **`modpackqt-slave-probe` removed** from the palette (old node type gone).

## [3.3.3] — 2026-05-10

### Added

- **`modpackqt-slave-server` config node** — a dedicated Modbus TCP slave
  server with its own register store (65 536 per type). This replaces the
  confusing embedded slave hidden inside the runtime config. Drop one per
  fake device; `slave-read` and `slave-write` nodes point at it directly.
  - Account Key + **My Slaves** picker load saved slave configs from
    modpackqt.com (pre-fills port and unit ID).
  - Register layout and limits are managed from the modpackqt.com web
    console — click **Open in ModPackQT Console** inside the config dialog.
  - Registers with the probe runtime so the web console finds it automatically.

### Changed

- **`slave-read` and `slave-write`** now have a **Slave Server** picker
  (type `modpackqt-slave-server`) as their primary config reference. The old
  `server` field (pointing to `modpackqt-config`) is kept as a hidden fallback
  so existing flows with the embedded slave keep working.
- **Embedded slave section removed from runtime config dialog** — the
  `modpackqt-config` dialog is now purely master/transport settings. The
  embedded slave JS stays in the runtime for backward compat with old flows.
- `modpackqt-slave-probe` kept as-is for full backward compatibility.

## [3.3.2] — 2026-05-10

### Changed

- **Account Key moved to probe nodes.** It is now a field on
  `modpackqt-master-probe` and `modpackqt-slave-probe` — the only
  nodes that talk to modpackqt.com. The runtime config (`modpackqt-config`)
  is now purely local device settings with no cloud fields at all.
- **My Profiles picker removed from runtime config.** The slave-probe's
  **My Slaves** picker now reads the key from its own node credential
  (`?probe=<nodeId>`) instead of the runtime config.
- Runtime config dialog is now clean: Name, Device, Transport, and the
  optional embedded slave server section. Nothing cloud-related.

## [3.3.1] — 2026-05-10

### Changed

- **Account Key section is now collapsed by default** in the runtime config
  dialog. It's only relevant for probe-node deep-linking and the optional
  cloud profile picker — master-read / write and slave-read / write users
  never need it. Auto-expands if a key is already saved.

## [3.3.0] — 2026-05-10

### Changed — Runtime config = one device

- **Host / Port / Unit ID now live on the `modpackqt-config` runtime, not on
  each master/probe node.** Master-read, master-write, and master-probe
  nodes simply pick which runtime to talk to — they only specify function
  code, address, quantity, and poll interval. To talk to multiple devices,
  create one runtime config per device.
- The runtime config dialog also gained a **My Profiles** picker (uses your
  Account Key) that auto-fills Host / Port / Unit from a saved
  modpackqt.com profile in one click.
- Edit dialogs are now **Name → Runtime → fields** — no Advanced toggle on
  master nodes anymore.

### Backward compatibility

- Existing flows from v3.2.x keep working unchanged. Master nodes still
  read their own `targetHost` / `targetPort` / `unitId` if set, and only
  fall back to the runtime config's values when those fields are empty
  (the new default for nodes created in v3.3.0+).
- `resolveTarget()` on the runtime config does this merging — exposed for
  any third-party node that wants the same behaviour.

## [3.2.4] — 2026-05-10

### Changed — Probe nodes are now picker-only

- **`modpackqt-master-probe` and `modpackqt-slave-probe` no longer expose
  Target Host / Target Port / Unit ID / Timeout / Bind Host / Listen Port
  fields in the editor.** All of that information comes from the picked
  profile (or saved slave). The probe simply deep-links the web tester
  to that device.
- The fields are still stored on the node (so existing flows keep
  working) — they're just hidden form state filled by the picker.
- Probe edit dialog is now: **Name + Runtime + My Profiles/Slaves**.
  Plus a one-line summary above the "Open in ModPackQT Console" button
  showing the resolved target.

## [3.2.3] — 2026-05-10

### Changed

- **Embedded slave server section is now hidden by default** in the
  runtime config dialog. Only relevant to users of the
  `modpackqt-slave-read` / `-write` nodes — master-only users no longer
  see the "Enable embedded Modbus TCP slave server" checkbox at all.
  Auto-expanded if the slave server is already enabled on the config.

## [3.2.2] — 2026-05-10

### Changed

- `modpackqt-master-read` default **Poll Interval** is now **1000 ms**
  (was 0 / disabled). Existing flows keep their saved value — only newly
  dropped nodes get the new default.

## [3.2.1] — 2026-05-10

### Changed — Picker-first node UI

- **"My Profiles" / "My Slaves" dropdown is now the primary input** on
  master-read, master-write, master-probe and slave-probe. Pick a saved
  device from your modpackqt.com account and the node is configured.
- **Runtime config + manual Host/Port/Unit/Timeout fields are now
  hidden** under a small **▸ Advanced — runtime config & manual entry**
  toggle. Auto-expanded for first-time setup (no runtime configured),
  collapsed once you have a runtime + Account Key set up.
- No behaviour change for existing flows — fields, defaults and
  validation are identical to v3.2.0.

## [3.2.0] — 2026-05-10

### Added — Cloud profile pickers

- **"My Profiles" dropdown** on `modpackqt-master-read`,
  `modpackqt-master-write` and `modpackqt-master-probe`. Picks one of
  your saved Modbus TCP profiles from your modpackqt.com account and
  auto-fills `targetHost`, `targetPort` and `unitId`. No more retyping
  IPs across nodes.
- **"My Slaves" dropdown** on `modpackqt-slave-probe`. Picks one of
  your saved slave configs and auto-fills `bindPort` + `unitId`.
- **Account Key** field on the runtime config (renamed from "API Key").
  Paste your tunnel key from
  [modpackqt.com → Settings → Cloud Gateways](https://modpackqt.com/settings)
  to enable the dropdowns. Same key the Electron gateway uses — no new
  signup, no new mechanism.
- **Hidden admin proxy** (`/modpackqt/connections`, `/modpackqt/slaves`)
  on the Node-RED admin port. Calls modpackqt.com server-side from the
  Node-RED process so the Account Key never reaches the browser.

### Changed

- Manual `targetHost` / `targetPort` / `unitId` fields stay as a fallback
  on every node — existing v3.1.x flows keep working untouched.
- Runtime config `apiKey` credential is unchanged on disk — only the
  label and helper text in the editor were updated.

## [3.1.1] — 2026-05-10

### Fixed

- **"Open in ModPackQT Console" buttons now point at the existing
  `/master` and `/slave` pages** (instead of a non-existent `/console`
  route). Master probe → `https://modpackqt.com/master?probe=…&host=…
  &port=…&unitId=…`, slave probe → `https://modpackqt.com/slave?probe=…
  &port=…&unitId=…`. The pages auto-fill the connection panel from the
  query string, so the button is useful immediately — even before the
  web app wires up to the local probe runtime API.
- Both URLs still carry `probeHost` + `probePort` + `probe` (node id)
  so the web app can attach to the local runtime once that work lands.

## [3.1.0] — 2026-05-10

### Added

- **Two new probe nodes** for live commissioning & analysis:
  - `modpackqt-master-probe` — drop one per Modbus TCP device, click
    **Open in ModPackQT Console** to launch the web tester live-attached
    to that connection.
  - `modpackqt-slave-probe` — drop one per fake slave (port + unit ID),
    click the same button to open the web register editor.
- **Hidden HTTP runtime** (`nodes/lib/probe-runtime.js`) auto-starts on
  `127.0.0.1:8502` when the first probe deploys, auto-stops when the last
  unregisters. Exposes `/api/probes`, `/api/probes/:id/read|write|store`
  for the modpackqt.com web console to drive.
- **Multi-device aggregation** — all probes from this Node-RED instance
  appear together in the web console sidebar; switch between devices
  with one click.
- **Editor admin route** `/modpackqt-probe/info` returns the runtime
  host/port so the "Open in Console" button can deep-link with the
  correct probe ID.

### Notes

- Default bind is loopback-only (`127.0.0.1`) for safety. Override with
  env vars `MODPACKQT_PROBE_HOST` and `MODPACKQT_PROBE_PORT` (e.g.
  `MODPACKQT_PROBE_HOST=0.0.0.0` to allow remote browsers on your LAN).
- Port `8502` falls back to `8503`–`8506` if already in use.
- Probe nodes have **no flow inputs/outputs** — they're commissioning
  tools, not flow nodes. Use the existing `master-read`/`-write`/
  `slave-read`/`-write` nodes to wire Modbus into your flow logic.
- CORS is open to `https://modpackqt.com` plus common localhost dev
  origins.

## [3.0.0] — 2026-05-10

### ⚠️ Breaking changes (positioning, not behavior)

- **Removed the 1,000 ops/day rate limit.** All nodes are now 100% free with
  no usage limits. The `RATE_LIMIT` error code is no longer thrown. If your
  flows previously caught it, you can remove that handler.
- **Removed the `modpackqt · ` brand prefix from node status text.** Status
  text is now clean by default.
- **Repositioned palette as "Modbus commissioning, testing & analysis tools."**
  README, package description and node help text updated. No code changes
  beyond the rate-limit removal.

### Changed

- `modpackqt-config.js` — `checkLimit()` is now a no-op counter. The API key
  field is retained but is reserved for future optional cloud features
  (profile sync, remote console). All Modbus functionality works without a key.
- README — pricing table, "free tier" sections and trial-key call-outs removed.
- DISCLAIMER.md — rate-limit references removed.

### Added

- New keywords: `modbus-tester`, `modbus-commissioning`, `modbus-analyzer`
  for better discoverability.

## [2.1.1] — 2026-05-09

### Changed

- **Promo button copy:** "Free Modbus Tester & Tools" →
  "Premium Advanced Modbus Tester". Tagline updated to match.

## [2.1.0] — 2026-05-09

### Added

- **In-editor promo button** in every node's edit dialog ("Free Modbus Tester &
  Tools" → modpackqt.com). Lets users discover our web-based tester without
  leaving the Node-RED editor.

## [2.0.6] — 2026-05-09

### Changed

- **README:** removed vendor name references (Siemens, Schneider) from
  word-order tips. Wording is now vendor-neutral.

## [2.0.5] — 2026-05-09

### Changed

- **README:** removed the "Why Modbus + bytes are split into two palettes"
  explainer section.

## [2.0.4] — 2026-05-09

### Changed

- **README & package.json:** removed all GitHub repo and email references
  (we don't have a public GitHub org or support inbox set up yet). Bug reports
  and security disclosures now go through `modpackqt.com/contact` and
  `modpackqt.com/security`. The `repository` field was removed from
  package.json since the URL was a placeholder.

## [2.0.3] — 2026-05-09

### Changed

- **README:** removed the external "safe-use checklist" link. Only standard
  MIT "as is" disclaimer remains.

## [2.0.2] — 2026-05-09

### Changed

- **README:** removed broken in-package links (DISCLAIMER.md, LICENSE, etc. —
  npmjs.com couldn't resolve them since the repo isn't public yet). Replaced
  with a standard "as is" disclaimer line and a link to the safe-use checklist
  on modpackqt.com. Files still ship inside the package for reference.

## [2.0.1] — 2026-05-09

### Changed

- **README:** moved the production safety notice from the top of the README to
  the bottom and trimmed it to one line. Full safe-use checklist remains in
  [`DISCLAIMER.md`](./DISCLAIMER.md). No code or behavior changes.

## [2.0.0] — 2026-05-09

### ⚠️ Breaking changes

- **Removed cloud gateway dependency.** Modbus communication now runs entirely
  inside the Node-RED process via [`modbus-serial`](https://www.npmjs.com/package/modbus-serial).
  No companion app required. Existing flows from `1.x` must be re-created — the
  config node schema and node IDs have changed.
- **Slave nodes no longer accept `slaveId`.** The embedded slave server is
  single-unit (`unitID: 1`). Multi-unit support is on the roadmap.
- **Master read/write nodes output raw register arrays only.** Type decoding
  was removed in favour of the new
  [`node-red-contrib-bytes-modpackqt`](https://www.npmjs.com/package/node-red-contrib-bytes-modpackqt)
  palette — install both for the full experience.

### Added

- **Embedded Modbus TCP slave server** with a 65 536-register store per
  register type (coils, discrete inputs, holding, input).
- **`modpackqt-traffic` node** — free passive monitor that emits one message
  per Modbus operation. Filters by direction, kind, function code, target.
- **Local rate limit** (1 000 ops/day per Node-RED instance) for the free tier.
- **Modbus spec quantity validation** — read/write requests exceeding the
  protocol maximums (125 regs read, 123 regs write, 2 000 / 1 968 bits)
  return a clear error before hitting the wire.
- **Strict input validation on master writes** — non-integer or out-of-range
  values now produce a helpful error pointing at the bytes palette instead of
  silently truncating.
- **Traffic events for external slave reads/writes** — Modbus masters writing
  to the embedded slave server now appear in the traffic monitor with
  `via: 'external'`.
- **`DISCLAIMER.md`, `SECURITY.md`, `CONTRIBUTING.md`** documenting safe use,
  vulnerability disclosure, and contribution guidelines.
- **Bundled example flow** (`examples/basic-flow.json`) with six sections
  combining this palette with the bytes palette.

### Changed

- Connection pooling per `(host, port, unitId)` for TCP and `(serial, unitId)`
  for RTU — repeated reads/writes to the same target reuse a single client.
- All master ops are serialised through a single promise queue to prevent
  collisions on shared serial ports.

### Security

- Removed unauthenticated cloud gateway endpoints. Communication is local-only
  unless you explicitly enable the embedded slave server (off by default).

## [1.x] — Legacy

Prior releases used a cloud gateway (`modsim`) for Modbus communication. They
are deprecated; please migrate to 2.x.
