MQTT strange behaviour

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 :slight_smile:
They still publish in mqtt but HA seems to ignore them.

How can I fix this ?

Thank you.

Have exakt the same behaviour since a while…

and nobody answer since 1 year ! oh my

Is it linked to EMQX ? did you try with other mqtt server ?

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.

Maybe nobody had the same setup to offer suggestions?

There were hints of a chatty traffic issue which would be probably impossible to reproduce elsewhere.

Moving to the recommended environment offers more hope for future support if it is not reliable.

Such is the nature of open source software.

I had an issue when updating z2m to the latest version. It was installed as an add-on in HA but now I migrated it to a LXC instead and no problems.

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.