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

IMPORTANT NOTE: It’s come to our attention that this alarm automation is not working for some people, and is for others. This seems to be down to an issue with Aqara’s Cloud servers, so it’s best to not rely on this method until these issues are fixed – and ultimately, if you shouldn’t rely on this as your only alarm setup if it’s something you need for security, as it’s not currently as reliable as a fully professional alarm system.

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.