OK, if I had any hair, I’d be pulling it out right now.
HA Setup @ 192.168.10.100
RPi4 running HassOS 4.17 and latest stable Supervisor.
Mosquitto installed via the Add-On Store
MQTT sensors defined in configuration.yaml
NO other mqtt definitions in configuration.yaml (I read a bunch of topics here that stated to not double-configure through yaml and UI.
Install is default from add-on store (I’ve confirmed the ‘Enable Discovery’ is checked.) with the exception of:
Add-On configuration - only change is to enable anonymous as one of my clients does not have the facility to provide user/pass.
MQTT client setup @ 192.168.10.30:
MQTT.fx on Mac OS High Sierra
Standalone MQTT broker on FreeBSD @ 192.168.10.197 running only mosquitto (test/verification broker)
Observations:
I can see clients connecting to the HA broker instance in the logs
I have entities for the mqtt sensor definitions contained in the configuration.yaml but no entities for anything not defined in there
All clients publish successfully to the test/verification broker at 192.168.10.197
MQTT.fx and mosquitto_sub clients successfully read the mqtt stream from the test/verification broker at 192.168.10.197
HA mosquitto does not seem to receive the messages directed to it.
MQTT.fx and mosquitto_sub do not read/receive any messages from HA mosquitto broker.
Issue:
The publishing clients are publishing correctly and are received by the test/verification broker. My clients can read the messages published to the test/verification server by subscribing to it. This confirms operation of both the publishing and subscribing clients, leaving the broker as the only changing variable.
I must be missing something along the way. I’ve read the topics where people say “I was way over-thinking it!” and to that end my expectation is that I install the add-on, point the client to the IP address of HA (192.168.10.100) and it works. It creates an entity and I use that entity in HA. I’m not sure that I would consider that to be over-thinking things. Problem is, that isn’t happening and I’m getting frustrated at how long it is taking for me (and many others, it seems) to resolve this ‘undocumented feature’.
Request:
Can someone that has a working MQTT broker on HA please clearly define what is required to get the messages from my publishing clients into HA so that I can use them in monitoring and automation? I need it to work WITHOUT a username and password; yes, I know the security issues with that and will resolve them later, for what they are. Right now, I just need to solve this issue and move on.
My gratitude will be limitless!
EDIT:
For what it is worth, I think that the issue is connected to the anonymous status as the MQTT.fx client will not even read the homeassistant/status topic which I assume is getting published by HA. I have no user/pass details in the client.
Further Edit:
If I publish a message using ‘Configuration>Integrations>MQTT Configure’ interface, both the broker listener AND the MQTT.fx client see it. The broker doesn’t see anything else.