Hi can someone tell me how I can see if HA is recognosing an MQTT client? Im trying to get an RF Bridge and simple door sensor to work. It is flashed to Tasmota and the RFBridge succesfully recognises the sensor in the Tasmota console. Any help appreciated. I get an error of “No matching payload for entity found” in log so assume its doing something. My config looks like this:
The automation enables me to see what its doing - if there’s any change. Is there another way to see if its working in HA?
I tried your suggestion but it seems to make no difference.
Also the DRZZs video I followed showed the formatting as this ‘{{ value_json.RfReceived.RfKey }}’ with leading and trailing spaces where your formatting doesn’t use the spaces. Which is correct?
Thanks for help.
Yup, that’s because it’s not a valid option for MQTT Binary Sensor (it’s valid for MQTT Sensor).
If you are seeing warning messages in Home Assistant’s log reporting “no matching payload” then this is confirmation that Home Assistant is connected to the MQTT Broker, subscribed to topics, and receiving payloads (MQTT messages). The complaint is that the format of the payload doesn’t match what Home Assistant needs.
For example, I created a simple MQTT Binary Sensor, called “My Test”, subscribed it to the topic “test/state” and then published an invalid message to the topic. Here’s the resulting warning message:
2019-02-16 11:04:59 WARNING (MainThread) [homeassistant.components.binary_sensor.mqtt] No matching payload found for entity: My Test with state_topic: test/state
When I published a valid message to “test/state” (either ON or OFF for a binary_sensor), the “My Test” sensor reflected the published state and the log contained no warning message about the “My Test” sensor.
Many thanks for your help. I’m not quite certain what you mean or where I can find whats required. I can confirm that “tele/RF_Bridge/RESULT” is a valid topic. What am I missing? Thanks
I simply wanted to inform you that the presence of the warning messages is, as per your original assumption, confirmation that something is attempting to ‘get through’. In other words, Home Assistant is subscribed to the topic (tele/RF_Bridge/RESULT) and receiving messages … except the messages (payloads) aren’t matching what you’ve asked it to find (hence the warning ‘no matching payload’).
Are you using any kind of MQTT client to help debug this problem? If not, you can use Home Assistant’s MQTT page to publish a message to a topic. It allows you to easily experiment with the message (as opposed to having to manually activate, in your case, the physical door sensor).
This ought to activate your binary_sensor because it is configured to match a payload of AEBB89 in value_json.RfReceived.Data.
When debugging MQTT problems, I use an MQTT client to observe all topics and their messages. The MQTT client lets me confirm the message contains precisely what I think it should (or not).
I’ve used several MQTT clients but I’m now partial to MQTT Explorer because it presents all topics in a tree-view and displays JSON payloads in great detail.
Here’s how your topic, and the payload I suggested, appear in MQTT Explorer:
Thanks for your help. I published the MQTT as you suggested and that seems to have resolved the error ocurring. Strange it was’nt part of Dr.ZZs video? Things seem to change rapidly on HA though. I suspect my problem therefore must be in the YAML.
Thanks
My suggestion isn’t needed to make anything work. It is simply to confirm the message is being received and interpreted correctly. Publishing the message this way is often more convenient than manually activating the physical device that normally publishes the message (i.e. your postbox sensor). Had the test failed, then we would know something is still amiss in the configuration.