Apache Kafka
The Apache Kafka integration集成将 Home Assistant 与您的设备、服务等连接和集成。 [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 integration集成将 Home Assistant 与您的设备、服务等连接和集成。 [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:
- 不使用过滤器
- 包含所有实体
- 仅包含
- 实体列表中的实体包含:include
- 否则,实体匹配域包含:include
- 否则,实体匹配通配符包含:include
- 否则:排除
- 仅排除
- 实体列表中的实体排除:exclude
- 否则,实体匹配域排除:exclude
- 否则,实体匹配通配符排除:exclude
- 否则:包含
- 域和/或通配符包含(还可能有排除)
- 实体列表中的实体包含:include
- 否则,实体列表中的排除:exclude
- 否则,实体匹配通配符包含:include
- 否则,实体匹配通配符排除:exclude
- 否则,实体匹配域包含:include
- 否则:排除
- 域和/或通配符排除(没有域和/或通配符包含)
- 实体列表中的实体包含:include
- 否则,实体列表中的排除:exclude
- 否则,实体匹配通配符排除:exclude
- 否则,实体匹配域排除:exclude
- 否则:包含
- 没有域和/或通配符的包含或排除
- 实体列表中的实体包含:include
- 否则:排除
以下字符可用于实体通配符:
*
- 星号表示零个、一个或多个字符
?
- 问号表示零个或一个字符