Page 1 of 1

MQTT Test Not Working

Posted: Sun Dec 31, 2023 8:15 pm
by curtis-r
I have an MQTT motion alert set up with Home Assistant and it's working properly, but I want to try something different and need to do some MQTT testing and I can't get tests to work. I'm monitoring Home Assistant and there is not change with a test alert. Twice while I was trying to get this to work, a legit motion trigger occurred and subsquently Home Assistant correctly changed the motion sensor to ON.

Here is the alert (which works when there is the proper motion), just not during a test.
mqtt.jpg
mqtt.jpg (57.37 KiB) Viewed 5075 times
Here is what I'm doing for a test, and it returns that 1 alert is skipped, which is correct since I have one other (sms) alert that is not active in Profile 1, so it should be skipped.
test.jpg
test.jpg (26.87 KiB) Viewed 5075 times

Re: MQTT Test Not Working

Posted: Mon Jan 01, 2024 10:17 am
by TimG
I recommend using MQTT Explorer while testing MQTT commands. What does your test do if you delete "Car" from "Required AI objects" ?

Re: MQTT Test Not Working

Posted: Tue Jan 02, 2024 11:50 pm
by curtis-r
I believe you are supposed to enter something in AI objects and check at least one source. If you don't, all actions are skipped. I take it that by me using "car", it's supposed to create simulation that a car was the trigger.

Never used an MQTT-Explorer but I think there is a Home Assistant one you can add. I'll look into it.

Re: MQTT Test Not Working

Posted: Wed Jan 03, 2024 2:48 am
by curtis-r
UPDATE: I installed MQTT-Explorer in Home Assistant, and indeed the BI MQTT is being received, but for some reason the state of the binary sensor doesn't change during the BI MQTT test. The state only changes when there is an actual motion alert.

UPDATE#2: When I test-trigger the MQTT to Home Assistant the &TYPE is blank (""). If I change the action to { "type": "motion", "trigger": "ON" } where "motion" is static, then a test-trigger properly affects Home Assistant.