MQTT Test Not Working

Post Reply
curtis-r
Posts: 13
Joined: Wed Dec 13, 2023 6:19 pm

MQTT Test Not Working

Post 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 3968 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 3968 times
User avatar
TimG
Posts: 2170
Joined: Tue Jun 18, 2019 10:45 am
Location: Nottinghamshire, UK.

Re: MQTT Test Not Working

Post by TimG »

I recommend using MQTT Explorer while testing MQTT commands. What does your test do if you delete "Car" from "Required AI objects" ?
Forum Moderator.
Problem ? Ask and we will try to assist, but please check the Help file.
curtis-r
Posts: 13
Joined: Wed Dec 13, 2023 6:19 pm

Re: MQTT Test Not Working

Post 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.
curtis-r
Posts: 13
Joined: Wed Dec 13, 2023 6:19 pm

Re: MQTT Test Not Working

Post 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.
Post Reply