YET another take on an alarm system

Getting some errors after upgrading to 0.92:

2019-04-25 00:09:55 ERROR (MainThread) [frontend.js.latest.20190424
0] https://ha_url:port/frontend_latest/app.7ac4ac3c.js:2:60
391 Uncaught TypeError: Cannot convert undefined or null to object

Any ideas what is going on?

Thanks!

Have you tried clearing your browser cache?

I did, yes and also tried other browsers.
That happened as soon as I upgraded to 0.92, I will downgrade to 0.91.4 and wait to see if someone else has the same problem.

Is that correct that you havenā€™t changed anything in your alarm panel, just updated HA to 0.92?
If so, Iā€™d suggest to open a new issue on HA github.
The error message is absolutely unclear and impossible to debug :\

OK, I havent updated since 0.86 and the posts here are too many. I read most of them but I still didnt manage to update this alarm panel. I changed the location and renamed bwalarm.py but I am getting this error when I check my config:

Integration bwalarm not found when trying to verify its alarm_control_panel platform.

Any help on what I am missing, would be appreciated. I am on 0.92

just confirming you renamed the folder to bwalarm and renamed bwalarm.py to alarm_control_panel.py

also custom components require a manifest.json file since 0.92

try creating a manifest.json file with the following inside

{
  "domain": "bwalarm",
  "name": "Yet another take on an alarm",
  "documentation": "https://github.com/gazoscalvertos/Hass-Custom-Alarm",
  "dependencies": [],
  "codeowners": [],
  "requirements": []
}
3 Likes

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ā€™