Apache Kafka
The Apache Kafka integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] sends all state changes to a
Apache Kafka
Apache Kafka is a real-time data pipeline that can read and write streams of data. It stores its data safely in a distributed, replicated, fault-tolerant cluster.
To use the Apache Kafka integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] in your installation, add the following to your
configuration.yaml
file:
apache_kafka:
ip_address: localhost
port: 9092
topic: home_assistant_1
Configuration Variables
The username of Apache Kafka cluster for SASL authentication. Required with SASL_SSL
security protocol only.
The password of Apache Kafka cluster for SASL authentication. Required with SASL_SSL
security protocol only.
The security protocol used to communicate with brokers. Use SSL
for secure or SASL_SSL
for secure with SASL authentication. (only SASL_PLAINTEXT
SASL mechanism is supported)
Filters for entities to be included/excluded. (Configure Filter)
Configure filter
By default, no entity will be excluded. To limit which entities are being exposed to Apache Kafka
, you can use the filter
parameter.
# Example filter to include specified domains and exclude specified entities
apache_kafka:
ip_address: localhost
port: 9092
topic: home_assistant_1
filter:
include_domains:
- alarm_control_panel
- light
include_entity_globs:
- binary_sensor.*_occupancy
exclude_entities:
- light.kitchen_light
Filters are applied as follows:
- No filter
- All entities included
- Only includes
- Entity listed in entities include: include
- Otherwise, entity matches domain include: include
- Otherwise, entity matches glob include: include
- Otherwise: exclude
- Only excludes
- Entity listed in exclude: exclude
- Otherwise, entity matches domain exclude: exclude
- Otherwise, entity matches glob exclude: exclude
- Otherwise: include
- Domain and/or glob includes (may also have excludes)
- Entity listed in entities include: include
- Otherwise, entity listed in entities exclude: exclude
- Otherwise, entity matches glob include: include
- Otherwise, entity matches glob exclude: exclude
- Otherwise, entity matches domain include: include
- Otherwise: exclude
- Domain and/or glob excludes (no domain and/or glob includes)
- Entity listed in entities include: include
- Otherwise, entity listed in exclude: exclude
- Otherwise, entity matches glob exclude: exclude
- Otherwise, entity matches domain exclude: exclude
- Otherwise: include
- No Domain and/or glob includes or excludes
- Entity listed in entities include: include
- Otherwise: exclude
The following characters can be used in entity globs:
*
- The asterisk represents zero, one, or multiple characters
?
- The question mark represents zero or one character