[SOLVED] InfluxDB does not show any measurements

I have configured homeassistant to save my energy sensor’s data to influxDB. I followed all the guides I found in this forum and seems my configuration is correct, but I cannot found any data saved on InfluxDB. Can anyone help me?
Here there is my configuration.yaml:

customize: !include customize.yaml


    purge_keep_days: 2
    purge_interval: 2
            - automation
            - weblink
            - updater
            - sun.sun 
            - sensor.date

influxdb: host:
username: homeassistant
password: passwd
max_retries: 10
override_measurement: state
        - group.energySensor
    source: hass

groups: default_view:
    view: yes
    icon: mdi:home
        - group.energySensor
    name: EnergyMonitor
        - sensor.consumption
        - sensor.fetchedenergy
        - sensor.immissionenergy
        - sensor.production
        - sensor.selfconsumption

I have checked the identation (I’m not able to copy that here) and influxdb i’m sure its working because i use it on OpenHAB (that i would like to replace with Home assistant if I can make InfluxDB to work).
Thanks in advance.

See the blue box at the top of the page. We can’t generally help until this is correct.

Ok excuse me, I fixed that

That indentation doesn’t look correct, and I think you need to specify the entities explicitly, rather than from a group.

Also check the username and password for influxdb. Following the instructions has a - in the username, which you may or may not have copied.

Try this

  username: homeassistant
  password: passwd
  max_retries: 10
  override_measurement: state
        - sensor.consumption
        - sensor.fetchedenergy
        - sensor.immissionenergy
        - sensor.production
        - sensor.selfconsumption

Here there is the current file

    username: homeassistant
    password: passwd
    #ssl: true
    #verify_ssl: true
    max_retries: 10
    override_measurement: state
            - sensor.consumption
            - sensor.fetchedenergy
            - sensor.immissionenergy
            - sensor.production
            - sensor.selfconsumption
        source: hass

and regarding the access problem it works correctly if i access to the database with the command

influx -username homeassistant -password passwd -host

I don’t know what can be the problem because following the guides seems all correct.
I forgot to tell that I have installed Home Assistant and InfluxDB on Arch Linux aarch64 on an Odroid-C2

How are you trying to access the data?

After the log in inside the influx console I type

use home_assistant
show measurements

but it returns nothing and I don’t understand why.
I also checked if the port is the set to default and the influx console logs in in the port 8086.

The next step is to integrate Grafana, but I have already configured it in OpenHAB so would not be a problem.

Yes, that works fine on my db

Connected to http://localhost:8086 version 1.6.3
InfluxDB shell version: 1.6.3
> use home_assistant
Using database home_assistant
> show measurements
name: measurements

Does either the HA log or influxdb log show any errors?

And I notice the difference in your configuration from mine is the override_measurement and tags parameters, that I don’t use. They look fine according to the documentation, but it might be worth taking them out to test.

I removed all the config entries from influxdb except host, username and password, in this way, as it is described in config, it should store all the data in influxdb.
I also checked /etc/influxdb/influxdb.conf and the only thing different from default is:

# Determines whether HTTP endpoint is enabled.
enabled = true

# The bind address used by the HTTP service.
bind-address = ":8086"

# Determines whether user authentication is enabled over HTTP/HTTPS.
auth-enabled = true

I don’t know moreover where to look to have more information about this problem to find what’s going wrong… I mean in the logs it shows nothing so I don’t know what to do.

If HA can’t connect to influxdb, you get warnings like this in the log file

2018-10-10 16:22:31 ERROR (InfluxDB) [homeassistant.components.influxdb] Write error

Since you are not seeing those, I think HA is connecting correctly.

If you set the component logging to debug

  default: warning
      homeassistant.components.influxdb: debug

You should see lines like this whenever a sensor changes, that needs to update influxdb

2018-10-10 16:24:47 DEBUG (InfluxDB) [homeassistant.components.influxdb] Wrote 33 events
2018-10-10 16:24:53 DEBUG (InfluxDB) [homeassistant.components.influxdb] Wrote 3 events
2018-10-10 16:25:16 DEBUG (InfluxDB) [homeassistant.components.influxdb] Wrote 3 events
2018-10-10 16:25:35 DEBUG (InfluxDB) [homeassistant.components.influxdb] Wrote 3 events
2018-10-10 16:29:49 DEBUG (InfluxDB) [homeassistant.components.influxdb] Wrote 1 events

If its doing this, then the problem is probably at the influxdb end - but I don’t know about debugging that as it has always worked for me.

Sorry if I respond only today but I decided to make some tests to have something else for understand the problem.
I tried to update home-assistant to the last version and to remove the autentication on influxdb but i cannot write any data on that… I checked in the directory in which influxdb saves data and there is nothing regarding home_assistant database, so i think the problem is on influxdb side… I will try to reinstall influxdb and see if it will work!
Thaks a lot for helping!

I post an update regarding my situation.
I checked Influxdb installation and everithing is ok, I think the problem is on Home Assistant side.
I try to explain better my configuration: I have a sensor that push on MQTT broker every 7 seconds and data is saved correctly on recorder component.
My idea is to save also this data on Influxdb and to have a Retention Policy and a Continous Query to save instead that all this data an average every 5 minutes.
What make me think of an Home Assistant problem is that on Influxdb log there is no request about writing data from Home Assistant, while OpenHAB continues to write correctly.
The only thing that is written in log is:

2018-10-21 23:08:05 ERROR (MainThread) [homeassistant.components.updater] Got unexpected 
response: None

All I can say is that my configuration is working perfectly on my machine from MQTT sensors.

The MQTT sensors have the force_update parameter set, to send data to Influxdb for every reading, rather than just on status changes, but that should only make a difference if you data never changes.

I uninstalled both influxdb and home assistant and now (without any password/extra configuration) using just influxdb: on configuration.yaml seems to work… Maybe was an incorrect configuration somewhere but i’ll never know it!
Anyway thanks a lot for your help!

1 Like

Hello, i have installed the influxdb on a separate raspberry with raspbian buster and Im experiencing the same issue.
Hass.io connects to the database and sends data to influxdb but not all the data.
Some entities (sensors) are absent and I don’t know how to make it work.

As a counter measure i’ve installed mariadb/mysql to the same raspberry and made hass.io use that mysql database instead its internal db and miraculously all my entities are there! And i mean all of them.
Unfortunately i find it very difficult to make graphs in grafana with mariadb whereas with influx is a piece of cake.
Hass.io sends to both databases but only mariadb has all the entities.

Is there a bug in influxdb or hassio?

Hi all, is there a way to access to influxdb data in it is installed as addon on Hassio running within a VM on Proxmox on an Intel Nuc? I can access from ssh but I think the environment is limited, any help appreciated.

Same thing here… Influx doesn’t get everything by default. but should right?

Just an update…
Turns out Influxdb sends all data to the remote raspberry
You just have to look for it using the right strings.
For example I couldn’t find the temperature readings from the sensors using the entity id…
First i had to search for “oC” celcius entries and then the entity.

Hello, I am having the same issues as noted above, i.e. no data coming into the influx environment. Here is the code from my config.yaml file - what am I doing wrong?

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

I had the same issue, while adding the homeassistant user in InfluxDB, by default it does not have any permissions. When adding ALL permissions for this user, the problem is fixed, and data is being written in the InfluxDB.

1 Like