After upgrade to 0.116.0 and 0.116.1 no data anymore sent to influxdb v2rc0 + zeroconf error in logfile

Yesterday I upgraded from 0.115.6 to the 0.116.0 version. Everything was working.
Then I upgraded my python 3.7.5 to 3.8.0 in my python venv (I’m running the HA core in python venv on a Ubuntu virtual machine)
After reinstalling the missing mysqlclient module in the new python 3.8, HA was working again with my MariaDB and I saw data appearing in my influxdb. Great :slight_smile:

But today I saw no data anymore in my influxdb and in the logfile of HA, I had the errors mentioned here : 116: Recorder issues – Instance is not present in this Session .
After rebooting I saw not anymore the instance error but another error:

2020-10-08 19:42:06 WARNING (zeroconf-Engine-2367) [zeroconf] Choked at offset 29 while unpacking b'\x00\x00\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x0bHello world\x00\x05_http$
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.8/site-packages/zeroconf/__init__.py", line 715, in __init__
    self.read_questions()
  File "/srv/homeassistant/lib/python3.8/site-packages/zeroconf/__init__.py", line 756, in read_questions
    name = self.read_name()
  File "/srv/homeassistant/lib/python3.8/site-packages/zeroconf/__init__.py", line 864, in read_name
    raise IncomingDecodeError("Bad domain name at %s" % (off,))
zeroconf.IncomingDecodeError: Bad domain name at 30

Reading in the release notes that homekit was now supported via zeroconfig and that there was a new version 0.116.1, I installed the new version, hoping that the error would go away.
But no luck, the error is still appearing and still no data is send to influxdb.
Are these two related?

Are there other people with the same problem?

@sender, this post is about a problem between Grafana and influxDB.
My problem is that influxDB isn’t receiving any data anymore fro HA since the update to 0.116.x

In 0.115.x there was no problem.

Am I the only one with this problem? :frowning:

In the HA logfile no error is occurring about influxdb.
If I stop the influxdb docker image, I see warnings in the HA log file about not be able anymore to connect to influxdb.
If I restart the influxdb docker image, the warnings are gone.
So HA is connecting to the influxdb api, but I don’t see any data in influxdb.
I see only the old data sent by HA before the update to 0.116.x

I think I found it.

I was looking in GitHub which changes were done on the influxdb integration code between version 0.115.x and 0.116.x and on the master branch I saw that a new option was added ‘precision’ (https://github.com/home-assistant/core/pull/38454)
According to the documentation this option is optional

precision string (Optional, default: ns) 
Set this to specify the time precision sent to influxdb. Setting a coarser precision allows InfluxDb to compress your data better. If not set, defaults to ns.

This option was not set in my configuration.
So, I added this option to my configuration, restarted HA and bam, I was again receiving values in my influxdb.

I will let it run now for some time to see if it is really the solution.
To be continued.

Meanwhile, I saw the following in the code core/const.py (https://github.com/twdkeule/core/blob/393becb2a0c1a4a718c63baa9349cb1fbe698fb6/homeassistant/components/influxdb/const.py)

2020-10-13 22_01_55-influxdb - const.py

There is no default defined for the CONF_PRECISION, so it is not optional, but required…

I think a lot of people are still on influxdb v1 which doesn’t have the issue. Should be solved in 0.116.4 for influxdb v2.

@RobBie1221, thanks for the pull request with the correction :slight_smile:

I just started 2? weeks ago with influxdb, so I did take directly their new version 2.0.
I was not completely correct in my debugging, but it was enough so that you could correct it.
Thanks

For completeness, the zeroconf error has nothing to do with the influxdb v2 problem.

See After upgrade to 0.116.0 and 0.116.1 no data anymore sent to influxdb v2rc0 + zeroconf error in logfile for the solution for the influxdb v2 problem.

I have still the zeroconf error, but it is not taken down my HA, so for the moment, I can live with it.