Alarm, how to quickly enable/disable specific sensors

I am setting up a security system on my HA that already automates all my lights.
So far so good, the security system works fine, but I have trouble finding a simple way to disable specific door sensors (Aquara magnetic sensor).
Sometimes I need to arm the system but keep one window open; is there a fast way in Lovelace to enable/disable specific sensors so that do not trigger the alarm?
Do you have any suggestions?

Not sure what the details of your security system are… do you check the magnetic sensors with an automation in Home Assistant to trigger the alarm?
If so, you could add https://www.home-assistant.io/integrations/input_boolean/ and use that toggle to see if certain sensors need to be checked or not in your automation.

I suggest using the get enteties node in node red.
On each sensor you add a custom attribute, say “trigger alarm”.
Then you set true/false on that attribute.

In node red you trigger on all sensors and compare with get enteties of “trigger alarm” to see if the sensor is true or false.

That is a rough idea.
I don’t have anything to test it on so I can’t help you much more.

Glenn,
I have about 20 magnetic sensors and 20 vibration sensors to protect all the doors and windows, plus 5 motion sensors, and 3 water sensors.
I have created a group for each family, vibration, magnetic, water, motion. I have one automation for each group that checks the state, in case “on”, triggers the alarm if armed.

I thought to create helpers to enable/disable single sensors, but that means creating one helper for each sensor. But then I would not be able to trigger the alarm with group state change, forcing me to create one automation for each sensor to trigger the alarm. Only in this way I can trigger the alarm if the specific sensor is enabled or disabled.

I am looking for a more efficient way to handle this.

Hellis81, I am not familiar with node red yet but the solution you propose is a good chance to start.

Yeah I get your problem in reference to the amount of sensor.
Maybe other people have a better idea.

Maybe I can give you a example of what I mean later, now I have few hours of cleaning up after dinner and getting the kids in bed

1 Like

Probably not what you asked for, but this new alarmo panel has a few inbuilt function that may be of use…

Apparently you can’t use attributes that way.
I couldn’t find a way to change a attribut in an easy way.

So sadly it seems the input_boolean method is the only way.
I created an example in node red of what you can do with input boolean holding if or if not the trigger should trigger.

Since I don’t have any security sensors I used input booleans as my “door” switches.
Each “sensor” has a boolean called …_trigger which will be if this sensor should fire the alarm.

The ones marked with yellow is supposed to be the sensors.

The node red flow looks like this:

Since I use input booleans as “sensors” I use the top sequence to simulate a motion sensor or door sensor, essentially, when triggered it goes to on for one second then back to off.
So you will not need the upper part.

The sequence below first grabs the sensor name. For instance “sensor.back_door” and converts that too “input_boolean.back_door_trigger”.
It gets the current state of “input_boolean.back_door_trigger” and the switch node looks at the state to know if it should send it to fire the alarm or not fire the alarm.
In this example case it’s debug nodes so that you get the output in debug window, but in your case you should have it call a service I guess

I forgot to mention the start of the flow. The trigger state node will trigger on any input_boolean.door* entity.
You will have to think about the naming of the triggers so that you can use regex to capture them all in one trigger node. Or at least a few. Having 50 trigger points in a flow is, although possible, not very nice.

[{"id":"e8afcb5a.9a3138","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"1412940d.931eec","type":"debug","z":"e8afcb5a.9a3138","name":"Motion triggered alarm fires","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1020,"y":140,"wires":[]},{"id":"3cd42011.f7abe","type":"trigger-state","z":"e8afcb5a.9a3138","name":"","server":"4bbca37b.1700ec","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"input_boolean.door\\d$","entityidfiltertype":"regex","debugenabled":false,"constraints":[{"id":"crjk16qg49v","targetType":"this_entity","targetValue":"","propertyType":"current_state","propertyValue":"new_state.state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"on"}],"constraintsmustmatch":"all","outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"str","x":160,"y":140,"wires":[["7cb65eb5.a7757","2f1a51e1.20f32e"],[]]},{"id":"722d3c7c.9c7e04","type":"api-call-service","z":"e8afcb5a.9a3138","name":"","server":"4bbca37b.1700ec","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"toggle","entityId":"{{topic}}","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":610,"y":120,"wires":[[]]},{"id":"7cb65eb5.a7757","type":"delay","z":"e8afcb5a.9a3138","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":400,"y":120,"wires":[["722d3c7c.9c7e04"]]},{"id":"41d9993c.865058","type":"api-current-state","z":"e8afcb5a.9a3138","name":"","server":"4bbca37b.1700ec","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"{{topic}}","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":580,"y":180,"wires":[["fdf95518.334be8"]]},{"id":"fdf95518.334be8","type":"switch","z":"e8afcb5a.9a3138","name":"","property":"data.state","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":770,"y":180,"wires":[["1412940d.931eec"],["8398da3d.da35f8"]]},{"id":"8398da3d.da35f8","type":"debug","z":"e8afcb5a.9a3138","name":"Motion triggered alarm does not fires","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1050,"y":200,"wires":[]},{"id":"2f1a51e1.20f32e","type":"function","z":"e8afcb5a.9a3138","name":"","func":"msg.topic = \"input_boolean.\" + msg.topic.split(\".\")[1] + \"_trigger\";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":400,"y":180,"wires":[["41d9993c.865058"]]},{"id":"4bbca37b.1700ec","type":"server","z":"","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]
1 Like

@Hellis81, thank you very much for the detailed explanation!

This is the right chance to start with Node-RED. I will try and let you know.

@andie_will5 thanks for the suggestion, Alarmo looks promising, indeed.
Still beta, but I think it has big potential. Installed and trying it.

You could use variables to store the current status of all sensors while activating. Then only react on changes of the sensors.
But of course this requires a bit of programming…