YET another take on an alarm system

After upgrading to 0.88.0 there are several problems… the MDI update was covered in the post above under the panel-custom change. The custom component directory and python file will need their names swapped to clean up some errors, and I changed up a TON of CSS code to make things more responsive before upgrading but after, it looks like this:

After looking at the breaking changes it seems that they have discontinued use of paper-button and are using mwc-button now. After changing everything over to the new supported version of the button, it places a button within the frame of the existing button and nothing works properly. I reverted and am looking for a fix yet, but this and the image posted a few above is caused by dropping support for paper-button.

Anyone have ideas for getting the replacement working for now, ir ideas for importing paper-button.js back into this component until the new non-polymer UI is released?

Thanks
Have latest files as of the 10th, but some the above still needed to be done thanks
But when you use Lovelace Alarm Panel there is still n Keypad52%20PM

Read @BenchPressesBooks post directly above yours.

I’ve just upgraded Hass.io and the only difference I can see is that text is not centered within buttons, but they are still round. Cleared cache before checking.

and yes, it says “WARNING (MainThread) [homeassistant.loader] Integrations need to be in their own folder. Change alarm_control_panel/bwalarm.py to bwalarm/alarm_control_panel.py. This will stop working soon.”

Hi there,

I was testing this panel but I cannot save any change in the configuration, everytime I got an error related to Websocket API

Here an example while trying to change the “Alarm Panel Title:”

2019-02-21 10:30:24 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1707841520] Error handling message: {'type': 'call_service', 'domain': 'alarm_control_panel', 'service': 'ALARM_YAML_SAVE', 'service_data': {'configuration': 'panel', 'value': {'camera_update_interval': '', 'cameras': [], 'enable_camera_panel': 'False', 'enable_clock': 'True', 'enable_clock_12hr': 'True', 'enable_custom_panel': 'False', 'enable_floorplan_panel': 'False', 'enable_sensors_panel': 'True', 'enable_serif_font': 'True', 'enable_weather': 'True', 'hide_passcode': 'True', 'panel_title': 'Surname Residence2', 'shadow_effect': 'True', 'enable_fahrenheit': 'False'}}, 'id': 75}
Traceback (most recent call last):
  File "/home/ha/homeassistant/lib/python3.6/site-packages/homeassistant/components/websocket_api/decorators.py", line 17, in _handle_async_response
    await func(hass, connection, msg)
  File "/home/ha/homeassistant/lib/python3.6/site-packages/homeassistant/components/websocket_api/commands.py", line 147, in handle_call_service
    connection.context(msg))
  File "/home/ha/homeassistant/lib/python3.6/site-packages/homeassistant/core.py", line 1133, in async_call
    self._execute_service(handler, service_call))
  File "/home/ha/homeassistant/lib/python3.6/site-packages/homeassistant/core.py", line 1153, in _execute_service
    handler.func(service_call)
  File "/home/ha/.homeassistant/custom_components/alarm_control_panel/bwalarm.py", line 324, in alarm_yaml_save
    alarm.settings_save(service.data.get(CONF_CONFIGURATION), service.data.get(CONF_VALUE))
  File "/home/ha/.homeassistant/custom_components/alarm_control_panel/bwalarm.py", line 541, in settings_save
    self._yaml_content[configuration] = value
TypeError: 'NoneType' object does not support item assignment

I am using HA 0.88 but I was having the same problem yesterday with 0.87.1

Any feedback welcome :slight_smile:

Thanks
Andrea

I cannot reproduce it on 0.88.0, and it was working fine on 0.87.0

Thanks but have done all the changes with main ones around fixing keypad but still no go
@property
def code_format(self):
“”“One or more characters.”""
if self._code is None:
return None
if isinstance(self._code, str) and re.search(’^\d+$’, self._code):
return alarm.FORMAT_NUMBER
return alarm.FORMAT_TEXT

warning, I am not a programmer, developer, or even like to write code

can someone explain something to me. I have hass.io working with the Konnected boards and running this security system. Am I supposed to write an automations.yaml file to actually sound the alarm when this is “triggered” I’ve been trying to write one, but then when I look in the developer tools, state section it appears that most of what I am doing is already there…

sorry for such an elementary question, but I must be missing something here.

here is what I have written so far. is this necessary or am I reinventing the wheel.

I still can’t get it to set off the siren when I open the door and when it does I can’t get it to disarm.

Mate, the idea is you need to react to the state of alarm panel as it itself takes care of the sensors configured via alarm.yaml/webinterface.
Therefore for your siren you can use something like:

- id: alarm__triggered
  alias: '[Alarm] Triggered'
  hide_entity: true
  initial_state: true
  trigger:
    platform: state
    entity_id: alarm_control_panel.house
    to: 'triggered'
  action:
  - service: switch.turn_on
    entity_id: switch.siren

That’s basically it, apart from the fact that you need to switch off your siren somehow when the alarm is disarmed OR goes back to armed away/home state.

Regarding alarm beep when door opened or closed - you need to monitor appropriate sensors yourself and react to their state. Your trigger section should contain - platform sections, not - entity_id, read the docs

Hi.
I have this problem in 88.1.

Error while setting up platform bwalarm
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py”, line 128, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File “/usr/local/lib/python3.7/asyncio/tasks.py”, line 416, in wait_for
return fut.result()
File “/usr/local/lib/python3.7/asyncio/coroutines.py”, line 120, in coro
res = func(*args, **kw)
File “/config/custom_components/alarm_control_panel/bwalarm.py”, line 316, in async_setup_platform
alarm = BWAlarm(hass, config, mqtt)
File “/config/custom_components/alarm_control_panel/bwalarm.py”, line 341, in init
self.init_variables()
File “/config/custom_components/alarm_control_panel/bwalarm.py”, line 441, in init_variables
self.immediate = self._states[self._state][“immediate”]
KeyError: ‘disarmed’

Can you help me please?
Thanks

Sure

I’m going to try that solution.
Thanks

Would this be an idea? Apparently it won’t work for the HTML files etc but would work for the “custom component” element of it. I guess if it won’t update as a whole it might be counterproductive and confusing.

The alarm in principle works well. Although with version 88.1 the panel numbers are smaller and do not look good. Any ideas?

Already reported earlier.
I have the same. Don’t have time to look into it as it’s still functional.
But UGLY :frowning:

For those who wants to get rid of the following warning in HA log

[homeassistant.loader] Integrations need to be in their own folder. Change alarm_control_panel/bwalarm.py to bwalarm/alarm_control_panel.py. This will stop working soon.

Just do what they say, namely: in create /config/custom_components/bwalarm folder, move bwalarm.py there and rename it to alarm_control_panel.py. Then it’s safe to remove /config/custom_components/alarm_control_panel folder

IMPORTANT UPDATE: if you set logging level for the alarm, it’s affected by this change and you need to change its full name. For example, in configuration.yaml it should be:

default: warning
logs:
# old style naming, doesn't work
# custom_components.alarm_control_panel.bwalarm: debug
  custom_components.bwalarm.alarm_control_panel: error
3 Likes

A word of caution regarding 0.88.1 - make sure all your automations have initial_state: true as they will be disabled by default.

This was a requirement after .85 i believe, so hopefully most people have made the change
lets hope

My config was functional on 0.88.0, but after upgrading to 0.88.1 I found few automations not working exactly because they had no explicit initial_state.

One thing you can do is edit www/alarm/alarm.css. On lines 802 and 595 (edit: 486 as well) add:

justify-content: center;
align-items: center;

Of course you’ll have to clear your cache to see the changes. There also might be other places, those are just the ones that affected me.

2 Likes