Zeitarchiv – long-term data archive, comparisons, data correction and energy dashboard

Hi everyone,

I’m Roberto, the developer of Zeitarchiv, a free and open-source long-term data archive for Home Assistant.

Zeitarchiv stores selected entity state changes independently of the Home Assistant Recorder and provides charts, comparison tables, data maintenance, imports, backups, and a dedicated Energy Dashboard.

The current release is version 1.3.0, featuring a complete English interface and English documentation.

Why I built Zeitarchiv

I have been using Symcon for around 13 years and have accumulated more than 130 million energy, temperature, weather, and operational data points.

Home Assistant is my main system for integrations, control, and automation. Its History, long-term statistics, and Energy Dashboard cover many everyday requirements very well.

For my own use, however, I also wanted an easy way to:

  • Retain selected detailed values for many years
  • Compare periods directly with the previous year
  • Create flexible charts and comparison tables
  • Find and correct faulty historical values
  • Import existing data from other systems
  • Store very large datasets efficiently

I also spent a lot of time experimenting with InfluxDB, VictoriaMetrics, and Grafana. These are powerful tools, but for my desired workflow they required considerably more setup and maintenance. Even convenient year-over-year comparisons usually have to be built manually.

That experience eventually led to Zeitarchiv.

Main features

Zeitarchiv currently provides:

  • Compact, lossless monthly archives using Parquet and Zstandard
  • Precomputed rollups for fast analysis across months and years
  • Custom dashboards with line, bar, and timeline charts
  • Comparison tables, formulas, sums, and running totals
  • Previous-period and previous-year comparisons
  • Detection of outliers, gaps, duplicate timestamps, repeated values, and counter decreases
  • Correction, addition, marking, restoration, and removal of historical values
  • A history of performed data changes
  • Import from Home Assistant, Symcon, CSV files, and VictoriaMetrics
  • Portable, verifiable backups and CSV export
  • German and English interfaces

Energy Dashboard

Zeitarchiv also includes its own Energy Dashboard with:

  • Sankey visualization of energy flows
  • Multiple producers, batteries, consumers, and consumer groups
  • Self-sufficiency and self-consumption metrics
  • Cost and CO₂ calculations
  • Battery state of charge and efficiency
  • PV yield forecast
  • Daily load profiles
  • Plausibility checks and sensor monitoring

Zeitarchiv is not intended to replace Home Assistant’s built-in Energy Dashboard or long-term statistics. It is an additional option for users who want to retain, compare, import, inspect, and maintain detailed data over long periods.

The project is personal, non-commercial, and fully open source.

App, screenshots, documentation, and installation:

Home Assistant integration:

I would really appreciate feedback, suggestions, and bug reports. I’m especially interested in how you currently manage long-term measurement and energy data and which types of analysis you are still missing.

Thanks for taking a look!

Roberto

2 Likes

Do you have ideas, suggestions for improvement, or requests for future features? Feel free to leave a comment here or use GitHub Discussions:

:speech_balloon: bertel2020/HA-Apps · Discussions · GitHub

It’s a good place to discuss and develop ideas together. Specific bugs can be reported through GitHub Issues:

:bug: Issues · bertel2020/HA-Apps · GitHub

All feedback is welcome—including smaller suggestions about usability, presentation, or documentation. :blush:

I do - since you seem to handle English quite well, why not stick to that? English is kinda the universal language, for me it is hard to relate to a German repo.

Fair point! :blush: The project itself is bilingual: both the interface and documentation are available in English and German. Home Assistant’s language setting is used automatically, so Housekeeper will appear in English on an English installation.

The English README is available here:

I’ll also make sure to use English for international posts and discussions going forward. Thanks for the feedback!

1 Like

Looks really nice, and just what I have been looking for. Just a question - what is the best way to drop a created database and start anew? I guess I can just delete the entry in the integration (and create a new) and it will stop sending data, but what is the proper way through the app?

Deleting the Home Assistant integration stops new data from being sent, but it does not remove anything already stored in Zeitarchiv.

The proper in-app method is:

  1. Open Entities in Zeitarchiv.

  2. Select the entity and open its gear/settings page.

  3. At the bottom under Data management, choose:

    • Delete all values — clears its complete history but keeps its configuration. New incoming values start a fresh archive immediately.
    • Remove entity — deletes both the history and its Zeitarchiv configuration. If the integration still sends that entity, Zeitarchiv recreates it automatically using the global defaults.

For a clean restart of a single entity, Delete all values is usually the best choice. Make a backup first if there is anything you may want later.

There currently isn’t a single in-app “drop the entire database” button; a complete all-entity reset must be done entity by entity. Uninstalling/deleting the add-on data would be the more drastic whole-instance reset, but that also removes settings, dashboards, charts, and everything else—not just archived measurements.

ZEITARCHIV 1.5.0 – MAJOR UPDATE

Zeitarchiv 1.5.0 is now available, combining the improvements introduced with versions 1.4 and 1.5.

:high_voltage: ENERGY DASHBOARD

• Devices can now be assigned behind a sub-meter.
• Consumption is never counted twice.
• The Sankey diagram, consumer shares, charts and energy report show devices underneath their respective meter.
• Unassigned consumption automatically appears as “other consumers”.
• A monthly standing charge can be configured as an entity or fixed value.
• Missing energy prices, feed-in tariffs or standing charges are clearly highlighted.
• An issue affecting rarely changed price helpers has been fixed.

:floppy_disk: EXTERNAL BACKUPS

Backups can now be copied to an additional external destination:

• NFS or SMB/CIFS network storage
• WebDAV, such as Nextcloud
• Built-in connection test
• Separate retention settings for the external destination

The local backup is always kept. If a transfer fails, Zeitarchiv automatically retries it with the next backup.

The network storage selection is now clearer and collapsible. Shares that are not mounted are displayed separately.

:outbox_tray: NEW CSV EXPORT

The new export wizard provides:

• Selectable time range and resolution
• Export of multiple entities at once
• Automatic ZIP file containing one CSV per entity
• Estimated file size before the export starts

:chart_decreasing: COUNTER DECREASES

The overview has been redesigned. Before marking incorrect values, Zeitarchiv shows exactly which data will be affected. Direct links then take you to the marked values.

:house: ZEITARCHIV INTEGRATION 0.20.0

The matching Home Assistant integration can now display the status of external backups. Failed transfers are reported through the “Backup failed” binary sensor and can be used in automations.

HOW TO UPDATE:

• Update the Zeitarchiv app through the Home Assistant add-on store
• Update the Zeitarchiv integration through HACS

App and documentation:

Integration:

Enjoy the update! Feedback and reports about your experience are always welcome.

2 Likes

Thanks for the detailed reply. As I had just begun using Zeitarchiv, I decided to remove the app and reinstall to start fresh. However as a request I think it could be useful to be able to clear/drop the database through the app, instead of having to go through all the steps described.

1 Like

Thanks for the suggestion, that makes sense: starting over shouldn’t require manual steps. I’ve built it already, and it will be included in the next release.

There’s a new Reset section in the app’s Settings with two options:

  • Delete measured values only: removes all stored values but keeps your entities, configuration, dashboards and settings.
  • Reset everything: also removes entities, dashboards, saved charts and tables and the settings, so you’re back to a fresh installation. The API token and backup settings are kept, so the Home Assistant integration stays connected.

To avoid accidents, you have to type a confirmation word in a dialog first. A backup can be created beforehand (enabled by default; if it fails, nothing is deleted). Existing backups are never touched.

I’ll post here again once the release is out.

1 Like

Hi everyone, Zeitarchiv 1.6.0 is out. This release focuses on checking and maintaining archived data:

  • Data quality: A new page shows outliers, gaps, duplicates and counter decreases for every entity. Search, finding filters, sorting and periods from seven days to all time help narrow down issues. A status indicator shows when the results were last updated.
  • Remove duplicates: Clean up multiple entities in one action, with a preview and undo.
  • Selective restore: A four-step wizard offers a full restore, selected entities or settings only. The selective options work without a restart, can be undone and add charts and tables as copies by default.
  • Delete multiple entities: Select several entities in the overview. Before deletion, the dialog shows where they are used in charts, tables, tiles and the energy dashboard, and offers a backup.
  • Ignore values: Set values per entity that should never be stored, such as a sensor briefly reporting 0 at startup.
  • Assess counter decreases: Each decrease gets an assessment—probably a bad value, probably a reset or still open—with a reason and meaningful colors.
  • Reset data: Settings → Reset can remove measured values or the entire data set. Typed confirmation and a backup option are included.
  • Table labels: The {weekday} and {weekday_short} placeholders are available for column labels.
  • Entity types: The displayed type now includes state_class. Entities with total are marked “n/a” for counter-decrease checks.
  • Energy dashboard: “Show by group” displays collapsible consumer groups with a total row.

Improvements and fixes: Data quality checks run in the background within a time budget and focus on entities with new values. Quiet entities are no longer treated as outdated. Charts referencing deleted entities load correctly, and scheduled midnight resets of daily counters are no longer reported as decreases.

:link: Project, README and installation:

:clipboard: All changes in 1.6.0:

:rocket: 𝗭𝗲𝗶𝘁𝗮𝗿𝗰𝗵𝗶𝘃 𝟭.𝟴.𝟬 𝗶𝘀 𝗵𝗲𝗿𝗲!

𝗖𝗼𝗺𝗽𝗮𝗿𝗲 𝘆𝗲𝗮𝗿𝘀. 𝗧𝗮𝗸𝗲 𝗰𝗼𝗻𝘁𝗿𝗼𝗹 𝗼𝗳 𝘆𝗼𝘂𝗿 𝗱𝗮𝘁𝗮.

Your Home Assistant data tells a story. Zeitarchiv helps you preserve it for the long term and discover patterns over time.

Here are the highlights from 𝟭.𝟲.𝟬, 𝟭.𝟳.𝟬 𝗮𝗻𝗱 𝟭.𝟴.𝟬 :backhand_index_pointing_down:

━━━━━━━━━━━━━━━━━━━━
:new_button: 𝗡𝗘𝗪 𝗜𝗡 𝟭.𝟴.𝟬
━━━━━━━━━━━━━━━━━━━━

:chart_increasing: 𝗟𝗼𝗻𝗴-𝘁𝗲𝗿𝗺 𝗰𝗼𝗺𝗽𝗮𝗿𝗶𝘀𝗼𝗻
How is your electricity use changing? How warm was this year really? Compare multiple years in one chart, complete with a previous-years average and a monthly table showing deviations.

:bar_chart: 𝗖𝗼𝗺𝗽𝗮𝗿𝗶𝘀𝗼𝗻𝘀 𝗼𝗻 𝘆𝗼𝘂𝗿 𝗱𝗮𝘀𝗵𝗯𝗼𝗮𝗿𝗱
Previous-year comparisons, running totals with targets and long-term comparisons now appear directly in your chart tiles.

:date: 𝗖𝗵𝗮𝗿𝘁𝘀 𝘄𝗶𝘁𝗵 𝗮 𝗳𝗶𝘅𝗲𝗱 𝗽𝗲𝗿𝗶𝗼𝗱
A chart saved for 2025 stays on 2025. Current periods keep moving forward. “Back to now” takes you straight to the present.

━━━━━━━━━━━━━━━━━━━━
:sparkles: 𝗙𝗥𝗢𝗠 𝟭.𝟲.𝟬 𝗔𝗡𝗗 𝟭.𝟳.𝟬
━━━━━━━━━━━━━━━━━━━━

:magnifying_glass_tilted_right: 𝗗𝗮𝘁𝗮 𝗾𝘂𝗮𝗹𝗶𝘁𝘆 𝗮𝘁 𝗮 𝗴𝗹𝗮𝗻𝗰𝗲
Find outliers, gaps, duplicates and counter decreases per entity, then jump straight to the relevant cleanup view.

:broom: 𝗘𝗮𝘀𝗶𝗲𝗿 𝗰𝗹𝗲𝗮𝗻𝘂𝗽
Remove duplicates across multiple entities with preview and undo. Delete counter decreases assessed as “Probably a bad value” in bulk.

:card_index_dividers: 𝗛𝗶𝘀𝘁𝗼𝗿𝗶𝗰 𝗲𝗻𝘁𝗶𝘁𝗶𝗲𝘀
Retired meters keep their data and charts without being flagged as inactive.

:recycling_symbol: 𝗦𝗲𝗹𝗲𝗰𝘁𝗶𝘃𝗲 𝗿𝗲𝘀𝘁𝗼𝗿𝗲
Restore an entire backup, individual entities or just settings. The last two options work without a restart and can be undone.

:control_knobs: 𝗙𝗶𝗹𝘁𝗲𝗿 𝘂𝗻𝘄𝗮𝗻𝘁𝗲𝗱 𝘃𝗮𝗹𝘂𝗲𝘀
Exclude specific values from storage, such as brief zero readings when a sensor starts.

:hammer_and_wrench: 𝗪𝗵𝗮𝘁 𝗲𝗹𝘀𝗲?
Grouped consumers in the energy dashboard, more reliable external backups, a fix for Nextcloud 31+, many smaller improvements and a fresh new logo! :artist_palette:

:backhand_index_pointing_right: 𝗜𝗻𝘀𝘁𝗮𝗹𝗹𝗮𝘁𝗶𝗼𝗻 & 𝗰𝗵𝗮𝗻𝗴𝗲𝗹𝗼𝗴:

:speech_balloon: Which feature is your favourite?

#Zeitarchiv #HomeAssistant #SmartHome #OpenSource #DataAnalysis

:rocket: 𝗭𝗲𝗶𝘁𝗮𝗿𝗰𝗵𝗶𝘃 𝟭.𝟭𝟮.𝟬 𝗶𝘀 𝗵𝗲𝗿𝗲!

𝗬𝗼𝘂𝗿 𝗮𝗿𝗰𝗵𝗶𝘃𝗲. 𝗢𝗻 𝘆𝗼𝘂𝗿 𝗱𝗮𝘀𝗵𝗯𝗼𝗮𝗿𝗱.

:house: 𝗡𝗘𝗪: 𝗗𝗮𝘀𝗵𝗯𝗼𝗮𝗿𝗱 𝗰𝗮𝗿𝗱𝘀 𝗳𝗼𝗿 𝗛𝗼𝗺𝗲 𝗔𝘀𝘀𝗶𝘀𝘁𝗮𝗻𝘁

The new Zeitarchiv card brings your archived data directly to your Lovelace dashboard!

:bar_chart: Display saved charts and tables
:chart_increasing: Select archived entities directly
:three_o_clock: Use comparisons, timelines, states, heatmaps and donuts
:family_man_woman_girl_boy: Share selected charts and tables with all signed-in users – perfect for a wall tablet
:chart_decreasing: Add sparklines to standard Home Assistant tile cards

Set up the Zeitarchiv card directly in the card editor, with support for light and dark mode.

━━━━━━━━━━━━━━━━━━━━
:sparkles: 𝗠𝗢𝗥𝗘 𝗛𝗜𝗚𝗛𝗟𝗜𝗚𝗛𝗧𝗦 𝗦𝗜𝗡𝗖𝗘 𝟭.𝟴.𝟬
━━━━━━━━━━━━━━━━━━━━

:compass: 𝗦𝗲𝗹𝗲𝗰𝘁𝗶𝗼𝗻 𝗮𝘀𝘀𝗶𝘀𝘁𝗮𝗻𝘁
Which entities should you archive? Choose a topic such as energy, weather or air quality and get matching suggestions with explanations.

Review the selection and confirm each change. “Selection & history” keeps changes traceable, and actions made by the assistant can be undone.

:speech_balloon: 𝗔𝗜 𝗮𝗰𝗰𝗲𝘀𝘀
“How did electricity use in July compare to last year?”

Through Home Assistant’s MCP server, Claude, ChatGPT or Home Assistant’s conversation agent can answer questions about your archive.

:locked: Optional, off by default and read-only. You choose which entities and tools are available.

━━━━━━━━━━━━━━━━━━━━
:hammer_and_wrench: 𝗔𝗟𝗦𝗢 𝗜𝗡𝗖𝗟𝗨𝗗𝗘𝗗
━━━━━━━━━━━━━━━━━━━━

• State history for heating, robot vacuums and more
• Expanded CSV import with multiple value columns
• Hourly dynamic-tariff cost calculations when hourly readings are available
• Shared period navigation for dashboard tiles
• Custom chart colours, table sum columns and four decimal places
• Numerous improvements and fixes

:counterclockwise_arrows_button: 𝗨𝗣𝗗𝗔𝗧𝗘 𝗡𝗢𝗪:
Update the app to 1.12.0 first, then the Zeitarchiv integration to 1.3.0. AI access also requires MCP access to be configured.

:backhand_index_pointing_right: 𝗜𝗻𝘀𝘁𝗮𝗹𝗹𝗮𝘁𝗶𝗼𝗻 & 𝗰𝗵𝗮𝗻𝗴𝗲𝗹𝗼𝗴:

:speech_balloon: Which archived chart will get a place on your dashboard?

#Zeitarchiv #HomeAssistant #SmartHome #OpenSource dashboard ai

𝗭𝗲𝗶𝘁𝗮𝗿𝗰𝗵𝗶𝘃 𝟭.𝟮𝟬.𝟬 𝗶𝘀 𝗵𝗲𝗿𝗲 :sun_behind_rain_cloud:

Was October actually colder than last year? Is that why the heating used more energy? And how does this year’s solar generation compare?

This release adds a dedicated weather dashboard and a much more detailed long-term view for energy.

𝗡𝗲𝘄: 𝘁𝗵𝗲 𝘄𝗲𝗮𝘁𝗵𝗲𝗿 𝗱𝗮𝘀𝗵𝗯𝗼𝗮𝗿𝗱

Assign your existing Home Assistant sensors for outdoor temperature, rainfall, humidity, pressure, wind, gusts and radiation.

Alongside current readings, you get previous-year comparisons, monthly trends across multiple years, rain days, dry spells and weather records. You can also compare frost days, summer days and hot days over the years.

Add heating meters to see heating degree days and consumption in kWh per degree day, helping you put heating use into context with the weather.

𝗘𝗻𝗲𝗿𝗴𝘆: 𝗮 𝗯𝗿𝗼𝗮𝗱𝗲𝗿 𝗹𝗼𝗻𝗴-𝘁𝗲𝗿𝗺 𝘃𝗶𝗲𝘄

The new “Long-term” tab brings monthly comparisons with averages and ranges, a years-by-months matrix and records since your archive began.

“What has changed?” highlights the consumers with the biggest changes. You can also track almost self-sufficient days, surplus days and battery usage. Enter your solar system’s capacity to compare yield per kWp.

𝗪𝗵𝗮𝘁 𝗲𝗹𝘀𝗲 𝗵𝗮𝘀 𝗰𝗵𝗮𝗻𝗴𝗲𝗱 𝘀𝗶𝗻𝗰𝗲 𝟭.𝟭𝟮.𝟬?

• Organise and filter entities with coloured categories such as “Heat pump” or “Solar”.
• Export multiple entities into one CSV, side by side or stacked, with configurable number and file formats.
• Click energy tiles to open charts for generation, consumption, battery or grid energy.
• Numerous fixes to recording, archiving, imports, cost calculations and everyday usability.

Enable the weather dashboard from the dashboard overview. Demo data is included if you want to try it out.

𝗨𝗽𝗱𝗮𝘁𝗲, 𝗶𝗻𝘀𝘁𝗮𝗹𝗹𝗮𝘁𝗶𝗼𝗻 𝗮𝗻𝗱 𝗰𝗵𝗮𝗻𝗴𝗲𝗹𝗼𝗴:

Which weather readings are you already collecting in Home Assistant?

#Zeitarchiv #HomeAssistant #SmartHome #WeatherStation #SolarEnergy

1 Like

Been using zeitArchiv for about a week and really liking the change over from InfluxDB. I do have one question for which I’ve found a solution but it’s a bit clumsy and I wonder if I’m missing something.

I have many utility meter sensors that log daily and reset overnight. Normally these record a new value each time they change but some only log once at the end of day or part way e.g. my energy supplier Octopus provides the previous day’s electricity consumption sometime in the afternoon and my old InfluxDB has used continuous queries which just log one entry at the end of each day for all the kWh sensors I have.

When I try to import these sensors into zeitArchiv I don’t see the data represented correctly when I view entity charts over a week or month or longer. It shows the delta between readings rather than the value in the table. I can fix this in Excel by inserting a row with a zero value for each day prior to the import but it’s a bit of a chore and I was wondering if there was an easier way ?

Hi Tim, thanks for the feedback, and glad the switch from InfluxDB is working out.

What you’re seeing comes from how Zeitarchiv treats counters: consumption is the increase between two consecutive readings, and a drop counts as a reset (0). That’s right for a meter that reports several times a day. With only one value per day, the reset to 0 overnight is never stored, so zeitArchiv can’t tell that a new day started. You only get the difference between days, and any day lower than the day before counts as 0. Your zero row is exactly the right way to say “the counter restarted at 0”.

For now there’s no switch for this. If you’d rather not edit in Excel, a small script that inserts a 0 row before each daily value does the same thing.

I’ve put an idea on the roadmap: a per-sensor setting like “resets daily at midnight”, so the first value of each day always counts in full. That would also work for data that is already imported and for live values, and it wouldn’t need any extra rows. A few questions so I get it right:

  1. Which Octopus integration are you using, and do you have a Home Mini/Pro? If so, a cumulative counter like current_total_consumption should work in zeitArchiv without any extra setting. Without one, the previous-day sensor is a daily value and we’d need the daily-reset approach above.
  2. Do you import via CSV or from the HA history?
  3. What timestamp do the Octopus values have: the day they belong to (e.g. 23:59) or the time they arrived in the afternoon?

No promises on timing, but I’ll keep you posted.