Reliability Issues with MQTT and Home Assistant

Hi guys,

I’ve been working on some MQTT switches the last couple of days, they’re working great on their own, but when I connect them to home assistant I’ve been having issues with messages only sometimes going through. Subscribing to the MQTT topic shows that messages are not always getting posted. Has anybody had similar problems with this? What did you do to solve them?

To be clear, the devices work when I do a simple MQTT publish, but for some reason when I click the button on the Home Assistant UI, it sometimes publishes to MQTT but not always.

I’m running both Home Assistant and mosquitto on the same machine, a Pine64 with an Ethernet connection.

Thanks