The Night I Tried to Kill My IoT Demo

Nov 3, 2026 | Industrial Automation, IOT

Illustrative simulation. The results below come from a deterministic model at ten observations per second. Fault durations, storage rules, retry behavior, and recovery delays are prescribed scenario inputs. They are not measurements from the physical bench or validation of the current collector.

A simulated Halloween experiment in broken connections, dead processes, and what survives the reboot.

There is a dangerous moment in a hardware demo when the numbers start moving and everyone relaxes.

The sensor responds. The graph looks sensible. The little Linux box on the bench appears to have found its purpose in life. Someone starts talking about putting one on every machine.

That is when I want to reach for the Ethernet cable.

If you have been following my adventures with Rust on the Revolution Pi and the BeagleBone Green Eco, you know where this is heading. Getting a reading onto a screen is the beginning. The interesting engineering starts when something interrupts the story.

For this Halloween thought experiment, I put a simple software model through four small disasters. It follows the same questions I want answered on the bench: what was captured, what survived, and what the system could still tell me afterward. Think of it as a haunted house for an IoT collector. The monsters are ordinary failures wearing very cheap costumes.

The laboratory

The reference architecture remains a BeagleBone Green Eco, Debian 13, and a Rust collector. The simulation represents a synthetic temperature source, local recording, and a receiving system. It follows their events and state changes without running the board, operating system, or hardware drivers.

Each scenario starts independently with ten seconds of healthy operation. An observation is scheduled every 100 milliseconds. Faults begin immediately before a scheduled observation; the observation at the recovery boundary is healthy. Where the model commits a record, it treats that commit as immediate and successful. The durations below are chosen inputs to the story.

The goal is to account for the observations: which reached storage, which reached their destination, and which were never captured. Each record carries a device identity, a session identity, and a sequence number so the model can distinguish a repeated delivery from a new observation.

A test that exposes a missing record has done useful work. I want to find that gap while the most expensive thing at risk is my evening.

First scare the network disappears

The first scenario interrupts delivery for 30 seconds while leaving the local sensor and collector running. Acquisition and delivery are separate states in the model, so the broken connection affects only the second part of the journey.

At ten observations per second, that interruption produces 300 readings. The local queue has room for 600 records in this scenario, and every observation is committed locally before delivery. All 300 therefore remain available when the modeled connection returns.

The replay deliberately includes a second delivery of the final ten records. A receiver that stores every delivery produces 310 rows for 300 observations. A receiver that recognizes the combination of device, session, and sequence number stores 300 unique readings. The ghosts are repeat deliveries.

An observation taken during the interruption should retain its original context when it arrives later. Otherwise, a burst of delayed records can become a very convincing account of something happening at the wrong time.

The queue reaches 300 records, halfway to its assumed capacity. The model keeps the original observation time with each reading as it replays the backlog. Delivery speed and long-term storage exhaustion are outside this scenario.

Simulated result: A 30-second delivery outage produces 300 locally retained readings. Replay makes 310 delivery attempts, including ten scripted repeats. Deduplication leaves 300 unique stored readings, with none of the outage readings missing. Without deduplication, the same replay would create ten extra rows.

Second scare the collector dies

Next, the model abruptly terminates its collector while leaving the surrounding system available. This failure discards the collector’s application memory.

In a real Linux deployment, intentionally stopping a service is treated differently from an unexpected failure, and automatic restart depends on the service configuration. The systemd service documentation spells out those distinctions. Here, the process return and the resumption of collection are separate, prescribed events.

This scenario uses a recording policy that commits pending observations every 500 milliseconds. The failure lands with four recent readings still held only in application memory. Those four readings disappear when that memory is discarded.

The model brings the process back after one second, then allows acquisition and recording to resume after 3.2 seconds. A health rule based only on process existence would declare success 2.2 seconds before useful work resumes. Requiring a fresh, successfully recorded observation keeps the status at recovering until the work actually restarts.

During the 3.2-second acquisition interruption, 32 scheduled observations never happen. Add the four readings lost from memory and the surviving history is missing 36 observations. Those are two different losses: four were captured and lost, while 32 were never acquired.

Dr. Frankenstein was understandably excited when his creation moved. I would still like to inspect its output file.

Simulated result: The process returns after one modeled second, but the first new observation is acquired and immediately committed at 3.2 seconds. Four uncommitted readings are lost and 32 scheduled readings are never taken, leaving 36 observations absent from the surviving history. A health check that follows successful recording avoids the 2.2-second false recovery signal.

Third scare the board returns

The third scenario models an orderly reboot. It commits all pending records before shutdown and makes the collector unavailable for a prescribed 8.4 seconds.

That is a specific set of assumptions. Abrupt power loss would need its own failure and storage model. This scenario gives the orderly shutdown a chance to finish its work.

All 100 observations from the ten-second baseline remain available after the modeled restart. During the interruption, 84 scheduled observations are never acquired. Collection resumes at the recovery boundary, and the interruption remains visible.

This is also where the difference between displaying a reading and preserving it becomes painfully concrete. Linux provides calls such as fsync() to synchronize file data and metadata with storage, and the application must check for errors. The useful evidence is what can actually be recovered afterward.

The new session starts its own sequence at one. Because the session identity is part of the record’s key, that new first observation remains distinct from the first observation in the earlier session.

If the board comes back from the dead, it still owes me an explanation of where it has been.

Simulated result: An 8.4-second period of unavailability leaves 84 scheduled observations unacquired. All 100 previously committed records survive under the model’s orderly-shutdown rules. Recording resumes in a new session at the recovery boundary. The collector resumes work while preserving an explicit interruption in its history.

Fourth scare the sensor stops telling us anything useful

For the final scenario, the model injects an open-probe fault at the application’s input boundary for five seconds. The MAX31855 datasheet documents a real open-circuit fault indication; here, that indication supplies the template for synthetic fault-status observations.

The question is what the application does with the fault once it reaches the collection boundary.

Each affected observation carries a fault status and no numeric temperature. A display can retain the last valid temperature as historical context, with its original timestamp, while clearly marking the current input as faulty.

A working sensor reporting a temperature above the process limit is a different situation: that is an equipment alarm. The fault test needs to preserve that distinction. Losing the ability to measure the temperature provides no evidence that an existing high-temperature condition has cleared.

At the five-second recovery boundary, a valid observation closes the single modeled fault episode. The 50 fault-status observations belong to that one episode; they are not 50 separate sensor failures.

This is the scene in the horror film where the room goes quiet. I would prefer the dashboard to notice.

Simulated result: A five-second injected open-probe condition generates 50 fault-status observations within one fault episode. No numeric temperature measurements are generated during that interval. The first valid observation appears at the recovery boundary, five seconds after the fault began, and the episode closes.

What counts as surviving

Each row below describes an independent scenario. The counts come from the model’s scheduled observations and explicit handling rules.

Simulated event Chosen duration Outcome
Delivery connection unavailable 30 seconds 300 readings retained; 310 replay attempts become 300 unique records after deduplication.
Collector terminated 3.2 seconds until recording resumes Four captured readings lost from memory plus 32 observations never acquired; 36 absent in total.
Orderly reboot 8.4 seconds unavailable 100 previously committed records preserved; 84 observations never acquired; a new session begins.
Injected open-probe fault 5 seconds 50 fault-status observations in one episode; no invented numeric temperatures.

The interesting differences are in the recovery. Buffering lets the modeled network outage end with a complete set of observations. Restarting the collector leaves both discarded memory and an interval when nobody was collecting. The sensor fault leaves a useful record of why a temperature is unavailable.

A manufacturer reviewing an oven run or a test-bench session needs to understand what happened to the equipment and what happened to the monitoring. Those are related histories, and the record should let someone follow both.

These scenarios give me a concrete list to take back to the hardware: replay identity, commit behavior, recovery status, and fault visibility. Each has a specific question attached, which makes a useful starting point for the real bench.

If you have a bench, oven, or older machine whose data gets lost between the shop floor and the office, tell me what is stuck at The Mad Botter. We can start with one useful measurement and the workflow that needs it.

The Halloween costume is optional. Accounting for the missing measurements is the interesting part.

More from Mike:

About Me

Hi! I’m Mike! I’m a software engineer who codes at The Mad Botter INC. You might know me from Coder Radio or The Mike Dominick Show.  Drop me a line if you’re interested in having some custom mobile or web development done.

Follow Me

© 2026 Copyright Michael Dominick | All rights reserved