YET another take on an alarm system

I just upgraded to new hassio 0.83.1 and the latest version of the alarm and now I’m getting this in the log:
I’ve tripple checked countdown360.js and it’s the exact same file as in Git. Only confusing thing is the path, I have the file in /config/www/lib/ but the error message refers to /local/lib ?

http://xxxxxx:8123/local/lib/jscolor.js:532:50 TypeError: undefined is not an object (evaluating 'e.path[0]')
http://xxxxxx:8123/local/lib/countdown360.js:7:0 SyntaxError: Unexpected token '<'

/config/www is /local

That’s what I thought, but just wanted to make sure.

The errors just keeps coming… There isn’t any < at row 7 on countdown360.js, it’s like there is some cache in HA somewhere that has the old version?

http://xxx:8123/local/lib/jscolor.js:551:50 TypeError: undefined is not an object (evaluating 'e.path[0]')
http://xxx:8123/local/lib/countdown360.js:7:0 SyntaxError: Unexpected token '<'

seeing a very odd error in my hassio log when rebooting with this updated component:

2018-12-01 19:12:29 ERROR (MainThread) [homeassistant.components.alarm_control_panel] Error while setting up platform bwalarm
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 212, in coro
    res = func(*args, **kw)
  File "/config/custom_components/alarm_control_panel/bwalarm.py", line 324, in async_setup_platform
    alarm = BWAlarm(hass, config, mqtt)
  File "/config/custom_components/alarm_control_panel/bwalarm.py", line 349, in __init__
    self.init_variables()
  File "/config/custom_components/alarm_control_panel/bwalarm.py", line 443, in init_variables
    self._timeoutat = pytz.UTC.localize(datetime.datetime.strptime(self._persistence_list["timeoutat"].split(".")[0].replace("T"," "), '%Y-%m-%d %H:%M:%S')) if self._persistence_list["timeoutat"] != None else None
  File "/usr/local/lib/python3.6/_strptime.py", line 565, in _strptime_datetime
    tt, fraction = _strptime(data_string, format)
  File "/usr/local/lib/python3.6/_strptime.py", line 365, in _strptime
    data_string[found.end():])
ValueError: unconverted data remains: +00:00

I’m on latest bwalarm, and hassio 0.80.3

EDIT: aha, seems to happen when I enable persistence. Turned it off, rebooted and the alarm is functioning again. Is this a UTC / localisation issue prehaps?

Hi @gazoscalvertos and other,

Need your help. I am trying to integrate the keyfob into alarm system. I have return the automation part which I receive a message when key is pressed but I am not sure how to call Alarm to activiate using ‘armed_away’ or ‘armed_home’, etc. Below is my automation piece for keyfob.

- id: fob_warning
  alias: 'Key Fob Armed'
  trigger:
    - event_type: zwave.scene_activated
      platform: event
      event_data:
        entity_id: zwave.aeotec_zw088_key_fob_gen5_3
        scene_id: 1  
  action:
    - data:
        message: 'KeyFob On'
      service: notify.Telegram

- id: fob_warning
  alias: 'Key Fob Disarmed'
  trigger:
    - event_type: zwave.scene_activated
      platform: event
      event_data:
        entity_id: zwave.aeotec_zw088_key_fob_gen5_3
        scene_id: 3  
  action:
    - data:
        message: 'KeyFob Off'
      service: notify.Telegram
    - data:
      service: 
      entity_id: alarm_control_panel.house 

Thank you and looking forward for some answers. Desperately need solution for new home as my wife is not able to use GUI and MQTT stopped working for me :slight_smile:

call this service in your automation action to arm the alarm:

  - service: alarm_control_panel.alarm_arm_away
    entity_id: alarm_control_panel.house

and if you want to disarm:

  - service: alarm_control_panel.alarm_disarm
    entity_id: alarm_control_panel.house
    data:
      code: 1234

(replacing the code above with your actual code)

@sparkydave

Thanks for prompt reply. This is awesome. it works great.

Thanks again.

Hi I am a happy user of the old alarm system (need just a fix in Lovelace in which the card is not working so I use a panel).

Any advantages of using the new alarm system?

Well the old one is no longer maintained as the new version was made the master version on github
For me it was an easy transition, and i started from scratch my config as this was easier

Apart from new GUI. multi-user support, show who use the alarm, Config individual, sensor, camera, custom and more.

Is this how it’s supposed to look on an iPhone? It’s seams like there are some css classes missing?

When I type in the code my numbers show up on-top of the first button row (1,2,3) and I can’t imagine that’s by design?
I’m confident I’ve updated all files according to the Github readme but something must be wrong.

I also see errors like this in the log:

[frontend.js.latest.201811211] http://xxx:8123/local/lib/countdown360.js:7:0 SyntaxError: Unexpected token '<'
[frontend.js.latest.201811211] http://xxx:8123/local/lib/jscolor.js:551:50 TypeError: undefined is not an object (evaluating 'e.path[0]')

Running Hass.io 0.83.2

Nope.l you’re right. I see that in the readme now, I followed this. Will raise a PR

@gazoscalvertos, is there any hope of getting the keypad scaled to screen?
On my landscape-mounted 7" tablet the bottom row is almost unreachable and one has to scroll to press the Disarm button, very inconvenient.

This seams to only happen when I’m accessing from the iOS app.

2018-12-02 14:06:13 ERROR (MainThread) [frontend.js.latest.201811211] http://xxx:8123/local/lib/jscolor.js:551:50 TypeError: undefined is not an object (evaluating 'e.path[0]')
2018-12-02 14:06:18 ERROR (MainThread) [frontend.js.latest.201811211] http://xxx:8123/local/lib/jscolor.js:551:50 TypeError: undefined is not an object (evaluating 'e.path[0]')
2018-12-02 14:06:18 ERROR (MainThread) [frontend.js.latest.201811211] http://xxx:8123/local/lib/jscolor.js:532:50 TypeError: undefined is not an object (evaluating 'e.path[0]')
2018-12-02 14:11:15 ERROR (MainThread) [frontend.js.latest.201811211] http://xxx:8123/local/lib/jscolor.js:551:50 TypeError: undefined is not an object (evaluating 'e.path[0]')
´´´

I use wallpanel on a Nexus 7 2013 and I’ve scaled the entire thing in wallpanel’s settings. I had the same problem of showing half the touchpad before as well. Now everything looks & works great.

Thanks for sharing your experience.
The thing is I had no problems with an old version of this alarm panel. And it looks good on computer and my phone, but the tablet’s version looks much worse, hence the question.

Just tried the Wallpanel’s scaling option and have to say I don’t like it. The only reasonable scaling is 50%, but it’s way too small even for buttons, let alone switching between alarm panel and the rest of HA.
Hence the proper automatic scaling is badly needed…

Hi,

I have issues with some Ikea PIR sensors which behave unexpectedly when they have low batteries. I would rather that they are disabled as alarm sensors when the battery level drops bellow a certain %.

The battery levels are reported in home assistant - is there anyway to build this into the alarm? or should I just have home assistant somehow disable the sensor altogether.

I’m looking at moving some features across from HomeKit, specifically the alarm system I’d created by stringing together scripts and automations.

One more request I’m afraid.

I prefer to have a final exit button, this is a button at my front door which is used to confirm setting the alarm, you quite often see these in commercial alarm systems. I use this because quite often I will set the alarm, and then mess around getting the dog ready, or the other half will need to dart back in for something, so once we are all outside the button acts as confirmation to set the alarm.

To be clear the current automations work as follow:

  • I “set” the alarm using a fake switch in HomeKit
  • Homekit kicks off the exit siren etc
  • I get outside the door, close it, and then press the button
  • The alarm is then “set” and usual away alarm rules apply

Would I be able to do this using this plugin?

@gazoscalvertos thanks for keeping this panel fresh.

I’ve just updated and taken your advice to start with a blank alarm.yaml, but I’m lost as to what elements to add or what bits from my old alarm.yaml are still valid.

Do you have a populated example you can post to github please?

@DZMM, you don’t need anything other than the default blank alarm.yaml file with this in it:

platform: bwalarm
name: House

Everything is now set up in the GUI. Start at the first settings page and work your way through.