YET another take on an alarm system

just use the built in ui editor in lovelace
3 dots top right

yes that was off my phone as i just wanted to give a screenshot easily. it doesn’t scale the best lol but fine on my pc or 7" tablet

I’ve finally got everything perfect.
the ide is a great addon too plus i found a backup to google drive addon :+1:.
ive also got the mqtt alarm panel app working again after following the pull requests in github plus the alarm log ones for displaying which sensor triggered

all with no errors in the log lmao

scroll right on header to reveal the red +

sorry i missed a section.
just press 3 dots and goto ui configuration then hit the 3 dots again and select raw edit mode.
then add the bottom card from this screenshot manually.

i will push my config files to my github later, I’ve just got a couple of secrets to sort out 1st :stuck_out_tongue_winking_eye:

Thanks for showing the code. That worked in my yaml file for Lovelace. Thanks!

I have set up a RF 433 remote control. I want to arm and disarm the alarm, when the remote is activated. How do I arm the alarm by writing an automation. Same question for disprming?

I use these scripts but you could use the services in automation actions:

alarm_arm: # uses exit time
  sequence:
    service: alarm_control_panel.alarm_arm_away
    entity_id: alarm_control_panel.house

alarm_arm_instant:
  sequence:
    service: alarm_control_panel.alarm_arm_away
    entity_id: alarm_control_panel.house
    data:
      code: 'override'

alarm_disarm:
  sequence:
    service: alarm_control_panel.alarm_disarm
    entity_id: alarm_control_panel.house
    data:
      code: !secret alarm_code
# ALARM

# Alarm Armed Away
- id: alarm_armed_away
  alias: '[Alarm] Away Mode Armed'
  hide_entity: true
  initial_state: 'on'
  trigger:
  - platform: state
    entity_id: alarm_control_panel.house
    to: armed_away
  action:
  - service: tts.google_say
    entity_id: media_player.kitchen_speaker
    data:
      message: Away mode set.
      
# Alarm Armed Home
- id: alarm_armed_home
  alias: '[Alarm] Home Mode Armed'
  hide_entity: true
  initial_state: 'on'
  trigger:
  - platform: state
    entity_id: alarm_control_panel.house
    to: armed_home
  action:
  - service: tts.google_say
    entity_id: media_player.kitchen_speaker
    data:
      message: Home mode set.
      
# Alarm Arming Away Pending
- id: alarm_arming_away
  alias: '[Alarm] Away Mode Arming'
  hide_entity: true
  initial_state: 'on'
  trigger:
  - platform: state
    entity_id: alarm_control_panel.house
    to: pending
  action:
  - service: tts.google_say
    entity_id: media_player.kitchen_speaker
    data:
      message: ensure all doors and windows are closed
      
# Alarm Disarmed
- id: alarm_disarmed
  alias: '[Alarm] Disarmed'
  hide_entity: true
  initial_state: 'on'
  trigger:
  - platform: state
    entity_id: alarm_control_panel.house
    to: disarmed
  action:
  - service: mqtt.publish
    data:
      topic: house/alarm/siren/01
      payload: '0'
  - service: tts.google_say
    entity_id: media_player.kitchen_speaker
    data:
      message: Alarm unset
      
# Alarm Triggered
- id: alarm_triggered
  alias: '[Alarm] Triggered'
  hide_entity: true
  initial_state: 'on'
  trigger:
  - platform: state
    entity_id: alarm_control_panel.house
    to: triggered
  action:
  - service: mqtt.publish
    data:
      topic: house/alarm/siren/01
      payload: '1'
  - service: notify.pushbullet
    data:
      title: "Home Alarm"
      message: ALARM TRIGGERED!!! {{states[states.alarm_control_panel.house.attributes.changed_by.split(".")[0]][states.alarm_control_panel.house.attributes.changed_by.split(".")[1]].name}}
  - service: tts.google_say
    entity_id: media_player.kitchen_speaker
    data:
      message: The police have been called. Lockdown is starting
      
# Alarm Warning
- id: alarm_warning
  alias: '[Alarm] Warning'
  hide_entity: true
  initial_state: 'on'
  trigger:
  - platform: state
    entity_id: alarm_control_panel.house
    to: warning
  action:
  - service: tts.google_say
    entity_id: media_player.kitchen_speaker
    data:
      message: Please input user code.

Those automations are triggered by the alarm state. They do not switch the alarm on or off as was requested.

You remote is easily jammed/intercepted. Don’t do that with a RF remote.

Oops so they are, sorry for any confusion caused.

Sorry for the possibly stupid question, am coming late to this project. Have got it all installed but am struggling a little with understanding some (not all) of the options and the differences between the different modes. e.g. I’m looking for a “night mode” and a way to disarm night mode through a particular PIR sensor sensing me before all the rest do (i.e. me coming down the stairs in the morning!). Also wanting some assistance understanding the override column of sensors and what the implications are for a sensor being selected in that column. So anyway I’m coming to a point…is there any documentation available beyond the installation instructions on GitHub?
Thanks!!

You will have to write an automation for this.

If a sensor is in the override column it will not prevent the alarm from arming if active. Could be handy for an exit door or PIR near the alarm panel. If it is not in this column and is active when trying to arm you will get a warning and the alarm wont arm.

Thanks, Tom. But in terms of a “night mode” isn’t this essentially what “home mode” is ? Don’t you get two different alarm modes (or even three if you turn on perimeter mode)?

Yes indeed, but if you want to disable it with a PIR that is going to be up to you. Here’s an example of disarming using an automation:

- id: automatic_alarm_disarm
  alias: Automatic Alarm Disarm
  trigger:
    - entity_id: device_tracker.iphonex
      platform: state
      to: 'home'
  condition:
    condition: template
    value_template: "{{ not is_state('alarm_control_panel.house', 'disarmed') }}"
  action:
    service: script.turn_on
    entity_id: script.alarm_disarm

You could change the trigger and add a condition to only do this if armed in home or perimeter mode.

I posted the script above: YET another take on an alarm system

Did you ever get this sorted? Be handy to use Telegram

While it doesnt pass the template editor until something actually triggers the alarm, it works with facebook and telegram…

'Alarm triggered by {{ states[states.alarm_control_panel.house.attributes.changed_by.split(".")
          [0]][ states.alarm_control_panel.house.attributes.changed_by.split(".")[1]].name }}'

note: the alarm_control_panel.house has to be changed with the one being used by you. By default the control panels name is house, but if you have changed it, you have to use the right one. Just check your states in your dev panel.

1 Like

Just a thought, is there any way this could be integrated with custom_updater? At the moment I’m manually patching bugs based on bug reports and suggested fixes on GitHub.

2 Likes

How do I add in the sensor that tripped the alarm here:

Search the topic? Here

With about 1500 posts in this topic Im sorry if this is asked before. Firstly very good job with this panel, but is it any way to make the control panel more reactive? I tried to use it on a Fire tab 10, and the “keypad” is very slow, at the point if it go from 1-9 with “regular speed” it maybe catches 4-5 of the numbers and some of them is just selected with the grey overlay.