Hi guys,
I have an Arduino that sends out MQTT messages to the topic “gate/alerts/state”. I would like Home Assistant to forward these messages as push notifications to the HA App.
I have this fully working except for one thing: If my Arduino device sends more than 2 or more messages immediately after each other, then only the first one makes it through to the App notification.
I have found that all the MQTT messages make it from the Arduino to HA successfully (they show up in MQTT “Listen to a Topic”), but only the first message makes it from HA to the app.
If I make the Arduino insert a 500mS delay between each MQTT message, then everything works. But that’s causing problems on the Arduino side so it would be much better if HA wouldn’t drop them.
Here’s the automation:
alias: "Notify: Forward MQTT Alerts to notification"
description: ""
trigger:
- platform: mqtt
topic: gate/alerts/state
condition: []
action:
- service: notify.mobile_app_test_iphone
data:
message: "{{ trigger.payload_json['Msg'] }}"
title: "{{ trigger.payload_json['Title'] }}"
mode: single
Here’s what the MQTT JSON Payload looks like:
{
"Title": "Sample title here.",
"Msg": "Message A.",
"Critical": 0,
"MsgNum": 52
}
Any Ideas on what’s going on here or how to fix it?