#How does MQTT auto discovery work, and how are devices/entities or sensors created??

2 messages · Page 1 of 1 (latest)

turbid cobalt
#

Hi, I'm getting desperate about this Home Assistant MQTT auto-discovery. Can someone explain it to me?
So, I have an openDTU running here in version v25.2.3 (latest), MQTT is configured and reliably delivers values ​​to the (external) Mosquitto Broker on my NAS. From there, the values ​​can also be read and processed by ioBroker, for example. So MQTT basically works.

Because I'm curious, I've now set up Home Assistant, too, but I'm having trouble with auto discovery. In the MQTT config of the openDTU I have activated Auto Discovery fore Home Assistant and in the HA AD parameters I have set the prefix Topic to "homeassistant/#" and activated the three switches "Activate retain flag", "Activate expiration function" and "Individual panels".

The message from the DTU also arrives in Mosquitto, but HA does not react to it.

Unfortunately I have not yet found any clear documentation on Auto-Discovery and understand that in a separate topic (homeassistant/) the information is provided on how to configure a sensor via MQTT.
For example, the payload for the total power in openDTU (ch0_Power), only contains the topic "config", which also contains the unit_of_measurement ("W"), the device_class ("power") and also the topic path to the actual data within MQTT. So it is practically a "blueprint" for a sensor, isn't it? I would therefore expect Auto-Discovery to do this. Reads out information and uses it to assemble the corresponding devices/entities or sensors.
If I subscribe to the topic "homeassistant/#" in the MQTT integration, I also receive the 52 auto-discovery messages contained therein, but otherwise nothing happens.

As a test, I manually entered a few values ​​of the DTU as sensors in the mqtt.yaml, which can also be accessed. The values ​​are displayed and updated - but I would have actually expected them to be automatically pulled/created from the auto-discovery.

So, what am I doing wrong??

haughty grotto