[Custom Component] Alarmo - browser managed alarm system

If you go to Alarmo > actions > new action, you can click on task > ‘go to Yaml’.
Then you can use wildcards in the yaml code for message, e.g.:

The {{arm_mode}} alarm is triggered! Cause: {{open_sensors}}

Did not yet try it in something you are looking for but hope it helps…
Please also look at the following code that might help (the advanced-actions example):

But I’m not using the Alarmo code because it can’t do all the things I need to action when an event is triggered.

Correct me if I’m wrong but can’t you just use the code you’ve posted in the yaml view of the TASK for a new action in alarmo?

No, I was told by the developer when I was trying to create the automation that it would not support things like horn volume or specific tone, but I could do it by simply calling a HA script.

Maybe you can try looping trough the trigger event data like shown in the '‘failed to arm’ example on the link I provided?

{% for entity_id in trigger.event.data.sensors %}
- {{ state_attr(entity_id, ‘friendly_name’) }} is {{ states(entity_id) }}
{% endfor %}

Where would that code go? Does it go right in my script?

OK, I’m going to try and put this in the Alarmo yaml before it calls my HA script. Not perfect, but I will see how it works. So you said:

The {{arm_mode}} alarm is triggered! Cause: {{open_sensors}}

Can you point me to some code as to how to use that in the alarm action scripts? I tried just this, and it didn’t seem to do anything:

The {{arm_mode}} alarm is triggered! Cause: {{open_sensors}}
- service: script.alarm_action_in_home_mode_called_by_alarmo
  entity_id: script.alarm_action_in_home_mode_called_by_alarmo
  data: {}

This is not what I said, or at least not what I meant.
What I said was:

You should be able to define an action in Alarmo for controlling your siren.
But in the editor you only find the ability to select the entity and the action turn on/turn off.
For controlling volume and tone, you need to switch the editor to YAML mode and add the missing parameters yourself.
You can switch between UI and YAML mode by clicking this button:

1 Like

Solved, sort of. I bifurcated it. Called the HA script to do the chime volume and tone and then fire the chime, and also to notify phones and turn off the chime when the door is subsequently closed. Used Alarmo Action → Notifications to broadcast to all speakers including the wildcard specifying which door.

Only thing I can’t do with this is control the Google speaker volume for the broadcast, but homefully the volumes they were set at are correct.

service: tts.google_say
data:
  message: Door opened! {{open_sensors}}
  entity_id: media_player.everywhere

You should, imho, set the call for the script in Alarmo, send the variables you need with them to the script and let the script run. This is the expected way, I’d say. That doesn’t mean there wouldn’t be other ways, as you already found one, but for simplicity and to avoid maintenance issues in the future, I’d advise to do it the “expected” way. :slight_smile:

Or if you want to stay with the UI, see the screenshot above from @neliss. Go into YAML mode and add the data you additionally need to it. This additional data can only be added in YAML mode, but it can be added. So Alarmo can do as you want as well, you just need to write the additional data by hand in YAML mode. :slight_smile:

Hi,

I tried like this :

service: tts.google_say
data:
  message: L'alarme est réglée sur {{arm_mode|lang=fr}}
  entity_id: media_player.salon
  data:
    volume_level: 0.2

But when i click on test it it gives an error message
image

I’m pretty sure the developer suggested that certain things I wanted to do would not be doable using yaml from Alarmo’s scripter. And if I knew how to send variables to my HA script, I guess this would be easy. But I’m very new at this, not a developer, not a programmer, and the documentation didn’t help me at all. Hence, my hybrid solution.

I just wanted to say “why don’t you ask for”, but I went back and read your first question, and indeed you’re asking for how to pass a variable. :open_mouth: Sorry, didn’t see that! :slight_smile:

So back to the screenshot above, where you put in YAML code. :slight_smile: Open the YAML mode and set one of the two possibilities.

Here you call the script directly, eg. script.my_script

- service: script.your_script_name
  data: 
    my_open_sensors: {{ open_sensors }}

OR (here you call the script.turn_on service and set the script name

- service: script.turn_on
  target:
    entity_id: your_script_name
  data:
    variables: 
      my_open_sensors: {{ open_sensors }}

Both work equally, it’s just a personal choice which one to use. What I called my_open_sensors is the name of the variable you set and want to use later in your script, eg. like {{ my_open_sensors }} which will be filled with the content of the Alarmo template {{ open_sensors }}.

Now you can use the variable(s) in your script.

Hope this helps! :slight_smile:

1 Like

That’s cool. I will certainly give that a try.

1 Like

Has someone found a way to send an image from a cam motion alert event?
…i ask more if i wish assign also the cams to other sensors like doors open, or ld2410 movement detection?
I’m not sure Alarmo is suitable for the purpose… any advice/hint to puts me in the right way?
(for sure is possible with automations, but then Alarmo has no sense anymore…)

So far super awesome thank you so much for building and maintaining this!!!

I just installed today, v1.9.10, on HA 2023.8.4, Supervisor 2023.08.1, OS 10.5.

I have a sensor that is not showing up in the Alarmo sensors card. I have other sensors of the same type and manufacturer that are being recognized.

Device info= sengled E1D-G73 Zigbee open/close sensor. Entity ID= binary_sensor.bedroom_door_opening

Hello,

I have a question. I try to use two modes (I only have two + disarmed) for my alarm system, active away and active night. In my opinion, everything is configured and should work. I have three areas, all in active away and two in active night.
Currently it’s not possible to activate active night. It’s not present in UI and not possible to activate with script.
But when I put all areas in the active night then it works and I am able to select active night in UI.
Has everybody an idea?

I am using HA 2023.04 and the newest Alarmo.




UI
Night is missing.

Thanks and Greets
Sebastian

Possibly the device_class: "door" is missing?

Hi all,
I intend to use Alarmo as a mains switch for all my automations. If alarm panel is set to disarmed, I would like all my automations to be disabled. I am trying the following:

But somehow it doesn’t work. Pushing the TRY IT button brings up this:

Any suggestions? Thanks in advance.

Hi, maybe it might help to show the full YAML code of the task instead of a screenshot.
(How to help us help you - or How to ask a good question)

1 Like