Hmm…
I cannot get the latest version to work correctly…
It just won’t accept my code. Panic code works, but not the normal disarm code.
Both are encapsulated in quotes and are in the secrets.yaml (like in the example).
Is anyone else struggling with this?
secrets.yaml
alarm_code: ‘1111’
panic_code: ‘9111’
alarm.yaml
#Code, should consist of one or more digits ie ‘6482’ ensure your passcode is encapsulated by quotes
code: !secret alarm_code
#[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.
panic_code: !secret panic_code
Edit: While arming from the MQTT Alarm panel app works fine, disarming also fails there. In the HA log I find the following error:
2018-01-21 19:42:50 ERROR (MainThread) [homeassistant.core] Error doing job: Exception in callback <function async_subscribe..async_mqtt_topic_subscriber at 0x7347f6a8>
Traceback (most recent call last):
File “uvloop/cbhandles.pyx”, line 49, in uvloop.loop.Handle._run
File “/usr/lib/python3.6/site-packages/homeassistant/components/mqtt/init.py”, line 244, in async_mqtt_topic_subscriber
hass.async_run_job(msg_callback, dp_topic, payload, dp_qos)
File “/usr/lib/python3.6/site-packages/homeassistant/core.py”, line 253, in async_run_job
target(*args)
File “/config/custom_components/alarm_control_panel/bwalarm.py”, line 540, in message_received
self.alarm_disarm(self._code)
File “/config/custom_components/alarm_control_panel/bwalarm.py”, line 381, in alarm_disarm
if not self._validate_code(code, STATE_ALARM_DISARMED):
File “/config/custom_components/alarm_control_panel/bwalarm.py”, line 487, in _validate_code
self.check_open_sensors()
File “/config/custom_components/alarm_control_panel/bwalarm.py”, line 364, in check_open_sensors
if self._hass.states.get(sensor).state in self._supported_statuses_on:
AttributeError: ‘NoneType’ object has no attribute ‘state’
Do I need to have valid entities? I want to test in an empty, dedicated HA instance until everything works before I move it to my main installation (to avoid unneccessary restarts).
EDIT2: Yes, apparently having invalid entities in the alarm.yaml breaks disarming because for some reason the code validation method calls “self.check_open_sensors()” first which probably crashes in this situation.
What is the reason for this check? Disarming is not dependant on the sensors’ values, is it?
Is it on purpose that entity sections cannot be left blank?
I’m getting errors in the log:
Entity IDs can not be None for dictionary value @ data['override']. Got None
Entity IDs can not be None for dictionary value @ data['perimeter']. Got None. (See ?, line ?). Please check the docs at https://home-assistant.io/components/alarm_control_panel.bwalarm/Entity IDs can not be None for dictionary value @ data['override']. Got None
Entity IDs can not be None for dictionary value @ data['perimeter']. Got None. (See ?, line ?). Please check the docs at https://home-assistant.io/components/alarm_control_panel.bwalarm/
If I put my code in secret.yaml with or without quote ’ for the code. I can only use panic code to disarm. This happen before the latest upgrade. So I have to put the alarm_code and panic_code inside it own file with quote ’ .
Good catch with the quote character. That must’ve come from copy/pasting, though. The original is fine.
The codes now both work fine ever since I removed the invalid entity IDs from the alarm.yaml. For testing purposes you can comment out all entity related sections from alarm.yaml and then try to disarm.
The reason is as I stated above: the script checks all entity states before validating the disarm code.
I just want to say a big thank you to @gazoscalvertos for all his hard work.
I am still in testing phase with my HA setup, and have not received and setup all my sensors yet, but so far it’s working great with what I have!
A few things:
It would be great if the hide_sidebar option could be enabled/disabled depending on the alarm mode. In home mode it would be great if I could still access the rest of HA.
Maybe this is the wrong place to ask, but what is everyone using for indoor/outdoor sirens? Sorry if this should be asked elsewhere, if so, please direct me.
my alarm doesn’t have siren as well. however the physical alarm hub is able with SOS mode which activate the nosie and message to my phone. The SOS come from the keyfob, I put in HA which actually I use only for emergency for elderly, I didn’t put siren in the automation but put the notify to my phone with camera feed.
You can adjust the service in automation as suitable to your needs and hardware you have example flash light or tts to media player or notify to your phone.
Currently work fine when put pass_code and panic_code in secret.yaml (without quote)
Also work fine when you put pass_code and panic_code directly in alarm.yaml (with quote)
I’ve also realised, even with hide_sidebar set to True and the Alarm Armed, if i refresh the webpage, or hit the refresh button in the ios app, I gain access to the sidebar again.
So anyone can access the sidebar even when the alarm is on, and the sidebar is set to hidden.
I have a lot of xiaomi aqara sensors so use the xiaomi gateway for the siren. Regarding hiding the sidebar, I think it is still a work in progress, @gazoscalvertos has mentioned that the way HA works it isn’t a straight forward thing to do so it may not function 100% correctly until a work around is discovered.
Hi all, I installed and successfully configured the panel
thank you so much for your great work!
I would love the ability, when alarm is DISARMED, to see if anyone in my family is at home.
I used to do this with a group, wher I listed my tracked devices, but I have no idea on how to integrate this in the panel as I’m not confident with coding/programming.
To edit the panel buttons: alarm.css:
Size of the buttons are on lines 188 and 189
The background image for the buttons is on line 191
this is the original file:
The file “btnraised.png” must be located in the home assistant directory.
For example in my case it is:
homeassistant\www\alarm_skins\keyb\btnrased.png
as you can see the “local” is translated into “www”
Make sure the picture is the same size as the size of the button in the css file.
In my case I set the css to be 160x160 pixels and I made the png file the exact same size.
My problem now is to find out how to make the numbers larger.