From 55bec87b3865b9472c2f0e0e00339dd2876c2ba4 Mon Sep 17 00:00:00 2001 From: Alex Mekkering Date: Sat, 24 Jun 2017 09:47:13 +0200 Subject: [PATCH] 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 --- source/_docs/mqtt/discovery.markdown | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/_docs/mqtt/discovery.markdown b/source/_docs/mqtt/discovery.markdown index b32043a6229..38be23ffab0 100644 --- a/source/_docs/mqtt/discovery.markdown +++ b/source/_docs/mqtt/discovery.markdown @@ -37,15 +37,18 @@ Configuration variables: The discovery topic need to follow a specific format: ```text -///<> +//[/]/<> ``` - ``: One of the supported components, eg. `binary_sensor`. +- ``: (*Optional*) id of the node providing the topic. - ``: 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 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 `` level can be used by clients to only subscribe to their own (command) topics by using one wildcard topic like `/+//+/set`. + ### {% 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.