Setting up an Arm/Disarm Alarm Automation with the Aqara Hub

Our website has had a few people writing in, asking how they can set up an alarm with the Aqara Hub, using a door sensor detecting that the door opens, which in turn triggers the alarm on the Aqara Hub, which is easy enough in the Aqara app (the alarm/speaker can only be accessed via the Aqara app). However, to create an alarm that can be armed and disarmed remotely is stumping some people, so we thought we’d present a short ‘how To’ to explain how it’s done, but in order to do this, you will need the following devices;

  • Aqara Hub
  • Aqara or Mijia Door & window Sensor
  • Aqara or Mijia wireless mini switch

(1) So, click on the Automation tab and click the ‘plus’ symbol at the top to create your first of two automations. (2) Then, clicking on ‘add’ in the ‘IF’ section, you choose the device that you want to trigger the alarm, in my case the Aqara Door. (3) Once selected, you need to choose which action will trigger the alarm, in my case, when the door opens.

(4) Once you’ve completed these steps, you’ll be taken back to the ‘IF-THEN’ page. Click ‘Add’ in the ‘THEN’ section. (5) Select the Aqara Hub as the device to be triggered. (6) Select ‘Play alarm sound’.

(7) Then on the next screen, choose the relevant sound you want for your alarm, and the desired volume level. (8) Click OK at the top of the screen and you’ll return to the previous screen with a completed automation. (9) Click ‘Save’ and then name your automation – in my case ‘door opens – alarm sounds’.

Now, you’ve created an automation that will trigger the alarm every time you open the door, but that’s no good if you don’t want the alarm to trigger every time you come and go. You can of course turn off the alarm in the app, but with a carefully placed Aqara Switch, you can simply arm or disarm this action without having to go into the app at all.

(10) So the automation you’ve created will appear in the list of automations. Now for the second part. (11) Create another automation whilst in the automations list page, by clicking on the plus symbol at the top, which will bring you to the ‘IF THEN’ page, so click ‘add’ in the ‘IF’ section, then select the device to arm/disarm your alarm – I’m selecting the Mini Switch. (12) once selected, you simply choose the relevant action, in this case a ‘single press’ action is good enough.

(13) You will then return to the ‘IF THEN’ screen. (14) Click on ‘add’ on the ‘THEN’ section and then – crucially – instead of selecting a device to be triggered, scroll down and select the first automation you created – in my case ‘Door Opens – Alarm Sounds’. (15) Once you click on this, you will be offered a choice as to whether you want to have the Mini Switch action do one of the following actions;

  • Turn on
  • Turn off
  • Turn on/off

I choose, turn on/off, so that allows my switch to toggle the alarm on and off with one action.

(16) Once you’ve selected your choice, you’ll then return to the previous ‘IF THEN’ page to show your completed second automation, which in turn controls the first automation. Click on Save and name your automation. After that is all complete, you can test the Mini switch while directly in the automation page to see it (17) toggle on and (18) toggle off.

One thing to note is that there may be times when you forget whether you’ve toggled the switch to set arming or disarming, so in this case, you might want to assign two separate automations, with two separate button actions – maybe single click for ‘arm’, and a double-click for ‘disarm’. One other thing you may want to do, is add a delay to the first automation, so that when you return home from a night out, you’re not immediately greeted with a screaming alarm sound. The automation would look like the image below;

Finally, it may be a good idea to place your mini switch (or other device) in a secret location, so as to avoid having someone break into your house and immediately disable the alarm!

any questions – feel free to post.

Simon T Bramley

Editor - Musician, graphic designer and HomeKit aficionado, living in Taipei, Taiwan.

6 thoughts on “Setting up an Arm/Disarm Alarm Automation with the Aqara Hub

  • 10th October 2018 at 6:30 pm

    Hi Michael, thanks for the comprehensive post. I’m trying to do as you explain, but when I try to add a new automation the only trigger that I have available on the IF actions is “Timer”. None of my sensors/devices appear as triggers, so I can’t select the door sensor. I have the region set to Mainland China on my profile, so I don’t understand what the problem is.

    Any ideias?


  • 10th October 2018 at 6:37 pm

    There could be two reasons, but one is simple to fix, the other not so easy at present. First off all, when you create any automations, make sure that after you click add in either the IF or THEN sections, that at the top of the screen you have your home selected (on the right) and ‘All’ is on the left. If it shows a room and the device you’re looking for isn’t in that particular room, then it won’t be visible. That’s the easy fix. If it isn’t that, then it may well be that you’re having a similar issue to other people. The way to check is to see what firmware version your hub is – mine is 1.2.30, but many others are stuck on an earlier firmware number and can’t currently update. These people are usually in the EU it seems. Either way, make sure you’re server is set to Mainland China and that you’ve set up and Aqara account, which I see you’ve done regarding the server side of things.

    • 10th October 2018 at 6:58 pm

      Yes, I’m in the EU and the my firmware version is 1.2.26. When I try to update it says that I already have the latest version.

      How does the app know I’m in the EU? From the region set in my iPhone? I could try changing the region to another one to see if I can update the firmware. Do you think this would work?

      • 10th October 2018 at 6:59 pm

        I don’t know if it will work, but they may be using location services too, but I’m not sure. Worth a try though. If it does work, do let me know.

  • 10th October 2018 at 9:13 pm

    Good post~

    I have a quick question, do we get notification from the Apple homekit app for the setup you do in

    I am moving to new home around the end of this month, I guess I will be setting up all these in mid Nov.

    • 10th October 2018 at 9:26 pm

      Hi Jack
      as the speaker part of the Aqara Hub isn’t exposed to HomeKit currently, there’s no way to get a notification of the alarm being triggered. However, you can set up notifications in the Apple Home app, for the door sensor being triggered, for just when you’re not at home. You do get notifications to your phone from the Aqara app, when the Aqara alarm has been triggered though, so even though that isn’t coming from the Home itself, you’re still getting notifications specifically relating to the alarm and not just the door sensor.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.