Hi there. I’ve been using InfluxDB to collect data from various servers and machines, and I’ve ported all that to a database instance on my Home Assistant install. It’s working fine, I can use the queries in Influx/Chronograph.
I cannot for the life of me get a sensor working in HA to read that data! Even stranger, no matter what I do, I can’t see any errors in the log files, which makes me think I’m missing something pretty fundamental.
I’ve defined InfluxDB, and am sending all my HA data to it just to check connectivity:
influxdb:
host: 192.168.1.103
port: 8086
api_version: 1
database: homeassistant
username: 'homeassistant'
password: 'supersecretnotreallymypassword'
ssl: false
verify_ssl: false
max_retries: 3
default_measurement: state
This is working fine, sending to the HomeAssistant DB. The problem is the sensor. If I run this query in InfluxDB, it gives me loads of data:
SELECT value FROM "telegraf"."autogen"."temp_cpu" where time<now() GROUP BY "host"
Obviously it’s a different DB, but my sensor can’t seem to read it:
sensor:
- platform: influxdb
host: 192.168.1.103
port: 8086
api_version: 1
username: 'telegraf'
password: 'rightpasswordforthisuser'
queries:
- name: CPU temperatures
measurement: '"autogen"."temp_cpu"'
where: 'time < now()'
field: 'value'
database: telegraf
group_function: 'last'
I’ve tried as many combinations of quotes, using the whole database name, etc, and none of it seems to work. I would expect an error in the log files at least.
Any ideas?