YET another take on an alarm system

Oops! I forgot that clearing cache often help w/ these. I should have done that. Thank you! That fixed it.

Well, I removed Hass Custom Alarm configuration details in configuration.yaml and related installation files:

alarm_control_panel: !include alarm.yaml
panel_custom: !include panel_custom.yaml

And include Manual Alarm Control Panel configuration details in configuration.yaml:

alarm_control_panel:

  • platform: manual
    name: Home Alarm
    code: 1234
    pending_time: 2
    trigger_time: 10

System log did not appear this error log and displays the default alarm panel as per expected.

Now I also confused which part is going wrong :thinking:

Well, there should be something regarding this alarm it the log if it’s not configured properly.
Could you double check that your logger is set up with default: warning?

Will revert back if I found anyhings on my logger.

Thanks.

For everyone trying to get debug information in log - read this

1 Like

Just posted a thread here on how people are handling babysitters/dog walkers etc. Just letting everyone know in case anyone has any top tips. I am using a router device tracker to monitor for babysitters. It’s far from ideal.

The location tracker is already working. Thats not my question.
I want to combine that with a code panel and also want the alarm arming and disarming when the code panel is active.
Sorry for my english :wink:

Maybe some of you have recently noticed that the alarm panel stopped to show error messages if it fails to start.
Here is a PR I’d recommend everyone to apply to their code. Any comments about that are welcome.

This alarm panel has alarm_arm_home, alarm_arm_away, alarm_disarm services.
Search this thread, there are examples how to use it.

Hi Everybody,

I tried tonight to move the HASS Alarm into its own folder (bwalarm), but ever since doing that, the alarm panel component won’t load. I’ve implemented all of the recommended tweaks outlined here and also here, but so far I’m still getting the error.

My Lovelave frontend says:

The error in my log looks like this:

{myHAdomain}/api/panel_custom/alarm:2092:41 Uncaught TypeError: Cannot read property 'state' of undefined

Line 2092 of alarm.html looks like this:

if (instance.alarm.state != 'disarmed')

Perhaps I dropped a character (such as a semicolon at the end of the line?), maybe I’m looking in the wrong place, or maybe something completely different is wrong. Any help is much appreciated.

Just to add on to this, I added a ; to the end of the line above, restarted, and there was no change.

I also noticed the following error when HA tries to setup the bwalarm platform:

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/bwalarm/alarm_control_panel.py", line 316, in async_setup_platform
    alarm = BWAlarm(hass, config, mqtt)
  File "/config/custom_components/bwalarm/alarm_control_panel.py", line 341, in __init__
    self.init_variables()
  File "/config/custom_components/bwalarm/alarm_control_panel.py", line 441, in init_variables
    self.immediate  = self._states[self._state]["immediate"]
KeyError: 'disarmed'

And I did work through the suggested tweaks from @AhmadK in the post above from 4 days ago.

Again any help is appreciated.

Ok, let’s start.

  1. Dod your alarm work properly before you moved it so we can surely say that move is the reason of your troubles, or not quite?

  2. this

is most likely the result of “Entity not available” as it tries to accesses entity’s property.

isn’t it this? look here

Thanks for your reply.

The alarm panel was working as expected before the move to the new folder.

I went back and checked my alarm_control_panel.py, and it turns out that I was using the version from Github without the persistence fix. That must have happened when I moved the file. Thanks for catching that.

I updated with the persistence fix, and now I’m not seeing:

File “/config/custom_components/bwalarm/alarm_control_panel.py”, line 441, in init_variables self.immediate = self._states[self._state][“immediate”] KeyError: ‘disarmed’

in my logs. I am, however, still seeing:

{myHAdomain}/api/panel_custom/alarm:2092:41 Uncaught TypeError: Cannot read property ‘state’ of undefined

and it has me a bit confused. The error on the frontend:

still remains unchanged. Any additional thoughts?

I suppose I could go back to everything from the Github except for the persistence fix, since that was what was working before. Is that what you would suggest?

Edit: Quick update: after another restart, the alarm component now loads (!) - with the keypad display, which was missing before

However, the:

{myHAdomain}/api/panel_custom/alarm:2092:41 Uncaught TypeError: Cannot read property ‘state’ of undefined

Still seems to be filling up my log…

Thanks.

clear your cache and restart browser. restart HA

Unfortunately, the cannot read state of ‘undefined’ errors are continuing despite restarting HA and clearing browser cache. The alarm seems to work (arm/disarm) etc.

But I’d definitely still appreciate any help for getting to the bottom of the issue. Thanks.

please post here your log

If you are able to run appdaemon this is the way to go
No manual intervention required, Alarm system enabled and disabled based on presence

As it turns out the errors were coming from cached data on one of my wall tablets, and clearing the cache seemed to address the situation.

On another note though, I have a bit of concern about updating to 0.89 when a core piece of my setup depends on the Hass Alarm custom component.

Has anyone updated to 0.89 smoothly? What were the keys to have in place to avoid borking/fubaring your alarm? Thanks.

I had the same few months ago and now know the rule :wink:

yep. make a backup of your HA and roll it back if anything goes wrong.

Hi, i have installed the component and applicate every patch, but have a problem that i don’t read in the treath…
my page from the lett pannel it’s white… cant see the configuration page, i tryed with many browser from phone and laptop. The allarm it’s ok, i can change the state from the lovelace standard allarm’s card and don’t have error in the log …
What i can try ?
Thanks

Well… post screenshots here?