Home Assistant Community

YET another take on an alarm system

#847

I love this alarm and have been using it for a long time now and I’m really looking forward to the new interface. It looks amazing.

I’ve been having an issue since the update where the states were split apart and allowed for different sensor groups.
I cannot get the override option to work. I’ve made sure that all files have been updated, and verified that the sensors are named correctly. I even tried using the default alarm.yaml only replacing with my sensors.
I’ve scrolled through the thread and haven’t seen anyone talking about the issue. Any ideas or solutions anyone is able to provide is much appreciated.
Thanks in advance!

0 Likes

#848

I’ll take a look, I may not have wired up the override code correctly.

[edit] as suspected the front panel doesn’t account for the split out states.

I’ll try and get a version of the panel out over the weekend

1 Like

#849

Awesome! Thanks for all the hard work you put into this amazing component!

0 Likes

#852

Hi, I have a feature request (not sure if its inside already).

Tonight the alarm went on, all siren sounded, big panic. We went, half asleep, all over and we are not sure what caused it to trip (the armed at home has only windows/door sensors) because all door/windows were closed (they have xiaomi windows/door sensors). We still do not know what happened, had to go to work, later will try to check the log of the sensors

My request is to have a log of what caused the alarm to trigger, inside your component.

Is this possible?

0 Likes

#853

You could set your notification of an alarm to tell you what sensor tripped it. Like this:

- id: alarm_triggered
  alias: '[Alarm] Triggered'
  trigger:
  - platform: state
    entity_id: alarm_control_panel.house
    to: triggered
  action:
  - service: switch.turn_on
    entity_id: group.alarm_outputs
  - service: notify.ios_iphone
    data_template:
      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 }}
      data:
        push:
          badge: 0
          sound: "US-EN-Alexa-Motion-Detected-Generic.wav"
          category: "disarmalarm"
        action_data:
          entity_id: group.alarm_outputs
1 Like

#854

Hi there,

I’m having some strange issues… I have setup so that I use the HASwitchPlate (HA SwitchPlate - DIY LCD Touchscreen wall switch replacement) as my input for the alarm system. And it works great! Except for one situation where I can’t find what is wrong.

So I can arm the system from my alarm page och the HASwitchPlate, and put my code in on the touch-numpad to disarm it (first numbers then i Push “disarm”). In addition to this I have a script running, flashing a light on and off, while the system is arming(i.e. Pending). I then tried to add a similar light flashing if the system goes into triggered mode. But for some reason I’m not able to disarm it from my touch-numpad while it is in triggered mode!

Here are my scripts:

## Flashing Alarm Light While Arming
flash_arming_light1:
    alias: Flash Arming Light Loop 1
    sequence:
      - alias: Turn light on to Blue loop 1
        service: light.turn_on
        data:
          entity_id: light.sn1_led
          brightness: 255
          color_name: blue
      - delay:
          # time for flash light on
          seconds: 1
      - alias: Move to loop 2
        service: script.turn_on
        data:
          entity_id: script.flash_arming_light2
flash_arming_light2:
    alias: Flash Arming Light Loop 2
    sequence:
      - alias: Turn light on and to red loop 2
        service: light.turn_on
        data:
          entity_id: light.sn1_led
          brightness: 255
          color_name: purple
      - delay:
          # time for flash light on
          seconds: 1
      - alias: Move back to loop 1
        service: script.turn_on
        data:
          entity_id: script.flash_arming_light1
          
## Alarm Triggered
flash_trigger_light1:
    alias: Flash Trigger Light Loop 1
    sequence:
      - alias: Trigger loop 1
        service: light.turn_on
        data:
          entity_id: light.sn1_led
          brightness: 255
          color_name: red
      - delay:
          # time for flash light on
          seconds: 1
      - alias: Move to loop 2
        service: script.turn_on
        data:
          entity_id: script.flash_trigger_light2
flash_trigger_light2:
    alias: Flash Trigger Light on Loop 2
    sequence:
      - alias: Trigger loop 2
        service: light.turn_off
        data:
          entity_id: light.sn1_led
      - delay:
          # time for flash light on
          seconds: 1
      - alias: Move back to loop 1
        service: script.turn_on
        data:
          entity_id: script.flash_trigger_light1

And here are my automations:

Light go Red When armed

  • id: light_armed
    alias: ‘[Alarm] Armed Light On’
    trigger:
    • platform: state
      entity_id: alarm_control_panel.house
      to: ‘armed_away’
      action:
    • service: script.turn_off
      data:
      entity_id: script.flash_arming_light1
    • service: script.turn_off
      data:
      entity_id: script.flash_arming_light2
    • service: light.turn_on
      data:
      entity_id: light.sn1_led
      brightness: 255
      color_name: red

Light go Green When disarmed

  • id: light_disarmed
    alias: ‘[Alarm] Disarmed Light On’
    trigger:
    • platform: state
      entity_id: alarm_control_panel.house
      to: ‘disarmed’
      action:
    • service: script.turn_off
      data:
      entity_id: script.flash_trigger_light1
    • service: script.turn_off
      data:
      entity_id: script.flash_trigger_light2
    • service: light.turn_on
      data:
      entity_id: light.sn1_led
      brightness: 255
      color_name: green

Blinking light while arming

  • id: light_arming
    alias: ‘[Alarm] Arming Light On’
    trigger:
    • platform: state
      entity_id: alarm_control_panel.house
      to: ‘pending’
      action:
    • service: script.turn_on
      data:
      entity_id: script.flash_arming_light1

Blinking light if Triggered

  • id: light_trigger
    alias: ‘[Alarm] Trigger Light On’
    trigger:
    • platform: state
      entity_id: alarm_control_panel.house
      to: ‘triggered’
      action:
    • service: script.turn_on
      data:
      entity_id: script.flash_trigger_light1

Any ideas?

0 Likes

#855

Hello all. I have a quick question that I’m probably missing something on. I’ve been running this panel for a while and really like it. I’ve used the custom element option to display an ifram of a live feed from my camera that displays the front door. Today, I switched my setup so that is not encrypted. My camera frame still appears but the feed is not longer there. Below is my relevant code. Is there a change that I can make for this to work again. Ideally, I’d like to display as Home Assistant does in the views and not use the iframe option, but I’m willing to do either. I’ve tried just simply putting camera.front_door in the custom element, but that only displays those words below the sensors area. I thought that would be the case. Any help would be appreciated. I’ve posted my custom element html below.

					<!-- ADD YOUR CUSTOM HTML HERE. This could be liver camera views, custom buttons, rotating picture gallery -->
<dom-module id="custom-element">
	<template>
        <div style='text-align: center;'>
            <iframe src="http://camera_url:port/video.mjpg?oid=4&size=600x450&keepAR=true&overlay=false" width="600" height="450" scrolling="no"></iframe>
            		
         </div>
   </template>
</dom-module>

<script>
    Polymer({is: 'custom-element'});
</script>
0 Likes

#856

Do I get it right that you have your custom element inside the alarm panel?
And what do you mean by “switched my setup”? Can you switch it back to see if there is any difference?
I thought it is almost impossible to get a live camera feed in HA.
What camera are you using by the way?

0 Likes

#857

I’m using a very cheap but reliable Wansview K2 running through iSpy open source camera software. It’s $25-30 USD on Amazon. I pull it into HA with a generic mjpeg platform. What I mean by switching my setup is that I added encryption (https) with duckdns and lets encrypt. My camera feed is not encrypted (http). The iframe worked before encryption. It showed a live feed and worked really well.

According to the HA docs for the panel iframe component, I can’t show an non-encrypted website in the iframe while using encription. I’m assuming this applies to this scenario as well. I did revert the changes and removed the encryption and my live feed comes back.

0 Likes

#858

This migfht be worth a try. Open HA, click on the camera to get the full view, right click the video and select “inspect element” (that’s what it’s called in firefox, no idea for other browsers) copy the highlighted element’s Outer HTML, something like this:

<img class="camera-image style-scope more-info-camera" src="/api/camera_proxy_stream/camera.front?token=[my_token_removed]" alt="Front">

Paste that into your config.

0 Likes

#859

Hi Everyone,

Couple extra screens to share below.

Working on floorplan integration, the idea is open/tripped sensors auto show floorplan and if configured correctly lights up those tripped sensors. The image below is still very much a work in progress but the basics are there and you should get the idea.

The second image is native camera integration into the panel (btw I wish those were my actual cameras :-)). Just specify a list of camera entities in the alarm.yaml and hey presto.

7 Likes

#860

Hope you update to github soon. This is really nice and useful.

0 Likes

#861

Hi

I’ve decided to try this alarm panel as it seems way more advanced than the basic one, however I’m running into a problem that I haven’t seen while browsing / searching the thread…

At first I was getting an error about the custom component not being found, so as a couple people suggested I rebooted my server. From that moment, the HA service doesn’t seem to start properly anymore - the page won’t load, and I also have the Mycroft AI on another machine accessing HA through the API, it tells me it can’t find the HA server…
I have to remove / rename the custom_components folder in order for HA to work again.

Any ideas? HA’s log is of no help, and I couldn’t identify anything in the system log either…

Thanks.

PS: of course I have the Javascript instruction in my config file, however it it doesn’t seem to be the problem as the server can’t be reached at all.

0 Likes

#862

It sounds as though either a file is in the wrong directory or you have a yaml error somewhere. What does the HA log say?

To get this running add the files from this repo into your home assistant configuration directory, the directories need to match

alarm.yaml
panel_custom.yaml *(See Note Below)
panels/alarm.html
custom_components/alarm_control_panel/bwalarm.py
www/lib/countdown360.js
www/lib/jquery-3.2.1.min.js
www/alarm/alarm.css
NOTE: If you already have a panel_custom.yaml for say floorplan then just copy and paste the code from this repo file into your own panel_custom.yaml to prevent floorplan from being overritten.

Then add the following to your configuration.yaml file:

alarm_control_panel: !include alarm.yaml
panel_custom: !include panel_custom.yaml
NOTE: If you experience issues with the page not displaying then add the following:
#CONFIGURATION.YAML
frontend:
  javascript_version: latest

Let me know how you get on

0 Likes

#863

This fantastic UI has made me think the basic idea of the keypad needs to go in HA right out of the box…

3 Likes

#864

Having had another breaking this week, I’m going to implement this Alarm. Have already got the windows/door sensors. I’m looking for a siren, which will make a hole lot noise, and hopefully scare buglers. What have you integrated?

0 Likes

#865

I ended up making my own siren for integration into HA.

2 Likes

#866

I have placed these zwave sirens around the house.

They a very loud and support multiple tones so that I have different sounds triggering on different automations.

For example:

  • The trigger automation sets off the 'Police Siren’
  • There is a door automation which sets off a ‘Chime’ when one of the doors opens when the alarm is disarmed
  • There is another automation which plays a ‘Chirp’ when one of the doors is open longer than 60 seconds. This repeats every 60 seconds until the door is closed.

I don’t have an outdoor one configured yet. I do have a chubb 433mhz rolling code wireless one mounted which I can’t integrate as is, at some point I want to install a zwave/zigbee switch inside to replace the 433mhz element

0 Likes

#867

Thanks
I have set up at D-Link z510. I seems to be working, but I don’t know how to trigger the Siren. I’ve these in the States:
zwave.dlink_corporation_dchz510_siren
sensor.dlink_corporation_dchz510_siren_burglar
sensor.dlink_corporation_dchz510_siren_sourcenodeid
sensor.alarm_type
sensor.alarm_level

Should I have a Switch for the Siren?

0 Likes

#868

Yes you should have a switch. I have one of those two and if I recall correctly I had a hassle adding it to the zwave network. Sometimes it randomly drops off the network too.

0 Likes