Home Assistant Community Add-on: InfluxDB

When I configured this, following the instructions, the InfluxDB panel was blank. In order for it to be displayed I had to change the panel_iframe url to use https, not http. I hope this is of help to others in this situation :slightly_smiling_face:

Do I have to complete some configuration in order to get Nest thermostat data into the database so I can visualize it in Grafana?

Hm i have the same issue but https does not help and the webgui of the Influxdb itself is working. Its just blank within iframe … does anyone have any other ideas?

Same happens for the grafana component :neutral_face:

My issue is solved :yum: For anyone interested … at least chrome seems to block unsecure scripts from starting.
So chrome blocked the site from opening inside Homeassistant. There has been a message in the adressbar in regards to the scripts.

1 Like

Hmm thats weird i get this message every time i restart the browser. Does anyone know what kind of scripts these are? When i am accessing the normal WebGui of Influxdb or Grafana that does not happen at all.

I get the following when trying to open the web ui after install.

This site can’t be reached
mysite.duckdns.org refused to connect.
Try:

Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSED

I am using ssl via duckdns.

Here is my config.

“log_level”: “info”,
“username”: “meuser”,
“password”: “tohardtoremember”,
“auth”: true,
“ssl”: true,
“certfile”: “fullchain.pem”,
“keyfile”: “privkey.pem”,
“ipv6”: true

This is the last line in the logs.

ts=2018-06-08T17:40:26.914-05:00 lvl=error msg=“failed to connect to InfluxDB, retrying…” service=influxdb cluster=default err=“Get http://localhost:8086/ping: dial tcp 127.0.0.1:8086: connect: connection refused”

any ideas. I am running the latest version of HASSIO on a rpi3.

I use configurator on this install and it opens its web UI just fine.

Thanks for any help

:tada: Release v0.2.0

This release fixes the weirdness going on with saving dashboards, sorry for this.

Full Changelog

Added

  • Adds gpg-agent 2.2.4-1ubuntu1

Fixed

  • Fixes gpg check in Ubuntu Bionic

Changed

  • yml to yaml and OPEN WEB UI (#2) (@ferazambuja)
  • Upgrades Ubuntu base image to 2.0.0
  • Updates nginx to 1.14.0-0ubuntu1
  • Updates apache2-utils to 2.4.29-1ubuntu4
  • Rewrites GitLab CI

Removed

  • Removes problematic headers from NGinx configuration

:tada: Release v0.2.1

Full Changelog

Changed

  • Upgrades gpg to 2.2.4-1ubuntu1.1
  • Upgrades Chronograf to v1.5.0.1

I would be great to be able to get collectd data into this Influxdb instance to be displayed in your Grafana plugin.
No way to access the config file of Influxdb of this addon?

Thanks a lot for your work!

I’ve replied on the GitHub issues: Collectd in influxdb · Issue #1 · hassio-addons/addon-influxdb · GitHub

Even if you could (which you can using Docker), it would not persist… that’s how Docker containers work. So it would be better to get in it in. Please join me on GitHub. I’ve already build the feature, testing is the issue… (I think).

Is there any reason why home assistant would only send data to influxdb every few minutes instead of every time the sensor has a reading?

I have a mqtt temp and humidity sensor set up to take a reading every 2 minuets but if I go through my influxdb entries I have very few readings and are more then 2 min apart.

I’m getting a similar error. Have you found a fix?

@aadler Could you please share your logs and give a description of your setup. That would allows us to help you debug the issue.

Absolutely!

I’m on a Raspberry Pi 3 running Hass.io version 0.61.1. Actually the larger issue I’m having is that I can’t get hass.io to recognize the config entry for influxdb, after pasting your code from the github readme:

influxdb:
  host: a0d7b954-influxdb
  port: 8086
  database: homeassistant
  username: homeassistant
  password: strongpassword
  max_retries: 3
  default_measurement: state

At first the log looks like it doesn’t connect, then it seems to connect to kapacitor; but I honestly don’t know what I’m looking at. I have tried this with and without “ssl:” true. Additionally I have deleted and remade the homeassistant user on influxdb via the web ui and re-added all permissions:

[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing…
Log level is set to INFO
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] 02-updates.sh: executing…

INFO: You are running the latest version of this add-on
[cont-init.d] 02-updates.sh: exited 0.
[cont-init.d] 10-requirements.sh: executing…
[cont-init.d] 10-requirements.sh: exited 0.
[cont-init.d] 11-nginx.sh: executing…
Adding password for user
[cont-init.d] 11-nginx.sh: exited 0.
[cont-init.d] 20-system-users.sh: executing…
Failed to connect to http://localhost:8086: Get http://localhost:8086/ping: dial tcp 127.0.0.1:8086: getsockopt: connection refused
Please check your connection settings and ensure ‘influxd’ is running.
Failed to connect to http://localhost:8086: Get http://localhost:8086/ping: dial tcp 127.0.0.1:8086: getsockopt: connection refused
Please check your connection settings and ensure ‘influxd’ is running.
Failed to connect to http://localhost:8086: Get http://localhost:8086/ping: dial tcp 127.0.0.1:8086: getsockopt: connection refused
Please check your connection settings and ensure ‘influxd’ is running.
Failed to connect to http://localhost:8086: Get http://localhost:8086/ping: dial tcp 127.0.0.1:8086: getsockopt: connection refused
Please check your connection settings and ensure ‘influxd’ is running.
Failed to connect to http://localhost:8086: Get http://localhost:8086/ping: dial tcp 127.0.0.1:8086: getsockopt: connection refused
Please check your connection settings and ensure ‘influxd’ is running.
Failed to connect to http://localhost:8086: Get http://localhost:8086/ping: dial tcp 127.0.0.1:8086: getsockopt: connection refused
Please check your connection settings and ensure ‘influxd’ is running.
[cont-init.d] 20-system-users.sh: exited 0.
[cont-init.d] 21-auth.sh: executing…
/var/run/s6/etc/cont-init.d/20-system-users.sh: line 9: 505 Terminated influxd
[cont-init.d] 21-auth.sh: exited 0.
[cont-init.d] 30-kapacitor.sh: executing…
[cont-init.d] 30-kapacitor.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
INFO: Starting Chronograf
INFO: Starting the InfluxDB
time=“2018-06-23T23:38:20-04:00” level=info msg=“Serving chronograf at http://127.0.0.1:8889” component=server
time=“2018-06-23T23:38:20-04:00” level=info msg=“Reporting usage stats” component=usage freq=24h reporting_addr=“https://usage.influxdata.com” stats=“os,arch,version,cluster_id,uptime”
INFO: Starting the Kapacitor

‘##:::’##::::‘###::::’########:::::‘###:::::’######::‘####:’########::‘#######::’########::
##::‘##::::’## ##::: ##… ##:::‘## ##:::’##… ##:. ##::… ##…::‘##… ##: ##… ##:
##:’##::::‘##:. ##:: ##:::: ##::’##:. ##:: ##:::…::: ##::::: ##:::: ##:::: ##: ##:::: ##:
#####::::‘##:::. ##: ########::’##:::. ##: ##:::::::: ##::::: ##:::: ##:::: ##: ########::
##. ##::: #########: ##…::: #########: ##:::::::: ##::::: ##:::: ##:::: ##: ##… ##:::
##:. ##:: ##… ##: ##:::::::: ##… ##: ##::: ##:: ##::::: ##:::: ##:::: ##: ##::. ##::
##::. ##: ##:::: ##: ##:::::::: ##:::: ##:. ######::'####:::: ##::::. #######:: ##:::. ##:
…::::…::…:::::…::…:::::::::…:::::…:::…:::…:::::…::::::…:::…:::::…::

2018/06/23 23:38:22 Using configuration at: /etc/kapacitor/kapacitor.conf
ts=2018-06-23T23:38:22.746-04:00 lvl=error msg=“failed to connect to InfluxDB, retrying…” service=influxdb cluster=default err=“Get http://localhost:8086/ping: dial tcp 127.0.0.1:8086: connect: connection refused”
ts=2018-06-23T23:38:23.471-04:00 lvl=error msg=“failed to connect to InfluxDB, retrying…” service=influxdb cluster=default err=“Get http://localhost:8086/ping: dial tcp 127.0.0.1:8086: connect: connection refused”
ts=2018-06-23T23:38:23.874-04:00 lvl=error msg=“failed to connect to InfluxDB, retrying…” service=influxdb cluster=default err=“Get http://localhost:8086/ping: dial tcp 127.0.0.1:8086: connect: connection refused”

And some time after that…

time=“2018-06-23T23:54:19-04:00” level=info msg=“Serving assets” component=server method=GET remote_addr=“127.0.0.1:45232” url=/
time=“2018-06-23T23:54:19-04:00” level=info msg=“Response: OK” component=server method=GET remote_addr=“127.0.0.1:45232” response_time=10.613626ms status=200
time=“2018-06-23T23:54:19-04:00” level=info msg=“Serving assets” component=server method=GET remote_addr=“127.0.0.1:45234” url=/chronograf.css
time=“2018-06-23T23:54:19-04:00” level=info msg=“Serving assets” component=server method=GET remote_addr=“127.0.0.1:45240” url=/app.eccd31db11288ddfea45.js
time=“2018-06-23T23:54:19-04:00” level=info msg=“Serving assets” component=server method=GET remote_addr=“127.0.0.1:45236” url=/manifest.57b78255a267af8ab717.js
time=“2018-06-23T23:54:19-04:00” level=info msg=“Response: Not Modified” component=server method=GET remote_addr=“127.0.0.1:45236” response_time=5.064445ms status=304
time=“2018-06-23T23:54:19-04:00” level=info msg=“Serving assets” component=server method=GET remote_addr=“127.0.0.1:45238” url=/vendor.046b803da2dab4dc2c33.js
time=“2018-06-23T23:54:20-04:00” level=info msg=“Response: Not Modified” component=server method=GET remote_addr=“127.0.0.1:45240” response_time=394.749782ms status=304
time=“2018-06-23T23:54:20-04:00” level=info msg=“Response: Not Modified” component=server method=GET remote_addr=“127.0.0.1:45234” response_time=453.907509ms status=304
time=“2018-06-23T23:54:20-04:00” level=info msg=“Response: Not Modified” component=server method=GET remote_addr=“127.0.0.1:45238” response_time=1.003935931s status=304
time=“2018-06-23T23:54:21-04:00” level=info msg=“Serving assets” component=server method=GET remote_addr=“127.0.0.1:45242” url=/ac3f799d5bbaf5196fab15ab8de8431c.ttf
time=“2018-06-23T23:54:21-04:00” level=info msg=“Response: OK” component=server method=GET remote_addr=“127.0.0.1:45244” response_time=1.381917ms status=200
time=“2018-06-23T23:54:21-04:00” level=info msg=“Response: OK” component=server method=GET remote_addr=“127.0.0.1:45246” response_time=“460.569µs” status=200
time=“2018-06-23T23:54:21-04:00” level=info msg=“Response: OK” component=server method=GET remote_addr=“127.0.0.1:45248” response_time=2.789668ms status=200
time=“2018-06-23T23:54:21-04:00” level=info msg=“Response: OK” component=server method=GET remote_addr=“127.0.0.1:45250” response_time=“390.206µs” status=200

Those logs look fine btw! That connection error is expected, Chronograf is starting and connecting to InfluxDB, which is not ready at that time yet… I will just keep retrying until it does. (which it does, since You’ve been able to access the interface).

It seems like Home Assistant has issues connecting. Is there anything visible in the Home Assistant logs?

Hmm the only two lines with influxdb seem to point to an authorization issue:

2018-06-23 23:56:44 ERROR (SyncWorker_11) [homeassistant.components.influxdb] Database host is not accessible due to '401: {“error”:“authorization failed”}
2018-06-23 23:56:44 ERROR (MainThread) [homeassistant.setup] Setup failed for influxdb: Component failed to initialize.

Check that the username and password in the hass config match exactly with the user and pass you setup in influxdb

@atomicpapa That is uncanny. I triple checked the login/pw last night (it wasn’t a complicated pw to begin with but I simplified it even further). For sanity I’m going to revert it back to what it was and see if I’m just mentally programmed to typo that particular password.

:tada: Release v0.2.2

Full Changelog

Changed

  • Updates InfluxDB to v1.5.4

Hi Frenk,
In the end, I have setup a docker container with Telegraf. It supplies mostly the same information as Collectd, allows to have a config file at the host system and comunicates gracefully with the Influxdb instance of your plugin.
https://hub.docker.com/_/telegraf/

1 Like