YET another take on an alarm system


#715

The problem you have has to do with the #. As @Paul_Flavel said you should remove the leading # but… i had another problem with that!

I don’t know it the problem is with Hassio but try this (line comment removed):

state_topic: ‘home/alarm’

Or this (comment moved to another line):

#[OPTIONAL] The MQTT topic HA will publish state updates to.
state_topic: ‘home/alarm’ 

Only after i did this to ALL the comments the errors disapeared…

I think it has to do with the # in the middle of the line.


#716

the problem presents when i delete the “#” from the first mqtt: true.
then i restart ha and i the alarm panel stops working.


#717

I know, change that line to:

#[OPTIONAL] - False by default. Settings this to True will enable MQTT Mode. Uncomment options below to use See the README for guidance.
mqtt: True

#718

This panel was actually built for HASS just just add tht MQTT manual control panel to your HASS configuration and point the alarm panel to the HASS IP and port. The instructions are in the Alarm panel GitHub page. There is an example configuration there to get you started.


#719

i can’t put

alarm_control_panel:
  - platform: mqtt
    state_topic: "home/alarm"
    command_topic: "home/alarm/set"

just under

alarm_control_panel: !include alarm.yaml

i will have an error.


#720

The complete instructions for setting up the alarm panel are in the GitHub project

https://github.com/thanksmister/android-mqtt-alarm-panel

There is already a Home Assistant thread for the alarm panel application.


#721

ok, i know. but this instruction is for the default alarm panel and not this costum alarm panel. I wish i can use your panel with this custom components.
@j.assuncao i change the line as you suggested, but nothing has changed


#722

That isn’t the manual MQTT alarm control panel that’s just the MQTT component. Put this in your configuration.yaml directly:

alarm_control_panel:
  - platform: manual_mqtt
    state_topic: home/alarm
    command_topic: home/alarm/set
    pending_time: 60
    trigger_time: 1800
    disarm_after_trigger: false
    delay_time: 30

That will work with the alarm panel application. Remember that you need to point to your MQTT broker IP address and port. Then you should have two way communication setup.


#723
Configuration invalid
Testing configuration at /config
ERROR:homeassistant.util.yaml:YAML file /config/configuration.yaml contains duplicate key "alarm_control_panel". Check lines 68 and 457.

i can’t put that code if i already have:

alarm_control_panel: !include alarm.yaml


#724

Doesn’t the custom component work with HASS MQTT broker? Why wouldn’t it work with the manual MQTT control panel and just pick up the changes from the HASS MQTT broker. I guess another option is to use an automation to talk between the MQTT manual component and the MQTT component but that seems like overkill.


#725

in theory mqtt should be supported dirrectly by the custom component, i don’t underrstand why i delete the # from the mqtt line the component crash.


#726

I know this won’t immediately help.
I do have the aforementioned panel installed on my android tablet. When i get home (in approx 4 hours) i will test and post my findings, and settings.


#727

no problem, i will wait. really thanks


#728

In the meantime you may need to keep debugging, as removing the # should not be causing issues. Unless the formatting after that line in your yaml file is bad.
Run the check config and see what it tells you. It’s a very handy tool.


#729

the check config alwasy report ok.
i will wait for your config. thanks and good work!


#730

I pull camera feeds in using a generic MJPG component. How can I use the custom panel to show these?


#731

@nebbiadigiorno

I didn’t need to do anything in my configuration.yaml except add:
alarm_control_panel: !include alarm.yaml

Here are the contents of my alarm.yaml

platform: bwalarm
name: House

code: 'xxxx' #Code, should consist of one or more digits ie '6482' ensure your passcode is encapsulated by quotes
panic_code: '0000' #[OPTIONAL] Panic Code should consist of one or more digits ie '9876' ensure your passcode is encapsulated by quotes, it needs to be different to your standard alarm code. This enables a special panic mode. This can be used under duress to deactivate the alarm which would appear to the unseeing eye as deactivated however a special attribute [panic_mode] listed under the alarm_control_panel.[identifier] will change to ACTIVE. This status could be used in your automations to send a notification to someone else police/spouse/sibling/neighbour that you are under duress. To deactive this mode arm then disarm your alarm in the usual manner. 

pending_time: 10 #Default grace time in seconds to allow for exit and entry using Away mode
trigger_time: 600 #Default time in seconds the alarm triggers before returning to its previous armed state

##[Pending/Trigger State Specific]
##armed_home: #This can either be armed_home/armed_away/armed_perimeter
##pending_time: 0
##trigger_time: 300

##armed_perimeter: #This can either be armed_home/armed_away/armed_perimeter
##pending_time: 0
##trigger_time: 300

alarm: automation.alarm_triggered
warning: automation.alarm_warning

##[OPTIONAL SETTINGS] 
clock: True  #[Optional] - False by default. True enables a clock in the center of the status bar
perimeter_mode: True #[Optional] - False by default. True enables perimeter mode, this could be known as 'Day Mode' i.e. only arm the doors whilst there is someone using all floors
weather: True #[Optional] - False by Default. Allows a weather summary to be displayed on the status bar. Dark Sky weather component must be enabled with the name sensor.dark_sky_summary
persistence: True #[OPTIONAL] False by Default. Allows this custom component to save the state of the alarm to file then reinstate it in the event of power loss.
hide_passcode: True #[OPTIONAL] - True by default. This is a security feature when enabled hides the passcode while entering disarm code.
hide_sidebar: True #[OPTIONAL] - False by default. This is a security feature when enabled hides the HA sidebar when the alarm is armed. The sidebar re-appears when the alarm is disarmed.
hide_sensor_groups: False #[Optional] - False by default. Setting this to True hides sensor groups (all sensors, immediate sensors, delayed sensors, inactive sensors) from the display. Open sensors will still appear
hide_custom_panel: False #[Optional] - True by default. Setting this to False enables a custom panel below the sensors groups which allows you to add your own html code. Use this to bring any other features you would like to see for example displaying live camera feeds, a rotating image gallery, custom HA buttons and sensors. To use this enable the custom panel in alarm.yaml (custom_panel: True) then ensure you take a copy of custom-element.html and add it to you www/alarm/ folder. Edit the html code between the <template> tags. I'm have added a custom sample folder where I will upload examples of 'things' which can be added here. Please contribute!!!

##[PASSCODE RELATED]
#passcode_attempts: 3 #[Optional] Disabled if commented out. When a value equal or greater than 0 is set, the system will only allow the set amount of password attempts before timing out
#passcode_attempts_timeout: 30 #[Optional] Default 30 seconds. When set with the password attempts option the panel will timeout for the amount of seconds set if the password is entered incorrectly as per the password_attempts option. The system will then reset the allowed password attempts

##[MQTT RELATED]
mqtt: True #[OPTIONAL] - False by default. Settings this to True will enable MQTT Mode. Uncomment options below to use See the README for guidance.
override_code: True #[OPTIONAL] False by default. if true allows MQTT commands to disarm the alarm without a valid code.
state_topic: 'home/alarm' #[OPTIONAL] The MQTT topic HA will publish state updates to.
command_topic: 'home/alarm/set' #[OPTIONAL] The MQTT topic HA will subscribe to, to receive commands from a remote device to change the alarm state.
qos: 0 #[OPTIONAL] The maximum QoS level for subscribing and publishing to MQTT messages. Default is 0.
payload_disarm: "DISARM" #[OPTIONAL] The payload to disarm this Alarm Panel. Default is “DISARM”.
payload_arm_home: "ARM_HOME" #[OPTIONAL] The payload to set armed-home mode on this Alarm Panel. Default is “ARM_HOME”.
payload_arm_away: "ARM_AWAY" #[OPTIONAL] The payload to set armed-away mode on this Alarm Panel. Default is “ARM_AWAY”.
payload_arm_night: "ARM_NIGHT" #[OPTIONAL] The payload to set armed-night mode on this Alarm Panel. Default is “ARM_NIGHT”.

############### COLOURS ###########  Use any HTML format
warning_colour: 'orange'
pending_colour: 'orange'
disarmed_colour: '#03A9F4'
armed_home_colour: 'black'
armed_away_colour: 'black'
triggered_colour: 'red'

############# SENSOR GROUPS ########################
##Sensors in this group tigger the alarm immediately
immediate:
  - binary_sensor.back_door
  - binary_sensor.lounge_multi_sensor_sensor
  - binary_sensor.toilet_window_sensor
  - binary_sensor.back_door_sensor
  - binary_sensor.lounge_doors_sensor
  - binary_sensor.kitchen_window_sensor
  - binary_sensor.front_window_g2
  - binary_sensor.laundry_door
  - binary_sensor.front_window_g1

##Sensors in this group start the clock (pending_time) when tripped before the alarm is activated in 'Away' mode
delayed:
  - binary_sensor.pir1
  - binary_sensor.pir2
  - binary_sensor.toilet_multi_sensor_sensor
  - binary_sensor.front_door_sensor
  - binary_sensor.garage_door_sensor

##Same as notathome but hopefully the title is more self explanatory. Can still use notathome for backwards compatibility
##Note sensors can exist in more than one group notice top_floor appears in two groups
homemodeignore:
  - binary_sensor.pir1
  - binary_sensor.pir2
##Use this group to automatically override the warning message on open sensors when setting 'away' mode. (I use this as I have a motion sensor at the front door)
override:
  - binary_sensor.hall_multi_sensor_sensor

##This group is special and only effects 'perimeter mode'. If perimeter_mode is enabled then any sensor in this group will trigger the alarm immediately if arm perimeter is set. There is no delayed group for this mode (unless requested as a feature of course!)
perimeter:
  - binary_sensor.toilet_window_sensor
  - binary_sensor.back_door_sensor
  - binary_sensor.lounge_doors_sensor
  - binary_sensor.kitchen_window_sensor
  - binary_sensor.front_door_sensor
  - binary_sensor.garage_door_sensor

##[OPTIONAL] - CUSTOM SENSOR STATUSES - These settings allow devices which are not natively supported by this panel to be used. 
##This is to be used when the state of the device is not recognised by the panel. Examples are provided below 
#custom_supported_statuses_on:
#  - 'running' #EXAMPLE
#  - flipped #EXAMPLE
#custom_supported_statuses_off:
#  - 'not_running' #EXAMPLE
#  - unflipped   #EXAMPLE

In the aforementioned alarm panel, on the MQTT setup page, my settings are:

Alarm Command: home/alarm/set
Alarm Topic: home/alarm

I am able to arm/disarm the alarm using this panel and the aforementioned one, and they both change to reflect the condition. I was pleasantly surprised how well they compliment each other.

Remember to match your timings and pass code


#732

In your configuration.yaml do you have somethong regarding mqtt?


#733

i managed to make the panel works with the custom component, but the moment i enable mqtt for the alarm panel node red stop working…

i reinstalled node-red and now all is working again.


#734

Glad you got it sorted, sorry I’m late to the party. The help docs on github need a full overhaul to be honest.

@thanksmister the custom component works with either the HASS MQTT Broker or a custom defined one, no need for the manual MQTT control panel. This gives all the features of this component plus access to other MQTT apps such as yours.