As time goes by, I add more and more sensors and automation into my HA setup. As it grows, I notice MQTT in HA crashed more and more often. I am wondering, is it due to too much traffic? or is it due to software limitation or hardware limitation?
What do you mean by crashed?
I am asking the same question not that MQTT crashes, but the senses do not seem to link to it as well as just a few senses.
The majority of my system functions through MQTT, so would my system benefit from a separate MQTT system totally dedicated to the task which will allow me much more throughput of data and a unlimited number of senses
sometimes automation that uses mqtt as trigger doesn’t trigger. other clients (devices) that subscribe to the same topics can receive the payload just fine.
@Andy_Nunes my MQTT broker is on separate computer, not embedded with the HA in Pi.
Have you tried setting the QOS level to 1. This should ensure that the message is delivered at least once, by the client sending an acknowledgement back to the broker.
Has this been resolved? I’m seeing the same thing HASS stops responding to triggers; works after a restart
It seems to be isolated to HASS as the MQTT broker is receiving and sending messages to HASS but HASS is not responding unless I restart HASS and then everything starts working for a while. This is isolated to one MQTT device. Others appear to continue working while the one is ignored.
good idea. but where do i set the QOS? For example, I am using this OpenMQTTGateway by @1technophile. With this gateway, it will publish to an MQTT topic when it receives a signal from my sensors. I assume the QOS setting has to be specified in the gateway, am I right? But there is no setting in the gateway to make it publish with QOS 1 setting. Please correct me if I am wrong.
The qos for a connection is requested by the client when it connects. It is a parameter for all the MQTT components in HA.
You mean qos is set in HA? Can you show me an example on how to use it? Is it in automation under trigger? I refer to this documentation but it doesn’t say where to put in the qos.
Yes, HA connects to the broker as a client for each item, so it sets the qos. It can be specified in in each mqtt item that is declared.
I use appDaemon, so I’m not much up on HA Automations and there certainly doesn’t seem to be an option for the mqtt trigger to specify the qos, although I would try putting qos: 1
in the trigger options, just to see if HA objects.
If that doesn’t work, I suggest you create a MQTT sensor for the incoming message with a QOS value of 1, and trigger off the state of the sensor, rather than the message directly.
hello,
Currently openmqttgateway use qos = 0, I never seen lost messages but if you think it happens between the gateway and the broker maybe we can explore that
From what I understand, other clients can always read the messages, so the connection between the broker and openmqttgateway is not the problem…
The message is getting lost between the broker and the HA mqtt trigger automation, so its a matter of whether the message is lost at the mqtt part, or somewhere in the innards of HA.