I would suggest listen on all topics and see if there are any MQTT message from your relay that have a discovery topic. The discovery topic should have homeassistant at the beginning. This is called the discovery prefix that by default is set to homeassistant, so hopefully this matches the discovery topic sent by your relay. If this all looks correct, well, hmm…don’t know.
The relay is not being discovered, a smartplug that I have is the only MQTT device.
It worked before with this firmware but somewhere in between updates of HA it stopped working.
Because it’s not in production yet, I did not notice it right away.
Given this it’s not an HA issue, it’s an MQTT issue. If you aren’t even seeing the messages in your broker then the failure is between the client device and the broker, HA isn’t even involved.
1653684662: New connection from 172.16.0.150:4196 on port 1883.
1653684662: New client connected from 172.16.0.150:4196 as 2154d5e0aa46831378722ee8 (p2, c0, k256, u'mqtusr').
This log seems to indicate that the relay is registering with the MQTT broker…that’s good.
Just to verify, to listen in on all topics, one would subscribe to #. If you are doing this, and you are seeing topics from the smart plug but not seeing any mqtt topics from the relay, then yeah it appears the relay is having some issue.
What changes are you referring to? Did you just upgrade your broker or something? If so, between which two versions?
If you’re referring to changes in the Mqtt integration of ha then again, that’s not relevant here. You said you connected to the broker with some kind of client and saw no discovery messages in the homeassistant topic from your relay right? If so then HA isn’t involved at all. Either your relay’s messages are being rejected for some reason (check your acl?) or your relay is failing to send messages at all (maybe check it’s logs? Did you just update it by any chance?)
Yea that’s why one of the main reasons I was asking if they updated the broker. If they recently went from 1.x to 2.x then they could be in for a rough time with that, discovering all the devices that were actually banking on anonymous connections now that mosquitto disabled that by default.
If they were using the addon I would’ve assumed that was it since the addon recently did that upgrade. But since they said they were separately hosting mosquitto I wasn’t sure.
Mosquitto broker 1.x to 2.0 - automatically - at the time I went from Buster to Bullseye.
I discovered MQTT Explorer to get more insight.
I installed Mosquitto in the same LXC as my HA.
I am using username/password for MQTT connections.
I can also control the relay from it’s webinterface: is it not so that when I see messages from changing outputs, that the communication between relay & broker is OK?
I faced the same situation. Receiving all messages, but the MQTT integration was not creating the devices and entities.
In my case, the MQTT prefix was not set as defined ("Z2M) in the “re-configure” process of the MQTT integration.
Once the change applied on my client, all devices and entities appeared.