I feel that Home Assistant's MQTT discovery, while useful, is at least to some extend just broken.
-
I feel that Home Assistant's MQTT discovery, while useful, is at least to some extend just broken.
It only works somewhat reliably when discovery messages are being retained (so that's basically what everyone uses by default), but HA offers no way of deleting all retained messages for a device. You have to do that manually, and for complex devices it may require deleting perhaps dozens of retained messages from your broker, which makes removing an MQTT-discovered device a major PITA and susceptible to breakage if you accidentally remove the wrong messages

-
I feel that Home Assistant's MQTT discovery, while useful, is at least to some extend just broken.
It only works somewhat reliably when discovery messages are being retained (so that's basically what everyone uses by default), but HA offers no way of deleting all retained messages for a device. You have to do that manually, and for complex devices it may require deleting perhaps dozens of retained messages from your broker, which makes removing an MQTT-discovered device a major PITA and susceptible to breakage if you accidentally remove the wrong messages

@robertklep Although HA Discovery[1] supports a lot of values, you are spot on about the retained message issue.
I've had to reboot kit to re-publish topics after deleting the wrong retained.My custom-device dev needed a load of `mosquitto_pub` scripts to create and remove. At least the changes in #homeassistant are instant.
I can see why #Tasmota switched to their own all-in-one #MQTT JSON payload format [2].
[1] https://www.home-assistant.io/integrations/mqtt#mqtt-discovery
-
@robertklep Although HA Discovery[1] supports a lot of values, you are spot on about the retained message issue.
I've had to reboot kit to re-publish topics after deleting the wrong retained.My custom-device dev needed a load of `mosquitto_pub` scripts to create and remove. At least the changes in #homeassistant are instant.
I can see why #Tasmota switched to their own all-in-one #MQTT JSON payload format [2].
[1] https://www.home-assistant.io/integrations/mqtt#mqtt-discovery
@jamesderrick For one particular device I have 137 topics/messages to deal with... 🫣
-
I feel that Home Assistant's MQTT discovery, while useful, is at least to some extend just broken.
It only works somewhat reliably when discovery messages are being retained (so that's basically what everyone uses by default), but HA offers no way of deleting all retained messages for a device. You have to do that manually, and for complex devices it may require deleting perhaps dozens of retained messages from your broker, which makes removing an MQTT-discovered device a major PITA and susceptible to breakage if you accidentally remove the wrong messages

@robertklep I had rtl433 listening and feeding mqtt. I got over 10 000 devices (temperature sensors, tire pressure sensors and so on) and there wasn't any neat way of mass deleting. Or even filtering. My ha instance slowed to a crawl everytime i opened the mqtt entities page.
-
R ActivityRelay shared this topic