Skip to content

About

InfluxDB - Home Assistant Community Add-ons

Resources

Code of conduct

Contributing

Security policy

Stars

6 stars

Watchers

0 watching

Forks

ย 
ย 

Latest commit

ย 

History

346 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

vistalba/addon-influxdb โ€” maintained fork

This is a maintained fork of the archived hassio-addons/addon-influxdb.

Current components

Component Version
InfluxDB 1.13.1-1
Chronograf 1.11.6
Kapacitor 1.8.8-1
Base image ghcr.io/hassio-addons/debian-base:9.5.1
โ„น๏ธ 32-bit (armv7) support dropped: the 9.5.1 base image only ships amd64 and aarch64.

Migrating InfluxDB Data Between Home Assistant OS Add-ons

Move InfluxDB 1.x data from an old add-on to a new one on Home Assistant OS without extra disk space (uses an atomic rename, not a copy).

โš ๏ธ BACK UP FIRST โ€” the move is destructive! Step 3 uses an atomic mv, so the data is removed from the old add-on and there is no fallback if anything goes wrong. Before you start, create a full backup โ€” and ideally not only a Home Assistant snapshot:

  • Full system / VM image snapshot (e.g. Proxmox, ESXi, or a disk image of the SD card / SSD) so you can roll back the entire HA OS instance.
  • Or an off-box copy of /mnt/data/supervisor/apps/data/<OLD_SLUG> to external storage.

A Home Assistant snapshot alone may be insufficient (large InfluxDB data is often excluded or too big), so a VM/disk-image level backup is strongly recommended.

Prerequisites

  • Access via the Advanced SSH & Web Terminal add-on with Protection Mode disabled.
  • Both add-ons installed. Note their slugs (folder names) under /mnt/data/supervisor/apps/data/.
  • A verified full backup / VM image (see warning above).

1. Identify the container names and data paths

docker ps | grep -i influx

docker inspect <OLD_CONTAINER> --format '{{ range .Mounts }}{{ .Source }} -> {{ .Destination }}{{"\n"}}{{ end }}'
docker inspect <NEW_CONTAINER> --format '{{ range .Mounts }}{{ .Source }} -> {{ .Destination }}{{"\n"}}{{ end }}'

The data volume is mapped to /data, e.g. /mnt/data/supervisor/apps/data/<slug>.

2. Stop BOTH add-ons

In the Home Assistant UI: Settings -> Add-ons -> <add-on> -> Stop

Stopping flushes the WAL and closes all files, ensuring consistent data. Note: On HA OS, stopping an add-on removes its container (so docker cp won't work afterwards - that's why we use a helper container below).

3. Move the data (atomic rename, no extra space)

Both add-on folders live under the same partition, so a mv is an instant rename. A helper Alpine container mounts the shared parent directory:

docker run --rm \
  -v /mnt/data/supervisor/apps/data:/apps \
  alpine sh -c "mv /apps/<OLD_SLUG>/influxdb \
                   /apps/<OLD_SLUG>/chronograf.db \
                   /apps/<OLD_SLUG>/kapacitor \
                   /apps/<OLD_SLUG>/secret \
                   /apps/<NEW_SLUG>/"

Do NOT move options.json (managed by each add-on).

4. Verify the move

docker run --rm \
  -v /mnt/data/supervisor/apps/data/<NEW_SLUG>:/dst \
  alpine sh -c "ls -la /dst /dst/influxdb"

Expected in /dst/influxdb: data/, meta/, wal/.

5. Start the new add-on

Start the new add-on in the HA UI, then check the logs:

docker logs --tail 30 <NEW_CONTAINER>

6. Reconfigure the connectors

Both add-ons use port 8086, but the hostname and credentials may differ. In Home Assistant, add-ons are reachable by their slug as a hostname (slugs contain hyphens, e.g. influxdb-vistalba). Use <NEW_SLUG> (the new add-on's slug) as the hostname, or use the HA host IP instead.

Home Assistant -> InfluxDB (configuration.yaml)

influxdb:
  host: <NEW_SLUG>   # or HA host IP
  port: 8086
  database: homeassistant
  username: <USER>
  password: <PASS>
  ssl: false
  verify_ssl: false

Get username / password from the new add-on's Configuration tab. Restart Home Assistant (or reload the InfluxDB integration) afterwards.

Grafana -> InfluxDB (Data source)

Connections -> Data sources -> <your InfluxDB source>:

Field Value
URL http://<NEW_SLUG>:8086
Database homeassistant
User / Password credentials from the new add-on
HTTP Method GET or POST (as before)

Click Save & Test - it must report "datasource is working".

7. Post-migration tests

a) Databases and data present

# Add -username / -password if authentication is enabled
docker exec -it <NEW_CONTAINER> influx -username <USER> -password <PASS> \
  -execute "SHOW DATABASES"

docker exec -it <NEW_CONTAINER> influx -username <USER> -password <PASS> \
  -database homeassistant -execute "SHOW MEASUREMENTS" | head

b) Continuous Queries migrated

docker exec -it <NEW_CONTAINER> influx -username <USER> -password <PASS> \
  -execute "SHOW CONTINUOUS QUERIES"

Confirm the CQ service is enabled:

docker exec -it <NEW_CONTAINER> sh -c "grep -A3 continuous /etc/influxdb/influxdb.conf"
# expected: enabled = true

Verify a CQ is actually firing (the CQ target should hold recent timestamps). Replace <CQ_TARGET> with your actual continuous-query target name (list them with SHOW CONTINUOUS QUERIES above):

docker exec -it <NEW_CONTAINER> influx -username <USER> -password <PASS> \
  -database homeassistant \
  -execute 'SELECT * FROM "<CQ_TARGET>"./.*/ ORDER BY time DESC LIMIT 5'

c) Connector smoke tests

  • Home Assistant: confirm new points arrive (check the logs, or run a query filtered to a recent time range).
  • Grafana: open a dashboard and confirm panels render current data.

8. Clean up

Remove the old (deprecated) add-on only after all tests pass and you have confirmed your backup is intact.

Notes / Troubleshooting

  • Timezone error in Grafana (unable to find time zone CET): Newer Debian images split legacy zones into the tzdata-legacy package, so CET is missing. Replace tz('CET') with tz('Europe/Zurich') in your queries (always included in standard tzdata), or set the timezone in Grafana's dashboard settings instead.

Home Assistant Community App: InfluxDB v1

GitHub Release Project Stage License

Github Actions Project Maintenance GitHub Activity

Sponsor Frenck via GitHub Sponsors

Support Frenck on Patreon

InfluxDB 1.x time series database with Chronograf and Kapacitor.

About

InfluxDB is an open source time series database optimized for high-write-volume. It's useful for recording metrics, sensor data, events, and performing analytics. It exposes an HTTP API for client interaction and is often used in combination with Grafana to visualize the data.

This app provides the InfluxDB 1.x series (InfluxQL, the 1.x HTTP API and the classic database, user and retention policy model). It is not InfluxDB 2 or InfluxDB 3; those have a different API, data model and configuration. If you are integrating with Home Assistant, use the influxdb integration with api_version: 1, which is the default.

Chronograf in the Home Assistant Frontend

This app comes with Chronograf and Kapacitor pre-installed, which gives you a nice InfluxDB admin interface for managing your users, databases and data retention settings, and lets you peek inside the database using the Data Explorer.

๐Ÿ“š Read the full app documentation

Support

Got questions?

You have several options to get them answered:

You could also open an issue here on GitHub.

Contributing

This is an active open-source project. We are always open to people who want to use the code or contribute to it.

We have set up a separate document containing our contribution guidelines.

Thank you for being involved! ๐Ÿ˜

Authors & contributors

The original setup of this repository is by Franck Nijhof.

For a full list of all authors and contributors, check the contributor's page.

We have got some Home Assistant apps for you

Want some more functionality to your Home Assistant instance?

We have created multiple apps for Home Assistant. For a full list, check out our GitHub Repository.

License

MIT License

Copyright (c) 2018-2026 Franck Nijhof

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

InfluxDB - Home Assistant Community Add-ons

Resources

Code of conduct

Contributing

Security policy

Stars

6 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages