Alarmo: Nobody home notification to arm

Gotcha, funnily enough I had just tried remove the attribute before reading here and it worked, hopefully now tomorrow when we are both away this automation will work :slight_smile: il keep you both posted, thanks

It worked! Thank you both for your help !

2 Likes

Hey Stevo92,
mind sharing the code that works or did you update the first post?
Thanks

Hello and welcome to the forum. :wave:

No, the first post wasn’t changed. You can see that for yourself as there is no pencil left to the posting data. If it would have been changed, you could check yourself for the former version(s). :slight_smile: Just for future reference.

So what is it, that you need/want?

Here is a corrected version from above, maybe it already helps you:

alias: Notify to arm when nobody home
description: ''
trigger:
  - platform: state
    entity_id:
      - zone.home
    to: '0'
    for:
      hours: 0
      minutes: 2
      seconds: 0
condition:
  - condition: time
    after: '06:00:00'
    before: '21:00:00'
  - condition: state
    entity_id: alarm_control_panel.alarmo
    state: disarmed
action:
  - service: notify.alarm_notify_group
    data:
      title: Nobody Home
      message: 'Arm The Alarm ? '
      data:
        actions:
          - action: ALARMO_FORCE_ARM
            skip_delay: true
            title: Arm Alarm
            event_type: ios.notification_action_fired
            icon: sfsymbols:alarm.fill
            destructive: true
            mode: away
            force: true
mode: single
1 Like

Hey Paddy,
you’ve got a point there which I could’ve noticed myself :smiley: Thank you for posting the code and also welcoming me to the forum.
As I’m fairly new to HA I’ll give it a try and see if I can manage to get the code working for my needs. Meaning basically just notifying me and my wife to arm the alarm once we’re all out of the house.
Thanks again,
Helge

Oh, no, no, that pencil is something even long registered users tend to overlook (aka me) :rofl:

But back to the notification: I can see your point, but why aren’t you arming it automatically? If nobody is at home, the house could/should take care of its own. That is what I call the difference between an automated and a smart home. Automation is in this case you or somebody has to do something to start an automated plan, smart would be, to let your home decide, that you’re out and it should take care of what’s necessary while you’re away. :wink:

I personally find that easier, and in the end more reliable. Chances are much higher, that my good configured home knows what’s going on, while my wife or I forget to click the notification, or we don’t have ceel coverage (yeah, I know, in countries outside of Germany this wording is long gone, but here we are) or, or, or… :slight_smile:

Haha okay well I’ll most likely do this also a few more times.
Automatically arming it would be even better, but I thought that is not a do-able scenario/action with alarmo. If you could point me into the right direction or even provide the solution that would be great.
Thanks

Sometimes having pets or if somebody is at home that isn’t a registered user on the app, also occasionally HA doesn’t update straight away or even at all, options are options dependant on the end user, don’t use this anymore as the actual arm option on the notification doesn’t work anyway :rofl::man_shrugging:

The way to arm Alarmo is fortunately not complicated, as it is a “normal” automation.

See here:

action:
  - service: alarmo.arm
    data:
      entity_id: alarm_control_panel.alarmo
      code: !secret alarmo_arm_code
      mode: away 
      skip_delay: true
      force: true

It is just a service call like in any other automation, combined with some additional infos. :slight_smile:

You should make yourself a plan, on how to handle these “presence” things. :open_mouth: Imho this is the essential part in your home. If your presence detection isn’t working on spot, you are blocked for so many things. After you have presence working, you can easily add a ton of automations to it. Lights turning on or off, closing covers, starting the vacuum robot or whatnot. :wink:

I personally do my presence with a point system, where I combine different sensors and values into an input_select that reflects my state (home, just arrived, just left, away, vacation). This state is then used to set a “residence state” (wife and/or me are home, someone else is home, nobody is home, alarm). And the automation is triggered by the “residence state”. If all are out, arm the system. :slight_smile:

We got a Konnected alarm that’s converted an old alarm into a smart one, generally the dogs don’t set sensors off but with somebody most the time being home in the day main time alarms on is for holidays ect generally to be honest

1 Like

I switch mine to armed_home while I’m/we’re in. This way I can still control if some doors open or the garage will be opened or such things. You never know, who want’s to take a look at your belongings. :wink: :slight_smile:

Thank you for the link. I’ll dig into this and see which features can be used :+1:
As you all are saying, there is a huge variety of possibilities and at the beginning it’s just kinda overwhelming and I personally don’t know where to start to achieve my goal as it also changes frequently after discovering new features :smiley:
And to be sure that I don’t get something wrong right at the beginning. I’d use the code from the linked page as an automation and then combine it for example with the action you suggested (or whatever I believe is most suitable for my needs)? So something like this:

Arming my alarm system:

trigger:
  - platform: state
    entity_id:
      - zone.home
    to: '0'
    for:
      hours: 0
      minutes: 2
      seconds: 0
condition:
  - condition: state
    entity_id: alarm_control_panel.alarmo
    state: disarmed
action:     
      entity_id: alarm_control_panel.alarmo
      code: 'my-alarm-code'  (unless I use the secret.yaml file?)
      mode: away 
      skip_delay: true
      force: true

Disarming my alarm when entering the geo zone

trigger:
  - platform: state
    entity_id:
      - zone.home
    to: '1'
    for:
      hours: 0
      minutes: 0
      seconds: 10
condition:
  - condition: state
    entity_id: alarm_control_panel.alarmo
    state: armed
action:     
      entity_id: alarm_control_panel.alarmo
      code: 'my-alarm-code'  (unless I use the secret.yaml file?)
      mode: armed_home
      skip_delay: true
      force: true

A few questions which I do have with my limited understanding:

  • Is there a better way to disarm it then saying that it switches to 1? How would it behave if both of us where to come home at the exact same time and it switches from 0 to 2? Would it still work?
  • Why is there a difference between “away” and “armed_away”?
  • Do I need to (un)check the box in the alarmo integration that I need a code to arm the system?

Sorry for all the questions…

That’s what the forum is here for! :wink: So ask, if you have questions.

To your questions:

  1. The number represents the count of persons that are currently in the home zone. This is a little wrong in the example, because as you said, it is not correct for more than one person. If you want to check for one or more persons, you’d better go with a different approach:
    trigger:
      - platform: state
        entity_id:
          - zone.home
        from: '0'
    
    This way you’re not checking for the count itself, but rather if it goes above ‘0’.
  2. The difference between away and armed_away is where you use it. away is the mode you want to set the alarm to, armed_away is the state that is given after you turned it to. It’s comporable to “close the door” (away) and “the door is closed” (armed_away).
  3. If you check the box you need a code to arm/disarm the alarm, so I’d say, yes, use it. There are cases where you don’t want to use an alarm code, but that doesn’t seem to apply to you. :slight_smile:

And one last thing: I wouldn’t disarm the alarm automatically. This is something I believe should be done “old school” by hand. There are to many failure points to disarm an alarm. In theory it sounds good, but even I don’t trust my system that much, that I’d disarm like that. If it is out of comfort or the WAF (=WifeAcceptanceFactor) is trying you hard, just use a simple button, that you hide anywhere, and let a double press on the button disarm the alarm (with code in the automation). There are numerous ways, to make that comfortable, but I’d still go with an approach, that needs at least one personal interaction with the system. For me, I have a tablet right next to the front door, and I’ll give my wife or myself 45 seconds to enter the code.

Let me know what you think! :wink:

WAF, I like that one. Seems to be somewhat the same everywhere… :smiley:
That’s a good hint with the “from”. Makes much more sense this way.
I did now order a set of small aqara switches which I can hide somewhere to disable the alarm. Did you guys just use a delay to activate the alarm within the integration?

I’m not sure what you mean… :slight_smile:

I do the arming with an automation that controls my “Going away”.

After being out and the alarm being in armed, me or my wife get back home. As we do not want the alarm siren to go off right away we need some time to disarm it before it engages. Hope this makes more sense.

Ah that. :slight_smile: You can set a delay to disarm (or arm) the alarm. It’s under Alarmo > General > Modes where you choose the mode you want to configure (the down arrow) and set an Entry delay and an Exit delay.

1 Like

Allright, thanks I did change this as well :slight_smile:
I now did some additional minor adjustments and will see what happens once my wife and I are not home and I did not arm the alarm manually. I did try to implement the condition to arm the alarm if the system is either in armed_home or disarmed. I was also thinking about using a ‘not’ condition but didn’t see a benefit here. This will most likely be also altered once I received my ‘secret’ button which I’ll use for disarming the alarm. But for now I want to ensure that the system is armed automatically every time we leave the house and it is not armed.

alias: Automatic arm when nobody home and not armed
trigger:
  - platform: state
    entity_id:
      - zone.home
    to: "0"
    for:
      hours: 0
      minutes: 2
      seconds: 0
condition:
  alias: "Alarm disarmed or Armed_Home"
  or:
    - condition: state
      entity_id: alarm_control_panel.alarmo
      state: armed_home
    - condition: state
      entity_id: alarm_control_panel.alarmo
      state: disarmed
action:
  - service: alarmo.arm
    data:
      entity_id: alarm_control_panel.alarmo
      code: "??????"
      mode: away
      skip_delay: true
      force: true
1 Like

Ok I did just walk to the garage, should have taken me longer than 2 minute, but the alarm was not armed automatically. I’ll take a longer walk later and check if it works, or do you see any issue with the code I posted?
Ok it does Work :slight_smile:

1 Like

Okay, I’m kind of stuck at the part for disarming it with a hidden button. Yes the WAF is given :wink: What am I doing wrong here? When double clicking the button it’s recognized by the automation that it was triggered but the alarm stays on armed. Any ideas?

```
alias: disarm
description: “”
trigger:
- platform: device
domain: mqtt
device_id: hidden-button-id
type: click
subtype: double
discovery_id: hidden-button-id click_double
condition:
- condition: state
entity_id: alarm_control_panel.alarmo
state: armed_away
action:
- service: alarmo.disarm
data:
entity_id: alarm_control_panel.alarmo
code: "nope, not telling "
mode: armed_home
skip_delay: true
force: true
mode: single

```
Two other thoughts:
* I’m thinking also to remove the condition that it needs to be in armed_away so that it can also be disarmed from away_vacation or would that be in conflict with my thought below?
* When we are on vacation friends or family sometimes come by to water the plants e.g. is there a way that for example when it is set to armed_vacation that they’re just told a differnet way to disarm it (e.g. just one push) and that the system re-arms after like 30min or 1h?

Thanks,
Helge

Got it running using an automation which I took from the blueprint exchange:
Aqara Buttons All-In-One [Zigbee2MQTT]
Great for people like me :smiley: