# Help needed for alarm checking

**URL:** https://discourse.nodered.org/t/help-needed-for-alarm-checking/96539
**Category:** General
**Created:** [12 April 2025 15:52 UTC](https://discourse.nodered.org/t/help-needed-for-alarm-checking/96539 "2025-04-12T15:52:54Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Haithamk](https://avatars.discourse-cdn.com/v4/letter/h/b9bd4f/32.png) [@Haithamk](https://discourse.nodered.org/u/Haithamk)
#### Post date: [12 April 2025 15:52 UTC](https://discourse.nodered.org/t/help-needed-for-alarm-checking/96539/1 "2025-04-12T15:52:54Z")

</div>

Gent  
I am new to node red  
I want to send WhatsApp message when the alarm change state  
The payload that i get from the alarm device is  
"{"payload":{"arm\_state":"arming","detail":{"sid":2,"name":"Away Mode"}}}"

I want to check arm state and name at the same time and if it match I send a WhatsApp to my number  
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: [12 April 2025 19:11 UTC](https://discourse.nodered.org/t/help-needed-for-alarm-checking/96539/2 "2025-04-12T19:11:52Z")

</div>

Welcome to the forum @Haithamk.

> [@Haithamk](#):
>
> I want to send WhatsApp message when the alarm change state

You can use a filter node to only pass a message when msg.payload.arm\_state changes  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/7/77a39f5a5456469bd9259d4508ea51c9521a0700.png)

> [@Haithamk](#):
>
> I want to check arm state and name at the same time and if it match ...

I don't understand "if it match" here.  
Perhaps you need to set the filter node to handle each msg.payload.detail.name separately

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

---

<div class="post-metadata">

### Author: ![Haithamk](https://avatars.discourse-cdn.com/v4/letter/h/b9bd4f/32.png) [@Haithamk](https://discourse.nodered.org/u/Haithamk)
#### Post date: [18 April 2025 18:10 UTC](https://discourse.nodered.org/t/help-needed-for-alarm-checking/96539/3 "2025-04-18T18:10:12Z")

</div>

> [@jbudd](#):
>
> payload.detail.name

thank you for your reply.

i was thinking about comparing the arm state with a value of arming and name with a value of away mode in the payload. then if what i am getting is true for both then send me whatsapp.

i think it is too complicated for me. i settle for checking the name to has a value or alarming from the payload message. i am using AND node like below

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

i hope there is a better way to extract a string value from the payload and compare it to any defined string value

thank you

---

<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: [17 July 2025 18:10 UTC](https://discourse.nodered.org/t/help-needed-for-alarm-checking/96539/4 "2025-07-17T18:10:43Z")

</div>

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