Hello,
I have a strange behaviour with HA and mqtt.
I’m using an external server for mqtt with EMQX.
When I’m restarting HA, all my mqtt devices appears as unavailable.
I need to restart everything (zigbee2mqtt, Tasmota, etc …) to have then back in HA.
But some can’t be restarted like my iSpindel in my fermentor for beer
They still publish in mqtt but HA seems to ignore them.
I tried Mosquitto but in the newest variant I’m not able to setup unauthenticated communication due to changes in the code. So no, currently I don’t tried with another broker. My hope is that this is an issue which is fixable without setting up a new broker.
As we both have the same issue with EMQX it could be possible that it’s EMQX related.
@Nomis
Check out my linked post. After securing all my clients and switching from EMQX to Mosquitto, it works again like it used to without any problems.
It’s a lot of work, but it was worth it.
Maybe it will help you.
I personally have not had good luck with this.
I believe it has to do with the protocol version it is using or it defaults to compares to what HA expects.
HA seems to like Mosquitto out of the box better. Try adjusting the MQTT protocol, don’t know.