YET another take on an alarm system

Another thing, just found errors from bwalarm.py in the HA logs. I triggered 2 motion sensors in the house, but both are not relevant for the alarm in home mode.
The logs are not really indicating what the error is:

<state binary_sensor.bewegungsmelder=on; battery_level=None, friendly_name=Bewegungsmelder Flur OG, device_class=motion @ 2018-02-01T06:09:48.119472+01:00>
06:10 custom_components/alarm_control_panel/bwalarm.py (ERROR)
<state binary_sensor.fibaro_motion_sensor_sensor=on; node_id=4, value_index=0, value_instance=1, value_id=72057594110017536, old_entity_id=binary_sensor.fibaro_motion_sensor_sensor_4_0, new_entity_id=binary_sensor.fibaro_motion_sensor_sensor, friendly_name=Bewegungsmelder Flur EG, device_class=motion @ 2018-02-01T06:09:58.199837+01:00>
06:10 custom_components/alarm_control_panel/bwalarm.py (ERROR)

Hi first post here.
Evertyhing looks great and i have the system up and running, but I have the same issue with the codes, that only the Panic code will deactivate the alarm. I have tried without quotes with single quotes ( ’ ) and with doublet quotes ( " ).

I have looked at the install fines and they seem to be same date as the ones I find here, are there any fix for this problem yet?

Thank you for the answer in advance and the great work you have put into this project.

/Steffen

My motion sensor is in “standyby” (all lower case) and “motion detected” when triggered

I use his latest update from github. He just recently updated. Both put direct in alarm.yaml or secrets.yaml work fine for me.

from alarm.yaml I have single quote ‘1234’ and ‘5678’ on both
code: ‘1234’
panic_code ‘5678’

When I put the code and panic_code in secret file.
code: !secret alarm_code
panic: !secret panic_code

in secrets.yaml
alarm_code: 1234
panic_code: 5678

Newb question, panic mode is when you want to trigger the alarm??

I didn’t see any explain regarding the panic mode

Panic mode is used to unlock the alarm but send an SOS notification to a predefined recipient. If I’m not mistaken, it’s described inside alarm.yaml

Alright, I managed to make use of the space below the keypad. Here it is

This is the camera I have just right outside my main door (the door is on the left of this tablet)
It works like a high-tech peephole.

If you want to do this I am pasting the code here:

alarm.html:
go to line 140 (where the “open sensors” template ends)
and paste this:

					</div>        
					<div align="center">
					<iframe  src="PASTE-HERE-THE-URL-OF-YOUR-CAMERA" height="480" width="640"></iframe >
					</div>

To help you what you must paste on the code, here is my cameras url http://192.168.1.160:8080/video.mjpg?mute

4 Likes

@Sunonline

Thanks for the support, however it’s still the same. I have now tried with the code in the !secrets file and directly in the alarm file as you described - no difference.

The panic code works but the normal alarm code does not.

What can I do in order to debug what is going on with the code or what code that the alarm “picks up” from the ini files?

Small bug/behavior:
I also just notiched something strange. If I try to arm the alarm from the Home screen of HA instead from the alarm panel, I need to type a code in order to arm the alarm, but that can be any code and the Arm fields will “un-grey” and I can activate the alarm.
Code%20HA

/Steffen

Thank you very much for sharing. Can we have more than 1 camera inside? if possible please advice for the code.

Thank you very much again.

Did you use MQTT alarm or normal alarm? This is in my alarm.yaml , I didn’t use mqtt although it can be use with mqtt. The rest under what I have pasted is the name of my sensor and binary sensors

platform: bwalarm
name: HOUSE

code: !secret alarm_code
panic_code: !secret panic_code

pending_time: 25
trigger_time: 600

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
#settings: True #[NOT YET IMPLEMENTED, OPTIONAL] True/False. Enables a settings mode which allows you to define certain settings in the UI without the need to restart HA after certain config changes. This will be used for fluid settings such as enabling/disabling the screensaver mode once implmented. NOTE for this to work you will need to create a directory within your HA config directory named 'alarm_settings' this is where the settings file will be managed. Also ensure you have the appropriate permissions/ownership for the HA user to create/amend the file.
#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_all_sensors: True #[NOT YET IMPLEMENTED, Optional] - False by default. Setting this to True hides the 'All Sensors' box which displays every sensor when in disarmed mode.

##[PASSCODE RELATED]
passcode_attempts: 3
passcode_attempts_timeout: 30

##[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.
#state_topic: smarthome/alarm #[OPTIONAL] The MQTT topic HA will publish state updates to.
#command_topic: smarthome/alarm/set #[OPTIONAL] The MQTT topic HA will subscribe to, to receive commands from a remote device to change the alarm state.
#aassqos: 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”.

My the camera show above all sensors not under sensors. Look strange.

Based on pure logic I would say yes you can add more cameras…
I have already shared my code!

1 Like

Here is where I pasted my code. Notice that it is under Open Sensors

Thank you very much. However, the camera show above all sensors ^^ not below all sensors like yours.

Maybe “center” change to “bottom”

Hi,

Having set clock: True in alarm.yaml gets the following error in log file (the panel doesn’t load):
(MainThread) [frontend.js.latest.201801300] http://192.168.x.x:8123/frontend/panels/alarm-551d7xx.html:235:19 Uncaught TypeError: Cannot read property 'attributes' of undefined

The line generating the error in alarm.html is if (this.alarm.attributes.clock) { however I do have the time_date sensor setup in HA.

Panel loads fine by setting clock: False.

Does it need additional config?

Try load the alarm.html again from his github.

Hi,

I’ve only set it today from github so it is the latest version.

clock: True / then restart your ha.

It worked, I think that clock is initiated later. So probably it should be first set to false for the first run after setup and then changed to true.

Thanks