Best physical button to disable alarm in HA + Xiaomi (Zigbee) solution?

Hello,

I’m looking for a solution to my problem with ‘fake’ alarms. I have this setup:

Xiaomi door sensor -> Mi home app (disable alarm)

New situation with HA:

Xiaomi door sensor -> 30sec delay -> Physical button/code -> HA (disable alarm)

I see people fix the problem with a Xiaomi switch (1tap (activate alarm) / double tap (disable alarm) but that doesn’t seem really ‘safe’ to me.

The perfect solution for me would be some sort of physical keychain button that you can press to activate/deactivate the alarm.

Any ideas how this would be possible?

I’m running HA on a PI3 in a docker environment.

Regards,
Ward

I would say a button is not safe…

Either one of the following options are better:

  1. an RFID reader
  1. a physical keypad that shoots an event at the right/wrong code (don´t have an example of this)
  2. Virtual button on your frontend… Binary input.

You could use xiaomi door sensor as keychain trigger. Hook up bigger piece to keys and stick smaller piece somewhere in your house. But there is no button so maybe this would not work for you. Somebody on this forum already done that (if i remember correctly).

Why not use your known devices and the trackers (now persons entity)?

I don’t even have an alarm at all, I just walk out or in, and let the automations take over.

If none of the devices are home (in my case phone or smart watch which I carry with me), then every sensor (motion and door sensor) will trigger an alarm, record video (on motion detected only, starting 15 seconds before the event) and even send me an IFTTT rich notification with an embedded image from the camera where the sensor is located, this happens instantly when the sensor is triggered.
All the videos are uploaded to Google Drive/Dropbox and saved locally as well.

If I’m home then all the sensors will stop triggering alarms, notifications. The camera which have PTZ will stop recording, turn itself against the ceiling or wall (just to be on the safe, privacy concerns), and stay idle.
If I leave it will go back to the default position. I even had one PTZ camera which turned to the direction in which the triggered sensor was.

No need to activate or deactivate alarms, you will never forget to activate or deactivate it. I even use the same logic to turn off lights, fans, air conditioners that I forgetfully left running when I leave my home.

Then you can have a template switch (you can use template alarm panel and set a code) or a small hidden button somewhere in your home for when you want to do it manually. In my case I have a template switch for it.

This is probably as safe as your idea since there’s no physical switches and unless somebody knows exactly how you manage your entity (LAN tracker, Bluetooth tracker or any other tracker) and has the right information (MAC address and be able to clone it), they won’t be able to deactivate it.

1 Like

Hey, i recently found myself wanting a button for my DIY alarm system.

still working things out right now but basically have an automation that triggers all the lights to come on and a Z-wave siren to sound when motion is detected by one of my motion sensors.
Currently this automation is always running and only takes effect between the hours of 00:30 and 6 am (have a dog so no need for an alarm during the day). However i felt a little restricted as if we watched a film that went on later than midnight thirty i’d have to go to my front end and turn off the automation then turn it back on when we went to bed. Also it meant that if we went away with the dog, i would have to have a separate automation that has no time conditions so that it could be on all the time.
Hence me just wanting a button to press when i get into bed to activate the house alarm automation.

I recently started playing with raspberry pi zeros and python and have started using the home assistant API to write a script that will turn the house alarm automation on and off.
This works great and i can now run the script on a raspberry pi and it toggles the automation. My next step is to solder a button to the Pi and program it to call the API when the button is pressed, as well as play a sound when the automation has been toggled.
It may be overkill to use a raspberry pi but it’s relatively cheap, familiar and the Zero is tiny so next to no footprint.

Thanks for you advice, but what to do with my cleaning lady? she doesn’t have a smart device (and if she had, i would not add her to my WIFI…)

1 Like

Thanks, but adding a Xiaomi switch for 9eur would do the same :slight_smile:

How about getting a Xiaomi Cube? I have one and I set that if I turn it 180° degrees to toggle the alarm. Most people would be clueless on a white cube. I also have a spare phone I locked down with Fully which I use as a remote for guests. It only grants access to HA, YouTube,Netflix, Play Music, Spotify and so on… you get the idea and it’s locked by PIN or fingerprint.

Hi Gurbina,

What you did here seems amazing. I was wondering how you get clearly the home/not_home trigger. Today I used my GPS from the phone but it takes so much time to get updated which is not efficient enough in my case. I tried with Google Maps, and nmap discovery and unfortunately that’s also takes time.
Did you had any other device to clearly state you are at home once you get in the appartement?
I was also wondering if any device with proximity detector with a key fob would be compatible with Hass.IO and zigbee, but didn’t find any for now :frowning:

Thanks for any help and tips !

I’ve used the person component and group, personally I find the group component works better for me.

I have 3 methods of detection:

  • Bluetooth (default bluetooth tracker using a RPi 3B+)
  • WiFi (Unifi Component)
  • GPS (Using Ariela App on Android, works pretty well)

I have set the time to 2-3 minutes before marking me away in most of these components.

The least reliably sensor is the GPS but on the latest updates on Ariela now it works quite okay, you can set the update period (I have mine at 1 minute), update position (I’ve set mine to update if I’ve moved more than 50 meters), accuracy (set to 50m) and I’ve also set WiFi Zone (so when I am connected to a certain WiFi it will mark the GPS position as home).

Nearly all the time when I come home the GPS sensor doesn’t change state fast enough, but by the time I am opening up the door the network presence component picks my phone first so it disabled the alarm by then time I am done unlocking the door. It is the only reliable component for presence detection.

For me this works 99% of the time, good enough that I forget about disabling and enabling the alarm automatically based on presence detection, sometimes I will have to do it manually. But I have set an HTML notification whenever the alarm gets armed/disarmed so if I leave home and I don’t get anything then I know there’s something going on.

Battery wise Ariela app it will probably eat up 7-10% of my battery at the of the end (Xiaomi Mi 9T - 4000 mah battery).

If I could I’d use Google Maps if there was a way to integrate it with the existing tracking (the one that keeps track of the places you’ve been to in order to give you suggestions, which seems pretty reliable.)

Hi Gurbina,

I will try with Ariela App to see how GPS / WIFI zone works. Unfortunately I don’t have any ubiquiti, or RB so router detection and Bluetooth not good enough :frowning:
I tried NMAP but this was slower than GPS :smiley:

Thanks for your tips. I will let you know if I get better experience with this