InfluxDBClientError: 400:

Have bin running influxdb for a weak+ now and and it has bin running fine. But now Im getting a lot of errors like this

16-10-06 21:42:04 homeassistant.components.influxdb: Error saving event "[{'tags': {'entity_id': 'wc_view', 'domain': 'group'}, 'time': datetime.datetime(2016, 10, 6, 19, 42, 4, 609203, tzinfo=<UTC>), 'measurement': 'group.wc_view', 'fields': {'hidden': True, 'entity_id': ('group.wc', 'media_player.wc', 'sensor.badrum', 'sensor.badrum_2', 'binary_sensor.4_in_1_sensor', 'sensor.embedded_humidity_s', 'sensor.embedded_temperatur', 'switch.4_in_1_sensor'), 'value': 0, 'view': True, 'order': 8, 'friendly_name': 'WC'}}]" to InfluxDB
Traceback (most recent call last):
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/influxdb.py", line 121, in influx_event_listener
    influx.write_points(json_body)
  File "/home/hass/.homeassistant/deps/influxdb/client.py", line 402, in write_points
    tags=tags)
  File "/home/hass/.homeassistant/deps/influxdb/client.py", line 447, in _write_points
    expected_response_code=204
  File "/home/hass/.homeassistant/deps/influxdb/client.py", line 289, in write
    headers=headers
  File "/home/hass/.homeassistant/deps/influxdb/client.py", line 259, in request
    raise InfluxDBClientError(response.content, response.status_code)
influxdb.exceptions.InfluxDBClientError: 400: {"error":"unable to parse 'group.wc_view,domain=group,entity_id=wc_view entity_id=('group.wc', 'media_player.wc', 'sensor.badrum', 'sensor.badrum_2', 'binary_sensor.4_in_1_sensor', 'sensor.embedded_humidity_s', 'sensor.embedded_temperatur', 'switch.4_in_1_sensor'),friendly_name=\"WC\",hidden=True,order=8i,value=0i,view=True 1475782924609202944': invalid boolean"}

16-10-06 21:33:14 homeassistant.components.influxdb: Error saving event "[{'tags': {'entity_id': 'extrarum', 'domain': 'media_player'}, 'time': datetime.datetime(2016, 10, 6, 19, 33, 14, 932756, tzinfo=<UTC>), 'measurement': 'media_player.extrarum', 'fields': {'source_list': ['Line-in', 'TV', 'Radio'], 'media_content_type': 'music', 'media_content_id': 'Elephant', 'value': 'paused', 'entity_picture': '/api/media_player_proxy/media_player.extrarum?token=1760272368&cache=a0289', 'media_duration': 211, 'supported_media_commands': 10815, 'volume_level': 0.46, 'is_volume_muted': False, 'friendly_name': 'Extrarum', 'media_title': 'Tame Impala - Elephant'}}]" to InfluxDB
Traceback (most recent call last):
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/influxdb.py", line 121, in influx_event_listener
    influx.write_points(json_body)
  File "/home/hass/.homeassistant/deps/influxdb/client.py", line 402, in write_points
    tags=tags)
  File "/home/hass/.homeassistant/deps/influxdb/client.py", line 447, in _write_points
    expected_response_code=204
  File "/home/hass/.homeassistant/deps/influxdb/client.py", line 289, in write
    headers=headers
  File "/home/hass/.homeassistant/deps/influxdb/client.py", line 259, in request
    raise InfluxDBClientError(response.content, response.status_code)
influxdb.exceptions.InfluxDBClientError: 400: {"error":"unable to parse 'media_player.extrarum,domain=media_player,entity_id=extrarum entity_picture=\"/api/media_player_proxy/media_player.extrarum?token=1760272368\u0026cache=a0289\",friendly_name=\"Extrarum\",is_volume_muted=False,media_content_id=\"Elephant\",media_content_type=\"music\",media_duration=211i,media_title=\"Tame Impala - Elephant\",source_list=['Line-in', 'TV', 'Radio'],supported_media_commands=10815i,value=\"paused\",volume_level=0.46 1475782394932755968': invalid boolean"}

I think that this have started after my last upgrade of HA to 0.29.7 but im not shure. Anyone more who has these problems?

Can you give it a try when the media player is backlisted?

Hi,
I think I might have a similar problem.
I have never used influxdb before - just thought I might give it a try.
So I installed v1.0.2 from the influxdb repo on my Centos 7 (x64) machine.
I created a home_assistant database and added the host ip to ha’s configuration.yaml.
After restarting ha, I’m getting dozends of errors like these:

16-11-01 12:00:50 homeassistant.components.influxdb: Error saving event "[{'measurement': 'sun.sun', 'tags': {'domain': 'sun', 'entity_id': 'sun'}, 'time': datetime.datetime(2016, 11, 1, 11, 0, 50, 362482, tzinfo=<UTC>), 'fields': {'next_setting': '2016-11-01T16:02:45+00:00', 'value': 1, 'elevation': 0, 'friendly_name': 'Sun', 'azimuth': 0, 'next_rising': '2016-11-02T06:26:50+00:00'}}]" to InfluxDB
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/components/influxdb.py", line 123, in influx_event_listener
    influx.write_points(json_body)
  File "/usr/local/lib/python3.5/site-packages/influxdb/client.py", line 402, in write_points
    tags=tags)
  File "/usr/local/lib/python3.5/site-packages/influxdb/client.py", line 447, in _write_points
    expected_response_code=204
  File "/usr/local/lib/python3.5/site-packages/influxdb/client.py", line 289, in write
    headers=headers
  File "/usr/local/lib/python3.5/site-packages/influxdb/client.py", line 259, in request
    raise InfluxDBClientError(response.content, response.status_code)
influxdb.exceptions.InfluxDBClientError: 400: {"error":"field type conflict: input field \"azimuth\" on measurement \"sun.sun\" is type int64, already exists as type float"}

or

16-11-01 12:00:50 homeassistant.components.influxdb: Error saving event "[{'measurement': 'group.livingroom_media', 'tags': {'domain': 'group', 'entity_id': 'livingroom_media'}, 'time': datetime.datetime(2016, 11, 1, 11, 0, 50, 579462, tzinfo=<UTC>), 'fields': {'value': 0, 'order': 22, 'friendly_name': 'Wohnzimmer: Media', 'entity_id': ('media_player.kodi_wetek', 'media_player.denon_avr')}}]" to InfluxDB
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/components/influxdb.py", line 123, in influx_event_listener
    influx.write_points(json_body)
  File "/usr/local/lib/python3.5/site-packages/influxdb/client.py", line 402, in write_points
    tags=tags)
  File "/usr/local/lib/python3.5/site-packages/influxdb/client.py", line 447, in _write_points
    expected_response_code=204
  File "/usr/local/lib/python3.5/site-packages/influxdb/client.py", line 289, in write
    headers=headers
  File "/usr/local/lib/python3.5/site-packages/influxdb/client.py", line 259, in request
    raise InfluxDBClientError(response.content, response.status_code)
influxdb.exceptions.InfluxDBClientError: 400: {"error":"unable to parse 'group.livingroom_media,domain=group,entity_id=livingroom_media entity_id=('media_player.kodi_wetek', 'media_player.denon_avr'),friendly_name=\"Wohnzimmer: Media\",order=22i,value=0i 1477998050579461888': invalid boolean"}

Any idea what is wrong here?
I’m running HA 0.31.1 btw.

TIA,
Sebastian

Having the same issue here.

16-11-23 16:49:50 homeassistant.components.influxdb: Error saving event “[{‘fields’: {‘value’: 0, ‘friendly_name’: ‘Home-wide options’, ‘entity_id’: (‘switch.alert_delays__jeroen’, ‘switch.alert_delays__griet’, ‘switch.motionbased_events’, ‘switch.vacation’), ‘order’: 7}, ‘time’: datetime.datetime(2016, 11, 23, 15, 49, 50, 204159, tzinfo=), ‘tags’: {‘entity_id’: ‘home_options’, ‘domain’: ‘group’}, ‘measurement’: ‘group.home_options’}]” to InfluxDB
Traceback (most recent call last):
File “/opt/homeassistant/home_env/lib/python3.4/site-packages/homeassistant/components/influxdb.py”, line 122, in influx_event_listener
influx.write_points(json_body)
File “/home/homeassistant/.homeassistant/deps/influxdb/client.py”, line 402, in write_points
tags=tags)
File “/home/homeassistant/.homeassistant/deps/influxdb/client.py”, line 447, in _write_points
expected_response_code=204
File “/home/homeassistant/.homeassistant/deps/influxdb/client.py”, line 289, in write
headers=headers
File “/home/homeassistant/.homeassistant/deps/influxdb/client.py”, line 259, in request
raise InfluxDBClientError(response.content, response.status_code)
influxdb.exceptions.InfluxDBClientError: 400: {“error”:“unable to parse ‘group.home_options,domain=group,entity_id=home_options entity_id=(‘switch.alert_delays__jeroen’, ‘switch.alert_delays__griet’, ‘switch.motionbased_events’, ‘switch.vacation’),friendly_name="Home-wide options",order=7i,value=0i 1479916190204158976’: invalid boolean”}

The trick is to explicitly whitelist only the values you need, e.g.

influxdb:
  host: 192.168.xxx.xxx
  username: xxx
  password: xxx
  whitelist:
    - sensor.fibaro_system_fgms001_motion_sensor_temperature_8_1
    - sensor.fibaro_system_fgms001_motion_sensor_luminance_8_3

Sebastian

Whitelisting doesn’t help anything.

I’ll just get the same errors on the whitelisted values.