akasma74 / Hass-Custom-Alarm

It is a fork of "Yet another take on a home assistant custom alarm" that will exist until its author is back to our Earth
78 stars 29 forks source link

Alarm fails to load after any update #94

Closed suds32 closed 4 years ago

suds32 commented 4 years ago

Copy to clipboard Error while setting up bwalarm platform for alarm_control_panel Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 178, in _async_setup_platform await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT) File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for return fut.result() File "/config/custom_components/bwalarm/alarm_control_panel.py", line 399, in async_setup_platform config={"alarmid": "alarm_control_panel.house"}, File "/usr/src/homeassistant/homeassistant/components/panel_custom/init.py", line 140, in async_register_panel require_admin=require_admin, File "/usr/src/homeassistant/homeassistant/components/frontend/init.py", line 190, in async_register_built_in_panel raise ValueError(f"Overwriting panel {panel.frontend_url_path}") ValueError: Overwriting panel alarm

akasma74 commented 4 years ago

When you say "If I install any update", what updates are you talking about? And does it behave the same way if you just restart HA without installing any updates?

suds32 commented 4 years ago

Fails after a home assistant update ie going from 0.109.5 to 0.109.6 Just a general restart with no update etc works fine, as does any update within HACS and then restarting

akasma74 commented 4 years ago

So basically after every HA update you have to restart it one more time to get back to normal, is that correct? Do you remember when (roughly) you started experiencing such a behaviour? Was it HA update or the alarm's update?

suds32 commented 4 years ago

That is correct, not sure exactly when it started but pretty sure it was fine .108.0

suds32 commented 4 years ago

Sorry HA update not an alarm update

akasma74 commented 4 years ago

By the way, does it make any difference if you update HA, reboot your host (like ha host reboot?) and then open the alarn's panel?

akasma74 commented 4 years ago

Is the browser/app you are using to display HA/alarm panel uses admin account or normal user's one? If the latter, could you try with the admin account? Also, have you cleared cache of all your browsers/apps accessing HA before reboot?

suds32 commented 4 years ago

Yes it is an admin account

akasma74 commented 4 years ago

Ok, thanks. So after previous HA updates it helped to restart HA twice to get the alarm working. Is it different with 0.111?

fn87 commented 4 years ago

My alarm is broken now after 0.111. Restarts does not fix the issue anymore.

fn87 commented 4 years ago

2020-06-11 11:55:19 ERROR (MainThread) [homeassistant.components.alarm_control_panel] Error while setting up bwalarm platform for alarm_control_panel Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 178, in _async_setup_platform await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT) File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for return fut.result() File "/config/custom_components/bwalarm/alarm_control_panel.py", line 401, in async_setup_platform config={"alarmid": "alarm_control_panel.house"}, File "/usr/src/homeassistant/homeassistant/components/panel_custom/init.py", line 140, in async_register_panel require_admin=require_admin, File "/usr/src/homeassistant/homeassistant/components/frontend/init.py", line 190, in async_register_built_in_panel raise ValueError(f"Overwriting panel {panel.frontend_url_path}") ValueError: Overwriting panel alarm

This is for an template alarm that are connected to my BWalarm. Could our issues have something to do with the alarm beeing Unknow instead of Unavailable? 2020-06-11 11:55:42 ERROR (MainThread) [homeassistant.components.template.alarm_control_panel] Received invalid alarm panel state: unknown. Expected: armed_away, armed_home, armed_night, disarmed, pending, triggered, unavailable

akasma74 commented 4 years ago

This is for an template alarm that are connected to my BWalarm. Could our issues have something to do with the alarm beeing Unknow instead of Unavailable?

The OP has no such error in his log so I'd say it's a different issue and not the reason why the alarm fails to load. To be honest, those unknown/unavailable states are HA-generated, this component only provides valid states.

akasma74 commented 4 years ago

@suds32, @fn87 guys, could you overwrite your custom_components/bwalarm/alarm_control_panel.py with this one, set log level of the alarm to debug, clear cache of all your browsers, restart HA and post the relevant log part here?

fn87 commented 4 years ago

Ok, I did that and strange things are happening. Suddenly my alarm is working as it should again with your new file but BWalarm doesn't load and do not show up in custom components.

I looked at what you changed and compered it to what I had before and there is nothing in there that would change the actual behavior of the alarm itself. No logs either.

I thing there is something wrong on my end so please disregard my issues for now. Thanks for a quick response and for the file that fixed my alarm...

akasma74 commented 4 years ago

@suds32 could you tell me why the issue was closed?

suds32 commented 4 years ago

HI I have removed the Alarm Panel and just gone back to suing the standard Manual Alarm so for me the issue is closed. Thanks fro your effort in this area

akasma74 commented 4 years ago

Ok, got it. That's a shame.

akasma74 commented 4 years ago

By the way, your issue is identical to this one and the reason is an old version of the alarm.