Bwalarm (akasma74 edition)

Have you copied the manifest.json and __init__.py file from the repository?

I copied them to config\custom_components\bwalarm. This worked.

MQTT integration looks to be broken with 0.92.1. Taking a working bwalarm (v1.1.4_ak74) confguration and enabling MQTT produces no alarm component upon a restart. The logs show the following message:

“Signature of MQTT msg_callback ‘custom_components.bwalarm.alarm_control_panel.message_received’ is deprecated”

I’ve logged the issue at https://github.com/akasma74/Hass-Custom-Alarm/issues/1

Anyone else seeing this?

hi, thanks for the effort to maintain this add-on, have you also incorporated this code changes ?

i have replaced all files from your repo and i get this
https://xxx.xxx.xxx/local/lib/jscolor.js:532:50 TypeError: undefined is not an object (evaluating ‘e.path[0]’)

also the alarm panel do not show up at all instead i get a blank page, i have tired with and without frontend:
javascript_version: latest

I most likely haven’t because I personally haven’t seen any issues with jscolor.js… when does that error happen?

could you create a new issue here?

appears in the log if you use an iPhone to access the Home Assistant iOS app and view the alarm panels AND your code is unpatched.

i.e when using HA iOS app with the original jscolor.js.
and what is the result apart from that error?

I don’t use HA app, but could give it a go to test…

It seems to still work, just generates a lot of errors. I don’t really know as I soon patched the error myself.

One thing I’d like to achieve is sending the sensor which has triggered the alarm in a mobile_app, pushover or telegram notification. I used to have this working but I don’t anymore. Anyone got any examples they could share?

You used to see a lot of errors, but haven’t seen them since you patched that jscolor.js, is that correct?

I don’t quite get it… when has it stopped and what exactly are you asking for? What kind of notification were you able to receive and how?

I haven’t used iOS HA app, but now I can give it a go so let’s try if you wish…

Thanks for picking it up the project while the author is gone, much appareciated!
I’ve been having some issues with my Hass (camera.stream and google cast) so sometimes it’s freezing so I have to kill the process and restart Hass.
Problem is that today I’ve done that and my alarm was engaged so I believe it just set it to triggered and now I can’t bring the alarm back on at all, this is what I get on Hass:

2019-05-04 10:28:43 ERROR (MainThread) [homeassistant.components.alarm_control_panel] Error while setting up platform bwalarm
Traceback (most recent call last):
  File "/home/hass/homeassistant/lib64/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 126, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/lib64/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  File "/usr/lib64/python3.6/asyncio/coroutines.py", line 212, in coro
    res = func(*args, **kw)
  File "/home/hass/homeassistant/custom_components/bwalarm/alarm_control_panel.py", line 315, in async_setup_platform
    alarm = BWAlarm(hass, config, mqtt)
  File "/home/hass/homeassistant/custom_components/bwalarm/alarm_control_panel.py", line 340, in __init__
    self.init_variables()
  File "/home/hass/homeassistant/custom_components/bwalarm/alarm_control_panel.py", line 440, in init_variables
    self.immediate  = self._states[self._state]["immediate"]
KeyError: 'triggered'

Any idea what can I do here?

PS: I was able to recover from it, just edited the alarm.json to:

“state”: “disarmed”,
“returnto”: “disarmed”,

And then it came back up.
Would be nice to account for that situation as well, if possible.
Thanks!

1 Like

Could you post your component and panel versions here?

Sure thing!

This Panel: v1.3.6
Component (Bwalarm): v1.1.4_ak74

The panel should have _ak74 suffix as well, clear the cache.
That error is strange because a similar one was fixed months ago…
Can you reproduce it and open a new issue here?

Hi AhmadK,

Thanks, I have cleared the cache and the panel is now the new one.
I think that one is different, the alarm was triggered and when trying to restart HASS, it was not loading up the alarm.
I will check to see if I can reproduce it.

Hi I use a working bwalarm (the original), is there a release note to check the differences with your fork?

Not really I’m afraid. Basically it’s currently most of the PRs and fixes (check my post in the original thread and my PRs at Github) that keep this component running rather than “Oops something went wrong”.

I used @gazoscalvertos alarm a long time ago. Then multiple codes were in the works. Is it implemented now? I can’t see that in the configuration description, but it would be great.

I am fine with original features (enough for me). If your fork is just fixes I am glad to install it

Hey, I’ve been “away” from this component for a while, and just upgraded to your version (thanks for keeping the development going!), and I have an issue.

This seems really silly, but I can’t figure out how to gain access to the settings through frontend. I put in the admin password, but nothing happens when I press enter. Regardless of what I put as password. I’ve tried both without any password set (using component default) and by setting one manually. And there’s no “enter” button, or anything to click…

Sorry if this is covered somewhere, but I couldn’t find anything when searching through the (slightly fragmented) documentation and threads.



alarm_control_panel.py version:    1.1.5_ak74
alarm.html version:                1.3.6_ak74
Chrome version:                    73.0.3683.103

EDIT: And I noticed this in my logs, though not every time I tried to access Settings:

https://MYEXTERNALIP/api/panel_custom/alarm:1913:9 Uncaught ReferenceError: sha256_digest is not defined

Currently there is support for per-used codes.
This component imports all existing users from HA, but one can define their own users within the component as far as I understand.

Well, I didn’t 'update’t the docs, just copied them over and made sure the installation bit is up-to-date.
It’s actually mentioned here.

yep, I’m not adding anything fancy but try to keep it going as I’m using the component.

@Aephir what do you call “admin password” and what exactly happens when you enter the password and hit enter ? Have you changed it from the default HG28!!&dn ?
Yes, there is no “enter” button, but it usually works fine.
By the way, if you paste it, there is no need to even hit enter :wink:

Can’t comment on sha256_digest at the moment, have you tried to clear your browser’s cache after upgrading? There is nothing at panels/alarm.html:1913…

2 Likes