# ⚠️ Industrial use disclaimer

This software talks to industrial control systems (PLCs, RTUs, drives, meters).
A Modbus write can move physical equipment — valves, motors, heaters, pumps —
and a wrong write can damage equipment, ruin a batch, or cause a safety incident.

**Read this before deploying in production.**

## You are responsible for

- **What your flows do.** Node-RED, this palette, and the bytes palette only
  carry your bytes — they don't know whether `setpoint=200` means 200 °C or
  200 RPM, or whether opening valve 7 floods the building.
- **Testing.** Always test against the embedded slave server (or a simulator
  like ModPackQT's own Modbus simulator) before pointing at a live device.
- **Staging.** Have an air-gapped or read-only staging environment between
  development and production. Never deploy a flow change directly to a system
  controlling real assets.
- **Backups.** Keep your Node-RED flows in version control. A flow recovery
  is faster than a hardware recovery.
- **Compliance.** If your installation is subject to safety regulations
  (IEC 61508, ISO 13849, OSHA, FDA 21 CFR Part 11, etc.), this software is
  **not certified** for safety-instrumented systems (SIS). Use it for
  monitoring, supervisory control, and data acquisition — not for safety
  interlocks.

## Recommended safe-use workflow

1. **Always start with reads.** Get the values flowing in before you wire any
   write back out.
2. **Use the embedded slave server as a sandbox.** Wire your flows to write
   into the local slave first; verify the bytes are correct with `decode-…`
   nodes; only then point them at a real device.
3. **Add the `modpackqt-traffic` node** (free) to every config — it logs every
   read and write with timing, value, and error info. If something goes wrong,
   the trail is right there.
4. **Test the worst case in the bytes palette.** Round-trip your values
   through `encode-… → decode-…` to confirm the byte/word order matches the
   target device. Wrong endianness on a setpoint write is a common cause of
   damage.
5. **Wrap critical writes in a guard.** A `function` node that rejects values
   outside a safe range, or a `switch` node that blocks writes during
   maintenance windows, costs you 30 seconds and saves you a service call.
6. **Pin a major version in production** (`"node-red-contrib-modbus-modpackqt": "^2.0.0"`).
   We follow semver — patch and minor releases are backward compatible; major
   releases may not be.

## What this software does NOT promise

- It is **not** safety-rated.
- It is **not** suitable for safety-instrumented systems (SIS / SIL-rated loops).
- It is **not** a substitute for a real PLC's hardwired interlocks.
- It does **not** guarantee delivery, ordering, or completeness of writes
  beyond what the underlying `modbus-serial` library and the network/serial
  link provide.

## Reporting issues

- **Bugs / unexpected behavior:** open an issue at
  <https://modpackqt.com/contact> (or the package's GitHub repo when listed).
- **Security issues:** email **support@modpackqt.com** privately. Please
  follow responsible disclosure — give us 90 days to fix before publishing.
- **Paid customers:** include your customer ID for priority response.

## Updates

This package is distributed via npm. **Updates are never automatic.** Node-RED
will show "update available" in the palette manager when a new version is
published; you choose when to upgrade.

We strongly recommend subscribing to release notifications:

- **GitHub:** watch the repository (when listed in `package.json`)
- **npm:** `npm view node-red-contrib-modbus-modpackqt versions`
- **Email** (paid customers): security and breaking-change notices go to your
  registered address.

## Licence

This software is provided under the MIT License — see `LICENSE`. The
limitation of liability in the LICENSE applies to all users. See
<https://modpackqt.com/nodered/terms> for the full terms.

---

If any of the above is unacceptable for your project, **do not use this
software in production**. There is no shame in that — Modbus is a mature
protocol with many alternative implementations, including hardware-based
gateways with safety certifications.
