BLOG developers portal FAQs

IoT Data Freshness: How to Avoid Decisions Based on Stale Readings

Uncategorised

IoT data freshness determines whether a sensor reading is recent enough to support a decision. At 10:20, a maintenance technician opens a dashboard and sees a motor temperature of 58°C. The page has just refreshed, but the sensor took that reading at 10:02. If the team needs a measurement from the last five minutes to decide whether to inspect the motor, that number is already too old. 

How to measure IoT data freshness

Start by keeping two timestamps for each measurement. The measurement timestamp records when the device captured the reading. The ingestion timestamp records when the platform or pipeline received it. Those timestamps can differ when a gateway buffers messages during an outage and sends them once the connection returns. Microsoft Learn

How old is the reading right now? Subtract the time the sensor took the measurement from the current time. If the sensor measured 58°C at 10:02 and you check the dashboard at 10:20, the reading is 18 minutes old.

How long did it take to reach the platform? Subtract the measurement time from the time the platform received it. If that same reading arrived at 10:19, it took 17 minutes to reach the platform.

If the 58°C reading was measured at 10:02 and arrived at 10:19, it took 17 minutes to reach the platform. At 10:20, the reading is 18 minutes old, even though it appeared on the dashboard only a minute ago.

Both calculations depend on a trustworthy measurement timestamp. Store timestamps in UTC and check for clock drift, missing timestamps, or readings dated in the future. If you only know when the platform received a message, label it Received at and treat the measurement age as unknown. Microsoft Learn

Set a freshness limit for each decision

Ask how old a reading can be before someone needs to verify it. A motor temperature used to decide whether a technician should investigate may need a recent update. An energy report reviewed the following morning can allow more time for readings to arrive, provided the reporting workflow accounts for gaps and delayed data.

For example, if a sensor reports every minute and the maintenance team can work with a reading up to five minutes old, use five minutes as the freshness limit for that workflow. If the sensor normally reports less often than the decision requires, revisit the reporting interval or use another source of confirmation.

Apply the limit to each signal the decision depends on. A gateway can remain connected while one sensor stops reporting. Likewise, a device can send a heartbeat while its temperature measurement is overdue. Connectivity and measurement freshness answer different questions.

Make stale readings visible on the dashboard

Show the value, when it was measured, and its freshness status together. In the motor example, the panel could display 58°C · Measured at 10:02 · 18 min ago · Stale. The technician can still see the last known value and immediately tell whether it can support a current decision.

For signals expected at regular intervals, show gaps in the trend when data is missing. A line carried forward through an outage can make a missing measurement look like a stable temperature. In a fleet view, surface the number of stale or unavailable signals alongside aggregate metrics so that operators can also see how much of the fleet those metrics represent.

Give missing updates their own alert. “Motor temperature above threshold” tells maintenance to investigate the equipment. “No fresh motor temperature reading” tells the team to check the sensor, gateway, or data pipeline. Evaluate the second rule on a schedule so it can fire when messages stop arriving.

Keep late telemetry from overwriting newer readings

Once connectivity returns, buffered readings can help reconstruct what happened during the outage. They can also arrive out of order. If a reading taken at 10:02 arrives after a valid reading taken at 10:18, record the older measurement at 10:02 in the historical series and keep the 10:18 reading as the latest known value. Microsoft Learn

Apply the same freshness check to rules that trigger an action. Define what each workflow should do when an input is stale or unavailable. Depending on the use case, it might pause the action, ask an operator to verify the reading, or use an agreed fallback.

Start with one dashboard your team uses every day. Pick a reading that drives a decision, give it a maximum age, and check what operators see when updates stop. Then replay a buffered reading after a newer one has arrived. The test should tell you whether the dashboard flags the gap and keeps the right value in view.

With thethings.iO, you can visualise device data in configurable dashboards, set up alerts, and apply custom business logic with Cloud Code. Bring one of your monitoring workflows to a demo and we can discuss how to display reading age and handle delayed updates in your setup. TheThings

Book a demo with thethings.iO