Influxdb can't write by HA

Tags: #<Tag:0x00007f3264594cd0>

Hi ALl,

Im running InfluxDB on same RPi where HA is running on.
Sometimes I see errors that influxdb is not writeable:

This is a example of a error. Can someone tell me how I can solve this?

2020-12-28 15:33:41 INFO (MainThread) [homeassistant.components.websocket_api.http.connection] [3816104744] Connection closed by client
2020-12-28 15:34:42 ERROR (influxdb) [homeassistant.components.influxdb] Could not write '[{'measurement': 'sensor.github_home_assistant', 'tags': {'domain': 'sensor', 'entity_id': 'github_home_assistant'}, 'time': datetime.datetime(2020, 12, 28, 14, 34, 40, 130870, tzinfo=datetime.timezone.utc), 'fields': {'value': inf, 'path_str': 'home-assistant/core', 'name_str': 'Github Home Assistant', 'latest_commit_message_str': "Tado: use proper variable name to avoid confusion (#44571)\n\nCurrent device_id variable refers to the Home ID obtained from the Tado API.\r\nLet's use home_id in order to avoid confusion with Tado devices.\r\n\r\nSigned-off-by: Ãlvaro Fernández Rojas <[email protected]>", 'latest_commit_sha_str': '50e11773eeb9e1c8b803c3515a27db705eefb23a', 'latest_commit_sha': 5.011773918803352e+23, 'latest_release_url_str': 'https://github.com/home-assistant/core/releases/tag/2020.12.1', 'latest_open_issue_url_str': 'https://github.com/home-assistant/core/issues/44580', 'open_issues': 1736.0, 'latest_open_pull_request_url_str': 'https://github.com/home-assistant/core/pull/28910', 'open_pull_requests': 376.0, 'stargazers': 38591.0, 'forks': 12685.0, 'latest_release_tag_str': '2020.12.1', 'friendly_name_str': 'Github Home Assistant', 'icon_str': 'mdi:github', 'templates_str': 'OrderedDict([(\'icon_color\', "if (state === \'on\') return \'rgba(251,214,67,1)\'; return \'rgba(71,116,157,1)\';")])', 'templates': 2.5121467171116157e+17}}, {'measurement': 'kWh', 'tags': {'domain': 'sensor', 'entity_id': 'zwave2mqtt_nodeid_96_electricity_kwh_meter'}, 'time': datetime.datetime(2020, 12, 28, 14, 34, 40, 301946, tzinfo=datetime.timezone.utc), 'fields': {'value': 59.4, 'value_id_str': '96-50-1-0', 'value_id': 965010.0, 'node_id': 96.0, 'class_id': 50.0, 'type_str': 'decimal', 'genre_str': 'user', 'instance': 1.0, 'index': 0.0, 'label_str': 'Electric - kWh', 'units_str': 'kWh', 'help_str': '', 'read_only': 1.0, 'write_only': 0.0, 'min': 0.0, 'max': 0.0, 'is_polled': 0.0, 'value_': 59.43, 'lastUpdate': 1609166080296.0, 'friendly_name_str': 'Switch Dryer kWh', 'device_class_str': 'power', 'templates_str': 'OrderedDict([(\'icon_color\', "if (state === \'on\') return \'rgba(251,214,67,1)\'; return \'rgba(71,116,157,1)\';")])', 'templates': 2.5121467171116157e+17}}, {'measurement': 'kWh', 'tags': {'domain': 'sensor', 'entity_id': 'zwave2mqtt_nodeid_96_electricity_kwh_meter'}, 'time': datetime.datetime(2020, 12, 28, 14, 34, 40, 302797, tzinfo=datetime.timezone.utc), 'fields': {'value': 59.43, 'value_id_str': '96-50-1-0', 'value_id': 965010.0, 'node_id': 96.0, 'class_id': 50.0, 'type_str': 'decimal', 'genre_str': 'user', 'instance': 1.0, 'index': 0.0, 'label_str': 'Electric - kWh', 'units_str': 'kWh', 'help_str': '', 'read_only': 1.0, 'write_only': 0.0, 'min': 0.0, 'max': 0.0, 'is_polled': 0.0, 'value_': 59.43, 'lastUpdate': 1609166080296.0, 'friendly_name_str': 'Switch Dryer kWh', 'device_class_str': 'power', 'templates_str': 'OrderedDict([(\'icon_color\', "if (state === \'on\') return \'rgba(251,214,67,1)\'; return \'rgba(71,116,157,1)\';")])', 'templates': 2.5121467171116157e+17}}, {'measurement': 'binary_sensor.dryer_machine', 'tags': {'domain': 'binary_sensor', 'entity_id': 'dryer_machine'}, 'time': datetime.datetime(2020, 12, 28, 14, 34, 40, 304563, tzinfo=datetime.timezone.utc), 'fields': {'state': 'on', 'value': 1.0, 'kwh': 59.43, 'friendly_name_str': 'Dryer machine', 'icon_str': 'mdi:tumble-dryer-off', 'templates_str': 'OrderedDict([(\'icon_color\', "if (state === \'on\') return \'rgba(251, 214, 67,1)\'; return \'rgba(71,116,157,1)\';")])', 'templates': 2.5121467171116157e+17}}, {'measurement': 'sensor.zwave2mqtt_nodeid_96_electricity_unknown_meter', 'tags': {'domain': 'sensor', 'entity_id': 'zwave2mqtt_nodeid_96_electricity_unknown_meter'}, 'time': datetime.datetime(2020, 12, 28, 14, 34, 40, 314375, tzinfo=datetime.timezone.utc), 'fields': {'state': 'False', 'value_id_str': '96-50-1-256', 'value_id': 96501256.0, 'node_id': 96.0, 'class_id': 50.0, 'type_str': 'bool', 'genre_str': 'user', 'instance': 1.0, 'index': 256.0, 'label_str': 'Exporting', 'units_str': '', 'help_str': '', 'read_only': 1.0, 'write_only': 0.0, 'min': 0.0, 'max': 0.0, 'is_polled': 0.0, 'value': 0.0, 'lastUpdate': 1609166080297.0, 'friendly_name_str': 'Switch Dryer Unkwown', 'device_class_str': 'power', 'templates_str': 'OrderedDict([(\'icon_color\', "if (state === \'on\') return \'rgba(251,214,67,1)\'; return \'rgba(71,116,157,1)\';")])', 'templates': 2.5121467171116157e+17}}, {'measurement': 'sensor.zwave2mqtt_nodeid_107_alarm_previous_event_cleared', 'tags': {'domain': 'sensor', 'entity_id': 'zwave2mqtt_nodeid_107_alarm_previous_event_cleared'}, 'time': datetime.datetime(2020, 12, 28, 14, 34, 40, 478462, tzinfo=datetime.timezone.utc), 'fields': {'value': 0.0, 'value_id_str': '107-113-1-256', 'value_id': 1071131256.0, 'node_id': 107.0, 'class_id': 113.0, 'type_str': 'byte', 'genre_str': 'user', 'instance': 1.0, 'index': 256.0, 'label_str': 'Previous Event Cleared', 'units_str': '', 'help_str': 'Previous Event that was sent', 'read_only': 1.0, 'write_only': 0.0, 'min': 0.0, 'max': 255.0, 'is_polled': 0.0, 'value_': 8.0, 'lastUpdate': 1609166080472.0, 'friendly_name_str': 'PIR Kitchen Burglar', 'icon_str': 'mdi:alarm-light', 'templates_str': 'OrderedDict([(\'icon_color\', "if (state === \'on\') return \'rgba(251,214,67,1)\'; return \'rgba(71,116,157,1)\';")])', 'templates': 2.5121467171116157e+17}}, {'measurement': 'sensor.zwave2mqtt_nodeid_107_alarm_previous_event_cleared', 'tags': {'domain': 'sensor', 'entity_id': 'zwave2mqtt_nodeid_107_alarm_previous_event_cleared'}, 'time': datetime.datetime(2020, 12, 28, 14, 34, 40, 479372, tzinfo=datetime.timezone.utc), 'fields': {'value': 8.0, 'value_id_str': '107-113-1-256', 'value_id': 1071131256.0, 'node_id': 107.0, 'class_id': 113.0, 'type_str': 'byte', 'genre_str': 'user', 'instance': 1.0, 'index': 256.0, 'label_str': 'Previous Event Cleared', 'units_str': '', 'help_str': 'Previous Event that was sent', 'read_only': 1.0, 'write_only': 0.0, 'min': 0.0, 'max': 255.0, 'is_polled': 0.0, 'value_': 8.0, 'lastUpdate': 1609166080472.0, 'friendly_name_str': 'PIR Kitchen Burglar', 'icon_str': 'mdi:alarm-light', 'templates_str': 'OrderedDict([(\'icon_color\', "if (state === \'on\') return \'rgba(251,214,67,1)\'; return \'rgba(71,116,157,1)\';")])', 'templates': 2.5121467171116157e+17}}, {'measurement': 'sensor.zwave2mqtt_nodeid_107_alarm_home_security', 'tags': {'domain': 'sensor', 'entity_id': 'zwave2mqtt_nodeid_107_alarm_home_security'}, 'time': datetime.datetime(2020, 12, 28, 14, 34, 40, 486212, tzinfo=datetime.timezone.utc), 'fields': {'state': 'Motion Detected at Unknown Location', 'value_id_str': '107-113-1-7', 'value_id': 10711317.0, 'node_id': 107.0, 'class_id': 113.0, 'type_str': 'list', 'genre_str': 'user', 'instance': 1.0, 'index': 7.0, 'label_str': 'Home Security', 'units_str': '', 'help_str': 'Home Security Alerts', 'read_only': 1.0, 'write_only': 0.0, 'min': 0.0, 'max': 0.0, 'is_polled': 0.0, 'values_str': "['Clear', 'Motion Detected at Unknown Location']", 'value_str': 'Clear', 'lastUpdate': 1609166080474.0, 'friendly_name_str': 'PIR Kitchen Alarm Level', 'icon_str': 'mdi:alarm-light', 'templates_str': 'OrderedDict([(\'icon_color\', "if (state === \'on\') return \'rgba(251,214,67,1)\'; return \'rgba(71,116,157,1)\';")])', 'templates': 2.5121467171116157e+17}}, {'measurement': 'sensor.zwave2mqtt_nodeid_107_alarm_home_security', 'tags': {'domain': 'sensor', 'entity_id': 'zwave2mqtt_nodeid_107_alarm_home_security'}, 'time': datetime.datetime(2020, 12, 28, 14, 34, 40, 486667, tzinfo=datetime.timezone.utc), 'fields': {'state': 'Clear', 'value_id_str': '107-113-1-7', 'value_id': 10711317.0, 'node_id': 107.0, 'class_id': 113.0, 'type_str': 'list', 'genre_str': 'user', 'instance': 1.0, 'index': 7.0, 'label_str': 'Home Security', 'units_str': '', 'help_str': 'Home Security Alerts', 'read_only': 1.0, 'write_only': 0.0, 'min': 0.0, 'max': 0.0, 'is_polled': 0.0, 'values_str': "['Clear', 'Motion Detected at Unknown Location']", 'value_str': 'Clear', 'lastUpdate': 1609166080474.0, 'friendly_name_str': 'PIR Kitchen Alarm Level', 'icon_str': 'mdi:alarm-light', 'templates_str': 'OrderedDict([(\'icon_color\', "if (state === \'on\') return \'rgba(251,214,67,1)\'; return \'rgba(71,116,157,1)\';")])', 'templates': 2.5121467171116157e+17}}, {'measurement': 'binary_sensor.zwave2mqtt_nodeid_107_contact', 'tags': {'domain': 'binary_sensor', 'entity_id': 'zwave2mqtt_nodeid_107_contact'}, 'time': datetime.datetime(2020, 12, 28, 14, 34, 40, 498939, tzinfo=datetime.timezone.utc), 'fields': {'state': 'on', 'value': 1.0, 'value_id_str': '107-48-1-0', 'value_id': 1074810.0, 'node_id': 107.0, 'class_id': 48.0, 'type_str': 'bool', 'genre_str': 'user', 'instance': 1.0, 'index': 0.0, 'label_str': 'Sensor', 'units_str': '', 'help_str': 'Binary Sensor State', 'read_only': 1.0, 'write_only': 0.0, 'min': 0.0, 'max': 0.0, 'is_polled': 0.0, 'value_': 0.0, 'lastUpdate': 1609166080494.0, 'friendly_name_str': 'PIR Kitchen', 'device_class_str': 'motion', 'templates_str': 'OrderedDict([(\'icon_color\', "if (state === \'on\') return \'rgba(251, 214, 67,1)\'; return \'rgba(71,116,157,1)\';")])', 'templates': 2.5121467171116157e+17}}, {'measurement': 'binary_sensor.zwave2mqtt_nodeid_107_contact', 'tags': {'domain': 'binary_sensor', 'entity_id': 'zwave2mqtt_nodeid_107_contact'}, 'time': datetime.datetime(2020, 12, 28, 14, 34, 40, 499542, tzinfo=datetime.timezone.utc), 'fields': {'state': 'off', 'value': 0.0, 'value_id_str': '107-48-1-0', 'value_id': 1074810.0, 'node_id': 107.0, 'class_id': 48.0, 'type_str': 'bool', 'genre_str': 'user', 'instance': 1.0, 'index': 0.0, 'label_str': 'Sensor', 'units_str': '', 'help_str': 'Binary Sensor State', 'read_only': 1.0, 'write_only': 0.0, 'min': 0.0, 'max': 0.0, 'is_polled': 0.0, 'value_': 0.0, 'lastUpdate': 1609166080494.0, 'friendly_name_str': 'PIR Kitchen', 'device_class_str': 'motion', 'templates_str': 'OrderedDict([(\'icon_color\', "if (state === \'on\') return \'rgba(251, 214, 67,1)\'; return \'rgba(71,116,157,1)\';")])', 'templates': 2.5121467171116157e+17}}, {'measurement': 'W', 'tags': {'domain': 'sensor', 'entity_id': 'zwave2mqtt_nodeid_96_electricity_w_meter'}, 'time': datetime.datetime(2020, 12, 28, 14, 34, 41, 181762, tzinfo=datetime.timezone.utc), 'fields': {'value': 339.17, 'value_id_str': '96-50-1-2', 'value_id': 965012.0, 'node_id': 96.0, 'class_id': 50.0, 'type_str': 'decimal', 'genre_str': 'user', 'instance': 1.0, 'index': 2.0, 'label_str': 'Electric - W', 'units_str': 'W', 'help_str': '', 'read_only': 1.0, 'write_only': 0.0, 'min': 0.0, 'max': 0.0, 'is_polled': 0.0, 'value_': 286.57, 'lastUpdate': 1609166081176.0, 'friendly_name_str': 'Switch Dryer Current Watt', 'device_class_str': 'power', 'templates_str': 'OrderedDict([(\'icon_color\', "if (state === \'on\') return \'rgba(251,214,67,1)\'; return \'rgba(71,116,157,1)\';")])', 'templates': 2.5121467171116157e+17}}, {'measurement': 'W', 'tags': {'domain': 'sensor', 'entity_id': 'zwave2mqtt_nodeid_96_electricity_w_meter'}, 'time': datetime.datetime(2020, 12, 28, 14, 34, 41, 182716, tzinfo=datetime.timezone.utc), 'fields': {'value': 286.57, 'value_id_str': '96-50-1-2', 'value_id': 965012.0, 'node_id': 96.0, 'class_id': 50.0, 'type_str': 'decimal', 'genre_str': 'user', 'instance': 1.0, 'index': 2.0, 'label_str': 'Electric - W', 'units_str': 'W', 'help_str': '', 'read_only': 1.0, 'write_only': 0.0, 'min': 0.0, 'max': 0.0, 'is_polled': 0.0, 'value_': 286.57, 'lastUpdate': 1609166081176.0, 'friendly_name_str': 'Switch Dryer Current Watt', 'device_class_str': 'power', 'templates_str': 'OrderedDict([(\'icon_color\', "if (state === \'on\') return \'rgba(251,214,67,1)\'; return \'rgba(71,116,157,1)\';")])', 'templates': 2.5121467171116157e+17}}, {'measurement': 'sensor.zwave2mqtt_nodeid_96_electricity_unknown_meter', 'tags': {'domain': 'sensor', 'entity_id': 'zwave2mqtt_nodeid_96_electricity_unknown_meter'}, 'time': datetime.datetime(2020, 12, 28, 14, 34, 41, 190383, tzinfo=datetime.timezone.utc), 'fields': {'state': 'False', 'value_id_str': '96-50-1-256', 'value_id': 96501256.0, 'node_id': 96.0, 'class_id': 50.0, 'type_str': 'bool', 'genre_str': 'user', 'instance': 1.0, 'index': 256.0, 'label_str': 'Exporting', 'units_str': '', 'help_str': '', 'read_only': 1.0, 'write_only': 0.0, 'min': 0.0, 'max': 0.0, 'is_polled': 0.0, 'value': 0.0, 'lastUpdate': 1609166081177.0, 'friendly_name_str': 'Switch Dryer Unkwown', 'device_class_str': 'power', 'templates_str': 'OrderedDict([(\'icon_color\', "if (state === \'on\') return \'rgba(251,214,67,1)\'; return \'rgba(71,116,157,1)\';")])', 'templates': 2.5121467171116157e+17}}]' to influx due to '400: {"error":"partial write: unable to parse 'sensor.github_home_assistant,domain=sensor,entity_id=github_home_assistant forks=12685.0,friendly_name_str=\"Github Home Assistant\",icon_str=\"mdi:github\",latest_commit_message_str=\"Tado: use proper variable name to avoid confusion (#44571)\\n\\nCurrent device_id variable refers to the Home ID obtained from the Tado API.\r\\nLet's use home_id in order to avoid confusion with Tado devices.\r\\n\r\\nSigned-off-by: Ãlvaro Fernández Rojas \[email protected]\u003e\",latest_commit_sha=5.011773918803352e+23,latest_commit_sha_str=\"50e11773eeb9e1c8b803c3515a27db705eefb23a\",latest_open_issue_url_str=\"https://github.com/home-assistant/core/issues/44580\",latest_open_pull_request_url_str=\"https://github.com/home-assistant/core/pull/28910\",latest_release_tag_str=\"2020.12.1\",latest_release_url_str=\"https://github.com/home-assistant/core/releases/tag/2020.12.1\",name_str=\"Github Home Assistant\",open_issues=1736.0,open_pull_requests=376.0,path_str=\"home-assistant/core\",stargazers=38591.0,templates=2.5121467171116157e+17,templates_str=\"OrderedDict([('icon_color', \\\"if (state === 'on') return 'rgba(251,214,67,1)'; return 'rgba(71,116,157,1)';\\\")])\",value=inf 1609166080130870016': invalid boolean dropped=0"}

It’s failing on an entity called sensor.github_home_assistant. Without diving into the exact issue, perhaps you can just exclude this entity (and possibly others like it) from being stored in InfluxDB?

exclude:
  entities:
    - sensor.github_home_assistant

More info here.

Thanks

I given to add all entities into influxdb.
I read also there is a 1.XX and 2.XX. Don’t know difference.

It was running for 24 hours without those errors.