No worries at all my friend. Thank you for taking the time to assist.
Iāll build it in
I have just tested the code and it works, will upload in a few hours once I have access
Thanks Gaz. Iām actually away for a few days so no hurry. Also if you have the time could you give me a few pointers on how to get the alarm panel to show in a view instead of the side panel?
I would like to play a notification sound from the web browser of the arming device during the arming delay time. The same goes for the delay time on the delay sensors before the alarm gets triggered.
I guess it just a matter of adding it to the timer javascript but thats not my strong side.
How are you arming the panel by the way?
As this solution allows you to override the arm_away service to arm instantly. It isnāt built into the gui at the moment.
Iāll have to develop a separate html file to allow view (state card) integration as HA uses different code for that it seems. Hopefully I can drop out the majority of the code in the panel as the base code and have either the panel or statecard skeleton html files call that.
What OS is it?
If itās android you could use automate or tasker to do this now
Hm. That could be an option. IĀ“m using a Fire 7 atm.
You mean http notifications?
Tasker or automate on Google play can be configured to monitor the alarm state then play a mp3 wav etc on certain statuses.
I have a text to speech notification app setup (will post link later) which speaks the status through automation.
For example when the alarm is arming the android wall panel next to the front door speaks āYour alarm will activate in 30 seconds, ensure doors and windows are closedā
Useful for other things too for example the panels around the house speak āPlug in your car the charge is below 70%ā
Basically annoys the wife until she plugs the car in when Iām not in
I see. I will check it out for sure. I still like the simplicity of the javascript playing the sound along the counter
Cheaply
One of these rfid readers hidden inside the door frame hooked up to the piās gpio port: https://www.ebay.com/itm/RFID-Reader-RFID-Key-Access-Control-with-relay-/370839896103
It can actually learn and use my work security access card so no need to even carry the keychain tag.
Thatās fine. I would only ever arm instantly from an automation.
As for the state card/view, I thought it was it originally a view? I got that impression from reading earlier posts.
(23/02/18) NEW FEATURE - Override the pending time when arming away mode so that the alarm arms instantly. To do this pass a code parameter of ā-1ā to the service, this could be in the form of an automation such as:
alias: '[Alarm] Instantly Arm Away Mode'
trigger:
... place your trigger here ...
action:
- service: alarm_control_panel.alarm_arm_away
entity_id: alarm_control_panel.house
data:
code: '-1'
No itās always been a custom panel
Here is my Alarm.yaml:
name: House
code: !secret alarm_code
panic_code: !secret panic_code
pending_time: 60
trigger_time: 45
alarm: automations.alarm_triggered
warning: automations.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: True
hide_custom_panel: True
##[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.basement_main_window_sensor
- binary_sensor.basement_outside_door_sensor
- binary_sensor.computer_room_north_window_computer_room_window
- binary_sensor.laundry_room_window_doorwindow_sensor
##Sensors in this group start the clock (pending_time) when tripped before the alarm is activated in 'Away' mode
delayed:
- binary_sensor.front_door_sensor
- binary_sensor.garage_outside_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:
##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:
##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.basement_main_window_sensor
- binary_sensor.basement_outside_door_sensor
- binary_sensor.computer_room_north_window_computer_room_window
- binary_sensor.laundry_room_window_doorwindow_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```
Here is the error message:
```Testing configuration at /home/homeassistant/.homeassistant
2018-02-19 13:27:31 INFO (MainThread) [homeassistant.setup] Setting up recorder
2018-02-19 13:27:31 INFO (MainThread) [homeassistant.setup] Setting up mqtt
2018-02-19 13:27:31 INFO (MainThread) [homeassistant.setup] Setting up http
2018-02-19 13:27:31 INFO (MainThread) [homeassistant.setup] Setup of domain recorder took 0.0 seconds.
2018-02-19 13:27:31 INFO (MainThread) [homeassistant.setup] Setup of domain mqtt took 0.0 seconds.
2018-02-19 13:27:31 INFO (MainThread) [homeassistant.setup] Setup of domain http took 0.0 seconds.
2018-02-19 13:27:31 INFO (MainThread) [homeassistant.setup] Setting up history
2018-02-19 13:27:31 INFO (MainThread) [homeassistant.setup] Setting up websocket_api
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setting up api
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setting up system_log
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setup of domain history took 0.0 seconds.
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setup of domain websocket_api took 0.0 seconds.
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setup of domain api took 0.0 seconds.
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setup of domain system_log took 0.0 seconds.
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setting up frontend
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setup of domain frontend took 0.0 seconds.
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setting up zwave
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setting up google
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setting up group
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setting up sensor
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setting up sun
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setting up rest_command
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setting up notify
2018-02-19 13:27:32 ERROR (MainThread) [homeassistant.config] Invalid config for [alarm_control_panel.bwalarm]: Entity IDs can not be None for dictionary value @ data['homemodeignore']. Got None
Entity IDs can not be None for dictionary value @ data['override']. Got None. (See ?, line ?). Please check the docs at https://home-assistant.io/components/alarm_control_panel.bwalarm/
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setting up alarm_control_panel
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setting up updater
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setting up hue
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setting up ffmpeg
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setting up input_select
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setting up discovery
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setting up input_boolean
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setting up lutron_caseta_pro
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setting up map
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setting up zone
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setup of domain zwave took 0.2 seconds.
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setup of domain google took 0.2 seconds.
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setup of domain group took 0.2 seconds.
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setup of domain sensor took 0.1 seconds.
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setup of domain sun took 0.1 seconds.
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setup of domain rest_command took 0.1 seconds.
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setup of domain notify took 0.1 seconds.
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setup of domain alarm_control_panel took 0.1 seconds.
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setup of domain updater took 0.1 seconds.
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setup of domain hue took 0.1 seconds.
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setup of domain ffmpeg took 0.1 seconds.
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setup of domain input_select took 0.1 seconds.
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setup of domain discovery took 0.1 seconds.
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setup of domain input_boolean took 0.0 seconds.
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setup of domain lutron_caseta_pro took 0.0 seconds.
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setup of domain map took 0.0 seconds.
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setting up camera
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setting up panel_custom
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setting up media_player
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setting up logbook
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setting up config
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setting up panel_iframe
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setting up conversation
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setting up tts
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setting up google_assistant
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setup of domain zone took 0.0 seconds.
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setting up script
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setting up cover
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setting up remote
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setting up automation
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setup of domain camera took 0.0 seconds.
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setup of domain panel_custom took 0.0 seconds.
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setup of domain media_player took 0.0 seconds.
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setup of domain logbook took 0.0 seconds.
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setup of domain config took 0.0 seconds.
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setup of domain panel_iframe took 0.0 seconds.
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setup of domain conversation took 0.0 seconds.
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setup of domain tts took 0.0 seconds.
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setup of domain google_assistant took 0.0 seconds.
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setup of domain script took 0.0 seconds.
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setup of domain cover took 0.0 seconds.
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setup of domain remote took 0.0 seconds.
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setting up device_tracker
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setup of domain automation took 0.0 seconds.
2018-02-19 13:27:32 INFO (MainThread) [homeassistant.setup] Setup of domain device_tracker took 0.0 seconds.
Failed config
alarm_control_panel.bwalarm:
platform: bwalarm
alarm: automations.alarm_triggered
armed_away_colour: black
armed_home_colour: black
clock: True
code: 8891
command_topic: home/alarm/set
delayed: [source /home/homeassistant/.homeassistant/alarm.yaml:55]
- binary_sensor.front_door_sensor
- binary_sensor.garage_outside_door_sensor
disarmed_colour: #03A9F4
hide_custom_panel: True
hide_passcode: True
hide_sensor_groups: True
hide_sidebar: True
homemodeignore: None
immediate: [source /home/homeassistant/.homeassistant/alarm.yaml:48]
- binary_sensor.basement_main_window_sensor
- binary_sensor.basement_outside_door_sensor
- binary_sensor.computer_room_north_window_computer_room_window
- binary_sensor.laundry_room_window_doorwindow_sensor
mqtt: True
name: House
override: None
override_code: True
panic_code: 0509
passcode_attempts: 3
passcode_attempts_timeout: 30
payload_arm_away: ARM_AWAY
payload_arm_home: ARM_HOME
payload_arm_night: ARM_NIGHT
pending_colour: orange
pending_time: 60
perimeter: [source /home/homeassistant/.homeassistant/alarm.yaml:68]
- binary_sensor.basement_main_window_sensor
- binary_sensor.basement_outside_door_sensor
- binary_sensor.computer_room_north_window_computer_room_window
- binary_sensor.laundry_room_window_doorwindow_sensor
perimeter_mode: True
persistence: True
qos: 0
state_topic: home/alarm
trigger_time: 45
triggered_colour: red
warning: automations.alarm_warning
warning_colour: orange
weather: True
Successful config (partial)
alarm_control_panel.bwalarm:```
What happens if you make and put a dummy sensor in both of the following
homemodeignore:
- sensor.your_dummy_sensor
override:
- sensor.your_dummy_sensor
I had to comment out empty sensor groups in the config. Otherwise the alarm panel would not show.
Doh. Yeah that would be simpler.
Anyone manged to merge the HA SwitchPlate project (HA SwitchPlate - DIY LCD Touchscreen wall switch replacement) with the alarm? The switch pla
I would like to use the SwitchPlate to interract with the alarm system. Is it possible for the alarm system to receive the passcode via MQTT? Or what is the best way to set it up? Anyone managed set this up and can share their code?
@Freland I like this project!
I may build one oneday.
There are probably a couple of methods to get this working:
- Use custom MQTT to trigger an automation in HA to arm/disarm the alarm
- modify the Nextion code to send an MQTT command to topic: home/alarm/set āDISARM 8654ā
This actually did work but yes I did not think of commenting out the empty group either. Thanks for the help. Now I am wondering if a cross group functionality was thought of to reduce false alarms. For example if you have a motion sensor near a door the alarm would not trigger unless both are activated.