YET another take on an alarm system

I may do that, yes. Got another error clicking on the Alarm panel on the left side:

2019-04-25 13:57:45 ERROR (MainThread) [frontend.js.latest.201904240] https://HA_URL:port/api/panel_custom/alarm:2029:37 Uncaught TypeError: Cannot read property ‘classList’ of undefined

0.91.4 works as expected.

I updated to 0.92 as well and i get the same error, - Integration bwalarm not found when trying to verify its alarm_control_panel platform.

I have the proper folder set up as well

My alarm panel now loads fine after I created the manifest.json.
Thanks for that.

2 Likes

Where do you put the file? In the main config directory?

in the custom folder for bwalarm

2 Likes

Firstly, thanks again to @AhmadK for taking over as dev/bug fixer extraordinaire!

Secondly, I’m wondering about whether anyone has done any looking into creating a ‘probability of ingress’ automation? I’ve had two false alarms since I began using this package. One was probably caused by a power blip and using a built in pull up resistor on a hard wired sensor, the other I’m still not sure, maybe sunlight shining on a PIR (but it wasn’t particularly sunny that day and has been much sunnier since!). Anyway. They’re really, really rare BUT when they do happen the stress and disruption is immense. On both occasions I pegged it home and found…absolutely nothing amiss.

I was wondering about creating an automation that somehow monitors whether a second sensor is tripped within (say) a minute of the first being tripped and if so, confirms that there is almost certainly an intruder rather than just a false positive.

Thoughts??

Yup, that was it. I created the manifest.json using your code and it passed the config check.
Thank you for that.
I am currently checking if everything works fine, and if not I may come back.

1 Like

Yes that worked for me also creating the manifest.json….thanks man

Did you restart HA after checking the conf?

Yes, I did and everything went fine.

1 Like

Okay - I’m just facing a few other issues with some other custom components, so I pass the comfiguration check. Hopefully after that get resolved and the reboot has taken place everything will be fine here as well.

Haven’t tried it yet, but apparently Bayesian Binary Sensor might be a solution.
Please let us know if it you can make it work.

Hi I am trying to use this alarm component with my konnected alrm. After I have installed as per instructions, I click on the alarm tab in the left hand side menu and I get a black page with Home Alarm written at the top with nothing else.

In chromes developer tools I see the error below. Can someone point me in the right direction?

Uncaught TypeError: Cannot read property ‘attributes’ of undefined
at HTMLElement.updateTime (alarm:2196)
at Object.z [as fn] (app.7ac4ac3c.js:2)
at k (app.7ac4ac3c.js:2)
at w (app.7ac4ac3c.js:2)
at HTMLElement._propertiesChanged (app.7ac4ac3c.js:2)
at HTMLElement._flushProperties (app.7ac4ac3c.js:410)
at HTMLElement._flushProperties (app.7ac4ac3c.js:2)
at HTMLElement.ready (app.7ac4ac3c.js:2)
at HTMLElement.ready (app.7ac4ac3c.js:2)
at HTMLElement.ready (alarm:1460)

code starting at the error.

   if (this.alarm.attributes.panel){
          if (this.alarm.attributes.panel.enable_clock){
            if (this.hass.states['sensor.time'] == null){
              this.error('Time Sensor (sensor.time) not found in HA');
              return;
            }

            this.time = this.hass.states['sensor.time'].state;

            if (this.alarm.attributes.panel.enable_clock_12hr)
              if ((parseInt(String(this.time).split(':')[0]) - 12) > 0 )
                this.time = String( parseInt( String(this.time).split(':')[0] ) - 12 ) + ":" + String(this.time).split(':')[1];
          }
        }
      }

Any help is greatly appreciated.

Thanks,

Ben

updatin gto 0.92 gives this error, any clue?

2019-04-27 15:14:52 ERROR (MainThread) [homeassistant.setup] Error during setup of component alarm_control_panel
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/homeassistant/setup.py”, line 156, in _async_setup_component
component.setup, hass, processed_config) # type: ignore
AttributeError: module ‘custom_components.alarm_control_panel’ has no attribute ‘setup’

plus also create an empty __init__.py and place this with the file above in the same folder as the bwalarm component

1 Like

I only created manifest.json and have no issues after updating to 0.92.0

Same, but others have had to create the __init__.py file also to get not just this but other custom components to work

Ok, I’ve just created a fork of this alarm panel that incorporates most of fixes/PRs to the original one (up to HA 0.92.0 inclusive) and you can check it out here.
Not sure if I need to create a separate topic for it… thoughts?

Open to ideas/suggestions. Enjoy!

3 Likes

As it’s only a temporary thing I reckon here is good. Unless you start adding features and the fork drifts to a project of it’s own.

Thanks for doing this.

nice work with the fork

only query i have is the folder structure for the great migration
in your fork you have
custom_components/alarm_control_panel/bwalarm/alarm_control_panel.py
should it not be
custom_components/bwalarm/alarm_control_panel.py

2 Likes