Help needed for alarm checking

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

Welcome to the forum @Haithamk.

You can use a filter node to only pass a message when msg.payload.arm_state changes
image

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

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

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

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