Smart Home Assistant

Home Assistant InfluxDB and Grafana: Long-Term History Guide

SepehrBy Sepehr· 7 August 2026· Updated 7 October 2026· 14 min read
✓ Independent — no paid placements✓ UK-tested in real homes✓ Cited sources
Home Assistant InfluxDB and Grafana: Long-Term History Guide
On this page[tap to expand]

The Home Assistant InfluxDB Grafana stack gives you sensor history that never expires and dashboards you design yourself — InfluxDB stores every reading, Grafana charts it. Here's how to set it up now that the original InfluxDB add-on has gone.

Why this page changed

  • 8 September 2026 — Two things broke the original version of this guide. The InfluxDB add-on was retired from the Home Assistant store, and Home Assistant began removing the InfluxDB connection settings from configuration.yaml. Step 1 and Step 2 have been rewritten and re-tested end to end against Home Assistant 2026.9.1, InfluxDB 2.9.1 and Grafana 13.2.
  • 7 August 2026 — First published.

InfluxDB add-on removed from the repository: what to do

If Home Assistant shows "App InfluxDB has been removed from the repository", the add-on you installed has been retired — your Home Assistant isn't broken. The notice is a repair issue: the original InfluxDB add-on was a community package built on InfluxDB 1.x, and its repository was archived, so the store no longer carries it. It will not update again.

  • Don't click Submit in a hurry. Users on the Home Assistant Community thread report that submitting the repair removes the app. Dismiss it instead, and take a backup first if you want to keep your history.
  • Your old data isn't migrated automatically. The archived add-on provided InfluxDB 1.x; InfluxDB 2 has a different API and data model, so you can't just point the same setup at a new version.
  • The fix is to move to InfluxDB 2. On Home Assistant OS or Supervised, use the community InfluxDB v2 app; on Container or Core, run the official influxdb:2 Docker image. Both routes are in Step 1, and Step 2 reconnects the integration.

Home Assistant's built-in History and Logbook pages are useful for a quick check, but the default recorder only keeps a rolling window of data — typically 10 days — before older records are purged to keep the database small. If you want to see how your living room temperature trended over the last six months, compare this winter's heating usage to last winter's, or build a dashboard that actually looks like something out of a data centre, you need a proper time-series database and a dedicated visualisation tool.

This guide covers the current path end to end: getting InfluxDB 2 running on either install route, configuring the InfluxDB integration the way today's Home Assistant expects, connecting Grafana as a data source, and building your first panel.

What Do InfluxDB and Grafana Actually Do?

InfluxDB is a time-series database. Unlike Home Assistant's default SQLite recorder, it is built specifically to store huge volumes of timestamped numeric data — exactly what sensor readings are — and query it efficiently over long ranges. It does not replace Home Assistant's recorder; it runs alongside it. Home Assistant keeps its short-term recorder for the History and Logbook UI, while the InfluxDB integration streams a copy of your state changes into InfluxDB for permanent storage.

Grafana is a visualisation and dashboarding tool. It connects to InfluxDB (and dozens of other data sources) and lets you build custom graphs, gauges, tables, and alert rules from the stored data. It is not a Home Assistant product — it is a general-purpose open-source tool used widely in server monitoring and IoT — but it integrates cleanly with Home Assistant's InfluxDB export.

What You Need

  • A running Home Assistant OS or Supervised installation for the app route, or any Home Assistant Container/Core install for the Docker route covered below.
  • Basic familiarity with editing YAML, either through the File editor app or via Studio Code Server.
  • Access to your configuration.yaml and secrets.yaml files.

One naming note before we start, because it causes real confusion: Home Assistant now calls add-ons apps in the UI, and Settings → Add-ons is now Settings → Apps. The old name still appears in repository names, in older documentation, and in the community forum, so you will see both. Where this guide gives a click path it uses the current wording.

Step 1: Get InfluxDB Running (the Original InfluxDB Add-on Is Gone)

The original InfluxDB add-on from Home Assistant Community Add-ons has been removed from the store. InfluxDB 1.x reached end-of-life, the maintainers archived the repository in August 2026, and if you already had it installed you'll see a repair notification reading "App InfluxDB has been removed from the repository." This isn't a bug in your setup — it's an intentional retirement, and there's no automatic migration path.

Home Assistant Container Settings page showing the Apps entry alongside Devices & services and Dashboards
On Container and Core installs there is still an Apps entry in Settings, but opening it only explains that apps require Home Assistant OS — there is no store to install InfluxDB from. This is the path every reader now ends up on, whether by choice or because the old add-on disappeared.

You have two working options, depending on how you run Home Assistant:

 Option A — community appOption B — Docker container
Works onHome Assistant OS / SupervisedContainer / Core (or anywhere Docker runs)
InstallAdd a third-party repository, then installdocker compose up -d
SSLNot supportedYours to configure
Sidebar / ingressNot supported — open it on its portOpen it on its port
Main riskDepends on one maintainer's repositoryYou own the upgrades

Option A — Home Assistant OS or Supervised: install the community InfluxDB v2 app. The original repository is retired, but an unofficial package for InfluxDB 2 is available. Go to Settings → Apps, open the store, and add https://github.com/danieloldberg/addon-influxdbv2 as a repository from the store's overflow (three-dot) menu, then install InfluxDB v2 from the new repository entry. It ships a graphical admin UI and a Data Explorer for browsing your buckets, but as of writing it has no SSL support and doesn't work through Home Assistant's ingress proxy (InfluxDB 2's path-based routing isn't compatible with it) — open it directly on its port instead. Note the organisation, bucket, and admin token you set during its first-run setup.

Option B — Home Assistant Container or Core: run InfluxDB 2 as its own Docker container, alongside Home Assistant, using the official influxdb:2 image. This is what we used to verify the steps in this guide, and it's arguably the more future-proof option since it isn't tied to any third-party repository staying maintained. All three services need to sit on the same Docker network so they can reach each other by name, which a single Compose project gives you for free. Here is a complete, working docker-compose.yml:

services:
  homeassistant:
    image: homeassistant/home-assistant:stable
    volumes:
      - ./ha-config:/config
    ports:
      - "8123:8123"
    restart: unless-stopped

  influxdb:
    image: influxdb:2
    ports:
      - "8086:8086"
    environment:
      - DOCKER_INFLUXDB_INIT_MODE=setup
      - DOCKER_INFLUXDB_INIT_USERNAME=admin
      - DOCKER_INFLUXDB_INIT_PASSWORD=change-me
      - DOCKER_INFLUXDB_INIT_ORG=home
      - DOCKER_INFLUXDB_INIT_BUCKET=home_assistant
      - DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=change-me-too
    volumes:
      - influxdb-data:/var/lib/influxdb2
    restart: unless-stopped

  grafana:
    image: grafana/grafana:latest
    ports:
      - "3000:3000"
    volumes:
      - grafana-data:/var/lib/grafana
    restart: unless-stopped

volumes:
  influxdb-data:
  grafana-data:

Bring it up with docker compose up -d. InfluxDB's own web UI is then at http://<your-host>:8086 — log in with the username and password you set in DOCKER_INFLUXDB_INIT_USERNAME and DOCKER_INFLUXDB_INIT_PASSWORD. Change all three change-me values before you run this on anything exposed to your network.

Either way, note the organisation, bucket, and API token you set — you'll need all three for both the Home Assistant integration and the Grafana data source. If you're migrating an existing InfluxDB 1.x install rather than starting fresh, treat it as a one-way move: back up your current data first, then follow the export/import steps in the InfluxDB v2 add-on's own migration notes (influx_inspect export on the old container, influx write into the new one) — the maintainers flag this process as capable of breaking your install if rushed, so don't skip the backup.

Step 2: Connect Home Assistant to InfluxDB

This is the part that has changed most recently, and it's worth reading before you paste anything into configuration.yaml. Home Assistant is removing the InfluxDB connection settings from YAML. If you add the old-style block with host, token, organization and friends, current versions will import it into a UI config entry and then raise a repair warning telling you to delete those keys:

The InfluxDB YAML configuration is being removed. This stops working in version 2026.9.0.

Home Assistant imports the connection settings into a UI config entry for you, then asks you to delete them from YAML. The filtering options stay where they are. Here's the split:

 Moves to the UIStays in configuration.yaml
Connectionapi_version, host, port, pathinclude
Authenticationusername, password, tokenexclude
Targetdatabase, organization, buckettags
TLSssl, verify_ssl, ssl_ca_certmeasurement_attr

The connection: set it up in the UI

Go to Settings → Devices & services → Add integration and search for InfluxDB. The flow asks two things. First, Choose InfluxDB version — pick InfluxDB v2.x / v3 (both install paths in Step 1 give you v2). Then the InfluxDB configuration screen asks for:

  • URL — the full URL including scheme and port, not just a hostname. On the Docker route that's http://influxdb:8086, matching the service name in your Compose file; on Home Assistant OS it's the InfluxDB v2 app's internal hostname from its Info tab, on port 8086. The box pre-fills https://, so remember to change it to http:// unless you've put a TLS proxy in front of InfluxDB. Prefer the hostname over an IP address: it survives the container getting a new address.
  • Verify SSL certificate — leave this unticked for a plain http:// connection on your own network.
  • Organisation and Bucket — the names you set in Step 1 (home and home_assistant if you used the Compose file above).
  • API token — the InfluxDB token, which needs write access to that bucket.
  • SSL CA certificate — optional, and not needed for a local unencrypted setup.

Submit, and Home Assistant confirms with "Created configuration for home_assistant (http://influxdb:8086)" — named after your bucket, with the URL beside it. The integration then appears under Settings → Devices & services → InfluxDB, and that entry is what holds your credentials from now on.

The filtering: this part stays in YAML

Which entities get streamed is still configured in configuration.yaml, and this half of the block is not going away. Add just this:

influxdb:
  include:
    domains:
      - sensor
      - binary_sensor
      - climate
    entity_globs:
      - light.*
  exclude:
    entities:
      - sensor.date
      - sensor.time

The include/exclude block is optional but strongly recommended — without it, every entity in your system streams to InfluxDB, including diagnostic and configuration entities you almost certainly don't want charted. The integration matches an explicit entity list first, then domains, then glob patterns, so you can be as broad or as precise as you like.

Already have the old YAML block?

You don't need to start over. Home Assistant has already copied your connection settings into a config entry — just delete the connection and authentication keys from configuration.yaml, leave include/exclude in place, and restart. The repair notification clears itself. If your old block referenced a token via !secret influxdb_token, you can drop that line from secrets.yaml too once the UI entry is working.

Save the file and restart Home Assistant. If the connection is working, you'll see state changes for your included entities start appearing in InfluxDB within a minute or two — check the InfluxDB v2 UI's Data Explorer to confirm, or check the Home Assistant log for any influxdb connection errors (a silent log with no errors is actually a good sign — the integration only logs on failure).

In Data Explorer, select your bucket, pick a measurement, and then — this bit matters — also tick _field → value. Home Assistant writes text fields (friendly_name_str, device_class_str) alongside the numeric one, and if you submit without the field filter, Data Explorer tries to average the strings and fails with unsupported input type for mean aggregate: string. That error means your data is arriving fine; it just needs a narrower query.

InfluxDB v2 Data Explorer showing a real Home Assistant sensor state written into the home_assistant bucket
Confirming the write worked: a Home Assistant entity state appearing in the InfluxDB v2 Data Explorer, queried straight from the home_assistant bucket with the value field selected.

Step 3: Install Grafana

Unlike InfluxDB, the Grafana app hasn't been deprecated — if you're on Home Assistant OS or Supervised, open the store from Settings → Apps, search for Grafana, and install the Home Assistant Community Add-ons version. Start it, enable Show in sidebar, and open it from the sidebar or directly at port 3000. On Container or Core, use the grafana/grafana service from the Compose file in Step 1 instead — same image, same result.

Either way, log in with the default admin/admin credentials. What happens next depends on which route you took. On the plain Docker image, Grafana immediately presents an Update your password screen and won't let you continue until you set a new one — do that and you're done. On the Home Assistant app build, the default admin password can't be changed directly from the UI, so the recommended approach there is to create a new user with the Admin role from Grafana's user settings and then delete the original default admin account.

Step 4: Connect Grafana to InfluxDB

Inside Grafana, go to Connections → Add new connection and search for InfluxDB. Selecting it opens the plugin's overview page rather than a form — click Add new data source in the top right to get to the actual settings screen. There, choose Flux as the query language (Flux is what InfluxDB 2.x uses; InfluxQL and SQL in that same dropdown are for 1.x and 3.x respectively) and fill in:

FieldWhat to enter
URLInfluxDB's address and port. Docker route: http://influxdb:8086, matching the service name in your Compose file. Home Assistant OS: the InfluxDB v2 app's internal hostname from its Info tab, on port 8086.
OrganizationThe organisation name from Step 1 — home if you used the Compose file.
TokenThe InfluxDB API token, with at least read access.
Default BucketThe bucket name — home_assistant if you used the Compose file.
Grafana data source settings screen configured for InfluxDB 2 with Flux query language, organization, token and default bucket fields filled in
Configuring the InfluxDB data source in Grafana using the Flux query language, the same organisation and bucket set in Step 1 — screenshot taken against a real InfluxDB 2 instance while verifying this guide.

Click Save & test. A working connection reports back the number of buckets found in your InfluxDB instance — "datasource is working. 3 buckets found", counting InfluxDB's two internal buckets alongside yours. If it fails, the most common causes are a mismatched token, the wrong hostname, or the organisation name not matching exactly. A no such host error in particular means Grafana can't resolve the name you gave it — check it against the service name in your Compose file, and that Grafana and InfluxDB really are on the same Docker network.

Step 5: Build Your First Dashboard Panel

From the Grafana sidebar, go to Dashboards → New → New dashboard. In current Grafana there's no "Add visualization" button — an Add pane opens on the right, and its first item is Panel ("Drag or click to add a panel"). Click that, then Configure visualization on the placeholder that appears. Pick your InfluxDB data source; because the data source is set to Flux, the panel opens straight into the Flux query editor. A basic query to chart a temperature sensor over the last seven days looks like:

from(bucket: "home_assistant")
  |> range(start: -7d)
  |> filter(fn: (r) => r["_measurement"] == "°C")
  |> filter(fn: (r) => r["entity_id"] == "living_room_temperature")
  |> filter(fn: (r) => r["_field"] == "value")

Three things about that query are worth knowing, because guessing any of them wastes an afternoon:

  1. The measurement is the unit, not the entity. By default the integration names the measurement after the entity's unit of measurement (controlled by measurement_attr), so a temperature sensor lands under °C.
  2. Entities with no unit are the exception. Those land under a measurement named after the entity ID instead.
  3. entity_id has no domain prefix. It's living_room_temperature, not sensor.living_room_temperature — the domain is stored as a separate tag.

Set the panel type to Time series, give it a title, and Grafana renders a line graph updating live as new data streams in from Home Assistant.

Grafana time series panel showing a Living Room Temperature curve built from real Home Assistant data stored in InfluxDB 2
A working Grafana panel charting temperature history sourced from InfluxDB 2 — the same Flux query and panel setup work identically whether InfluxDB is running as the community app or as a standalone Docker container.

From here, repeat the process for other entities — humidity, energy consumption, or anything else you included in the influxdb: filter — and arrange the panels into a dashboard. Grafana panels can also be pinned as a full dashboard link in Home Assistant's own Lovelace dashboard using an iframe or webpage card, so you don't need to switch apps to check your long-term history.

Common Problems and Fixes

"App InfluxDB has been removed from the repository"

This means you have the old, now-retired InfluxDB 1.x add-on installed. It won't come back — see Step 1 for the two current install paths (the community InfluxDB v2 app, or a standalone Docker container). Dismissing the repair notification doesn't fix anything by itself; you still need to install a replacement and point the InfluxDB integration at it.

"The InfluxDB YAML configuration is being removed"

Different problem, same integration. Your configuration.yaml still contains connection keys that have moved to the UI. Home Assistant has already imported them, so all you need to do is delete api_version, host, port, ssl, token, organization, bucket and any other connection or authentication keys from the influxdb: block, keep include/exclude, and restart. See Step 2.

No data appears in InfluxDB

Check the Home Assistant log for connection errors first — a wrong host or token is the most common cause. Confirm the entity you're checking for isn't accidentally caught by an exclude filter, and that InfluxDB and Home Assistant are both running.

Grafana connects but the panel is empty

This is almost always a mismatched _measurement or entity_id filter in the Flux query — use the InfluxDB v2 UI's Data Explorer to browse your actual measurement and tag names rather than guessing. Remember the measurement is usually the unit (°C, %, W) and the entity_id tag has no domain prefix.

"unsupported input type for mean aggregate: string"

You've selected a measurement without narrowing to a field. Tick _field → value and submit again — Home Assistant writes text fields alongside the numeric one and the default mean aggregate can't average those.

Restarting Home Assistant drops the connection

This is expected — the integration reconnects automatically once Home Assistant finishes starting, and any missed writes during the restart simply aren't recorded (InfluxDB doesn't backfill).

Is It Worth Setting Up?

For most casual users, Home Assistant's default 10-day recorder and the built-in Energy dashboard are enough. InfluxDB and Grafana earn their keep once you want year-over-year comparisons, custom alerting thresholds Grafana can email or Slack you about, or dashboards that combine Home Assistant data with other sources entirely — server metrics, network throughput, or a solar generation feed, for example. It's a bigger commitment than a stock Lovelace dashboard, but for anyone running Home Assistant as a serious home-data project rather than just light switches, it's one of the most useful additions you can make.

Buy the picks in this guide

Recommended for Home Automation

See all devices →

Frequently asked questions

Why does Home Assistant say the InfluxDB add-on has been removed from the repository?
The original InfluxDB add-on from Home Assistant Community Add-ons was built on InfluxDB 1.x, which InfluxData has end-of-lifed. The maintainers archived the repository in August 2026 and pulled it from the store, so anyone with it installed sees a repair notification and it will never update or come back. There's no built-in migration path. If you're setting up fresh, skip 1.x entirely and go straight to InfluxDB 2 — either via the unofficial community app at github.com/danieloldberg/addon-influxdbv2 on Home Assistant OS/Supervised, or as a standalone influxdb:2 Docker container alongside Home Assistant on Container or Core installs. If you have existing 1.x data you want to keep, back it up before attempting any export/import migration, since the process can damage your install if done carelessly.
Why does Home Assistant warn that the InfluxDB YAML configuration is being removed?
This is a separate change from the add-on retirement, and it affects everyone regardless of install method. Home Assistant is moving the InfluxDB connection settings out of configuration.yaml and into a UI config entry, and the repair warning says the YAML version stops working in 2026.9.0. The keys being removed are api_version, host, port, ssl, verify_ssl, ssl_ca_cert, username, password, database, token, organization, bucket and path. Home Assistant imports your existing YAML connection settings into the UI automatically, so the fix is simply to delete those keys from the influxdb: block and restart. The include, exclude and tags options stay in YAML.
Do I need InfluxDB and Grafana if I already use the Home Assistant Energy dashboard?
Not necessarily. The built-in Energy dashboard covers most household energy tracking needs out of the box, and it needs no extra software, no second database and no maintenance. The case for adding InfluxDB and Grafana is about the things the Energy dashboard deliberately doesn't do. It only covers energy, so it won't chart temperature, humidity, air quality or network throughput. It is also bound by the recorder's retention window, which defaults to ten days, so year-over-year comparisons are impossible. And it has no custom alerting. InfluxDB keeps every reading indefinitely, and Grafana lets you build any panel you like, set thresholds that email or message you, and combine Home Assistant data with sources outside Home Assistant entirely — server metrics or solar generation, for example. If none of that appeals, the Energy dashboard is genuinely enough.
Can I run InfluxDB and Grafana without Home Assistant OS?
Yes, and on Home Assistant Container or Core it's the only option — the app store (formerly the add-on store) requires Home Assistant OS or a Supervised install. On Container or Core you run InfluxDB and Grafana as ordinary Docker containers alongside Home Assistant. The important detail is that all three need to sit on the same Docker network so they can reach each other by name, which you get for free by defining them as services in a single Docker Compose project. Home Assistant then points at InfluxDB using the service name as the hostname, for example http://influxdb:8086, and Grafana uses the same URL for its data source. This route is arguably more durable than the app anyway, since it doesn't depend on a third-party repository staying maintained, and it's what we used to verify the steps in this guide.
What's the difference between InfluxDB 1.x and 2.x for Home Assistant?
InfluxDB 1.x authenticates with a database name, username and password, and the database has to be created manually before Home Assistant will write to it. InfluxDB 2.x replaces all three with an API token, an organisation and a bucket, and the bucket can be created automatically during first-run setup. The two also differ in Grafana: 1.x uses the InfluxQL query language, while 2.x uses Flux, so queries written for one won't run against the other. When you add the integration in Home Assistant, the first step of the config flow asks you to choose between InfluxDB v1.x and InfluxDB v2.x / v3, which determines which set of fields you're asked for. Since the 1.x add-on has been retired and InfluxData has end-of-lifed 1.x itself, there is no reason to start a new install on 1.x.
Does streaming data to InfluxDB slow down Home Assistant?
In normal use, no. The InfluxDB integration writes asynchronously, so state changes are queued and sent in the background rather than blocking Home Assistant's event loop, and the write volume for a typical home is trivial for a time-series database. Where it can bite is if you stream everything: a large installation with hundreds of entities, several of them updating every few seconds, adds both CPU load and a surprising amount of disk usage over months. That is exactly what the include and exclude filters in configuration.yaml are for. Restricting the stream to the domains you actually chart — sensor, binary_sensor, climate — and excluding noisy diagnostic entities keeps both the write rate and the storage footprint manageable, and makes your Grafana queries faster too, since there is less irrelevant data to scan.
How do I fix the "App InfluxDB has been removed from the repository" repair notice?
The notice means the original InfluxDB add-on, built on InfluxDB 1.x, has been retired and its community repository archived, so Home Assistant can no longer find it in the store. There is no in-place update that clears it. Before you submit the repair, which users report removes the app, back up Home Assistant and any InfluxDB data you want to keep. Then replace the add-on with InfluxDB 2: install the community InfluxDB v2 app on Home Assistant OS or Supervised, or run the official influxdb:2 Docker image on Container or Core installs. Finally, reconnect the InfluxDB integration and Grafana to the new instance, using the new organisation, bucket and token. Be aware that InfluxDB 2 uses a different data model from 1.x, so historic 1.x data does not carry over by itself and needs a separate export and import.

Sources

Sources verified 2026-09-08

  1. Home Assistant — InfluxDB — Home Assistant Integration Docs
  2. Grafana Labs — InfluxDB data source — Grafana Documentation
  3. Grafana Labs — Configure the InfluxDB data source — Grafana Documentation
  4. Home Assistant Community Add-ons — InfluxDB Add-on (archived/deprecated) — hassio-addons/addon-influxdb
  5. Home Assistant Community Add-ons — Grafana Add-on — hassio-addons/addon-grafana
  6. danieloldberg (GitHub) — InfluxDB v2 Add-on for Home Assistant — danieloldberg/addon-influxdbv2
  7. Home Assistant Community Forum — Repair issue: App InfluxDB has been removed from the repository
  8. Home Assistant — Recorder — Home Assistant Integration Docs
›How we researched this

Claims in this article are checked against primary sources — manufacturer specifications, official documentation, Which? research, Ofgem guidance, or gov.uk — rather than forum threads or video reviews. Where the author has direct hands-on experience with a product (most Home Assistant, Zigbee, and home-networking gear is running in his own homelab), that is stated explicitly in the text.

For categories outside that personal setup — such as boilers, heat pumps, and other areas that are traditionally a heating engineer's domain — verdicts are built from cross-referenced manufacturer data, published lab results, and vetted expert and owner reviews rather than a claim of personal hands-on testing. See the editorial policy for the full methodology.

Sepehr

Written by

Sepehr

10+ years hands-on with Home Assistant & networking · Research-backed elsewhere · No brand deals

Smart home specialist with 10+ years running a self-hosted Home Assistant setup — Zigbee2MQTT, Frigate NVR, and local-first automations. Independent coverage for UK homes, no brand deals.

LinkedIn →

Citing this page? Please use a dofollow link back to the original article — it helps us keep the data on this page accurate and up to date.

Related reading