Hi everyone.
I have a strange issue. I wanted to write a simple value to the InfluxDB (ver 1.x). I wanted this value to be saved with time 00:00 -(minus) 24 hours. So I made a simple code which calculate that timestamp. It worked ok, I mean data get into the InfluxDB. But when I look closely I figured out that values were not saved at 00:00 of previous day but at 23:57 !?
So I have made a test. I send the value with no time stamp - influxDB will assign time stamp at the time of data received. And guess what? The time is shifted by 3 min!
I have checked all the synchro with NTP by home assistant and everything is set ok. HA time is correct. My UTC zone is +1 but I knew that. InfluxDB is set up to UTC but there shouldn’t be differences in minutes but in rounded hours, right?
Can anyone help me with this ?
How are you running influx? With the addon? Do the entries made by HA to influx time shift as well?
Hi,
HA is running on RPi4. All of the entries are done by the Node-Red.
This is the influx addon? Do you have an influx entry in your config.yaml as shown below?
influxdb:
host: a0d7b954-influxdb
port: 8086
database: homeassistant
username: homeassistant
password: <yourpassword>
max_retries: 3
default_measurement: state
Hi,
Yes, InfluxDB is installed as add-on.
And no, I do not have entries in config.yaml like that. I don’t need HA to send anything to InfluxDB. Only program which use database is Node-Red.
I understand that. I wanted to know if the time shift also happens when ha writes to the db. If it shifts from HA, it’s likely something in influx, if not nodered. Have you looked in influx/NR logs to see if there are any hint of whats happening.
Hi, I have made a test. In the HA terminal I asked for actual time and at the same time I asked node red for actual time. There was no differences.
There are no logs in InfluxDB to check.
It’s not a question of whether or not HA and NR have the same time. The question is, when influx is integrated in HA do the entries that home assistant enters get time shifted as well.
Another question is does it need to be integrated in order to sync time.