As described in the title. If I restart / reload the MQTT integration or restart the whole Home Assistant, all devices / entities that are integrated via MQTT are not available in HA.
I come from a HA Docker container version back to HAOS. If I have observed it correctly, the problem only occurs since switching to HAOS.
I use Mosquitto as MQTT broker in a docker container.
The solutions in this older post marked as solved are no longer valid or do not work.
I have tested around a bit these days and installed the MQTT explorer add-on to understand a bit more of MQTT.
I also moved from my Docker MQTT-Broker to the HA add-on Broker.
After the last HA restarts all the Z2M and frigate devices/entities are coming back. Only the Valetudo robot not or with some delay. I will make some more research to this.
Any solution to this? After rebooting HA, MQTT devices are unavailable, and the only way to bring them back seems to be rebooting the devices reporting to my mqtt broker, which is mosquitto in my case. Then when they do come back, everything is listed as “unknown” until their state changes, which means I have to re-trigger everything again for things to go back to knowing what state they’re in.
It turns out, the DB for mosquitto wasn’t being written, despite being in the config. I don’t know what change I made but it started writing the DB and things will preserve state between mosquitto server reboots now.
I also can’t seem to get it in the state where I need to reboot the endpoint device anymore, so perhaps it was that config issue, whatever it was, that was causing the mosquitto db not to be created that caused it all?