# How to send mqtt out to trigger siren?

**URL:** https://discourse.nodered.org/t/how-to-send-mqtt-out-to-trigger-siren/75006
**Category:** General
**Tags:** node-red-dashboard, mqtt
**Created:** [10 February 2023 18:12 UTC](https://discourse.nodered.org/t/how-to-send-mqtt-out-to-trigger-siren/75006 "2023-02-10T18:12:09Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![AndKe](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andke/32/73023_2.png) [@AndKe](https://discourse.nodered.org/u/AndKe)
#### Post date: [10 February 2023 18:12 UTC](https://discourse.nodered.org/t/how-to-send-mqtt-out-to-trigger-siren/75006/1 "2023-02-10T18:12:09Z")

</div>

I have this device:

 ![Screenshot from 2023-02-10 19-04-38](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/6/869d74296a3b9194a9144eb53e6a36e26ba2d31f.png)

...and struggle with "how to configure this item"  
 ![Screenshot from 2023-02-10 19-10-54](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/4/d4a7653999973c5963d41bc4c8ea42bd45047ef3.png)  
...so that it triggers the alarm.  
Basically : how to set "alarm=True"

---

<div class="post-metadata">

### Author: ![gerry](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gerry/32/21604_2.png) [@gerry](https://discourse.nodered.org/u/gerry)
#### Post date: [10 February 2023 18:37 UTC](https://discourse.nodered.org/t/how-to-send-mqtt-out-to-trigger-siren/75006/2 "2023-02-10T18:37:24Z")

</div>

The node configuration and the message are two separate things. You can send any message you want to any device. The node configuration must match the device you are communicating with. From what information you have provided I don't see the MQTT settings. The topic the siren is looking for must match exactly what the node outputs. You need to show us more information on the device. Is it a MQTT device?

---

<div class="post-metadata">

### Author: ![AndKe](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andke/32/73023_2.png) [@AndKe](https://discourse.nodered.org/u/AndKe)
#### Post date: [10 February 2023 19:18 UTC](https://discourse.nodered.org/t/how-to-send-mqtt-out-to-trigger-siren/75006/3 "2023-02-10T19:18:42Z")

</div>

Thanks for trying to help, I am not sure exactly what you need - does this help?  
 ![Screenshot from 2023-02-10 20-17-23](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/c/9cf93f7e9d247ed09eef5c38f06e02a06e74ad8a.png)

---

<div class="post-metadata">

### Author: ![gerry](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gerry/32/21604_2.png) [@gerry](https://discourse.nodered.org/u/gerry)
#### Post date: [10 February 2023 20:38 UTC](https://discourse.nodered.org/t/how-to-send-mqtt-out-to-trigger-siren/75006/4 "2023-02-10T20:38:35Z")

</div>

What is really needed is more info on the alarm. What is it, maybe model or info from the siren instructions on how it communicates with other devices? I'm no expert but a device that communicates natively over MQTT seems a bit odd. I would expect wifi or maybe Bluetooth. If it is MQTT there should be a topic somewhere the device listens for. Also, how do you set what server the device looks for?

---

<div class="post-metadata">

### Author: ![gerry](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gerry/32/21604_2.png) [@gerry](https://discourse.nodered.org/u/gerry)
#### Post date: [10 February 2023 20:44 UTC](https://discourse.nodered.org/t/how-to-send-mqtt-out-to-trigger-siren/75006/5 "2023-02-10T20:44:44Z")

</div>

Maybe a little light reading on mqtt

> **[MQTT Essentials - All Core Concepts explained](https://www.hivemq.com/mqtt-essentials/)**
>
> MQTT Essentials: We want to explain the core concepts of MQTT, its features and other essential information about the protocol for the Internet of Things.

This may be some help

---

<div class="post-metadata">

### Author: ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)
#### Post date: [10 February 2023 21:00 UTC](https://discourse.nodered.org/t/how-to-send-mqtt-out-to-trigger-siren/75006/6 "2023-02-10T21:00:17Z")

</div>

You need to [lookup the information](https://www.zigbee2mqtt.io/supported-devices/) on the zigbee2mqtt site to see what the device accepts or not.

---

<div class="post-metadata">

### Author: ![AndKe](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andke/32/73023_2.png) [@AndKe](https://discourse.nodered.org/u/AndKe)
#### Post date: [10 February 2023 21:03 UTC](https://discourse.nodered.org/t/how-to-send-mqtt-out-to-trigger-siren/75006/7 "2023-02-10T21:03:23Z")

</div>

The zigbee2mqtt interface (in my initial post) shows the alarm:true parameter - If I set it to "true" - the selected("melody") alarm sounds.

What I need is to "write" to the device "alarm:true" - that's it - but I do not know how.

---

<div class="post-metadata">

### Author: ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)
#### Post date: [10 February 2023 21:06 UTC](https://discourse.nodered.org/t/how-to-send-mqtt-out-to-trigger-siren/75006/8 "2023-02-10T21:06:18Z")

</div>

> [@AndKe](#):
>
> What I need is to "write" to the device "alarm:true" - that's it - but I do not know how.

> you need to [lookup the information](https://www.zigbee2mqtt.io/supported-devices/) on the zigbee2mqtt site to see what the device accepts or not.

---

<div class="post-metadata">

### Author: ![AndKe](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andke/32/73023_2.png) [@AndKe](https://discourse.nodered.org/u/AndKe)
#### Post date: [10 February 2023 21:08 UTC](https://discourse.nodered.org/t/how-to-send-mqtt-out-to-trigger-siren/75006/9 "2023-02-10T21:08:40Z")

</div>

you are right: it says: [Neo NAS-AB02B2 control via MQTT | Zigbee2MQTT](https://www.zigbee2mqtt.io/devices/NAS-AB02B2.html#alarm-binary)  
So I set the topic to "zigbee2mqtt/Garage-siren/set"  
now I just need to know where to put the "payload" of "{"alarm": true}"

---

<div class="post-metadata">

### Author: ![AndKe](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andke/32/73023_2.png) [@AndKe](https://discourse.nodered.org/u/AndKe)
#### Post date: [10 February 2023 21:11 UTC](https://discourse.nodered.org/t/how-to-send-mqtt-out-to-trigger-siren/75006/10 "2023-02-10T21:11:48Z")

</div>

Apparently I could do it in a previous step - not on the "mqtt out node" inself.  
This works:  
 ![Screenshot from 2023-02-10 22-10-31](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/b/4bef3d1de52a7113964ddd7b904544459b545d6f.png)

Thank you.

---

<div class="post-metadata">

### Author: ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)
#### Post date: [10 February 2023 21:13 UTC](https://discourse.nodered.org/t/how-to-send-mqtt-out-to-trigger-siren/75006/11 "2023-02-10T21:13:23Z")

</div>

> Basically : how to set "alarm=True"

> [@AndKe](#):
>
> What I need is to "write" to the device "alarm:true" - that's it - but I do not know how.

Either  
 ![Untitled 3](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/7/f7b81a9568d665e89a54da81df477d91b35e8c00.jpeg)

Or (more likely)  
 ![Untitled 2](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/2/c20a9c3c0b79469d7a1b95083ba88fe813833452.jpeg)

---

<div class="post-metadata">

### Author: ![gerry](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gerry/32/21604_2.png) [@gerry](https://discourse.nodered.org/u/gerry)
#### Post date: [10 February 2023 21:33 UTC](https://discourse.nodered.org/t/how-to-send-mqtt-out-to-trigger-siren/75006/12 "2023-02-10T21:33:21Z")

</div>

Put an inject node in front of the mqtt node. Set the inject payload to string true. or boolean true. Set another inject node to false and see what it takes to trigger the siren. The mqtt node does not develop the payload it simply provides the connection to the device.

---

<div class="post-metadata">

### Author: ![TheNutHouse84](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/thenuthouse84/32/75946_2.png) [@TheNutHouse84](https://discourse.nodered.org/u/TheNutHouse84)
#### Post date: [12 February 2023 07:19 UTC](https://discourse.nodered.org/t/how-to-send-mqtt-out-to-trigger-siren/75006/13 "2023-02-12T07:19:42Z")

</div>

Here's what I'm doing

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/b/3ba8b38b94130b9720d6f7c56c0e4195ecb16ee4.png)

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [26 February 2023 07:20 UTC](https://discourse.nodered.org/t/how-to-send-mqtt-out-to-trigger-siren/75006/14 "2023-02-26T07:20:38Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
