GithubHelp home page GithubHelp logo

gazoscalvertos / hass-custom-alarm Goto Github PK

View Code? Open in Web Editor NEW
221.0 49.0 94.0 1.64 MB

Yet another take on a home assistant custom alarm

Python 14.98% HTML 49.59% JavaScript 22.46% CSS 12.97%
home assistant home-assistant hass home-assistant-config alarm

hass-custom-alarm's Introduction

Home Assistant - Custom Alarm Interface!

Intro :-)

Welcome my fellow modders, tinkerers, home assistant wizards!!

Follow the thread here

Consider donating to this project to keep it going as anything contributed will be placed back in to enable more hardware integration, new features and bug squashing.

This is very much a community project so if you wish to chip in then please do!! I could really use a CSS, animation, design guru to make this look amazing. Also please feel free to leave comments, suggestions, enhancements and fixes!!

NOTE!!! MAJOR CHANGE It's time to publish the New UI and settings into the master release.

Installation

You will need to copy the following files into your home assistant configuration directory

alarm.yaml This files stores your alarm configuration. An options page will be created for this file custom_components/alarm_control_panel/bwalarm.py The brains of the operation. This is the logic of the custom alarm system panels/alarm.html This is the interface for the custom alarm component. It's actually optional as the alarm will function without it but recommended for ease of setup www/alarm/[ALL FILES] These files control how the interface looks and feels www/lib/[ALL FILES] These files add additional functionality to the interface in order to work www/images/ha.png An image file used for the interface log

To get things working with Home Assistant (HA) you will need to adjust your configuration.yaml to instruct HA to use your new custom alarm component, add the following to this file:

alarm_control_panel: !include alarm.yaml

You will also need to tell HA where your new panel interface file is. Also add the following to your configuration.yaml:

panel_custom: !include panel_custom.yaml

You may need to restart HA if the component doesn't load first time as HA will need to install a dependency (ruamel.yaml).

It's advisable to start with a new alarm.yaml file with the minimum configuration set:

platform: bwalarm
name: House

Your new interface can be used to modify your alarm.yaml directly.

The default password to access the settings page is: HG28!!&dn

Please test and provide feedback/suggestions.

Features:

  • State specific groups and times (NEW)
  • User specific codes
  • Panic Mode
  • MQTT Integration
  • Floorplan Integration
  • Alarm State Persistence on reboots/power restore
  • Lockout of HA sidebar when armed
  • Custom Panel allowing your own html to display whatever you choose (Cameras, Sliding Images etc)
  • Passcode Attemps/Lockout
  • Support for custom device states
  • Code panel 0-9 on disarm only
  • Weather Status (Optional) - NOTE: Weather sensor nows supports generic sensors (sensor.weather_summary & sensor.weather_temperature) if these are not found then it will default to the dark sky sensors (sensor.dark_sky_summary & sensor.dark_sky_temperature)
  • Perimeter Mode (Optional) - I use this to only arm a particular set of sensors (doors) whilst I'm using all floors.
  • Masks passcode on entry
  • clock display (Optional)
  • Digit code entry on disarm
  • Themed colours depending on alarm state
  • Countdown timer on 'Pending' state
  • Notification of Open Sensors with the option to override
  • Information/Debug panel

Testing

  • Tested on HA v0.87 and below.

Change Log:

  • 10/02/19:

  • [REQUEST] Added option to hide sensors when alarm armed

  • [REQUEST] Added option to display in fahrenheit

  • [FIX] Panel lockout display

  • [FIX] HA 0.87 compatibility

  • [REQUEST] Included switches into the sensor lists as requested

  • [ENHANCEMENT] Modified the layouts due to polymer changes

  • 27/11/18:

  • [FEATURE] Adding some basic error handling which will be enhanced at a later date

  • [FIX BUG] Fixed margin issue in firefox (settings)

  • [REQUEST] Sorted sensors alphabetically

  • [FIX BUG] Fixed clock, serif, weather, passcode display issues

  • 22/11/18:

  • Quite a few bugs and issues have been resolved on this release. There has also been a number of changes to the config file layout so you are likely required to start from scratch as the users, themes and panel settings have changed.

  • Updated alarm.html to 1.3.3

  • Updated bwalarm.py to 1.1.3

  • fixed duplicate sensors in settings panel

  • fixed passcode attempts setting

  • fixed code to arm display issues

  • fixed persistant mode

  • fixed sesnor groups

  • fixed code to arm panel display and alignment

  • reformated logs

  • fixed log (displaying name and image)

  • removed windows line feed

  • integrated HASS users into alarm automatically however these initially are disabled

  • fixed switch breaks on service call

  • fixed themes

Note!

Beware, here be dragons! There may be bugs, issues whilst I get this off the ground and there will definately be design problems when used with different size browsers etc. Hopefully we can conquer these in due course!..

Thanks!

Thanks to the community for all the input into this.

Consider supporting this project and donate! All funds will go towards bringing new features, hardware support and bug squashing!!

  • BTC Address: 1NFeyzpKKiKbBYSmCLQZQLxBqJbhSbqmwd
  • LTC Address: LTUViN3QUESkQk3mG2hvTzhLRQPVAd269f
  • XRP Address: rwuMp76ht6dmGvipxwKr5ZE6VpF7ZKC7qs
  • ETH Address: 0xCbeD2D2cf0434370c1ca126707009b876b736609
  • Paypal: [email protected]

Credits

A great countdown JS that I have slightly modded

hass-custom-alarm's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hass-custom-alarm's Issues

Warning mode

Hey! That's an awsome project !

Just one question... Why when i have a delayed sensor trigger, open and close, warn mode doesn't disapear ?
alarm armed (black) -> sensor trigger (open) -> Warn mode (orange) -> sensor trigger (close) -> alarm mode (red)
I think that will be :
alarm armed (black) -> sensor trigger (open) -> Warn mode (orange) -> sensor trigger (close) -> alarm armed (black)

Mostly for motion sensors if it detect presence for X seconds...

[COMPATIBILITY] Display on older IOS version

Im trying to setup an old iPad (gen 3) as a alarm controller - It will display 24/7 the alarm panel. However when trying to access the Alarm panel from the HA app nothing appears but there is a message at the bottom "service system_log/write called.

Ive tried on newer iPad's, iPhone's, different browser all with the same message?

Any help?

MQTT ARM_AWAY does not work

Hi,
I am on HA v0.81.0 and bwalarm v1.0.4.

When sending an MQTT message to arm the alarm, I am getting this error in the logs:

2018-10-29 10:45:14 ERROR (MainThread) [homeassistant.core] Error doing job: Exception in callback <bound method MQTT._mqtt_handle_message of <homeassistant.components.mqtt.MQTT object at 0x7fd5e41695f8>>
Traceback (most recent call last):
  File "uvloop/cbhandles.pyx", line 66, in uvloop.loop.Handle._run
  File "/usr/src/app/homeassistant/components/mqtt/__init__.py", line 775, in _mqtt_handle_message
    subscription.callback, msg.topic, payload, msg.qos)
  File "/usr/src/app/homeassistant/core.py", line 327, in async_run_job
    target(*args)
  File "/config/custom_components/alarm_control_panel/bwalarm.py", line 668, in message_received
    self.alarm_arm_away('')
  File "/config/custom_components/alarm_control_panel/bwalarm.py", line 485, in alarm_arm_away
    self.process_event(Events.ArmAway)
  File "/config/custom_components/alarm_control_panel/bwalarm.py", line 577, in process_event
    self._hass.services.call("switch", "turn_on", {self._warning})
  File "/usr/src/app/homeassistant/core.py", line 1070, in call
    self._hass.loop
  File "/usr/src/app/homeassistant/util/async_.py", line 138, in run_coroutine_threadsafe
    raise RuntimeError('Cannot be called from within the event loop')
RuntimeError: Cannot be called from within the event loop

The MQTT message is send from within a script:

alarm_arm_away:
  alias: Alarm Arm Away
  sequence:
    - service: mqtt.publish
      data:
        topic: 'home/alarm/set'
        payload: 'ARM_AWAY'

alarm_disarm:
  alias: Disarm Alarm
  sequence:
    - service: mqtt.publish
      data:
        topic: 'home/alarm/set'
        payload: 'DISARM'

My configuration is based on the default:

##[MQTT RELATED]
#[OPTIONAL] - False by default. Settings this to True will enable MQTT Mode. Uncomment options below to use See the README for guidance.
mqtt: True 
#[OPTIONAL] False by default. if true allows MQTT commands to disarm the alarm without a valid code.
override_code: True 
#[OPTIONAL] The MQTT topic HA will publish state updates to.
#state_topic: 'home/alarm' 
#[OPTIONAL] The MQTT topic HA will subscribe to, to receive commands from a remote device to change the alarm state.
command_topic: 'home/alarm/set' 
#[OPTIONAL] The maximum QoS level for subscribing and publishing to MQTT messages. Default is 0.
#qos: 0 
#[OPTIONAL] The payload to disarm this Alarm Panel. Default is “DISARM”.
payload_disarm: "DISARM" 
#[OPTIONAL] The payload to set armed-home mode on this Alarm Panel. Default is “ARM_HOME”.
payload_arm_home: "ARM_HOME" 
#[OPTIONAL] The payload to set armed-away mode on this Alarm Panel. Default is “ARM_AWAY”.
payload_arm_away: "ARM_AWAY" 
#[OPTIONAL] The payload to set armed-night mode on this Alarm Panel. Default is “ARM_NIGHT”.
payload_arm_night: "ARM_NIGHT" 

Can confirm the alarm_disarm script works as expected. Calling the alarm_arm_away script causes this error. Tried isolating the problem as well by calling the MQTT publish service directly using these parameters:

{
"topic":"home/alarm/set",
"payload":"ARM_AWAY"
}

Same error:

2018-10-29T11:04:11.236237936Z 2018-10-29 11:04:11 ERROR (MainThread) [homeassistant.core] Error doing job: Exception in callback <bound method MQTT._mqtt_handle_message of <homeassistant.components.mqtt.MQTT object at 0x7faf183d4f28>>
2018-10-29T11:04:11.236292353Z Traceback (most recent call last):
2018-10-29T11:04:11.236304191Z   File "uvloop/cbhandles.pyx", line 66, in uvloop.loop.Handle._run
2018-10-29T11:04:11.236312654Z   File "/usr/src/app/homeassistant/components/mqtt/__init__.py", line 775, in _mqtt_handle_message
2018-10-29T11:04:11.236320738Z     subscription.callback, msg.topic, payload, msg.qos)
2018-10-29T11:04:11.236328408Z   File "/usr/src/app/homeassistant/core.py", line 327, in async_run_job
2018-10-29T11:04:11.236336480Z     target(*args)
2018-10-29T11:04:11.236343735Z   File "/config/custom_components/alarm_control_panel/bwalarm.py", line 668, in message_received
2018-10-29T11:04:11.236351601Z     self.alarm_arm_away('')
2018-10-29T11:04:11.236359243Z   File "/config/custom_components/alarm_control_panel/bwalarm.py", line 485, in alarm_arm_away
2018-10-29T11:04:11.236368628Z     self.process_event(Events.ArmAway)
2018-10-29T11:04:11.236376610Z   File "/config/custom_components/alarm_control_panel/bwalarm.py", line 577, in process_event
2018-10-29T11:04:11.236384942Z     self._hass.services.call("switch", "turn_on", {self._warning})
2018-10-29T11:04:11.236391272Z   File "/usr/src/app/homeassistant/core.py", line 1070, in call
2018-10-29T11:04:11.236395969Z     self._hass.loop
2018-10-29T11:04:11.236400297Z   File "/usr/src/app/homeassistant/util/async_.py", line 138, in run_coroutine_threadsafe
2018-10-29T11:04:11.236404850Z     raise RuntimeError('Cannot be called from within the event loop')
2018-10-29T11:04:11.236409428Z RuntimeError: Cannot be called from within the event loop
2018-10-29T11:04:11.237437077Z /usr/src/app/homeassistant/util/async_.py:29: RuntimeWarning: coroutine 'ServiceRegistry.async_call' was never awaited
2018-10-29T11:04:11.237453721Z   return loop.run_until_complete(main)

This is a critical error because HA is unable to recognise the alarm panel afterwards. (the following log is generated when clicking on the ARM Away button in the alarm panel frontend.

2018-10-29T11:05:00.034213092Z 2018-10-29 11:05:00 WARNING (MainThread) [homeassistant.core] Unable to find service alarm_control_panel/

Enabling MQTT breaks Interface

Describe the bug
Enable MQTT, and you can no longer access the interface.

The error below is reported. Only by deleting the MQTT section from the yaml was I able to get back into the interface. Enabling it promptly broke it again.

Whoops!
Something went wrong with your alarm component!
The following errors have been plucked from the Home Assistant log:

Home Assistant: v0.83.2

This Panel: v1.3.4

Overriden sensor trigger the alarm

Dear friend.
When I activate the alarm with an open window, it warns of this one and if you press override it, it is activated with that ignored sensor. After a while the alarm is activated randomly by this sensor.

Thanks!

[BUG] Slow load when using TLS

Slow loading with using certificates

This is due to the override of the weather colour icon. Need to find an alternative method for this.

Multi-User Functionality

Unable to add alternative user.

It is calling ALARM_YAML_USER but I'm not seeing any changes to the alarm.yaml nor am I seeing any addition files in my hassio config.

I add a name, a password, but I do not add an image.
I input user "test" with password "1111" and no image.

When I arm away or arm home after a few seconds I will see it write but the alarm will not change from Disarm to Arm Home or Away. When I use the master code it arms immediately.

I restarted HA expecting "ruamel.yaml" to be added.
Manually added "ruamel.yaml"

Is there a file I need to add?

MQTT active HASS not starting

Hi,

Last week i upgraded to the newest hass version 0.80.2
Now when starting hass the frontpage isnt loading anymore. In the log i cant find any error.

The solution for now is:

  1. use the old bwalarm.py (arm and disarm isn't working)
  2. Disable mqtt

so the problem is mqtt when i set "mqtt: false" everything working fine. (except mqtt)

in 0.80 there are some changes with mqtt and alarm_panel

Remove discovered MQTT alarm_control_panel device when discovery topic is cleared (@emontnemery - #16825) (alarm_control_panel.mqtt docs)
Remove discovered MQTT light device when discovery topic is cleared (@emontnemery - #16824) (light.mqtt docs)

Can you help me to solve this problem.

Feature request

Hi,

Would it be possible to do a similar python app where in home assistant where you input an image of an electricity meter and home assistant would calculate what your bill would be and email that image directly to the municipality and you would get an an notification to take an image every month?

Kind Regards,
Johan

override sensors remain ignored after arming, and immediate sensors don't trigger during warning

related to #15

I noticed an issue with “override sensors”. I have set up my armed_away mode as follows:

 armed_away: 
  #[OPTIONAL] State specific overrides default time above
  trigger_time: 600  
  ##[OPTIONAL however either an immediate or delayed group must exist] Sensors in this group tigger the alarm immediately 
  immediate:
    - binary_sensor.door_side_garage
    - binary_sensor.window_office
    - binary_sensor.window_living_room
    - binary_sensor.window_dining_room
    - binary_sensor.window_master_bedroom
  ##[OPTIONAL] Sensors in this group start the clock (pending_time) when tripped before the alarm is triggered 
  delayed:
    - binary_sensor.door_front
    - binary_sensor.door_garage
  #[OPTIONAL] Use this group to automatically override the warning message on open sensors when arming. (I use this as I have a motion sensor at the front door)
  override:
    - binary_sensor.motion_hall
    - binary_sensor.motion_living_room

I specified “override” for the motion sensors for the same reason as specified in the comments- I need to be able to walk around the doors while arming and leaving. That works.

However, once the alarm is armed_away, the motion sensors remain on the inactive list, and do not trigger the siren if there is motion. Really, they should only be ignored while in the pending arming stage, and they should trigger the siren immediately if there is motion after arming.

Furthermore, it appears that immediate zones do not trigger during the re-entry warning state. That doesn’t seem right.
If the alarm is armed away, and I open the front door, it starts the warning count-down ok- but if I then open or break a window while still counting-down, it really should trigger the alarm. And in this state, the motion detectors should be overridden to allow walking down the hall to turn off the alarm.
Based on the comments, it seems that’s what the override option in alarm.yaml is intended for, but it’s not working that way.

interface crashes Hass.io

in Hass.io, when I opening the alarm interface, I'm greeted with a hollow red circle and the whole interface crashes,

Error was:
alarm:462 Uncaught TypeError: Cannot read property 'attributes' of undefined
at HTMLElement.updateTime (alarm:462)
at Object.runMethodEffect [as fn] (app-084b7564.js:1067)
at runEffectsForProperty (app-084b7564.js:1067)
at runEffects (app-084b7564.js:1067)
at HTMLElement._propertiesChanged (app-084b7564.js:1067)
at HTMLElement._flushProperties (app-084b7564.js:1446)
at HTMLElement._flushProperties (app-084b7564.js:1067)
at HTMLElement.ready (app-084b7564.js:1067)
at HTMLElement.ready (app-084b7564.js:1101)
at HTMLElement.ready (alarm:270)

any ides????

Version .79.3

[FIX] Pending Timer Accuracy When Refreshing Panel

When the alarm is in the pending stage between disarmed and armed_away or armed_home the timer resets if you move to another tab in homeassistant and then back to the alarm panel tab. I did notice the alarm will enter a new state after 60 seconds regardless of the time on the alarm panel resetting back to what ever time you have set. For instance I have a pending time of 60 secs set, I would move to another tab and back to the alarm tab and the timer would reset to 60 seconds and start counting down again. After 60 seconds passed no matter what number showed on the alarm panel the alarm would enter the state I had initially set.

Not compatible with HA 0.82.0 - invalid service data/breaks (newUI)

Describe the bug
Unable to use on HA 0.82.0, and likely other 0.80+ versions

To Reproduce
Steps to reproduce the behavior:
Install on 0.82.0

Expected behavior
Panel appears, activates/deactivates

Screenshots

2018-11-05 22:43:32 ERROR (MainThread) [homeassistant.core] Invalid service data for switch.turn_on: expected a dictionary. Got {‘automation.alarm_warning’}
2018-11-05 22:43:43 ERROR (MainThread) [homeassistant.core] Invalid service data for switch.turn_off: expected a dictionary. Got {‘automation.alarm_warning’}

fixed by changing to:

self._hass.services.call(“switch”, “turn_on”, {‘entity_id’:self._config.get(CONF_WARNING)})
self._hass.services.call(“switch”, “turn_on”, {‘entity_id’:self._config.get(CONF_ALARM)})

at all locations which were previously:

self._hass.services.call(“switch”, “turn_on”, {self._config.get(CONF_WARNING)})
self._hass.services.call(“switch”, “turn_on”, {self._config.get(CONF_ALARM)})

Fix in the attached Diff from bwalarm.py v1.1.2:
bwalarm-diff1.txt

also diff for alarms.html (missing two break statements)
alarmshtml-diff1.txt

[MQTT] Warning Mode

I set this component up to work the the MQTT control panel app. However, when the alarm goes to warning, the app does not update. I think the cause of this is that the app can only receive these payloads: disarmed, armed_away, armed_home, pending, triggered.
Can this bug be easily fixed on your side or should I contact the app's developer?

On another note, why can't I set the alarm to armed_home when it set to armed_away via a service call? I made some physical buttons to arm the alarm to home and away. However, sometimes I press the wrong button (ie, I arm the alarm to home instead of away). As a result, I have to disarm the alarm and then arm it away again.

Error on Custom Panel

Hi @gazoscalvertos,

I started noticing this error I think after upgrading Hassio to 0.63, I'm on vr 0.64.3 now and just updated the Hass-Custom-Alarm to the most recent version. I am still getting this error. It doesn't seem to affect functionality, but it happens every time I load the panel:

2018-03-09 23:29:44 ERROR (MainThread) [frontend.js.latest.201802270] https://myhomeassistant.duckdns.org:8123/frontend/panels/alarm-001f97509c39e788542bd2b51deb052d.html:448:86 Uncaught TypeError: Cannot read property 'state' of undefined

Any ideas what this might be?

Make versioning clearer

Hi,
I'm having a hard time figuring out what the latest version of this component is.
There is a tag v1.3.1 and bwalarm.py contains:

  VERSION:  1.1.0
  MODIFIED: 03/08/18

It seems that version number refers to alarm.html which is being versioned separately to the Python component. It might help not to version these separately and instead include a version in the Readme file.

The master branch contains this information in bwalarm.py:

  VERSION:  1.0.4
  MODIFIED: 16/10/18

The new UI branch contains yet another version but with the same modified date:

  VERSION:  1.1.2
  MODIFIED: 16/10/18

Which one is the latest, stable released version? I would be happy to help explain versioning. Convention is that master contains released code and a corresponding version tag exists to mark that version in time. :)

Great work by the way, can't wait to see what's to come! :)

iOS 11.2.6 - Alarm Panel Fails to Load

In Safari and Chrome, when I load the alarm panel directly (http://hahost:8123/alarm), the page fails to load with just a spinning icon.

I can load all my other tabs on first try. If I switch to a different tab and then back to alarm it will load. I basically want a shortcut to load right into the alarm panel and this makes it so I can't do that.

Do you have an iPhone you can test with? Do you need any logs from me?

This process works fine for me on Android.

image

[QUESTION] UndefinedError: 'trigger' is undefined

Automations based on a 'to: armed_away' don't have access to trigger in their data_template.

Works:

- id: alarm_disarmed
  alias: '[Alarm] Disarmed'
  trigger:
  - platform: state
    entity_id: alarm_control_panel.house
    to: 'disarmed'
  action:
    - service: xiaomi_aqara.stop_ringtone
      data:
        gw_mac: XXX
    - service: script.sms_message
      data_template:
        message: '{{ trigger.to_state.name }}: {{ trigger.to_state.state }}'

Doesn't work:

- id: alarm_armed_away
  alias: '[Alarm] Away Mode Armed'
  trigger:
  - platform: state
    entity_id: alarm_control_panel.house
    to: 'armed_away'
  action:
    - service: script.sms_message
      data_template:
        message: '{{ trigger.to_state.name }}: {{ trigger.to_state.state }}'

Bug on update to newUI

Describe the bug
The Alarm page does not render properly on 0.82.1 on hassio
Log gives: https://homely.luz.com/api/panel_custom/alarm:1897:5 Uncaught ReferenceError: $ is not defined

To Reproduce
Steps to reproduce the behavior:
Install alarm panel newUI branch with old alarm instructions
Restart Hassio
Navigate to alarm panel

Expected behavior
Correctly rendered page display

Screenshots
If applicable, add screenshots to help explain your problem.

Browser (please complete the following information):
Chrome

New UI Mobile

I have found two issues with the mobile phone one is that the layout will not work over https connection which is the first log. Second in the settings menu while connecting locally it will not allow me to go anywhere but the main page this is the second log. Let me know if you need more.

Log Details (ERROR)
Sat Oct 20 2018 09:08:28 GMT-0500 (Central Daylight Time)

https://xxxxx.duckdns.org/api/panel_custom/alarm:377:72 Uncaught TypeError: Cannot read property 'disarmed' of undefined

Log Details (ERROR)
Sat Oct 20 2018 09:07:35 GMT-0500 (Central Daylight Time)

http://local:8123/api/panel_custom/alarm:1971:20 Uncaught TypeError: Cannot read property 'includes' of null

Custom interface broken in .79.3

When opening the alarm interface, I'm greeted with a hollow red circle and the whole interface crashes, requiring a browser reload of the page to do anything. Clicking on the alarm interface again crashes it again.

The button from the overview page works as expected.

Version .79.3

[FEATURE REQ] Silent Mode

Thanks for all your work on this. I'd like to have an option to for a silent mode. Meaning if triggered I want to get my push bullet notifications but not turn on the siren. I know I can comment out the action - entity_id: switch.siren service: switch.turn_on
but I would like the option in the Alarm panel to control if the siren will go off if alarm is triggered.

Can't arm Perimeter Mode.

I can see the night service being called but it doesn't change state. It remains disarmed. However, I can successfully call it under dev tools.

I made sure that Perimeter mode is enabled on my config.

edit 1 - It appears that the alarm doesn't like the lock.NAME style locks. I have since remove them and its all back to normal.

edit 2- error received

Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/lib/python3.4/asyncio/tasks.py", line 233, in _step result = coro.throw(exc) File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/core.py", line 1031, in _event_to_service_call yield from service_handler.func(service_call) File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/alarm_control_panel/__init__.py", line 142, in async_alarm_service_handler yield from getattr(alarm, method)(code) File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__ yield self # This tells Task to wait for completion. File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup value = future.result() File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result raise self._exception File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run result = self.fn(*self.args, **self.kwargs) File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/alarm_control_panel/__init__.py", line 212, in alarm_arm_night raise NotImplementedError() NotImplementedError

Support of multilangages

Hello
This is an awesome component:)
For a non English usage, is it possible to have support for others languages like French, Spanish ...
The ideal solution would be implementation of labels directly in the config file?
Another usage could be multi zone management : separate apartement?
With regards

NEW UI **BUG** "Home" and "Away" Disappear

I had open sensors that were not selected to be overridden. When I attempted to arm the alarm, the "Home" and "Away" buttons disappeared and I had to reload the page to be able to set the alarm.

I'll attach my alarm.yaml below:
alarm_panel_bug_yaml_file


platform: bwalarm
name: House
panel:
cameras: []
panel_title: Password is password
enable_clock: true
enable_clock_12hr: true
enable_sensors_panel: true
states:
armed_away:
immediate: []
delayed:
- binary_sensor.motion_sensor_158d00023d8ac1
- binary_sensor.door_window_sensor_158d00020b7bc1
- binary_sensor.motion_sensor_158d000239866f
- binary_sensor.motion_sensor_158d00023db67a
- binary_sensor.door_window_sensor_158d00020b5564
- binary_sensor.motion_sensor_158d00023972e0
- binary_sensor.door_window_sensor_158d0002394353
- binary_sensor.door_window_sensor_158d00023eb1a1
- binary_sensor.door_window_sensor_158d000245b370
- binary_sensor.motion_sensor_158d00023938eb
- binary_sensor.door_window_sensor_158d00020b7c28
- binary_sensor.door_window_sensor_158d000208e169
override:
- binary_sensor.motion_sensor_158d00023d8ac1
- binary_sensor.motion_sensor_158d00023db67a
- binary_sensor.motion_sensor_158d00023938eb
pending_time: 0
warning_time: 0
trigger_time: 600
armed_home:
immediate: []
delayed:
- binary_sensor.motion_sensor_158d00023d8ac1
- binary_sensor.door_window_sensor_158d00020b7bc1
- binary_sensor.motion_sensor_158d000239866f
- binary_sensor.motion_sensor_158d00023db67a
- binary_sensor.motion_sensor_158d00023972e0
- binary_sensor.door_window_sensor_158d00020b5564
- binary_sensor.door_window_sensor_158d000208e169
- binary_sensor.motion_sensor_158d00023938eb
- binary_sensor.door_window_sensor_158d00020b7c28
- binary_sensor.door_window_sensor_158d000245b370
- binary_sensor.door_window_sensor_158d00023eb1a1
- binary_sensor.door_window_sensor_158d0002394353
override:
- binary_sensor.motion_sensor_158d00023972e0
- binary_sensor.motion_sensor_158d00023db67a
- binary_sensor.motion_sensor_158d000239866f
- binary_sensor.motion_sensor_158d00023d8ac1
- binary_sensor.motion_sensor_158d00023938eb
pending_time: 0
warning_time: 0
trigger_time: 600
armed_perimeter:
immediate: []
delayed: []
override: []
pending_time: 0
warning_time: 0
trigger_time: 600
code: '0000'
enable_persistence: true
admin_password: password
log: {}
code_to_arm: true

BEFORE ARM HOME
alarm_panel_bug_prior_to_arm_home

AFTER ARM HOME
alarm_panel_bug

MQTT issue

I'm having some trouble getting the MQTT portion of this working.
As soon as I discovered that MQTT was added, I updated the custom_component and added mqtt: True to the alarm.yaml. However, I could not figure out what the state and command topics are.
So I tried uncommenting all of the options:

 mqtt: True
 state_topic: home/alarm 
 command_topic: home/alarm/set 
 qos: 0 
 payload_disarm: "DISARM" 
 payload_arm_home: "ARM_HOME" 
 payload_arm_away: "ARM_AWAY"
 payload_arm_night: "ARM_NIGHT"

However, I then got an error whilst rebooting HASS

Invalid config for [alarm_control_panel.bwalarm]: [state_topic] is an invalid option for [alarm_control_panel.bwalarm]. Check: alarm_control_panel.bwalarm->state_topic. (See ?, line ?). Please check the docs at https://home-assistant.io/components/alarm_control_panel.bwalarm/
Do you have any idea of what the issue could be?

NEW UI *BUG* Log Size

When a log size a set the alarm cannot be armed:

Log Details (ERROR)
Fri Aug 03 2018 16:54:41 GMT+0100 (British Summer Time)

Error executing service <ServiceCall alarm_control_panel.alarm_arm_night: code=>
Traceback (most recent call last):
File "/usr/src/app/homeassistant/core.py", line 1021, in _event_to_service_call
await service_handler.func(service_call)
File "/usr/src/app/homeassistant/components/alarm_control_panel/init.py", line 140, in async_alarm_service_handler
yield from getattr(alarm, method)(code)
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/alarm_control_panel/bwalarm.py", line 807, in alarm_arm_night
self._update_log('HA', 'Alarm set in Perimeter mode')
File "/config/custom_components/alarm_control_panel/bwalarm.py", line 980, in _update_log
if self._log_size != -1 and len(self._config[CONF_LOG]["logs"]) >= self._log_size:
TypeError: '>=' not supported between instances of 'int' and 'str'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.