28 min read · Smart factory

A technician opens the screen and sees the number 1798 in register 0. Nothing says it is an oven temperature, that the unit is degrees Celsius, that it must be divided by ten, or whether it was read just now or has been stuck since yesterday. On the other side, a manager wants the same data on the dashboard, the maintenance system and the reporting system at once. The question heard most often is: should we use OPC UA, MQTT or Modbus? The question makes it sound like the three compete. They do not, for the most part, because the three names do jobs at different layers.
This article does not decide who wins. It separates the jobs, using an example that runs on one machine: a simulated Modbus TCP device, a gateway that gives the data meaning in the same way as the OPC UA data model, and a minimal MQTT 3.1.1. Everything runs on localhost, and nothing needs installing except Node 24.
The real problem: data arrives, but nobody knows how far to trust it
The problem in a factory is usually not that data fails to arrive. It is that data arrives without meaning and without status. A value left over from a device that has gone off looks exactly like a normal value, and every message is sent on every cycle even when nothing has changed. Consider three hypothetical situations. None of them is a BT San customer project.
- A hypothetical small factory reads oven temperature over Modbus and sends the bare number to a central system. The communication line drops for ten minutes. The dashboard shows a flat line at 180 degrees. Nobody notices, because the value never looks wrong.
- Three hypothetical production lines from different brands: one sends pressure in bar and another sends it in kPa. The numbers go into the same table. The quality team compares the lines wrongly for months, because no unit travels with the value.
- A hypothetical system sends every variable to the cloud every second, even though most of them do not change. The network package is full, and the important data that really changed is buried under repeats.
These three point to different questions. The first is that a value has no quality status and no time. The second is that a value has no agreed unit and name. The third is that there is no rule for when to report. Each is solved at a different layer.
What the standards documents say, and what we know for sure
This table summarizes only what was read from the actual documentation pages and used as the basis of the example. What was not checked sentence by sentence is stated at the end of the article.
| Topic | What the document says | Effect on our example |
|---|---|---|
| Modbus | Modbus defines its data model as 4 kinds of tables: discrete inputs, coils, input registers and holding registers. A register is 16 bits wide. Modbus TCP uses port 502 and works as client/server, request and response. | The frame carries only register numbers, with no name, unit or time. The gateway has to add them. |
| OPC UA DataValue | A DataValue consists of Value, StatusCode, SourceTimestamp and ServerTimestamp. | Our tag has a value, a quality and a source time along the same lines (only an imitation of the concept, not a running OPC UA). |
| OPC UA deadband | DataChangeFilter has Absolute and Percent deadbands, used to decide whether a change is large enough to report. | We use an absolute deadband in engineering units. |
| OPC UA units and range | AnalogItemType requires the EURange property, while EngineeringUnits is optional and inherited from the parent type. | A tag has a unit and a min..max range, so it can mark Uncertain when a value falls outside the range. |
| OPC UA PubSub | The PubSub transport mapping of OPC UA names UDP, Ethernet and MQTT, and states that DTLS is not supported with broker-based transports. | The names OPC UA and MQTT are not strictly separate. OPC UA can use MQTT as a transport in a defined profile. |
| MQTT retained | The broker sets RETAIN to 0 when forwarding to existing subscribers, stores the retained message to send to new subscribers, and a zero-byte empty payload clears the stored value. | Our tiny broker follows this rule, tested with node --test. |
| MQTT last will | A will message is published when the connection closes abnormally, and is not published when the client sends a normal DISCONNECT. | The demo shows both cases. |
| MQTT topic | A topic filter uses + for one level and # for the rest. A topic starting with $ is not matched by a filter that starts with a wildcard. | topic.ts follows this rule. |
| Mosquitto | Eclipse Mosquitto is an open-source broker that supports MQTT 5.0, 3.1.1 and 3.1. | A real system uses a broker like this, not the tiny broker in the example. |
Cautions about the example: the broker in the example is a tiny one we wrote ourselves. It does only MQTT 3.1.1 QoS 0 and has not passed any standard conformance test. OPC UA does not run a real stack. It only imitates the data-model concept. A real system uses a broker such as Mosquitto or EMQX and an OPC UA stack such as open62541 or node-opcua.
Overview: three layers in one example
The simulated device speaks Modbus TCP on a port on localhost. The gateway reads the values and converts them into tags that carry meaning. It then publishes to a broker, and several receivers subscribe by topic. As a result, the lower layer does not need to know who receives the data, and the upper layer does not need to know which register a value came from.
| File | Role |
|---|---|
| modbus.ts | Simulated Modbus TCP device and holding register reads (function 03), with timeout and exception |
| tags.ts | Converts raw values into real values with unit, time, quality and deadband |
| topic.ts | MQTT topic filter matching |
| mqtt-codec.ts | Encodes and decodes MQTT packets |
| broker.ts | Tiny broker: retained, last will, wildcard |
| mqtt-client.ts | Tiny client for connecting to the broker |
| gateway.ts | Connects all the layers, names topics and builds payloads |
| demo.ts | An 8-part demo |
| pipeline.test.ts | 6 tests using node:test |
| output.txt | The real output of node demo.ts |
The byte-level structure of Modbus frames (MBAP, CRC, RTU) is not repeated in this article. See the sibling example modbus-rtu-tcp-rs485-ethernet, which covers it in depth.
Step 1: the field layer. Modbus gives only register numbers
The simulated device holds three registers. The gateway opens a connection, reads with function 03, and closes it. This is shorter than a real system, which keeps the connection open, and comments in the code mark where it is shortened.
let tid = 0;
// simplified: one TCP connection per read; real clients keep the connection open and reconnect.
export function readHolding(port: number, addr: number, qty: number, timeoutMs = 300): Promise<number[]> {
return new Promise((resolve, reject) => {
const sock = net.connect(port, "127.0.0.1");
const req = Buffer.alloc(12);
req.writeUInt16BE(++tid & 0xffff, 0);
req.writeUInt16BE(6, 4);
req[6] = 1;
req[7] = 3;
req.writeUInt16BE(addr, 8);
req.writeUInt16BE(qty, 10);
const done = (err: Error | null, v?: number[]) => { clearTimeout(t); sock.destroy(); err ? reject(err) : resolve(v!); };
const t = setTimeout(() => done(new Error("timeout")), timeoutMs);
let buf = Buffer.alloc(0);
sock.on("connect", () => sock.write(req));
sock.on("error", (e) => done(e));
sock.on("data", (d) => {
buf = Buffer.concat([buf, d]);
if (buf.length < 9) return;
if (buf[7] & 0x80) return done(new Error(`modbus exception ${buf[8]}`));
if (buf.length < 9 + buf[8]) return;
const out: number[] = [];
for (let i = 0; i < buf[8] / 2; i++) out.push(buf.readUInt16BE(9 + i * 2));
done(null, out);
});
});
}- The result is an array of 16-bit numbers, for example 1798, 448, 1496, with no name, no unit and no time.
- If the device replies with an exception (the high bit of the function code is set), the function throws an error carrying the code.
- If the device stays silent, the function throws a timeout, which matters a lot in step 3.
Step 2: the meaning layer. Numbers become tags
This is the same idea that the OPC UA data model gives a variable: a name, a data type, a unit, a range, a source time and a status. Our example defines three variables in gateway.ts.
export const SITE = "btsan-demo/siteA"; // topic hierarchy: site/area/line/machine/tag
export const TAGS: TagDef[] = [
{ path: "area1/line1/oven1/temperature", register: 0, dataType: "Int16", scale: 0.1, unit: "degC", min: 0, max: 400, deadband: 0.5 },
{ path: "area1/line1/oven1/pressure", register: 1, dataType: "UInt16", scale: 0.01, unit: "bar", min: 0, max: 10, deadband: 0.05 },
{ path: "area1/line1/fan1/speed", register: 2, dataType: "UInt16", scale: 1, unit: "rpm", min: 0, max: 3000, deadband: 20 },
];The decode function turns a raw number into a real value. If the number is a faulty-sensor code (in this example we made up the code 0x8000), the value is null and the quality is Bad. If the value falls outside the configured range, the quality is Uncertain.
export function decode(def: TagDef, raw: number, ts: string): TagValue {
const base = { path: def.path, unit: def.unit, dataType: def.dataType, sourceTimestamp: ts };
if (def.dataType === "Int16" && raw === SENSOR_FAULT_RAW)
return { ...base, value: null, quality: "Bad", reason: "sensor fault code" };
const signed = def.dataType === "Int16" && raw > 0x7fff ? raw - 0x10000 : raw;
const value = Math.round(signed * def.scale * 1e6) / 1e6;
if (value < def.min || value > def.max)
return { ...base, value, quality: "Uncertain", reason: "outside engineering range" };
return { ...base, value, quality: "Good" };
}
// Comms failure: do NOT keep the last value as if it were fresh. Value null + Bad.
export function badComms(def: TagDef, ts: string, reason: string): TagValue {
return { path: def.path, value: null, unit: def.unit, dataType: def.dataType, quality: "Bad", reason, sourceTimestamp: ts };
}- Convert Int16 to a signed number before applying the scale. Otherwise a negative temperature turns into a large number.
- An out-of-range value can still be passed on, but it is labeled Uncertain so the user can decide.
- Bad status uses null and not the previous value, because a stale previous value looks like a real one.
Step 3: one read cycle returns both values and status, even when communication fails
export async function pollTags(port: number, defs: TagDef[], ts: string): Promise<TagValue[]> {
try {
const raw = await readHolding(port, 0, 3, 200);
return defs.map((d) => decode(d, raw[d.register], ts));
} catch (e) {
return defs.map((d) => badComms(d, ts, (e as Error).message)); // value null, never the old value
}
}Modbus itself does not provide this, because the protocol has no concept of quality status. Anyone who keeps the previous value when a read fails gets a flat line, as in the first situation.
Step 4: name the topic, and choose whether to attach metadata
The topic uses the order site/area/line/machine/tag, so receivers can subscribe to a whole group with a wildcard. There are two payload styles to compare. The bare-number style is very short, but the receiver has to know on its own what the value is.
export const topicOf = (v: TagValue) => `${SITE}/${v.path}`;
// With metadata: the receiver needs no register map to understand the message.
export const withMeta = (v: TagValue) =>
JSON.stringify({ v: v.value, u: v.unit, type: v.dataType, q: v.quality, t: v.sourceTimestamp, ...(v.reason ? { why: v.reason } : {}) });
// Without metadata: only a number. Unit, quality and time are lost.
export const bare = (v: TagValue) => String(v.value);
// One publish cycle. db = null means fixed publishing (every tag, every cycle).
export function publishCycle(c: Client, values: TagValue[], db: Deadband | null, retain: boolean) {
let n = 0;
values.forEach((v, i) => {
if (db && !db.shouldPublish(TAGS[i], v)) return;
c.publish(topicOf(v), withMeta(v), retain);
n++;
});
return n;
}The deadband filter is in tags.ts. It reports when the quality changes, or when the value is further from the last reported value than the configured band.
// Report by exception: publish only on quality change or when |change| > deadband.
export class Deadband {
private last = new Map<string, TagValue>();
shouldPublish(def: TagDef, next: TagValue): boolean {
const prev = this.last.get(def.path);
let yes = !prev || prev.quality !== next.quality;
if (!yes && next.value !== null && prev!.value !== null)
yes = Math.abs(next.value - prev!.value) > def.deadband;
if (yes) this.last.set(def.path, next);
return yes;
}
}Compare this with the OPC UA DataChangeFilter, which also has an Absolute deadband. Ours only imitates the concept in a few lines of code. It does not follow the whole specification.
Step 5: the tiny broker. Retained, will and wildcard
The topic filter matcher follows the MQTT rules: + stands for one level, # stands for the rest and must be at the end, and a topic starting with $ is not matched by a leading wildcard.
// MQTT 3.1.1 topic filter matching (spec section 4.7): '+' = one level, '#' = rest (last level only).
export function topicMatches(filter: string, topic: string): boolean {
if (topic.startsWith("$") && (filter.startsWith("#") || filter.startsWith("+"))) return false;
const f = filter.split("/"), t = topic.split("/");
for (let i = 0; i < f.length; i++) {
if (f[i] === "#") return i === f.length - 1;
if (i >= t.length) return false;
if (f[i] !== "+" && f[i] !== t[i]) return false;
}
return f.length === t.length;
}The broker keeps retained messages in a Map. It forwards live messages with RETAIN set to 0, and when someone subscribes later, it sends the retained values that match the filter with RETAIN set to 1.
function route(topic: string, payload: Buffer, retain: boolean) {
if (retain) payload.length === 0 ? retained.delete(topic) : retained.set(topic, payload);
for (const c of clients)
if (c.subs.some((f) => topicMatches(f, topic))) c.sock.write(publishPacket(topic, payload, false)); // live delivery: RETAIN=0
} } else if (p.type === T.PUBLISH) {
if ((p.flags >> 1) & 3) { sock.destroy(); return; } // QoS 1/2 not supported here
const [topic, at] = readStr(p.body, 0);
route(topic, p.body.subarray(at), !!(p.flags & 1));
} else if (p.type === T.SUBSCRIBE) {
const codes: number[] = [];
let at = 2;
while (at < p.body.length) {
let f: string;
[f, at] = readStr(p.body, at);
at += 1; // requested QoS: we always grant 0
me.subs.push(f);
codes.push(0);
}
sock.write(packet(0x90, Buffer.concat([p.body.subarray(0, 2), Buffer.from(codes)])));
for (const [topic, payload] of retained)
if (me.subs.some((f) => topicMatches(f, topic))) sock.write(publishPacket(topic, payload, true));
} else if (p.type === T.PINGREQ) sock.write(Buffer.from([0xd0, 0]));
else if (p.type === T.DISCONNECT) { me.will = undefined; sock.end(); } sock.on("close", () => {
clients.delete(me);
if (me.will) route(me.will.topic, me.will.payload, me.will.retain); // abnormal close: publish the will
});- A normal DISCONNECT discards the will, so nobody sees offline when a client closes politely.
- A drop without DISCONNECT makes the broker publish the will. Subscribers use it to detect whether the gateway has died.
- Publishing an empty retained payload deletes the stored value.
What this example does not have is QoS 1 and 2, sessions, authentication, TLS and keep-alive timeout. A real system cannot do without them. See the section on what to add before real use below.
The real output of the demo
Running node demo.ts gives the results below. Time in the demo is a simulated clock that advances one second at a time, and the simulated plant gives fixed values, so the output is the same on every run.
== 1. Field level: what Modbus gives us (registers, no meaning) ==
registers 0..2 : [ 1798, 448, 1496 ]
nothing in the frame says unit, scale, type, or time
== 2. Gateway: registers become tags (name, type, unit, scale, time, quality) ==
{"path":"area1/line1/oven1/temperature","unit":"degC","dataType":"Int16","sourceTimestamp":"2026-01-01T08:00:00.000Z","value":179.8,"quality":"Good"}
{"path":"area1/line1/oven1/pressure","unit":"bar","dataType":"UInt16","sourceTimestamp":"2026-01-01T08:00:00.000Z","value":4.48,"quality":"Good"}
{"path":"area1/line1/fan1/speed","unit":"rpm","dataType":"UInt16","sourceTimestamp":"2026-01-01T08:00:00.000Z","value":1496,"quality":"Good"}
decode(raw 0x8000): {"path":"area1/line1/oven1/temperature","unit":"degC","dataType":"Int16","sourceTimestamp":"2026-01-01T08:00:00.000Z","value":null,"quality":"Bad","reason":"sensor fault code"}
decode(raw 1500) : {"path":"area1/line1/oven1/pressure","unit":"bar","dataType":"UInt16","sourceTimestamp":"2026-01-01T08:00:00.000Z","value":15,"quality":"Uncertain","reason":"outside engineering range"}
== 3. Payload with vs without metadata ==
topic : btsan-demo/siteA/area1/line1/oven1/temperature
with : {"v":179.8,"u":"degC","type":"Int16","q":"Good","t":"2026-01-01T08:00:00.000Z"} (79 bytes)
without : 179.8 (5 bytes)
== 4. Fixed publishing vs report-by-exception (30 polls x 3 tags) ==
fixed (every poll) polls=30 messages=90 payload bytes=7024
deadband (report by exception) polls=30 messages=6 payload bytes=470
== 5. Topic hierarchy: late subscribers get retained values ==
filter btsan-demo/siteA/area1/line1/+/temperature -> 1 message(s)
retain=1 btsan-demo/siteA/area1/line1/oven1/temperature {"v":183.8,"u":"degC","type":"Int16","q"...
filter btsan-demo/siteA/area1/line1/oven1/# -> 2 message(s)
retain=1 btsan-demo/siteA/area1/line1/oven1/temperature {"v":183.8,"u":"degC","type":"Int16","q"...
retain=1 btsan-demo/siteA/area1/line1/oven1/pressure {"v":4.99,"u":"bar","type":"UInt16","q":...
(retained = last PUBLISHED value, which is the value after the last step, not every poll)
== 6. Comms timeout: value is not held, quality goes Bad ==
device muted -> {"v":null,"u":"degC","type":"Int16","q":"Bad","t":"2026-01-01T08:00:30.000Z","why":"timeout"}
device back -> {"v":184.1,"u":"degC","type":"Int16","q":"Good","t":"2026-01-01T08:00:31.000Z"}
== 7. Last will: gateway dies without saying goodbye ==
monitor sees (retained): online retain=1
clean DISCONNECT -> will dropped, messages on monitor: 1
socket lost -> monitor sees: offline retain=0
broker retained 'status' now: offline
== 8. Who does what ==
| Modbus (TCP) | OPC UA | MQTT
Role | read/write device registers | model + access (client/server; PubSub also exists) | move messages via a broker
Pattern | request/response | request/response, subscriptions; PubSub | publish/subscribe
Name/type/unit | none (register numbers) | in the information model | none (payload is opaque bytes)
Quality + time | none | StatusCode + SourceTimestamp | only if you put them in the payload
Change reporting | poll it yourself | monitored items, deadband filter | publisher decides when to publish
Security | none in classic Modbus TCP | certificates, sign/encrypt modes | TLS + broker auth/ACL
clean exit- Part 1 reads 1798, 448, 1496, which are plain numbers. Nothing says what they mean.
- In part 2 the gateway converts them to 179.8 degC, 4.48 bar and 1496 rpm, with time and Good status. The faulty-sensor code example gives null and Bad. The value 15 bar, which is outside the range 0..10, gives Uncertain.
- In part 3 the payload with metadata is 79 bytes and the bare-number payload is 5 bytes. The price of meaning is message size.
- In part 4, polling 30 cycles of 3 tags and sending every cycle gives 90 messages and 7024 bytes. The deadband version gives 6 messages and 470 bytes. These numbers come from a simulated plant where values wobble slightly within the deadband plus one real change per tag. They are not numbers to predict anyone's factory.
- In part 5, a later subscriber using a machine-level filter immediately receives the latest retained values that were published. With the filter oven1/# it gets two messages, temperature and pressure, and the retained messages carry retain=1.
- In part 6, when the device goes silent, the value is null, the quality is Bad and the reason is timeout. When the device comes back it gives 184.1 Good.
- In part 7, a normal DISCONNECT produces no will. Cutting the socket makes the follower see offline with retain=0 (because it is a live delivery), and the broker keeps the offline status as a retained message.
- Part 8 is a table comparing the roles of the three names.
Role table: who does what
| Modbus (TCP) | OPC UA | MQTT | |
|---|---|---|---|
| Role | Read and write device registers | Data model and access (client/server, and also PubSub) | Move messages through a broker |
| Pattern | Request and response | Request and response, subscriptions and PubSub | publish/subscribe |
| Name, type, unit | None. Only register numbers | Part of the data model | None. The payload is uninterpreted bytes |
| Quality and time | None | StatusCode and SourceTimestamp | Added in the payload by you, nothing else |
| Report on change | You must poll yourself | Monitored items and deadband | The publisher decides |
| Security | None in traditional Modbus TCP | Certificates, sign/encrypt modes | TLS, plus authentication and ACLs at the broker |
Reading the table, you do not have to choose just one. Modbus talks to devices that know nothing beyond numbers, the middle layer adds meaning, and MQTT carries the data to many receivers. Real systems usually chain several layers.
How the tests work
pipeline.test.ts uses node:test, which ships with Node, so nothing needs installing. It has 6 tests. They cover scale and signed types, the deadband, the topic filter, splitting of MQTT packets, a Modbus read that times out and gives Bad, and the broker's retained and will behavior.
test("broker: retained goes to late subscriber, will only on lost connection", async () => {
const b = await startBroker();
try {
const pub = await connect(b.port, "p", { topic: "s/status", payload: "offline", retain: true });
pub.publish("s/a/temp", "1", true);
pub.publish("s/a/temp", "2", true); // replaces the retained value
await sleep(50); // publisher and subscriber use different sockets: let the broker see both publishes first
const late = await connect(b.port, "l");
const got: string[] = [];
late.onMessage((m) => got.push(`${m.payload}:${m.retain}`));
await late.subscribe("s/+/temp");
await sleep(50);
assert.deepEqual(got, ["2:true"]);
pub.publish("s/a/temp", "", true); // empty retained payload clears it
await sleep(50);
assert.equal(b.retained.has("s/a/temp"), false);
const mon = await connect(b.port, "m");
const st: string[] = [];
mon.onMessage((m) => st.push(m.payload));
await mon.subscribe("s/status");
pub.kill();
await sleep(100);
assert.deepEqual(st, ["offline"]);
const polite = await connect(b.port, "q", { topic: "s/status", payload: "bye", retain: false });
await polite.disconnect();
await sleep(50);
assert.deepEqual(st, ["offline"]); // no will after clean DISCONNECT
} finally { await b.close(); }
});This test failed the first time because the publisher and the subscriber used different sockets. The broker could see the subscription before the publish had fully arrived, so the test has to wait until the broker has taken the whole publish. The lesson is that testing a messaging system also means thinking about the order of connections.
You can run it yourself from the folder examples/opc-ua-mqtt-modbus-roles/ with node demo.ts and node --test pipeline.test.ts. You need Node 22.6 or later, and no npm install.
What to add before real use
- OPC UA security: use the sign or sign and encrypt security mode. Manage client and server certificates so it is clear who trusts whom. Do not let anonymous users reach values that can be written.
- MQTT: use TLS, authenticate clients, set per-topic permissions at the broker, and close unencrypted connections from outside the factory network.
- Modbus has no authentication mechanism in traditional Modbus TCP, so do not expose it to the internet or the office network. Keep it in the OT network and separate it with a firewall or gateway (see ot-it-network-segmentation).
- Multiple brokers in HA when the data is important, because a single broker is a point of failure.
- Store-and-forward at the gateway. When the broker or the network is down, the data in between needs temporary storage and to be sent afterward. Our example has none.
- Synchronized clocks. Use NTP or PTP depending on the accuracy you need, because a drifting SourceTimestamp puts events in the wrong order (see factory-timestamps-clock-data-gaps).
- The limits of the deadband: set too wide, it misses important changes, and values must also be sent periodically to prove the gateway is still alive.
What kinds of business can use this
- A factory with PLCs from several brands that wants to gather data in one place: use a gateway to give a common name, unit and time before forwarding, instead of making every system know the registers of every machine (hypothetical, not a real project).
- A business collecting data from old machines that speak only Modbus: add a gateway that labels quality and sends only what changed, to cut repeated data and to see when a device goes silent. See retrofit-old-machine-data-collection.
- A team that must send data to a dashboard, a maintenance system and a historian: use MQTT so several receivers subscribe by topic group, without adding load to the machine.
Common mistakes
- Keeping the previous value when a read fails, so the dashboard goes flat and looks normal. It should be null with Bad status.
- Sending bare numbers without unit and time. Receivers guess, and each guesses wrong in a different way.
- Naming topics after the file or the program that produces the value instead of the location in the factory, which makes group subscription impossible.
- Exposing a Modbus port or an unencrypted broker outside the factory network.
- Setting the same deadband for every variable, although each has a different unit and sensitivity.
- Treating OPC UA and MQTT as a choice of one or the other, although OPC UA PubSub can use MQTT as a transport.
Checklist before you start
- Make a variable list: source, name, type, unit, scale, range, and owner.
- Decide which layer gives meaning and status: the gateway, the OPC UA server, or the device itself.
- Define the topic naming plan site/area/line/machine/tag and the names every receiver shares.
- Set a deadband per variable, and a periodic send interval to confirm the source is alive.
- Define the Good, Uncertain and Bad states for when communication fails and when a value falls out of range.
- Set the security mode, certificates, TLS, per-topic permissions and network boundaries before turning it on.
- Plan for HA brokers, store-and-forward and clock synchronization.
- Test communication failure, a dead gateway and a broker restart before release.
Cautions about the example: all the data is made-up numbers, not a real factory. The message counts of 90 and 6 come from a configured simulated plant, not from measuring anyone's system. This example is learning material, not code for a production line. Before real use, test with the actual devices, firmware versions and broker you will use.
References
- OASIS — MQTT Version 3.1.1 (retained, will, topic filters) (accessed 2026-11-21)
- OPC Foundation — OPC UA (accessed 2026-11-21)
- OPC UA Part 14 — PubSub transport mappings (accessed 2026-11-21)
- OPC UA Part 4 — DataValue (accessed 2026-11-21)
- OPC UA Part 4 — DataChangeFilter and deadband (accessed 2026-11-21)
- OPC UA Part 8 — AnalogItemType (EURange, EngineeringUnits) (accessed 2026-11-21)
- Wikipedia — Modbus (data model, port 502, client/server) (accessed 2026-11-21)
- Eclipse Mosquitto — MQTT broker (accessed 2026-11-21)




