Need help with creating a panic button

Hi I am a complete beginner at home assistant and trying to create a panic button for my mother using a flic button.

I have the flic button running on HA using flicd an have been able to get the button to turn on lights with a double click of the button just as a test to see if the button works correctly.

what I would like to do is have HA send a text message to my phone along with her location when the button is double clicked. I know this can be done using the flic app on android but I do not have a flic hub and don’t want to have to rely on the phones Bluetooth being on so want to go down the HA route.

I have never used home assistant before but decided that HA seems to be the best way of setting up this project.

after doing some research I found what seem a few options such as telegram, Pushover and pushbullet but not sure if am heading in the right direction or even how to get one of those set up.

If anyone has any advice or idea how I could implement this idea of a panic button that will send a text alert that includes the location i would be very grateful.

I was also considering the possibility of setting up an automation that would also set the users phone to loudspeaker and call the emergency services if the button is double pressed but not sure how possible this would be.

additional information that may be useful is that i have Node-RED add-on installed but unfamiliar with how to use it as well as the file editor add-on.

Those of often the go-to’s for HA and notifications. You can also incorporate Twilio for SMS texting if you want, there are a number of 3rd party solutions with integrations into HA. Telegram is a very popular setup and is relatively easy to install in HA if you follow Telegram Integration documentation from Home Assistant.

1 Like

You can’t call emergency services from HA (at least in the US as far as I know). But you can use twilio for not only texting but to make automated calls.

I’m using it right now using the Alexa custom integration as a sort of a “panic alarm”. If we say “Alexa I need help” it will trigger twilio to call all of my kids phones with a message to call 911 for someone at my house.

I’ve used Clicksend and found them very reliable

Yes, you can, Twilio supports 911 and E911. But, if it didn’t (or if you want to over-engineer it) you could always set up a FreePBX system that uses a Twilio trunk and another SIP trunk that did support 911 and have Twilio activate 911 the long way around by calling into your PBX and having a PBX rule to dial out the 911 enabled trunk. I did this before moving to Twilio a few years ago.

1 Like

really…? :thinking: I had no idea that was possible. I looked into trying to figure out how to auto-call 911 a few times over the years and everything I read said that it wasn’t possible.

Is there anything special that needs to be done in twilio to get that functionality?

Since it’s an automated voice message does that cause any issues with the 911 system not believing it’s a real person?

You just have to associate an address with your SIP trunk via the numbers in the trunk and then turn on emergency calling on that number (after Twilio verifies the address).

Fortunately I’ve never had to do this, but it’s my understanding that a recorded message is fine (there are some alarm systems that do this, and generic panic buttons often do it too). I suppose it relies on how well you compose the message, i.e., “This is a recorded panic message from 1234 Anywhere Street that was activated by a panic button”. I would test it but don’t want the hefty fine that comes with a non-emergency call to 911 :stuck_out_tongue:. The other thing you could do is just call the non 911 dispatch and ask them how to format a recorded message to be taken seriously, they may have guidelines for it.

1 Like

I opened up the help in my Twilio and found the help link for 911 calling in Twilio. I use Twilio in my businesses, home and do Twilio coding for advanced customer projects and love their service, very robust.

2 Likes

wow, thanks for finding that!

I always read that you couldn’t do it (obviously I was looking in the wrong place!) so I never looked any further than the standard twilio calls.

Thanks again for the advice!

1 Like

Hi thank you, the idea of incorporating Alexa into the project is a good idea and one I didn’t think about.

just a heads up though my mother lives on her own and recently had a stroke and the issues this caused to her speech made it so that Alexa could not understand what she was trying to say.

using Alexa is a good layer to add but just thought I would mention the situation I recently experienced in case you had not thought about that possible issue.

One of the most flat-simple methods you could use is to have your mom’s panic button send an email to you (even if you did everything else this is a good backup option) and configure your email client to notify you of email to a special gmail account or something that would achieve the same results and you can do that right now without any additional add-ons.

I was going to suggest using app notifications but if you have your own HA system that you log into that might not be a good option since you might not be logged into hers when you need to be for an alert.

1 Like

So the home assistant is setup on a pi and I’m planning on setting that up in her home once i have figured out how to get the panic system running.

So far I have a number of motion sensors I am planning to install in rooms of her home and if none of these sensors detect motion within a number of hours then it will send me a message and I can give her a call and check in with her. I currently have this set to send a notification to my phone but would rather get a message as I find notifications sometimes unreliable.

The motion sensors will have to set for a set time period so that it doesn’t go off while she is sleeping and thinking of integrating her phones location as a way of stopping the automation if she is not home.

with an email solution would you suggest setting up a new email account just dedicated for the panic system or do you mean there is a way of getting alerts from specific emails within my current email account?
I think I have back tracked on the idea of it calling emergency services for the flic “panic button” as i would be worried about false alarms and guessing there is no way of testing to see if it works.

So do you think the best solution of receiving some sort of notification on if there is no motion detected or the panic button is pressed would be either sending an email or using telegram to send an automated message?

That would certainly work. And the panic button concern with calling 911, you could always call emergency services and explain what you are trying to do and I’m sure they will give you guidelines as to how to test it and what an automated message would say.

Thank you for the help so I think I will look through the documentation on telegram and see if I can get that set up.

Just to check, I seen someone also suggest Clicksend but don’t know what that is or how it works. do you have any experience with Clicksend or know if it would also be a solution to receiving a message?

I tested clicksend, twilio and another one (that i can’t remember) and out of the three I liked twilio the best.

And with the 911 support I like them even better!

1 Like

So I’m not sure if I have left it too late to ask for help on with the “panic alarm” on this again but im having trouble with the motion aspect of the system.

the automation is supposed to send me a Twilio message if it does not detect motion in the house within a space of 4 hours and the persons phone is located at home.
it also gives a text to speech waning in case its a false alarm giving the user the option to deactivate the alarm if its a false alarm.

 alias: no motion with countdown timer
  description: ''
  trigger:
  - type: no_motion
    platform: device
    device_id: f78ea9b30d0b8e2fdc8a4e9def4d22c1
    entity_id: binary_sensor.kitchen_motion_sensor_ias_zone
    domain: binary_sensor
    for:
      hours: 4
      minutes: 0
      seconds: 0
      milliseconds: 0
  condition:
  - condition: device
    device_id: 94ba87cc044adaa79048cd4ce9e3ae8a
    domain: device_tracker
    entity_id: device_tracker.oneplus_a5010
    type: is_home
  - condition: time
    after: 08:00:00
    before: 00:00:00
  action:
  - service: tts.google_translate_say
    data:
      entity_id: media_player.man_cave_display
      message: No motion detected. Sending Alert message in 5 minutes. If false alarm
        press deactivation button
  - delay:
      hours: 0
      minutes: 3
      seconds: 0
      milliseconds: 0
  - service: tts.google_translate_say
    data:
      entity_id: media_player.man_cave_display
      message: No motion detected. Sending Alert message in 2 minutes. If false alarm
        press deactivation button
  - delay:
      hours: 0
      minutes: 2
      seconds: 0
      milliseconds: 0
  - service: tts.google_translate_say
    data:
      message: The alert message has been sent
      entity_id: media_player.man_cave_display
  - service: notify.twilio_message
    data:
      message: 'ALLERT!: No motion has been detected at Myra''s home for 4 hours and
        may need assistance.'
      target:
      
  mode: restart

so this seems to work ok but if the motion sensor has not detected motion in the morning at all then the automation does not trigger a no motion response to initiate the automation at all.

so the problem is, if the user cant get out of bed then the alarm will never activate at all.
would anyone know if there is some way to force a check on the motion sensor or something or any other ideas on getting this automation to run the way I would like.

Any advice would be appreciated. :slight_smile:

what states does binary_sensor.kitchen_motion_sensor_ias_zone show in the dev page? My motion sensors have a state of on for motion and off for no motion, thus I would use a state trigger:

- alias: 'LIGHT: turn OFF the master-walk-in light when empty'
  id: light__turn_on_master_walkiun_when_empty
  initial_state: true
  trigger:
    platform: state
    entity_id: binary_sensor.motion_sensor_158d0002b441a6
    to: 'off'
    for:
      minutes: 4
  action:
    service: homeassistant.turn_off
    entity_id: switch.0720009584f3eb85017d

hello,

Panic buttons are ordinarily introduced in a area where they can effortlessly be come to, however out of see of the casual spectator. In numerous cases, freeze buttons are introduced on the underside of a work area or counter-top.

Panic buttons can be the wired sort or remote sort. Wired freeze buttons are associated utilizing cabling. Wired freeze buttons are exceptionally dependable, but it can in some cases be troublesome and exorbitant to urge cable to each freeze button area.

The communications system is the methodology that’s utilized to summon offer help when a solidify button is pressed. The sort of communications system utilized depends for the most part on the resources available at the office where the solidify alarm is being presented and the level of security threat.