Home Assistant Community Add-on: InfluxDB

My power meter reports power every second. With the default settings, is there some kind of downsampling in influxdb? And if not is there some kind of way to do this in the webinterface, if not some way with commands that is pretty easy for a newbie like me to follow?`(I would for instance like to truncate 1 s measurements into 1 minute when they are 1 week old, and 30 minutes when they are older than a year for instance) (if not the database will get pretty big)

Hi,
Having trouble setting up the db after a reinstall since the sd card broke.
Logg in Hassio tells me its writing data to influx.
In Influx I get the message: Unable to get hosts and there are no data to display

When i restart influx it stops at: INFO: Starting NGinx server…
Not sure if this is a clue why it doesnt work

I have setup everything accoring to the manual and reinstalled influx but without any success.

Any ideas what Im missing?

Hi, Im struggling with the same error. Did you manage to find a solution?

I did - use Chrome. There seems to be an issue between Chronograph and some versions of Firefox. I tried in Chrome, worked fine.

Thanks! That was it! Was on an old version of Chrome. After updating everything worked fine

I am using latest version, anyone knows what are these errors and warnings?

https://pastebin.com/mPqJaYgC

2019-04-08 18:01:23 WARNING (InfluxDB) [homeassistant.components.influxdb] Catching up, dropped XY old events

requests.exceptions.ReadTimeout: HTTPConnectionPool(host='a0d7b954-influxdb', port=8086): Read timed out. (read timeout=5)

I installed Hass.io yesterday on a Pi. Running version 0.91.3. I installed InfluxDB 2.0.0 today using Frenck’s youtube video tutorial. It all seemed to work just fine. I got some sensors through and then suddenly I seemed to get errors in the logs:

Sat Apr 13 2019 19:37:39 GMT+0200 (CEST)

Write error
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py”, line 384, in _make_request
six.raise_from(e, None)
File “”, line 2, in raise_from
File “/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py”, line 380, in _make_request
httplib_response = conn.getresponse()
File “/usr/local/lib/python3.7/http/client.py”, line 1321, in getresponse
response.begin()
File “/usr/local/lib/python3.7/http/client.py”, line 296, in begin
version, status, reason = self._read_status()
File “/usr/local/lib/python3.7/http/client.py”, line 257, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), “iso-8859-1”)
File “/usr/local/lib/python3.7/socket.py”, line 589, in readinto
return self._sock.recv_into(b)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/requests/adapters.py”, line 449, in send
timeout=timeout
File “/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py”, line 638, in urlopen
_stacktrace=sys.exc_info()[2])
File “/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py”, line 367, in increment
raise six.reraise(type(error), error, _stacktrace)
File “/usr/local/lib/python3.7/site-packages/urllib3/packages/six.py”, line 686, in reraise
raise value
File “/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py”, line 600, in urlopen
chunked=chunked)
File “/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py”, line 386, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
File “/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py”, line 306, in _raise_timeout
raise ReadTimeoutError(self, url, “Read timed out. (read timeout=%s)” % timeout_value)
urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host=‘localhost’, port=8086): Read timed out. (read timeout=5)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/homeassistant/components/influxdb/init.py”, line 312, in write_to_influxdb
self.influx.write_points(json)
File “/usr/local/lib/python3.7/site-packages/influxdb/client.py”, line 490, in write_points
tags=tags, protocol=protocol)
File “/usr/local/lib/python3.7/site-packages/influxdb/client.py”, line 551, in _write_points
protocol=protocol
File “/usr/local/lib/python3.7/site-packages/influxdb/client.py”, line 327, in write
headers=headers
File “/usr/local/lib/python3.7/site-packages/influxdb/client.py”, line 267, in request
timeout=self._timeout
File “/usr/local/lib/python3.7/site-packages/requests/sessions.py”, line 533, in request
resp = self.send(prep, **send_kwargs)
File “/usr/local/lib/python3.7/site-packages/requests/sessions.py”, line 646, in send
r = adapter.send(request, **kwargs)
File “/usr/local/lib/python3.7/site-packages/requests/adapters.py”, line 529, in send
raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPConnectionPool(host=‘localhost’, port=8086): Read timed out. (read timeout=5)

No data appears in InfluxDB anymore. I can still login into the web interface, but I can not see anymore what was imported.

Edit: Did a restart of the add-on. Storing data went fine for about 30 minutes. No issues and errors. And the suddenly the error happened again.

How do I fix this error?

[EDIT] Seems the problem fixed itself.During the night data came through and did not have any errors anymore. Not sure what happened.

:tada: Release v3.0.0

Full Changelog

This release adds Hass.io Ingress support to the add-on :tada:

Changed

  • :arrow_up: Upgrades base image to v3.1.0
  • :arrow_up: Upgrades lua-resty-http to 0.13-0
  • :arrow_up: Upgrades Chronograf to 1.7.9
  • :fire: Removes GPG signature checks. InfluxData fails to deliver the signatures.
  • :sparkles: Adds Hassio Ingress support
  • :hammer: Improves S6 finish scripts
  • :hammer: Simplifies add-on code logic
  • :books: Tweaked README a little
  • :ambulance: Fixes error in init scripts execution order

Questions? Join our Discord server! https://discord.me/hassioaddons
Enjoying my add-ons? Consider supporting my work: https://patreon.com/frenck

1 Like

I was trying to add database when i add new user i’m not able to set permission :confused: anyone experiencing same issue?

I’ve found the issue with it, now looking into a proper solution.

2 Likes

I get this error after update to latest version:

2019/04/15 23:43:02 Using configuration at: /etc/kapacitor/kapacitor.conf
ts=2019-04-15T23:43:02.067+02:00 lvl=error msg="failed to create database" service=kapacitor task_master=main task=chronograf-v1-cedcbaa1-70e8-421a-af70-34461e37a232 node=influxdb_out5 err="retention policy conflicts with an existing policy" database=chronograf cluster=
time="2019-04-15T23:43:02+02:00" level=info msg="Serving chronograf at http://127.0.0.1:8889" component=server 
time="2019-04-15T23:43:02+02:00" level=info msg="Reporting usage stats" component=usage freq=24h reporting_addr="https://usage.influxdata.com" stats="os,arch,version,cluster_id,uptime" 
[23:43:02] INFO: Starting NGinx...

I can access influx with the button “Open web UI” but not directly on port 8888 that i have since before (and now re-added)

Unfortunately same here.
Error message: “Failed to update User Permissions: undefined”

Issue has been identified, awaiting Home Assistant 0.91.4

1 Like

Updating to Home Assistant 0.91.4 solved the issue

:tada: Release v3.0.1

Full Changelog

Changed

  • :ambulance: Increases NGinx wait timeout for slower devices
  • :arrow_up: Bumps Home Assistant requirement to 0.91.4

Questions? Join our Discord server! https://discord.me/hassioaddons
Enjoying my add-ons? Consider supporting my work: https://patreon.com/frenck

1 Like

:tada: Release v3.0.2

Full Changelog

Changed

  • :ambulance: Fixes direct access to the web interface

Questions? Join our Discord server! https://discord.me/hassioaddons
Enjoying my add-ons? Consider supporting my work: https://patreon.com/frenck

1 Like

:tada: Release v3.0.3

Full Changelog

Changed

  • :arrow_up: Upgrades InfluxDB to 1.7.6
  • :arrow_up: Upgrades Chronograf to 1.7.10

Questions? Join our Discord server! https://discord.me/hassioaddons
Enjoying my add-ons? Consider supporting my work: https://patreon.com/frenck

1 Like

:tada: Release v3.0.4

Full Changelog

:sparkles: This release adds support for the “Add to sidebar” feature that became available in Home Assistant 0.92.

Please note: You need to have Home Assistant 0.92 or newer to be able to install this update.

:hammer: Changes

  • :arrow_up: Updates Home Assistant requirement to 0.92.0b2
  • :sparkles: Adds support for showing in sidebar
  • :books: Removes obsolete iframe URL section from README

Questions? Join our Discord server! https://discord.me/hassioaddons
Enjoying my add-ons? Consider supporting my work: https://patreon.com/frenck

I’m having a problem with InfluxDB that I just noticed. I’m getting this error message in my log:

2019-04-25 17:28:28 WARNING (SyncWorker_14) [homeassistant.components.influxdb] Database host is not accessible due to ‘HTTPConnectionPool(host=‘a0d7b954-influxdb’, port=8086): Max retries exceeded with url: /write?db=homeassistant (Caused by NewConnectionError(’<urllib3.connection.HTTPConnection object at 0x7fc99de3f780>: Failed to establish a new connection: [Errno -2] Name does not resolve’))’, please check your entries in the configuration file (host, port, etc.) and verify that the database exists and is READ/WRITE. Retrying again in 60 seconds.

This made me think it couldn’t resolve the host name, but I’m using the one from the guide in my config. It looks like this:

influxdb:
  host: a0d7b954-influxdb
  port: 8086
  database: homeassistant
  username: homeassistant
  password: my_password
  max_retries: 3
  default_measurement: state
  include:
    domains:
      - sensor

I’ve done nothing to change the config for several months. I have no idea what is going on.

Dear,
I would like to set
parse data not included in my list (which was previously recorded) in my database
Please guide for parsing states, entities anything which is not included in include.
thanks in adv.