mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 17:27:19 +00:00
Mqtt discovery optional nodeid (#2840)
* Add support for remote (TCP/IP) DSMR sensors (i.e. via ser2net) * Processed review comment and added ser2net config * added optional node_id to MQTT discovery
This commit is contained in:
parent
2189bbda03
commit
55bec87b38
@ -37,15 +37,18 @@ Configuration variables:
|
|||||||
The discovery topic need to follow a specific format:
|
The discovery topic need to follow a specific format:
|
||||||
|
|
||||||
```text
|
```text
|
||||||
<discovery_prefix>/<component>/<object_id>/<>
|
<discovery_prefix>/<component>/[<node_id>/]<object_id>/<>
|
||||||
```
|
```
|
||||||
|
|
||||||
- `<component>`: One of the supported components, eg. `binary_sensor`.
|
- `<component>`: One of the supported components, eg. `binary_sensor`.
|
||||||
|
- `<node_id>`: (*Optional*) id of the node providing the topic.
|
||||||
- `<object_id>`: The ID of the device. This will become the `entity_id` in Home Assistant.
|
- `<object_id>`: The ID of the device. This will become the `entity_id` in Home Assistant.
|
||||||
- `<>`: The topic `config` or `state` which defines the current action.
|
- `<>`: The topic `config` or `state` which defines the current action.
|
||||||
|
|
||||||
The payload will be checked like an entry in your `configuration.yaml` file if a new device is added. This means that missing variables will be filled with the platform's default values. All configuration variables which are *required* must be present in the initial payload send to `/config`.
|
The payload will be checked like an entry in your `configuration.yaml` file if a new device is added. This means that missing variables will be filled with the platform's default values. All configuration variables which are *required* must be present in the initial payload send to `/config`.
|
||||||
|
|
||||||
|
The `<node_id>` level can be used by clients to only subscribe to their own (command) topics by using one wildcard topic like `<discovery_prefix>/+/<node_id>/+/set`.
|
||||||
|
|
||||||
### {% linkable_title Examples %}
|
### {% linkable_title Examples %}
|
||||||
|
|
||||||
A motion detection device which can be represented by a [binary sensor](/components/binary_sensor.mqtt/) for your garden would sent its configuration as JSON payload to the Configuration topic. After the first message to `config`, then the MQTT messages sent to the state topic will update the state in Home Assistant.
|
A motion detection device which can be represented by a [binary sensor](/components/binary_sensor.mqtt/) for your garden would sent its configuration as JSON payload to the Configuration topic. After the first message to `config`, then the MQTT messages sent to the state topic will update the state in Home Assistant.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user