Docs → Data streams

Data streams

A data stream logs the values published to a single device topic over time and stores them on the server, so you can chart, scrub, and export your device's history instead of only watching the latest value fly by.

Pro Data streams are the Pro tier's "data storage & visualization" feature. See Account & billing for how the tiers compare.

editWhere to set them up

Creating and editing data streams is done in the web app at app.iotparrot.com. On mobile you can view the charts and export the data, but authoring a stream is web-only — like brokers, devices, dashboards, schedules, and alerts.

Live gauge vs. stored stream

These two things look similar but do very different jobs, and it's worth getting the distinction straight before you set anything up:

  • A live gauge (or any dashboard widget) shows the instant value it just received over MQTT. When a new message arrives, the old one is gone — nothing is kept. Close the dashboard and there's no history to come back to.
  • A data stream quietly records those values on the server as they arrive, keeping a downsampled trail you can plot over hours, days, or weeks — and scrub back through long after the fact.

So use a gauge when you only care about "what is it right now?", and add a data stream when you want to answer "how has it changed over time?" — for example, watching your greenhouse temperature trend across a week rather than just glancing at the current reading.

boltThey pair well

Nothing stops you from doing both: put a live gauge on your dashboard for the current reading and log the same topic to a data stream for the history. The stream never interferes with the widget — it just listens alongside.

Configuring a stream

A data stream binds to one device topic and records what gets published there. These are the fields you set when you create one:

name
A label for the stream, so you can pick it out later (e.g. "Greenhouse temp").
device
Which device the topic belongs to. The stream logs traffic on that device's broker.
topic
The exact MQTT topic to log, such as sensors/greenhouse/temp. This must be a concrete topic — wildcards # and + are not allowed, because a stream logs one series, not a fan-out of many.
valueType
number renders as a line chart; string renders as a discrete state timeline (good for values like ON/OFF or open/closed).
unit
Optional display unit shown on the axis and readouts (e.g. °F, %, hPa).
minIntervalSeconds
The downsample floor — at most one sample is kept per this window. On Pro the floor is 10 seconds, so you can't record faster than that. See below for why this exists.
enabled
Pause or resume logging without deleting the stream or the data it has already collected.

Downsampling & storage

Your firmware might publish a sensor reading many times a second, but you almost never need that resolution in a chart — and storing every message would balloon your storage for no real benefit. That's what minIntervalSeconds controls.

  • Within each interval window, the stream keeps at most one sample. Extra messages that arrive inside the same window are dropped from the stored history.
  • The smallest window Pro allows is 10 seconds, which caps how much a single stream can ever write.
  • Choosing a larger interval (say 60 seconds) stores less and still gives a perfectly readable trend for slow-moving signals like temperature or humidity.
scheduleMatch the interval to the signal

Fast-changing values you want fine detail on (like current draw) warrant a short interval; slow ones (like tank level or room temperature) are fine at a minute or more. A longer interval means smaller storage and a cleaner chart.

Retention & export

You can run up to 20 data streams on the Pro tier. Each stream's stored samples are retained for 30 days; a daily trim then deletes anything older, so a stream always holds a rolling one-month window rather than growing forever.

  • If you need to keep data beyond 30 days, export the stream to a file — available on both web and mobile as a download — before the window rolls off.
  • The server tracks each stream's last-sample time, so you can tell at a glance whether a stream is still receiving data.
  • A stream can be paused by the server with a reason (for example, if it stops seeing traffic). Check the stream's status if a chart unexpectedly stops filling in, and confirm the device is still publishing to the topic.
warning30 days is a rolling window

Data older than 30 days is deleted automatically and can't be recovered. If a month of history matters to you — say for a seasonal grow log — export it on a schedule so you always have the older samples saved off-platform.

Charting with the History widget

A stream on its own is just stored data; you visualize it with the History chart widget on a dashboard. Unlike a gauge, the History widget reads a stream's stored samples — it is not a live MQTT listener.

  • Point the widget at a stream (its streamId) and pick a default time window — hour, day, week, or month.
  • Overlay up to 4 streams on a single time axis, each with its own color and left/right Y-axis, to compare series like temperature against humidity.
  • On mobile you can view and scrub these charts even though you set the streams up on the web.

See the History Chart entry on Dashboards & widgets for the full widget configuration.