ZZigStream
Blog
telemetryzigbee2mqtthistoryiotmonitoring
9 min read

What Zigbee2MQTT history is worth keeping—and why

A live Zigbee2MQTT dashboard tells you what a device reports now. Historical telemetry helps you understand what changed, when it changed, and whether an automation or device needs attention.

Written by ZigStream Team

A Zigbee temperature sensor reporting 22.4 °C is useful. But it does not tell you whether the room has been gradually overheating since midnight, whether the heating is cycling too aggressively, or whether that one reading is unusual.

The same applies to battery percentage, humidity, power measurements, contact sensors, and device availability. Zigbee2MQTT is excellent at exposing the current state and messages from your network. The harder question is what to do when you need to understand behaviour over days, weeks, or seasons.

That is where history matters. It turns individual readings into evidence: a trend you can inspect, compare, and act on. This article explains which Zigbee2MQTT data is worth retaining, the practical questions it can answer, and how to decide between operating your own history stack and using a managed telemetry service such as ZigStream.

A current reading is not an explanation

Most Zigbee dashboards are designed around the latest state. You can see the current temperature, humidity, illuminance, occupancy status, battery level, or power draw. That is exactly what you need when building automations or checking whether a device is responding.

It is much less useful when you are diagnosing a problem.

Consider a humidity sensor in a bathroom. A current reading of 68% does not reveal whether humidity has remained high for ten minutes after a shower or for most of the day. Those are different situations. In the first case, normal ventilation may be working. In the second, the room may need better extraction, a changed automation, or further investigation.

History adds three things that a latest-state view cannot provide:

  • Direction — Is a value rising, falling, or stable?
  • Duration — How long has a condition persisted?
  • Context — Did the change happen alongside another event, such as heating activity, a door opening, a bridge restart, or a weather change?

A single number is a snapshot. A sequence of timestamped readings is a record of behaviour.

This distinction is particularly important for devices that report infrequently. A battery-powered contact sensor may remain silent for long periods because nothing has changed. That can be entirely normal. A mains-powered temperature sensor that suddenly stops reporting is usually more notable. To interpret either case properly, you need to know what the device normally does.

The telemetry worth retaining

It is tempting to store every field from every Zigbee2MQTT message forever. That can be useful for deep troubleshooting, but it is not always necessary. A more practical approach is to retain data according to the questions you expect to ask later.

For most homes and small installations, these categories provide the greatest value.

Environmental measurements

Temperature, relative humidity, pressure, illuminance, air quality, and soil moisture are usually most useful as time series. Their value comes from their shape over time rather than from a single event.

For example, a bedroom that is consistently warmer between 23:00 and 06:00 may point to a heating schedule, poor airflow, solar gain retained by the building, or a radiator valve that is not behaving as expected. A chart will not identify the cause on its own, but it gives you a precise pattern to investigate.

Humidity is often more useful when viewed with temperature. Relative humidity changes as air temperature changes, so an apparent spike may partly reflect a cooling room rather than a new moisture source. Comparing both series prevents overly simple conclusions.

Energy and power data

Smart plugs, meters, and energy monitors can report instantaneous power, cumulative energy, voltage, current, or other electrical fields depending on the device.

Power is valuable at high resolution when you need to see cycling behaviour: a fridge compressor, dehumidifier, pump, or appliance standby load. Cumulative energy is more useful for daily, weekly, or monthly comparisons.

The important practical decision is granularity. Keeping every rapid power update indefinitely may create more data than you need. Keeping a daily total alone may hide short, expensive, or abnormal operating patterns. A sensible history strategy often keeps detailed data for recent troubleshooting and summarised data for longer-term comparisons.

Battery percentage is useful, but it needs interpretation. Many devices report battery level in broad steps, at irregular intervals, or using a voltage-to-percentage estimate that is imperfect under load. A sudden change can indicate normal reporting behaviour, a cold environment, poor battery quality, or a device that is struggling to communicate.

History is still useful here because it lets you distinguish a one-off drop from a persistent decline. A sensor that moves from 92% to 88% over several months is different from one that falls from 92% to 55% in a few days.

Where available, link-quality information can add context, but it should not be treated as a universal measure of Zigbee health. It is a signal reported at a point in time, not a complete map of routing quality or a guarantee that a device is healthy.

State changes and last-seen information

Not every useful event is a numeric measurement. Door and window contacts, leak sensors, occupancy sensors, locks, and switches generate state changes that often matter most as an event timeline.

For these devices, useful history might answer questions such as:

  • When was the window last opened?
  • How often did this occupancy sensor trigger overnight?
  • Did the leak sensor report before or after a power outage?
  • When did this device last send a message?

“Last seen” is especially useful, but it needs a device-specific expectation. A mains-powered Zigbee router normally has a different reporting pattern from a battery-powered button that only transmits when pressed. A quiet device is not automatically an offline device.

History improves automations, not only dashboards

Historical telemetry is often introduced as a way to make nicer charts. Charts are useful, but the larger benefit is better operational decisions.

Automations built directly from a single reading can be noisy. A bathroom fan that starts whenever humidity crosses a threshold may turn on and off repeatedly around that boundary. A more robust rule considers time and direction: run the fan when humidity stays above a chosen level for a defined period, or when it rises sharply compared with the recent baseline.

That does not mean every automation needs a complex analytics system. Simple rules are often the most reliable. History helps you tune those rules based on how your home actually behaves rather than on guesses.

A practical workflow looks like this:

  1. Start with a simple automation and a conservative threshold.
  2. Observe the relevant telemetry for at least several normal cycles: showers, overnight heating, appliance use, or daylight changes.
  3. Check for false triggers, delayed responses, and conditions the rule did not catch.
  4. Adjust the threshold, duration, or hysteresis based on the observed pattern.
  5. Revisit the rule when the room, device placement, season, or household routine changes.

The same approach works for alerts. A low-battery alert is more meaningful when it is based on a sustained decline or a threshold appropriate to the device, rather than one isolated message. An offline warning is more useful when its timeout reflects the device’s power source and expected reporting interval.

DIY history stacks are valid—if you want to run them

A self-hosted stack built around MQTT, a time-series database, dashboards, and alerting can be an excellent fit. It gives you control over storage, query models, visualisation, retention rules, integrations, and where your data lives.

For many technically confident Zigbee2MQTT users, building that system is part of the appeal.

The trade-off is not simply initial setup. The ongoing work matters too. A telemetry pipeline needs decisions about schema changes, data retention, backups, database storage, dashboard maintenance, access from outside the home network, upgrades, and how to investigate failed ingestion when something changes.

None of that makes DIY monitoring the wrong choice. It means the system has an owner: you.

At a glance

Question Self-hosted history stack Managed telemetry history
Who designs the pipeline? You choose the broker, storage, transformations, and dashboards The service provides an opinionated telemetry workflow
Who manages retention and storage? You define and operate it Verify the service’s current retention and data-handling policy
How much can you customise? Potentially extensive, depending on the tools you run Typically focused on the workflows the product supports
Who troubleshoots infrastructure? You operate the database, network path, and monitoring components The provider operates its service; you still manage your local bridge and devices
When is it a good fit? You want maximum control or already operate reliable monitoring infrastructure You want useful device history without adding another stack to maintain

The right choice depends on what you want to spend your time maintaining. If you enjoy operating InfluxDB, Grafana, PostgreSQL, VictoriaMetrics, or a similar stack—and have requirements that justify it—self-hosting can be the better fit.

If your primary goal is to inspect Zigbee2MQTT device history and resolve practical problems, a focused managed service can reduce the operational surface area.

Where ZigStream fits

ZigStream complements Zigbee2MQTT rather than replacing it. Zigbee2MQTT remains the local bridge that communicates with your Zigbee network, exposes device data, and supports your automations. You continue to choose your coordinator, devices, network layout, and local automation platform.

ZigStream’s role is to provide managed telemetry and device history for that data. Instead of building and permanently operating a separate monitoring pipeline solely to preserve messages and inspect trends, you can use a service designed around that workflow.

The day-to-day difference is straightforward. Rather than asking whether a current value looks right, you can inspect how the value behaved over a relevant period. Rather than treating a low battery or missing message as an isolated incident, you can look for the pattern that preceded it.

That is particularly useful for questions such as:

  • Which temperature sensor consistently reports differently from nearby rooms?
  • When did a humidity issue start, and how long did it last?
  • Which devices have shown the largest battery decline over the last month?
  • Did a device stop reporting after a bridge restart or only after a particular time?
  • Does an appliance have an unexpected overnight power pattern?

The answer will always depend on the messages your devices actually report and the history you choose to retain. No telemetry system can infer measurements that were never sent. Device reporting behaviour, battery constraints, and Zigbee network conditions still matter.

History turns readings into decisions

You do not need to record every Zigbee message forever to benefit from history. Start with the telemetry that helps you make a better decision: environmental trends, energy use, battery behaviour, meaningful state changes, and the timing of device messages.

Then decide whether you want to operate the supporting data stack yourself. Self-hosting remains a strong option when control and customisation are the priority. If you would rather focus on your Zigbee network and the behaviour of your home than on retaining and querying telemetry, ZigStream is built for that narrower job.

Connect a bridge, collect a few weeks of representative data, and use it to answer one real question about your space. The useful result is not simply a graph. It is knowing what changed, when it changed, and what to investigate next.

Try it on your own devices

Five-minute setup from your Zigbee2MQTT instance.