{"title":"Model IoT Tests Across Device, Edge, and Cloud","excerpt":"An IoT test that polls the cloud for 'locked' passes on a jammed bolt, an open door and an offline hub. This guide maps the seven boundaries a lock command crosses, shows from the MQTT, CoAP, WoT and Matter sources how little each acknowledgement proves, and traces four sessions through a real broker.","canonicalUrl":"https://automationtester.in/blog/automation-tutorials/model-iot-tests-device-edge-cloud","category":{"name":"Automation Tutorials","slug":"automation-tutorials"},"tags":["iot-testing","mqtt","matter","test-architecture","smart-home","evidence"],"author":{"name":"Shashank Rawlani","url":"https://shashank.rawlani.com","linkedin":"https://www.linkedin.com/in/shashankrawlani/"},"datePublished":"2026-11-29T13:30:00.000Z","dateModified":"2026-11-29T13:30:00.000Z","coverImage":{"url":"https://ik.imagekit.io/automationtester/automationtester-in/blog/covers/v3/model-iot-tests-device-edge-cloud.webp","alt":"A green line leaves a phone panel through four dashed boundaries, each with a node whose arc loops back one hop. It then splits: up to a bolt beside a closed door frame, and in orange to a bolt beside a door swung open, crossed out."},"contentHtml":"<div class=\"callout callout-info\"><strong>Quick answer:</strong> An IoT command crosses at least seven boundaries: the controller app, the cloud API, the broker, the gateway or hub, the device firmware, the physical mechanism, and the identity layer that decides who may ask. Each acknowledgement proves only its own hop. An MQTT PUBACK means the broker took ownership, a CoAP ACK means a message arrived, and neither says the bolt moved. Write each boundary's evidence under one correlation id, report the highest rung you actually observed, and put each check at the cheapest boundary that can see the risk: payload contracts in unit tests, stale and undeliverable commands at the broker, jams and door position at the device.</div>\n\n<p>The end-to-end test taps \"Lock\" in the app, polls the cloud API until the lock's state reads <code>locked</code>, and passes. It passes when the bolt is thrown into an open doorway. It passes when the lock's own state is a cached copy from before the hub went offline. One version even passes when no hub is subscribed at all, because the broker accepted the command and the cloud service wrote <code>locked</code> optimistically on that acceptance.</p>\n\n<p>None of those are flaky tests. Each test asserted on the evidence of one boundary and reported it as the outcome at another. This article builds the map that stops that: which boundary can prove what, how to trace a single command across all of them, and where each check costs least.</p>\n\n<p>This is part 1 of an eight-part series on IoT protocol quality. Later parts go deep on one boundary each: MQTT delivery and sessions, Matter commissioning, CoAP on constrained links, network fault injection, device identity and credential rotation, offline event ordering, and fleet rollout signals. This part is the map they share, worked through on one smart lock.</p>\n\n<div class=\"callout callout-warning\"><strong>Versions checked on 2026-11-23:</strong> Eclipse Mosquitto 2.1.4 (the <code>eclipse-mosquitto:2</code> Docker image; v2.1.4 is the newest upstream tag, dated 17 November 2026), MQTT.js 5.16.1, Node.js 26.12.1, and the Matter SDK (<code>project-chip/connectedhomeip</code>) at v1.6.1.0. The lab ran on macOS against a broker in Docker. The broker and the MQTT traffic are real; the lock behind the hub is simulated, so it proves nothing about motors or radios.</div>\n\n<h2 id=\"iotm-seven-boundaries\">Seven places a lock command can stop</h2>\n\n<p>Follow one tap through the system. The worked example is \"lock the front door\" from a phone, through a cloud service, an MQTT broker and a home hub, to a lock on a local radio link.</p>\n\n<table>\n<thead><tr><th>Boundary</th><th>What its success proves</th><th>What it cannot see</th></tr></thead>\n<tbody>\n<tr><td>Controller app</td><td>The user's intent was captured and sent</td><td>Everything after the HTTP response</td></tr>\n<tr><td>Cloud API</td><td>The command was authorised and queued</td><td>Whether any hub is listening</td></tr>\n<tr><td>Broker</td><td>The broker took ownership of the message</td><td>Whether a subscriber received it, or acted</td></tr>\n<tr><td>Hub or gateway</td><td>The command reached the home and was translated for the local radio</td><td>Whether the lock executed it</td></tr>\n<tr><td>Device firmware</td><td>The lock ran the command and reports a state</td><td>Whether the door was closed when the bolt moved</td></tr>\n<tr><td>Physical state</td><td>Bolt position and door position, from sensors</td><td>Who asked, and whether they were allowed to</td></tr>\n<tr><td>Identity</td><td>The requester and the device are who they claim, with the right permissions</td><td>Any of the above</td></tr>\n</tbody>\n</table>\n\n<p>Identity cuts across the others. Proving the bolt moved does not prove the right account moved it; part 6 covers that boundary.</p>\n\n<h2 id=\"iotm-acks-prove-one-hop\">Every acknowledgement is local to one hop</h2>\n\n<p><strong>MQTT.</strong> In MQTT 5.0, the receiver of a QoS 1 PUBLISH sends PUBACK \"having accepted ownership of the Application Message\", and a non-normative note in the same section says the receiver \"does not need to complete delivery of the Application Message before sending the PUBACK\". When the publisher is the cloud service, the receiver is the broker. The PUBACK ends the cloud's responsibility and starts the broker's, and it says nothing at all about the hub. MQTT 5 does give the broker a way to say so: PUBACK reason code <code>0x10</code>, \"No matching subscribers\", which a server MAY send instead of <code>0x00</code> when it knows nobody will receive the message. It is optional, and it only reflects what the broker knows: an offline device holding a persistent session still counts as a subscriber, and in the lab Mosquitto answered <code>0x00</code> for it and queued the message.</p>\n\n<p><strong>CoAP.</strong> RFC 7252 is blunter. An Acknowledgement \"acknowledges that a specific Confirmable message arrived\", and \"by itself, an Acknowledgement message does not indicate success or failure of any request encapsulated in the Confirmable message\". A response piggybacked on that ACK carries the answer. An empty ACK means the bytes arrived.</p>\n\n<p><strong>Web of Things.</strong> If your devices publish W3C Thing Descriptions, look at the <code>synchronous</code> term on each action. TD 1.1 defines a synchronous action as one whose response \"contains all the information about the result of the action\", and says that when the keyword is missing, \"no claim on the synchronicity of the action can be made\". An action response from a Thing that does not declare <code>\"synchronous\": true</code> is a receipt, not a result. The same table defaults <code>idempotent</code> to <code>false</code>, which matters as soon as anything retries.</p>\n\n<p><strong>Shadows and twins.</strong> The cloud's view of the lock is often a copy. WoT Architecture 1.1 defines a Shadow as a virtual Thing that \"maintains a copy of the state\" of a device and \"aims to achieve eventual consistency\" with it, and says that for consumers an Intermediary \"may be indistinguishable from a Thing\". A test that polls the cloud for <code>locked</code> may be reading a value written before the device was asked. Find out which store the state API reads from before treating it as evidence of anything downstream.</p>\n\n<h2 id=\"iotm-what-only-the-device-knows\">What only the device can report</h2>\n\n<p>The Matter Door Lock cluster shows how much state lives below the hub. In the Matter SDK's cluster definition at v1.6.1.0, <code>LockState</code> is nullable and takes four values: <code>NotFullyLocked</code>, <code>Locked</code>, <code>Unlocked</code> and <code>Unlatched</code>. <code>NotFullyLocked</code> is the jam: the motor ran and the bolt did not seat. A test that treats \"not <code>Unlocked</code>\" as locked passes on a jammed lock.</p>\n\n<p>Door position is a separate, optional attribute, <code>DoorState</code>, with values including <code>DoorOpen</code>, <code>DoorClosed</code>, <code>DoorJammed</code>, <code>DoorForcedOpen</code> and <code>DoorAjar</code>. A bolt can report <code>Locked</code> while the door reports <code>DoorOpen</code>. If the lock has no door sensor, the attribute is absent, and \"the door is secure\" is a claim no boundary in your system can prove. Write that down as untested instead of letting <code>Locked</code> stand in for it.</p>\n\n<p>The device also enforces timing that nothing upstream does. The same cluster definition marks <code>LockDoor</code> and <code>UnlockDoor</code> as <code>mustUseTimedInvoke</code>: the controller first sends a Timed Request carrying a timeout, then the invoke. In the SDK's <code>TimedHandler</code>, an invoke arriving after that limit is answered with a <code>Timeout</code> status rather than executed. That is a device-boundary behaviour with a test of its own: delay the invoke past the window in your controller harness and assert the refusal, because a cloud-side test cannot produce or observe it.</p>\n\n<h2 id=\"iotm-correlation-lab\">Tracing one command by correlation id</h2>\n\n<p>The lab sends the lock command four times through a real Mosquitto broker. MQTT 5's request/response properties carry the trace: the cloud publishes with a <code>Response Topic</code> and <code>Correlation Data</code>, and the specification's request/response section says the responder copies the Correlation Data into its reply. Every boundary writes a record keyed by that value, and the verdict reads only those records.</p>\n\n<p>Start a throwaway broker and install the client:</p>\n\n<pre class=\"language-bash\"><code class=\"language-bash\">docker run -d --rm --name mqtt-lab -p 127.0.0.1:18831:1883 eclipse-mosquitto:2 \\\n  sh -c 'printf \"listener 1883\\nallow_anonymous true\\n\" &gt; /mosquitto/config/lab.conf &amp;&amp; exec mosquitto -c /mosquitto/config/lab.conf'\nnpm init -y\nnpm i mqtt@5.16.1</code></pre>\n\n<p>The hub subscribes to its command topic and answers with the lock's reported bolt and door state. The lock is a lookup table here, using Matter's value names, so each scenario can put a different physical outcome behind the same command:</p>\n\n<pre class=\"language-javascript\"><code class=\"language-javascript\">// One \"lock the front door\" command, traced across cloud, broker, hub and a\n// simulated lock by its correlation id. Each boundary writes its own record;\n// the verdict is the highest rung with evidence, never the app's assumption.\nimport mqtt from \"mqtt\";\nimport { randomUUID } from \"node:crypto\";\n\nconst URL = \"mqtt://127.0.0.1:18831\";\nconst sleep = (ms) =&gt; new Promise((r) =&gt; setTimeout(r, ms));\nconst v5 = (clientId, extra = {}) =&gt; ({ clientId, protocolVersion: 5, reconnectPeriod: 0, ...extra });\n\n// The simulated lock. bolt mirrors Matter's LockState values, door its DoorState.\nconst DEVICES = {\n  healthy: { bolt: \"Locked\", door: \"DoorClosed\" },\n  \"door left open\": { bolt: \"Locked\", door: \"DoorOpen\" },\n  \"bolt jammed\": { bolt: \"NotFullyLocked\", door: \"DoorClosed\" },\n};\n\nasync function run(scenario, { hubOnline = true } = {}) {\n  const site = scenario.replace(/\\W+/g, \"-\");\n  const cmdTopic = `site/${site}/hub/cmd`;\n  const replyTopic = `site/${site}/cloud/reply`;\n  const evidence = [];\n  const corr = randomUUID();\n\n  let hub;\n  if (hubOnline) {\n    hub = await mqtt.connectAsync(URL, v5(`hub-${site}`));\n    await hub.subscribeAsync(cmdTopic, { qos: 1 });\n    hub.on(\"message\", (_t, payload, pk) =&gt; {\n      const id = pk.properties.correlationData.toString();\n      evidence.push({ rung: \"hub received\", id });\n      const state = DEVICES[scenario] ?? DEVICES.healthy;\n      hub.publish(pk.properties.responseTopic, JSON.stringify(state), {\n        qos: 1, properties: { correlationData: pk.properties.correlationData },\n      });\n    });\n  }\n\n  const cloud = await mqtt.connectAsync(URL, v5(`cloud-${site}`));\n  let reason;\n  cloud.on(\"packetreceive\", (pk) =&gt; { if (pk.cmd === \"puback\" &amp;&amp; reason === undefined) reason = pk.reasonCode ?? 0; });\n  await cloud.subscribeAsync(replyTopic, { qos: 1 });\n  cloud.on(\"message\", (_t, payload, pk) =&gt; {\n    const { bolt, door } = JSON.parse(payload);\n    evidence.push({ rung: \"lock reported\", id: pk.properties.correlationData.toString(), bolt });\n    evidence.push({ rung: \"door sensor\", id: pk.properties.correlationData.toString(), door });\n  });\n\n  evidence.push({ rung: \"intent\", id: corr });\n  await cloud.publishAsync(cmdTopic, JSON.stringify({ action: \"lock\" }), {\n    qos: 1,\n    properties: { responseTopic: replyTopic, correlationData: Buffer.from(corr), messageExpiryInterval: 10 },\n  });\n  evidence.push({ rung: \"broker accepted\", id: corr, reason });\n  await sleep(500);\n\n  console.log(`\\n== ${scenario}  correlation ${corr.slice(0, 8)}`);\n  for (const e of evidence.filter((e) =&gt; e.id === corr)) {\n    const { id, ...rest } = e;\n    console.log(\"  \" + JSON.stringify(rest));\n  }\n  console.log(\"  verdict: \" + verdict(evidence.filter((e) =&gt; e.id === corr)));\n  await cloud.endAsync();\n  if (hub) await hub.endAsync();\n}\n\nfunction verdict(ev) {\n  const at = (rung) =&gt; ev.find((e) =&gt; e.rung === rung);\n  const accepted = at(\"broker accepted\");\n  if (!accepted) return \"UNKNOWN: broker never acknowledged\";\n  if (accepted.reason === 0x10) return \"NOT DELIVERED: broker accepted with 0x10, no matching subscriber\";\n  if (!at(\"hub received\")) return \"UNKNOWN: accepted by broker, no hub record\";\n  const bolt = at(\"lock reported\")?.bolt;\n  const door = at(\"door sensor\")?.door;\n  if (bolt !== \"Locked\") return `FAILED: lock reports ${bolt ?? \"nothing\"}`;\n  if (door !== \"DoorClosed\") return `FAILED: bolt thrown but door reports ${door ?? \"nothing\"}`;\n  return \"LOCKED: bolt and door sensor agree\";\n}\n\nawait run(\"healthy\");\nawait run(\"door left open\");\nawait run(\"bolt jammed\");\nawait run(\"hub offline\", { hubOnline: false });</code></pre>\n\n<p>Two details matter more than the rest. <code>protocolVersion: 5</code> is set explicitly because the MQTT.js default is <code>4</code>, which is MQTT 3.1.1 and has no Correlation Data, no Response Topic and no PUBACK reason codes. And the broker's reason code is read from the raw <code>puback</code> packet, because <code>publishAsync</code> resolves without it: an earlier version of this lab read it from the resolved value and reported <code>0</code> for every publish, while the broker's own log showed it had sent <code>rc16</code>.</p>\n\n<pre class=\"language-bash\"><code class=\"language-bash\">node ladder.mjs</code></pre>\n\n<pre class=\"language-text\"><code class=\"language-text\">== healthy  correlation 4710cb7d\n  {\"rung\":\"intent\"}\n  {\"rung\":\"broker accepted\",\"reason\":0}\n  {\"rung\":\"hub received\"}\n  {\"rung\":\"lock reported\",\"bolt\":\"Locked\"}\n  {\"rung\":\"door sensor\",\"door\":\"DoorClosed\"}\n  verdict: LOCKED: bolt and door sensor agree\n\n== door left open  correlation 3d86c694\n  {\"rung\":\"intent\"}\n  {\"rung\":\"broker accepted\",\"reason\":0}\n  {\"rung\":\"hub received\"}\n  {\"rung\":\"lock reported\",\"bolt\":\"Locked\"}\n  {\"rung\":\"door sensor\",\"door\":\"DoorOpen\"}\n  verdict: FAILED: bolt thrown but door reports DoorOpen\n\n== bolt jammed  correlation fb917076\n  {\"rung\":\"intent\"}\n  {\"rung\":\"broker accepted\",\"reason\":0}\n  {\"rung\":\"hub received\"}\n  {\"rung\":\"lock reported\",\"bolt\":\"NotFullyLocked\"}\n  {\"rung\":\"door sensor\",\"door\":\"DoorClosed\"}\n  verdict: FAILED: lock reports NotFullyLocked\n\n== hub offline  correlation ba20c549\n  {\"rung\":\"intent\"}\n  {\"rung\":\"broker accepted\",\"reason\":16}\n  verdict: NOT DELIVERED: broker accepted with 0x10, no matching subscriber</code></pre>\n\n<p><strong>Three of the four sessions look identical upstream.</strong> Intent, a <code>0x00</code> PUBACK and a hub record appear for the healthy lock, the open door and the jam alike. A test that stops at the hub passes all three. Only the last two rungs separate them, and they separate them for different reasons: the jam fails on the bolt, the open door on the sensor.</p>\n\n<p><strong>The offline hub fails early and cheaply.</strong> With nothing subscribed, Mosquitto 2.1.4 answered <code>0x10</code>, and the verdict says the command was never delivered instead of waiting for a reply that cannot come. Without the reason code the test would time out and report \"unknown\", which is honest but slower and less specific.</p>\n\n<p><strong>Join by id, not by order.</strong> In one of the lab's runs, the hub's record landed before the cloud's PUBACK for the same command. The broker had forwarded the message before its acknowledgement reached the publisher, and nothing in the specification orders those two packets. A verdict that reads the log top to bottom and expects the rungs in order will misjudge that session. Key every record by correlation id and let the rungs arrive in any order.</p>\n\n<p>One limit of this lab: the bolt and door values both arrive in the hub's reply, from the same simulated device. On real hardware, read door position from the door sensor's own report and record which device produced it, so that a lock reporting both values about itself does not count as independent confirmation.</p>\n\n<h2 id=\"iotm-stale-commands\">Stale commands are a broker-boundary check</h2>\n\n<p>A lock command that waits in a queue is a different command when it finally runs. \"Lock\" sent at 22:00 and delivered at 07:00, after the owner has unlocked the door and walked out to collect a parcel, locks them out. MQTT 5 gives each message a Message Expiry Interval, and the specification is precise about two things: if the interval passes before the server has \"managed to start onward delivery to a matching subscriber\", the server MUST delete that copy, and when it does forward the message it MUST set the interval to the received value \"minus the time that the Application Message has been waiting in the Server\".</p>\n\n<p>Both behaviours can be tested at the broker in seconds, with no hub and no device. Here the lock holds a persistent session and loses power; three commands queue for it with expiry 3 seconds, 30 seconds and none:</p>\n\n<pre class=\"language-javascript\"><code class=\"language-javascript\">// A lock loses power with a persistent session; three commands queue for it,\n// with expiry 3 s, 30 s and none. It comes back 5 s later.\nimport mqtt from \"mqtt\";\n\nconst URL = \"mqtt://127.0.0.1:18831\";\nconst sleep = (ms) =&gt; new Promise((r) =&gt; setTimeout(r, ms));\nconst v5 = (clientId, extra = {}) =&gt; ({ clientId, protocolVersion: 5, reconnectPeriod: 0, ...extra });\nconst persistent = { clean: false, properties: { sessionExpiryInterval: 3600 } };\nconst cloud = await mqtt.connectAsync(URL, v5(\"cloud\"));\n\nconst t = \"site/42/lock/front/cmd/offline\";\nconst lock = await mqtt.connectAsync(URL, v5(\"lock-offline\", persistent));\nawait lock.subscribeAsync(t, { qos: 1 });\nlock.stream.destroy(); // power cut: no DISCONNECT, session stays\nawait sleep(300);\nawait cloud.publishAsync(t, JSON.stringify({ commandId: \"c-1\", ttl: 3 }), { qos: 1, properties: { messageExpiryInterval: 3 } });\nawait cloud.publishAsync(t, JSON.stringify({ commandId: \"c-2\", ttl: 30 }), { qos: 1, properties: { messageExpiryInterval: 30 } });\nawait cloud.publishAsync(t, JSON.stringify({ commandId: \"c-3\", ttl: null }), { qos: 1 });\nawait sleep(5000);\nconst back = mqtt.connect(URL, v5(\"lock-offline\", persistent));\nconst got = [];\nback.on(\"message\", (_t, p, pk) =&gt; got.push(`${JSON.parse(p).commandId} expiry=${pk.properties?.messageExpiryInterval ?? \"none\"}`));\nawait sleep(1000);\nconsole.log(`Back after 5 s offline, received: ${got.join(\", \") || \"nothing\"}`);\nawait back.endAsync();\nawait cloud.endAsync();</code></pre>\n\n<pre class=\"language-text\"><code class=\"language-text\">Back after 5 s offline, received: c-2 expiry=24, c-3 expiry=none</code></pre>\n\n<p>The 3-second command was dropped. The 30-second one arrived with 24 seconds left, so the device can see how stale it is. The command with no expiry arrived as if it had just been sent, and it would have done the same after nine hours. Whoever publishes commands should set an expiry on every one, and this is the test that holds them to it: assert that a command older than its interval never reaches the subscriber, and that a forwarded command carries a reduced interval.</p>\n\n<h2 id=\"iotm-cheapest-boundary\">Putting each check where it is cheapest</h2>\n\n<p>The cheapest boundary for a risk is the lowest-cost one that can still observe it. Putting the check further out adds hardware and flake for no extra evidence. Putting it further in tests a component that cannot see the risk at all.</p>\n\n<table>\n<thead><tr><th>Risk</th><th>Cheapest boundary that sees it</th><th>Why not elsewhere</th></tr></thead>\n<tbody>\n<tr><td>Malformed or incompatible command payload</td><td>Unit tests in the cloud service and the hub, against one shared JSON Schema</td><td>A device test finds it hours later, behind a radio</td></tr>\n<tr><td>Command accepted with nobody listening</td><td>Broker integration test reading the PUBACK reason code</td><td>The cloud API cannot see subscribers, and a device test never starts when no device is listening</td></tr>\n<tr><td>Stale command executed late</td><td>Broker integration test with a persistent session and expiry</td><td>Hardware adds nothing to a timing rule the broker enforces</td></tr>\n<tr><td>Duplicate delivery after a reconnect</td><td>Hub or device consumer test against a real broker</td><td>The duplicate only exists after a session resumes; mocks never resume one</td></tr>\n<tr><td>Late timed invoke executed</td><td>Controller harness against a device or the SDK's example lock app</td><td>The time window is enforced on the device</td></tr>\n<tr><td>Jammed bolt reported as locked</td><td>Device test reading <code>LockState</code></td><td>Upstream, \"not unlocked\" and \"locked\" look alike</td></tr>\n<tr><td>Bolt thrown with the door open</td><td>Hardware rig with a real door sensor</td><td>No software layer can observe a door</td></tr>\n</tbody>\n</table>\n\n<p>The last row is the expensive one, and it should be. A rig with a door, a sensor and a lock is the only thing that proves the physical claim, so keep it for the few scenarios that need it and run everything above it on every commit. If you are tempted to move a row upward because hardware is slow, write the row as NOT TESTED at that level instead. A green check on a simulated door is the failure from the opening paragraph.</p>\n\n<h2 id=\"iotm-costs\">What this model costs</h2>\n\n<p>Correlation ids cost a field on every message and a discipline at every boundary. A hub that drops the id when it translates to the local radio breaks the chain silently, so assert at each boundary that the id it emits equals the id it received.</p>\n\n<p>Not every device needs the full ladder. A temperature sensor that only publishes telemetry has no command path; its risky boundaries are firmware, transport and time, which part 7 covers. Build the ladder for things that act on the world: locks, valves, relays, anything with a motor.</p>\n\n<h2 id=\"iotm-questions\">Questions about modelling IoT tests</h2>\n\n<h3 id=\"iotm-faq-shadow-assertions\">Can a device shadow be the assertion target?</h3>\n<p>For the question \"what does the cloud believe\", yes, and that is a fair thing to test. For \"what is the lock doing\", only if you can show the shadow was updated by a report from the device after the command, which means comparing the report's correlation id or timestamp with the command's. A shadow updated by the cloud's own write proves only that the cloud wrote.</p>\n\n<h3 id=\"iotm-faq-real-locks-in-ci\">Should CI run against real locks?</h3>\n<p>A small number of scenarios, yes: the ones in the bottom rows of the placement table. Everything else runs faster and more reliably against a real broker and a simulated device, as in the lab. The split to avoid is all-simulated with no hardware row at all, because then the physical claims are never tested anywhere and nobody notices.</p>\n\n<h3 id=\"iotm-faq-matter-only\">Does this apply to a Matter-only home with no MQTT?</h3>\n<p>The boundaries move, the method does not. The controller talks to the lock directly over the Matter interaction model, so the broker row disappears and the timed-invoke row gains weight. You still need one id or timestamp linking the command to the lock's <code>LockOperation</code> event, and you still need <code>DoorState</code> before you call the door secure.</p>\n\n<h2 id=\"iotm-references\">Specifications and source behind the map</h2>\n<ul>\n<li><a href=\"https://docs.oasis-open.org/mqtt/mqtt/v5.0/mqtt-v5.0.html\">OASIS MQTT Version 5.0</a>. PUBACK as transfer of ownership without completed delivery (4.3.2), reason code 0x10 No matching subscribers (3.4.2.1), Message Expiry Interval deletion and the reduced forwarded value (3.3.2.3.3), and Correlation Data copied into responses (4.10).</li>\n<li><a href=\"https://www.rfc-editor.org/rfc/rfc7252\">IETF RFC 7252, the Constrained Application Protocol</a>. An Acknowledgement confirms arrival and by itself does not indicate success or failure of the request.</li>\n<li><a href=\"https://www.w3.org/TR/wot-thing-description11/\">W3C Web of Things Thing Description 1.1</a>. The <code>synchronous</code> action term, with no claim when absent, and <code>idempotent</code> defaulting to false.</li>\n<li><a href=\"https://www.w3.org/TR/wot-architecture11/\">W3C Web of Things Architecture 1.1</a>. Shadows as eventually consistent state copies, and Intermediaries that consumers may not be able to tell apart from Things.</li>\n<li><a href=\"https://github.com/project-chip/connectedhomeip/blob/v1.6.1.0/src/app/zap-templates/zcl/data-model/chip/door-lock-cluster.xml\">Matter SDK Door Lock cluster definition at v1.6.1.0</a>. <code>LockState</code> and <code>DoorState</code> values, and <code>mustUseTimedInvoke</code> on <code>LockDoor</code> and <code>UnlockDoor</code>.</li>\n<li><a href=\"https://github.com/project-chip/connectedhomeip/blob/v1.6.1.0/src/app/TimedHandler.cpp\">Matter SDK TimedHandler at v1.6.1.0</a>. A timed invoke arriving after its limit is answered with a Timeout status.</li>\n<li><a href=\"https://github.com/mqttjs/MQTT.js/blob/v5.16.1/README.md\">MQTT.js README at v5.16.1</a>. The client defaults, including <code>protocolVersion: 4</code> and <code>clean: true</code>.</li>\n<li><a href=\"https://github.com/eclipse-mosquitto/mosquitto/tree/v2.1.4\">Eclipse Mosquitto source at tag v2.1.4</a>. The broker version that produced the lab output.</li>\n</ul>\n\n<h2 id=\"iotm-apply-this-now\">Apply this now to one command path</h2>\n\n<ol>\n<li>Pick the command in your product that does the most damage when it runs wrongly or late. Write its boundaries as rows, and for each one name the evidence you collect today, or NOT TESTED.</li>\n<li>Find the assertion your end-to-end test makes and put it on the row that produced it. If it is a cloud state read, find out whether that state comes from the device or from the cloud's own write.</li>\n<li>Add a correlation id to that command if it lacks one, and one test per boundary that the id survives the hop.</li>\n<li>Add the two broker tests from this article: the PUBACK reason code with no subscriber, and a queued command that must expire. Validate the command payload against a shared schema with the <a href=\"/tools/json-schema\">JSON Schema validator</a> while you are there.</li>\n<li>Keep the ladder output from the first run as the baseline, and list the rows that still say NOT TESTED as the work for the hardware rig.</li>\n</ol>\n"}