Storage And Logs

Files, logs, and support evidence

Storage shows persisted device files, while logs explain what happened during polling, commands, scenarios, and service work. This is the main evidence source for diagnostics.

Storage, Modbus Log, and Scenario Log

Area Shows Open it when
Storage Configuration files, device profiles, and service data on SPIFFS and SD Card. You need to verify what is actually stored on the device.
Modbus Log Polling and command history grouped by folder and file. A device does not respond, values are stale, or a command fails.
Scenario Log Automation execution history. You need to understand why a rule did or did not run.

Storage as persisted truth

Storage does not replace Setup, but it lets service engineers see which files are really stored on the device. Use Setup for normal changes. Use Storage for checking, downloading, analysis, and careful service work.

File browser

Storage file browser in English.
The left tree selects the storage area. The right side shows files and actions for the selected item.

Selected file

Storage selected file in English.
Before deleting or editing, download the file if it may be needed for recovery or incident review.

SPIFFS and SD Card

Medium Role Notes
SPIFFS Internal device storage. Always available, but limited. Polling logs may rotate by free-space pressure.
SD Card Main place for larger logs and service data when mounted. Common runtime/event logs are stored only on SD. The write reserve is 1% of capacity clamped to 8–64 MiB and includes the pending write. Under pressure only the oldest completed Modbus day directories inside the owned root may be pruned; the active file and unrelated data remain untouched.

How to read Modbus Log

The current UI separates folder navigation from file operations: choose the folder or area on the left, then work with files and actions on the right. This makes deep log structures easier to use.

Choose the line Use RTU 1, RTU 2, or TCP. TCP is bus3 and must not be replaced by RTU 1 data.
Open a folder in the tree The tree shows storage structure. Files and actions remain in the right pane.
Select a file Check date, size, and device context. If the log is needed for support, download it before cleanup.
Switch Table / Charts Table view is better for exact events. Charts are better for value dynamics.

What to collect before support escalation

  • Control screenshot with the selected device and visible state.
  • Modbus Log file for the affected line and device.
  • Scenario Log if automation is involved.
  • Settings screenshot showing line mode, MQTT/gateway, and storage state.
  • Device configuration files from Storage if the issue survives reboot.

Safe actions

Action Use when Risk
Download Before service work, deletion, or sending evidence to support. Low. Check that the file does not expose secrets.
Refresh After settings changes, reboot, or a long wait. Low. It may reveal a newer tree state.
Delete Only when the file is not needed or consumes space. High for configuration. Download first.
Edit For service correction when Setup is not suitable. High. Invalid JSON can break configuration loading.

CBOR format: what is inside a file

A polling log is a binary CBOR stream. Do not open it as UTF-8 text: download the bytes unchanged, then parse them with Workbench or another CBOR-aware tool. Files use modbus_<id>_<YYYYMMDD_HHMMSS>[_suffix].cbor names.

ElementFieldMeaning
HeaderhOrdered channel-name array.
RecordtMeasurement timestamp.
RecordidModbus device ID.
RecordvValues in header order; the reader also accepts the older map form.
Normal evidence: downloaded size matches the listing, the parser sees a header and at least one record, and the time/device ID match the selected device.

Download CBOR with Agent Tool

python gateway_agent_tool.py list-modbus-logs --storage auto --path "" --max 500
python gateway_agent_tool.py download-modbus-log --storage auto --file "<relative/path/modbus_137_YYYYMMDD_HHMMSS.cbor>" --output .\modbus_137.cbor
  1. If the response says truncated:true, narrow --path instead of making an unbounded request.
  2. Do not use an absolute path or ... The Tool will not replace a local file without --overwrite.
  3. Check /api/system/usage for active storage, reserve, storage pressure, and drop/no-space counters.
  4. Do not commit raw customer logs; retain only an approved, redacted summary.

Rotation and storage pressure

Files rotate at a bounded size. Under pressure, retention may select only the oldest completed directories inside the owned Modbus log root. It must not remove the current file or unrelated data. If reserve cannot be recovered, status must show storage pressure and dropped writes rather than reporting successful persistence.