Data & Exports

RIoT captures continuous time-series data from every sensor in your deployment. The platform provides two primary interfaces for working with that data: an interactive Charts page for real-time exploration and a dedicated Exports page for extracting data in bulk. Together, they cover the full spectrum from quick visual investigation to large-scale offline analysis.

Exploring Sensor Data

The Charts page (/charts) is the primary interface for interactive data exploration. A toolbar along the top of the page exposes a series of cascading filters that let you progressively narrow the dataset before rendering a visualization.

Filter workflow:

  1. Devices -- Open the Devices popover to select one or more devices by their UID. Each device shows a reading count so you can gauge data volume. Leave the selection empty to include all devices.
  2. Sensor Types -- Filter by sensor type (e.g., sht4x, scd4x). Available types update based on the selected devices.
  3. Fields -- Once sensor types are selected, choose specific data fields to chart. Fields are grouped by sensor type in the popover. Leave empty to include all fields.
  4. Time Range -- Select a time window using the quick-range buttons (1H, 6H, 24H, 7D, 30D) or enter a custom start and end time using the datetime inputs.

The chart renders once at least one device, sensor type, and field combination yields data within the selected time range.

Time-Series Visualization

Charts are rendered using Lightweight Charts (TradingView) with a dark theme tuned for industrial dashboards. Each selected field is plotted as its own line series with a distinct color.

Interacting with charts:

  • Zoom and pan. Scroll to zoom the time axis. Click and drag to pan across the visible range. The chart automatically fits content when new data loads.
  • Crosshair inspection. Hover over the chart to activate a crosshair that snaps to data points. Current values for all visible series are displayed in the legend panel below the chart.
  • Toggle series visibility. Click any entry in the legend panel to hide or show that series. This is useful when overlapping series obscure each other.
  • Auto-refresh. Enable automatic data refresh at intervals of 5s, 15s, 30s, or 60s. The refresh icon animates while auto-refresh is active.

Data resolution and aggregation:

To keep charts responsive over large time spans, the platform automatically selects an appropriate data resolution based on the visible window:

Time SpanAuto Resolution
< 2 hoursRaw (no aggregation)
2 -- 12 hours1 minute
12 hours -- 2 days5 minutes
2 -- 7 days15 minutes
7 -- 30 days1 hour
> 30 days1 day

Override the automatic selection using the Res dropdown in the toolbar. The resolved resolution is shown in parentheses when set to Auto.

Exporting Data

Navigate to the Exports page (/exports) to extract sensor data in bulk. The page is organized into three tabs: Jobs, Schedules, and Audit Log.

Supported Formats

FormatExtensionBest For
CSV.csvSpreadsheets, simple analysis, import into other tools
JSON.jsonProgrammatic access, APIs, structured data pipelines
Parquet.parquetLarge datasets, columnar analytics, data warehouses

Creating an Export

Open the Create New Export panel on the Jobs tab. A four-step wizard guides you through the process:

  1. Format -- Select CSV, JSON, or Parquet.
  2. Filters -- Set the time range (start and end), optionally filter by device IDs and sensor types (comma-separated), and choose a data resolution. Resolution options range from raw (no aggregation) through 1-minute, 5-minute, 15-minute, 1-hour, and 1-day intervals.
  3. Options -- Name the export, add an optional description, and configure output behavior:
    • Include Metadata Header -- Adds device and sensor metadata at the top of the file.
    • Flatten Values -- Flattens nested sensor values into top-level columns.
  4. Confirm -- Review the configuration summary. The platform calculates an estimate of the row count and file size before you commit. Click Create Export to submit the job.

Export Jobs

Export jobs are processed asynchronously. When you create an export, the backend enqueues a task on a Celery worker pool with Valkey as the message broker. This architecture keeps the web interface responsive even for exports spanning millions of rows.

Job Lifecycle

Each export job transitions through the following statuses:

StatusDescription
pendingThe job is queued and waiting for an available worker.
processingA Celery worker has picked up the job and is generating the file. Progress is reported as a percentage.
completedThe export finished successfully. The file is ready for download.
failedThe job encountered an error. An error message is available in the job details.
cancelledThe job was manually cancelled before completion.

Monitoring Progress

The Jobs tab displays all export jobs in a table with real-time status updates. Key columns include the export name, format, current status, a progress bar, row count, file size, and creation time.

The dashboard polls active jobs every 5 seconds. When a job completes or fails, a toast notification appears automatically. A badge in the page header shows the count of currently active jobs and any unread completions.

Downloading Results

Once an export reaches completed status, click the Download button in the job row's action menu. The file is served directly from the backend with a checksum-verified URL.

You can also Cancel a pending or processing job, or Delete any job to remove it and its associated file from the system.

Export Scheduling

For recurring data extraction, create an export schedule from the Schedules tab. Click Create Schedule to open the configuration dialog.

Schedule parameters:

ParameterDescription
NameA descriptive name for the schedule (e.g., "Daily sensor export").
FrequencyHow often the export runs: daily, weekly, or monthly.
TimeThe hour and minute (in your timezone) when the export triggers. Minutes are available in 15-minute increments.
TimezoneThe timezone used for scheduling. Defaults to your browser's local timezone.
Time WindowThe data window each run covers: last 1 day, last 7 days, last 30 days, or calendar-aligned periods (calendar day, calendar week, calendar month).
FormatCSV, JSON, or Parquet.
ResolutionData aggregation resolution, from raw through 1-day.
Device IDsComma-separated list of device IDs to include. Leave blank for all devices.
Sensor TypesComma-separated list of sensor types to include. Leave blank for all types.

Each scheduled run creates a standard export job that follows the same lifecycle described above.

Managing schedules:

The Schedules tab lists all configured schedules with their frequency, format, active status, next scheduled run, total run count, and failure count. From the action menu on each row, you can:

  • Pause an active schedule to temporarily stop it from running.
  • Resume a paused schedule.
  • Delete a schedule to remove it permanently.

All export activity -- creation, download, cancellation, deletion, and scheduled runs -- is recorded in the Audit Log tab for traceability.