How to...

An Even Better Way to Create a Security Alarm 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.

A couple of weeks ago, we posted a method of using the Aqara hub as an alarm system, and although it works, it was a little long-winded. Well, we always like to take advice and get help whenever it’s offered, and Mariusz from Sweden (although he’s Polish) has shared a really, really simple way to create an alarm automation that not only gives you the classic ‘ook-ook’ car alarm sound for arming and disarming, but also pushes a notification to your phone, so you know the whether the alarm is armed or disarmed. So, we’d like to share it here…

So for this automation you’re going to need;

  • The Aqara HomeKit-enabled Hub
  • an Aqara Door/Window Sensor
  • An Aqara Wireless Mini Switch, or any other compatible Aqara or Mijia switch you have available

The whole process involves creating an automation for the alarm to be armed or disarmed, an automation for the mini switch to arm and disarm the alarm and a final couple of automations to push a notification to your phone so you know the state of the alarm itself.

One important thing to note is that whilst the automations are created using the English app, some of the terminology used in the Aqara app isn’t grammatically right and can be confusing, so bear with it.

Starting with the alarm first;

  1. We create an automation by clicking on the ‘Automation’ tab at the bottom, and the clicking the plug button at the top. We’re going to make it so that the Aqara door sensor is triggered by the door opening, it will send a signal to the Aqara hub to trigger an alarm after 1 minute has elapsed – you do need a bit of time to disarm the alarm yourself once you get it, right?
  2. Click on ‘Add’ in the IF section
  3. Select your Aqara door and window sensor from the list of devices
  4. Choose ‘Opens’ from the next list of options
  5. You’ll then return to the ‘IF THEN’ section
  6. Click on ‘Add’ in the THEN section
  7. Now when adding stuff here, we’re going to add more than one device or action, so…
  8. First, select ‘Push Alarm Notifications’, then click next to ‘Push Alarm Notifications’ which results in a tick mark appearing, then click ‘save’
  9. You’ll return to the IF THEN section, but we’re going to add another couple of things.
  10. Click on ‘Add’ in the THEN section again, then select ‘Delay’ and select the time you require before the alarm actually goes off – I’m going with 1 minute.
  11. You’ll return to the IF THEN section once again, so for the final time, click on ‘Add’ in the THEN section
  12. Select your Aqara Hub, then on the next page select ‘Play alarm sound’ , choose the preferred alarm sound and desired volume via the slider at the bottom of the screen and then click OK
  13. Click ‘save’ and name your alarm as appropriate – in my case ‘Apartment alarm’
  14. Once you’ve saved this automation, you it listed with an orange ‘shield’ icon.

This all sets up the alarm itself, so now onto the arm/disarm mechanism

  1. While still in the Automations page, Click on the plus symbol and ‘Add’ in the IF section
  2. Select your Aqara Switch from the list of devices – Aqara Mini Switch in my case
  3. Select Single press for your action (or a different action if you prefer)
  4. Once you’ve selected your press action, you’ll go back to the IF THEN section, so now click on ‘add’ in the THEN section
  5. Scroll down until you see the alarm automation you previously created – ‘Apartment Alarm’ in my case
  6. Then select ‘open/close’. This will allow you to use just the one action to both arm and disarm the alarm.
  7. Click save and name this automation.

Once you’ve done this, you can simply test this by pressing on the Mini Switch. You’ll hear a single ‘ook’ sound to tell you that the alarm is armed, and if you press it again, you’ll hear a double ‘ook’ sound to let you know the alarm has been disabled. Its important to note however, that there seems to be a bug in the software that sometimes makes the first click of the button not register, but if you press it again, you’ll hear the ‘armed’ sound, and subsequent presses will register as expected

What you have here works perfectly well and you don’t need to do any more, but if the final part is getting push notifications to your phone so that you know what state the alarm is in, if for example you’re not actually at home to hear the confirmation sound from the hub.

  1. Go into the Automations section by clicking on the Automations tab and click on the plus icon as before.
  2. click on ‘add’ in the IF section and scroll down to choose the alarm automation you originally created – in my case ‘Apartment Alarm’
  3. Select ‘Open the moment’ (this is the bit where grammar is a bit confusing)
  4. You’ll then go back to the IF THEN section. Click on ‘add’ in the THEN section
  5. Select ‘Push notifications’ – this will send a notification every time you arm the alarm
  6. Click ‘save’ and then name it to save this automation – in my case Alarm Armed
  7. You then repeat steps 2 – 6, to create a separate ‘push notification’ but in this case instead of choosing ‘open the moment’ you select ‘Close the moment’
  8. This will send a push notification to let you know the alarm has been disarmed

So this final part makes sure you get your notifications when the alarm is armed or disarmed, along with the audible sound from the Aqara Hub.

The Editor

Editor - Musician, graphic designer and HomeKit aficionado.

26 thoughts on “An Even Better Way to Create a Security Alarm With The Aqara Hub!

  • I’m thinking of buying the Aqara Hub together with som Aqara door sensors and some motion sensor, to build a alarm system like this. I would like to get a botton outside the house that can be used as door Bell (which one can be used for this?). Is it possible to automate the door Bell system so the hub rings a Bell Sound but after 8pm it doesn’t ring but instead pushes a notification to the phono?

    • Hi Søren
      yes, this kind of automation is possible, as I’ve just tested it myself before replying to your question. However, seeing as both triggering a sound from the Aqara hub, and receiving push notifications to your phone are only capable via the Aqara app, you won’t be able to program this kind of automation via the Home app. You can still create all sorts of other automations with these devices via HomeKit though. As regards the switch to use, either the Mijia Wireless switch –
      or the Aqara Mini switch – are suitable for this type of job. The only thing to be aware of is whether these switches can cope with cold weather or rain, which I’m not sure they’re suitable for, but if their in an inner porch or doorway, you should be fine.

  • Hi Simon,
    Thank you for the answer. So I can set up the alarm and doorbell automation in Aqara app, but still being able to see the status for ex. all the door sensors in homekit? Setting up the automation in aqaua one time is fine but I only want to use homekit in my daily control and overview of my house.

    Regarding the switch it will not be exposed to directly rain as we have 1 meter roof cover at the front door. Hope it will do 🙂

    Would it be possible to use the door sensor in my mailbox to activate a notification when I got letters?

    Sorry for all the question, i really appropriate your help and the web site with all that great articles!

    • Hi Søren,
      yes the automations you’d need for the alarm and notifications will be in the Aqara app, but that doesn’t stop you from seeing the status of these devices, or controlling them within their capabilities – so the Aqara hub light can still be controlled in the Home app, for example and you would still be able to add additional functions to the switch that you choose as your doorbell. I will probably do a small ‘How to’ tutorial on it soon and post it on the site in the ‘How To’ section.

      Regarding the door sensor and a mailbox, you can absolutely do that, but the same applies regarding weather and water in relation to the device of course.

  • I totally want to do this same sort of mailbox notification! When and where can we buy the hub and sensors NOW!….I was going to buy Smartthings, but already have lots of Homekit, so am abandoning that idea…:)

    It would be really great if there was some sort of way to communicate Homekit with Blueiris security software now

    • Hi,
      I honestly don’t know what the delay is with Aqara releasing the products outside of China to be honest, and both dates given (late September and then October) have passed. The most likely issue is to do with Software and cloud issues, but I’m only guessing. If you want one, there are many stores on AliExpress selling the Chinese versions along with the switches and sensors etc.

  • ok thanks! how’s the stability of the hub so far?? read a couple accounts of people having problems getting sensors showing up in homekit..any of that??… you think the only difference with North American version will be language and the physical plug?…or will there be North American servers that the hub will talk to?

    • I’ve got the Chinese version and I’ve got it set to the Mainland China server and I don’t seem to be having any problems, but I know some people in Europe have been experiencing issues, although these are slowly being ironed out it seems. All my Aqara devices show up in HomeKit unless they’re not design to – like the Aqara Cube for example.

      As for the North American version, it’ll just be the plug. You can set up the language to be Chinese or English in both the Chinese & US versions. I believe they currently have a US server set up now, but. I don’t know if it is working well or not.

  • Hi Simon,

    I foundation these two at aliexpress:

    Hub with EU adapter – $25

    Only the hub with EU adapter – $40

    I just want to make sure that i buy the right version so which one should i buy?

    Do you know if it Will be possible to activate the alarm system if we aren’t home and forgot to activate it when leaving? I have Apple tv 4 and can control my light when im not home 🙂

    Thanks in advance

  • Which switch is the best – The Mijia or Aqara Wireless Switch? Which one is smallest and does both work with Aqara hub and homekit without problem?

    Thanks 🙂

    • Hi Søren
      Both switches are pretty much the same in many ways, but the Aqara is slightly smaller. Both will appear in Aqara and Home apps. In the Home app they will both have the same 3 options – single, double and long press, but the Aqara button has the ‘shake’ option as well (shake it and it will register as a function, just like pressing), but this only appears in the Aqara app as an option. If you’re looking for one as a doorbell, they’re both as good, but maybe the Aqara looks more obviously like a button than the Mijia.

      • Thank you Simon. Think I go with the Aqara 🙂

        Do you know if there is a smoke detector that will work in the Aqara alarm setup?

        Your site is awesome and it’s super great that you answer so quickly.

        • Hi Søren
          There is a smoke detector made by Honeywell & Mijia that will (according to Aqara) be compatible in the near future, but they haven’t given any firm date as such. I’ve got this device and it certainly feels good, with a loud alarm, and having tested it, it works as expected, although the real test would be something I’d rather not experience of course! Glad you like the site. I am here for the community, so if you’re happy, I’m happy.

  • Hi again,

    Which one of the door sensors is the right one?

    There is a small price difference but pictures and description look more or less the same. It is from the same store you suggested 🙂 Thanks

    • These are both official Aqara models and both should work fine with the Aqara hub. You can also use the Mijia door sensor, if you want to as they are also now supported in the Aqara and home apps.

  • Hi Simon,

    Just want to hear if the alarm system is accessible from outside the House? Is it possible to turn of the system from outside the House if the alarm starts?

    • Yes, you can access the alarm via the Aqara app even when you are not on the same network. Certain settings have to be on like remote access via HomeKit to enable this.

  • Hi Simon, I’ve set up an alarm with just the aqara door sensors and the hub. It works fine so far, I Just enable/disable the automation in the aqara app when I leave/arrive home.
    My automation is for now very simple : if « Sensor » opens then « alarm goes on ».

    However I was wondering what the « push alarm notification » is for.
    I can’t seem to find this info anywhere on google.
    Thanks a lot

    • Hi Alex,
      You can add a push notification to your automation that will also send a notification to your phone. It doesn’t say phone initially, but once you add this, it will show that it sends it to your phone.

      • Thanks for your quick reply. I have push notification set up as well with another automation. But when setting up the automation in the « then » you have two kind of push : « push alarm notification » and just simple push. I wanted to know if you knew the difference, cause I don’t and in your tuto you used both.

        • Hi
          I haven’t actually used the Aqara app at all since updating the hub to use the Mi Home app, so my memory of this is a bit ‘rusty’, but I’ll look into it and try and give you a definitive answer.

Comments are closed.