Bwalarm (akasma74 edition)

I appreciate that but imho one of many benefits of software alarms is it’s very flexible and configurable.
The way you mentioned makes sense but I personally prefer more precise diagnostics.

HTML will stop working in 0.115.0

Then don’t update to 0.115 yet.
They’re fast deprecating stuff without giving community devs time to change their code.
So far I’ve no idea how to migrate, mainly because didn’t have time to look into it.

We are still 7 weeks away from 0.115 I was just posting the commits made to remove it in case they offered any insight on how to move from HTML to .js

I get this multiple times per hour. If I disable bwalarm I don’t get it. I can’t figure out what its trying to do. It’s always with ‘id’:21.

I’m running 112.4 HassOS 4.11 Supervisor 228 on Raspberry PI - all current.
bwalarm is v 1.12.6

Has been a problem for many many prior versions but seems worse lately. Maybe worse with 112… but happened long before… Is something deprecated that isn’t alerting? Anyone see this and have tips?

2020-07-14 12:06:41 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.2807739760] Received {'type': 'config/auth/list', 'id': 21}
2020-07-14 12:06:41 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.2807739760] Error handling message: Unauthorized
2020-07-14 12:06:41 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.2807739760] Sending {'id': 21, 'type': 'result', 'success': False, 'error': {'code': 'unauthorized', 'message': 'Unauthorized'}}

Is your client logged in as admin or user?

Well there it is. Thanks. I set the tablet id to admin and the complaining goes away. I don’t recall seeing that as a tip in the documentation. Thanks for enlightening me.

Well, it took me some time to realise that the ugly message is related to a HA API call that works only if one uses admin’s account.
Since then I changed code so it checks if current user’s account and makes the call only if current user is an admin.
However, for some reason it does exist in my dev code but not in master one. Will fix it soon.
Thanks for pointing it out!

1 Like

I got a message tonight saying “This component is not working”.
This has been working for weeks.

I tried restarts, etc.
I backed everything up, and uninstalled Bwalarm, and reinstalled. No success.
I’ve cleared browser cache, etc and still nothing.

Any ideas please?

Did you check the home assistant log like it asks you to do?

Yeah I did. Could not find anything at all pertaining to Bwalarm.

EDIT: Replaced my Bwalarm.yaml, restarted and its working again. Don’t know what could have changed.

EDIT 2: So I had previously added name, under platform: bwalarm. This was never a problem until now, as its breaking the component.
Any ideas how I can rename the entity now? ie. alarm_control_panel.house_alarm

platform: bwalarm
name: House Alarm

If you can reproduce the issue and open a new one on Github, I’m happy to look into it

What exactly and how does break the component?

use house_alarm as name and it will be your object_id - part of entity_id in terms of HA.

If you want to change what’s displayed on panel (possibly you don’t) then it’s panel_title at panel level.

To reproduce the issue, as above, if I just add
name: House Alarm

into bwalarm.yaml, the entity id does indeed change to
alarm_control_panel.house_alarm.

I can even add this entity into the alarm card in lovelace and control the alarm.

However, it breaks the Bwalarm control panel, and I get the message as above.
“This componenent is not working. Check the Home Assistant log for more details.”

I’ve checked the log - there is nothing pertaining to this error at all.

I mean, its not a huge deal breaker, but I just don’t understand how I’ve had it working for so long without any issue. I’ve now had to go through and change the entity ID for all my automations.

I’m about to link two Home Assistant instances together with one as master and one as slave. I therefore think I need to rename my alarm_control_panel.house so that I can differentiate between the two. I tried to do this in /config/custom_components/bwalarm/alarm_control_panel.py
line 401 by renaming

  await hass.components.panel_custom.async_register_panel(
        webcomponent_name='alarm',
        frontend_url_path="alarm",
        html_url=url,
        sidebar_title='Alarm',
        sidebar_icon='mdi:shield-home',
        config={"alarmid": "alarm_control_panel.house"},
    )

but this did not work! :rofl: :rofl: any tips?!

EDIT: Figured it out. There was another line to edit (line 305) that seems to have done it.

Cheers

So what does your master-slave concept mean?

That I’d be able to view and interact the sensors from one HA directly natively in the other

So I take it that you have 2 HA instances and each one has its own bwalarm component, is that correct?
And after making the changes you mentioned above you are able to see/control both alarms from the master HA, was that your goal?

Yes, yes, yes :slight_smile:

And do you have 2 HA instances because you cannot have 2 alarm instances or there is another reason to that?

One’s at work, one’s at home