Call Phone +8618073152920 Hotline: +8618073152920
Call Phone +8618073152920
English
CONTACT US/ CONTACT US
Consumer hotline +8618073152920
Changsha Zoko Link Technology Co., Ltd.

Email:Arvin@niubol.com

WhatsApp:+8615367865107

Address:Room 102, District D, Houhu Industrial Park, Yuelu District, Changsha City, Hunan Province, China

Position:Home >> Blogs >> Product knowledge

Product knowledge

Offline Data Logging and Store-and-Forward in Industrial IoT Gateways

Time:2026-09-08 12:16:20 Popularity:271

Quick Answer: Offline data logging preserves measurements at the station; store-and-forward retains undelivered records and sends them after the connection recovers. They are separate functions. Select an industrial IoT gateway by its usable retention, power-loss behavior, timestamp handling and replay policy, then test the exact firmware and upload protocol. A memory card slot alone does not establish any of those behaviors.

NiuBoL data logger with display for local measurement recording

Decide which data must survive an outage

Remote weather, agriculture, hydrology and water-quality stations often depend on cellular networks that can be interrupted by weak signal, operator maintenance or power problems. The customer server can also be offline. Without local retention, a monitoring system may lose exactly the data needed to analyze a storm, flood event or equipment fault.

Start by separating network loss from loss of station power. A logger that remains powered may continue measuring through a communications outage. If the sensors and logger lose power, storage cannot recreate measurements that were never acquired. Specify the required autonomy as well as the retention period when continuity during a power interruption matters.

FunctionPurposeWhat to verify
Local data loggingMaintain an on-site history, whether online or offlineRecording interval, retention and access to older records
Store-and-forward queueRetain records awaiting deliveryPersistence, acknowledgment, retry and overflow rules
USB or card exportRetrieve files during maintenanceSupported format and a safe export procedure
Server archiveHold received data for central analysisCompleteness, duplicate handling and long-term retention

These functions may use different files, partitions or retention limits. A gateway can have a long local history but a short retransmission queue, or a persistent queue with no convenient user export. Ask for the behavior needed by the project instead of treating local storage as a single yes/no feature.

Calculate retention from stored records, not sensor count

The useful starting formula is: retention days = usable bytes divided by bytes per record divided by records per day. For a fixed recording interval, records per day = 86,400 divided by the interval in seconds. Use the recording interval here, which may differ from both sensor polling and upload intervals.

Generate records from the intended configuration and measure actual storage growth over a known period. A single record containing all channels differs from a system that stores one row per channel. JSON field names, timestamps, indexes, transaction journals and file-system allocation also consume space. The size of one outgoing message is not necessarily the size of the stored record.

Illustrative recording intervalRecords per dayDaily payload at 512 bytes per record
1 minute1,440737,280 bytes
10 minutes14473,728 bytes
15 minutes9649,152 bytes

This is a sizing example, not a NiuBoL retention specification. At one minute, seven days would generate 10,080 records and 5,160,960 payload bytes before overhead. Verify the measured total against the space reserved for the application. Do not use all advertised flash capacity in the calculation because the operating system, software and maintenance files also occupy storage.

Extending the recording interval reduces storage demand but changes the information available. A 15-minute snapshot can miss a short level excursion even if the sensor was polled every second. Decide whether the record needs an average, maximum, accumulated count or individual events. Capacity savings should not remove the very behavior the station was installed to observe.

What the storage hardware does and does not promise

The NiuBoL TG462/TG462S gateway family provides internal flash and external storage interfaces, including Micro SD support up to 32 GB and USB 2.0. Internal flash capacity depends on the supplied version. Neither the card limit nor nominal flash size specifies how many historical records the configured application will retain.

Check supported card type, file system, operating temperature and replacement procedure for the supplied device. A removable medium is useful for field service only if the application can detect a missing or full card and report the resulting condition. Specify whether logging stops, changes to another location or continues with an alarm when that medium becomes unavailable.

The required software may impose a record-count or age limit well before the card is full. This can be deliberate, for example to reserve free space for updates and database maintenance. Ask for the configured limits and how an operator checks remaining capacity. Avoid an unlimited-storage claim: every physical medium and retention policy has a boundary.

NiuBoL weather sensor supplying measurements to a field data logger

A reliable replay policy starts before the upload attempt

For projects requiring retention through a sudden restart, specify durable recording before a measurement is considered safely queued. A design that tries to send first and only writes to storage after detecting a failure has a vulnerable interval: power can disappear between acquisition and the fallback write. The acceptable loss window should be an explicit project requirement.

Next define what removes a record from the queue. Acceptance by a network stack, broker or web endpoint may not mean that the final database has committed it. Choose an acknowledgment boundary appropriate to the application. Stronger end-to-end confirmation can require additional application logic; it should not be assumed from a protocol label.

Retain each record's acquisition time and stable identity during retries. If a server accepts a record but the response is lost, the gateway may send it again. The receiving application needs a defined duplicate rule. A sequence counter can help, but it must not silently reuse old identifiers after a reboot. Include station identity and an appropriate restart or generation identifier where the design needs them.

Can the backlog drain while new readings continue?

Replay throughput must exceed the rate of new records if a queue is to shrink. Suppose a hypothetical station generates one record per second and has accumulated 3,600 records. If the recovered connection accepts five records per second in total while acquisition continues, the net drain rate is four records per second. The backlog takes approximately 900 seconds, or 15 minutes, to clear, ignoring pauses and retry overhead.

If acceptance falls to one record per second, the backlog does not shrink. Rate limits, mobile bandwidth and server processing therefore affect recovery time. Test whether the gateway interleaves current records with history or sends the oldest first. The appropriate choice depends on whether operators prioritize a live view, chronological processing or both.

Preserve time and data meaning during recovery

Store acquisition time separately from arrival time. Uploading an hour-old water-level record with the current time creates a false event in the trend. Define time zone or UTC handling, clock synchronization and what happens when the clock is corrected backward. A timestamp alone may not be a sufficient unique record key.

Historic measurements should not automatically trigger the same immediate actions as fresh measurements. For example, replaying an old high-level alarm after conditions have returned to normal may require a historical event entry rather than a current control action. The receiving application should distinguish delayed data from live data and apply its own approved alarm policy.

Sensor faults also belong in the history. Preserve invalid or unavailable status rather than substituting zero. A complete sequence of timestamps containing invalid pH readings is not complete measurement coverage, but it does explain the outage honestly and helps separate sensor maintenance from communications loss.

Test server failure, power loss and full storage separately

Controlled testWhat to examine afterward
Disconnect the uplink while acquisition continuesLocal count growth, acquisition timestamps and automatic replay
Keep the network available but reject server requestsRetry policy, error reporting and whether rejected records are retained
Restart during an offline periodSurvival of committed records, queue position and configuration
Lose a delivery acknowledgmentDuplicate recognition and consistency between queue and server
Reach a defined storage limit in a test setupAlarm, stop or overwrite behavior and protection of undelivered records

Perform disruptive tests on an isolated commissioning setup, with configuration saved and the approved power procedure. Compare unique record identities and time coverage, not just the number of rows received. Two duplicates can conceal two missing records if the test checks totals alone.

Power-loss resilience depends on software and storage behavior together. A database format is not a guarantee against corruption. The SQLite documentation on database corruption, for example, explains the importance of synchronization, recovery files and storage behavior. This is a general design consideration, not a claim that every NiuBoL gateway uses SQLite.

Export data without damaging the active history

Some applications store records in database files and provide an export function; others write CSV directly. Specify the required columns, units, time format, delimiter and missing-value convention. Open a sample in the customer's analysis software before site deployment. An export that succeeds technically but changes decimal separators or drops status fields may not be usable.

Use the supported export or backup operation while the logger is running. Copying only an active database file may omit associated transaction files or capture an inconsistent state. Do not remove a card or USB drive during writes unless the equipment explicitly supports the procedure. For offline-only research, verify that retrieval works without cloud authentication or an internet connection.

For a NiuBoL configuration proposal, describe the maximum outage, record interval, required fields, export format and destination protocol. Include the acceptable loss window and backlog recovery time. MQTT buffering and HTTP buffering should each be tested when both are required; a result for one upload path does not establish the other.

NiuBoL water quality probe for timestamped online monitoring records

Project Decision FAQ

Q1. Is offline data logging the same as store-and-forward?

No. Logging maintains a local history; store-and-forward manages undelivered records and their later transmission. Specify both when technicians need an on-site archive as well as automatic recovery of the central database.

Q2. Does a 32 GB card guarantee a particular retention period?

No. Retention depends on usable space, record format, recording interval and application limits. Measure actual growth with the intended channel configuration and include metadata and maintenance overhead.

Q3. Will records survive a power failure during an outage?

Only within the tested behavior of the storage and firmware. Check which records were durably committed before power loss and whether the queue resumes correctly. Samples never acquired while power was absent cannot be recovered from memory.

Q4. Can USB always provide live CSV output?

No. A USB interface may support storage, maintenance or export without providing a continuous CSV stream. Specify the required operation and inspect a real exported file from the ordered software configuration.

Q5. What should happen when offline storage is full?

The policy must be agreed: stop recording, overwrite selected history or use another supported action, with a visible alarm. Distinguish delivered history from unsent records so an ordinary ring-buffer policy does not silently discard the only copy of missing data.

Q6. How is successful backfill demonstrated?

Compare the station's committed record identities with the server's unique records for the outage interval. Check timestamps, values, status and duplicates, then confirm that live acquisition continued while the backlog drained. A reconnect indicator alone is insufficient.

Summary

Offline data logging becomes useful when records remain readable and correctly timed through the failures the project expects. Size retention from real storage growth, define acknowledgment and overflow rules, and test replay under continuing acquisition. Select the NiuBoL logger configuration against these behaviors rather than treating memory capacity as a guarantee of data continuity.

Related recommendations

Sensors & Weather Stations Catalog

Agriculture Sensors and Weather Stations Catalog-NiuBoL.pdf

Weather Stations Catalog-NiuBoL.pdf

Agriculture Sensors Catalog-NiuBoL.pdf

Water Quality Sensor Catalog-NiuBoL.pdf

Related products

Tell us your requirements, Let's discuss more about your project.we can do more.

Name*

Tel*

Email*

Company*

Country*

Message


online
Contacts
Email
Top
XOffline Data Logging and Store-and-Forward in Industrial IoT Gateways-Product knowledge-Automatic Weather Stations_Industrial, Agricultural, Water & Environmental IoT Monitoring Solutions—NiuBoL

Screenshot, WhatsApp to identify the QR code

WhatsApp number:+8615367865107

(Click on WhatsApp to copy and add friends)

Open WhatsApp

The WhatsApp ID has been copied, please open WhatsApp to add consultation details!
WhatsApp