Giter VIP home page Giter VIP logo

hass-custom-alarm's Introduction

BWAlarm (ak74 edition)

Disclaimer

This fork was created to maintain the original bwalarm custom component until its author is back.
The discussion thread on Home Assistant Community to share ideas or ask for help (NOT to report a bug!) is here.
Feel free to open a new issue or make a Pull Request.
Any constructive feedback/suggestion is welcome.

Important!

Since HA 0.115 until further notice this component no longer has a GUI panel and can only be controlled via automations/MQTT commands/Lovelace Alarm Card.

How to: installation

Manually:
Copy the following folders into your home assistant configuration directory:

  custom_components/bwalarm/  The alarm system code, resources and documentation there
  resources                   This folder stores your alarm configuration file and some user data (i.e badges)

Using HACS (you need to have HACS already installed and configured):

  1. Click on Community in the left hand side menu on Home Assistant frontend
  2. Click Store
  3. Scroll down until you see BWAlarm (ak74 edition) and click on it
  4. If necessary, select Show Beta from the drop-down menu under SETTINGS
  5. Optionally, select version from Available versions drop-down list (it has the latest one selected by default).
  6. Click INSTALL and wait until it's done
  7. If you don't have resources folder in your <Home Assistant config folder> folder, you may need to create one
  8. Save bwalarm folder into your local <Home Assistant config folder>/resources folder
  9. Configure the alarm.

To get things working with Home Assistant (HA) you need to add the following to your configuration.yaml:

alarm_control_panel: !include resources/bwalarm/bwalarm.yaml

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

It's advisable to start with a new bwalarm.yaml file (located in resources/bwalarm folder) with the minimum configuration set:

platform: bwalarm

You can always configure your alarm using web interface or by editing your bwalarm.yaml directly.
The default password to access the Settings tab of the panel is HG28!!&dn
For more details please refer to the configuration variables page, examples and notes.

How to: update

Manually:
Currently the update process is pretty much similar to installation:

  1. Copy a new release archive/clone the repository from GotHub to a local folder on your computer.
  2. You only need to copy custom_components/bwalarm folder from the downloaded release into your <Home Assistant config folder>/custom_components folder.
  3. Please note that you DON'T need to overwrite <Home Assistant config folder>/resources folder as it contains your integration's configuration file (and possibly some additional resources).

Using HACS:

  1. Click on Community in the left hand side menu on Home Assistant frontend
  2. Click on BWAlarm (ak74 edition) in Integrations
  3. Click UPGRADE

Bear in mind that if you use this method, it only updates <Home Assistant config folder>/custom_components/bwalarm/ folder and ALL user data inside that folder will be lost upon every update!
Updating by using HACS (even if you initially installed the integration manually) does not overwrite user settings as these are stored in the <Home Assistant config folder>/resources folder.

After update (for all methods)

Please note that the component's code is loaded on Home Assistant startup and the panels' code (panel.html) is cached by a browser.
Therefore, every time you update no matter how, you HAVE to clear cache of ALL of your browsers and then RESTART Home Assistant for changes to take effect.

hass-custom-alarm's People

Contributors

akasma74 avatar gazoscalvertos avatar ludeeus avatar tjpoorman avatar tomlut avatar

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

Watchers

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

hass-custom-alarm's Issues

MQTT Disarm with passcode

Is your feature request related to a problem? Please describe.
Allow Disarm/Arm via MQTT with the passcode in the payload. This will allow the use of the Android Alarm Panel.

Describe the solution you'd like
As above

bwalarm not working after upgraded to 0.100.0

Your components (from Alarm/Settings/About):

  • component version v1.10.2

Platform & Browser:

  • Platform name & Home assistant version : Hass.io 0.100.0
  • Browser name & version: Chrome Version 77.0.3865.120 (Official Build) (64-bit)

Describe the bug
The following components and platforms could not be set up:
alarm-control-panel.bwalarm

Entity not available: alarm_control_panel.house

tried to restart the HA but problem still persist. It was working before and just after the upgrade it started not able to recognize.

Error when arming from Lovelace

Home Assistant: v0.94.4
This Panel: v1.3.8_ak74
Component (Bwalarm): v1.1.8_ak74
Python: v(3,7,3,final,0)

2019-06-27 06:18:56 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1796488304] async_alarm_arm_home() missing 1 required positional argument: 'ignore_open_sensors'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 121, in handle_call_service
connection.context(msg))
File "/usr/src/homeassistant/homeassistant/core.py", line 1150, in async_call
self._execute_service(handler, service_call))
File "/usr/src/homeassistant/homeassistant/core.py", line 1172, in _execute_service
await handler.func(service_call)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 194, in handle_service
required_features
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 316, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 337, in _handle_service_platform_call
await getattr(entity, func)(**data)
TypeError: async_alarm_arm_home() missing 1 required positional argument: 'ignore_open_sensors'

"This component is not working"

Your components (from Alarm/Settings/About):

  • component version [e.g v1.5.0]
    v1.11.2pre1

Platform & Browser:

  • Platform name & Home assistant version [e.g. Hass.io 0.91.0]
    Hass.io v0.103.4
  • Browser name & version
    Chrome Version 79.0.3945.88 (Official Build) (32-bit)

Describe the bug
A clear and concise description of what the bug is.

Alarm component is not working. Get this on the Alarm Tab:
"This component is not working"
Cant find anything on the hass logs as well, except for:

2019-12-26 23:38:20 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for bwalarm which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.

2019-12-26 23:38:30 WARNING (MainThread) [homeassistant.components.frontend] Overwriting integration alarm

I tried to install via HACS. Also tried to install manually.
This happened to me after updating hass.io to latest version.
Any breaking changes?

Alarm triggered only on specific state change for each entity

Is your feature request related to a problem? Please describe.
Currently the alarm is triggered for every supported state change and for all the entities in the delayed or immediate lists. It would be really helpful to be able to trigger the alarm only for specific state change for certain entities. For example, I have a motion sensor with "on" and "off" states, and it triggers the alarm for both state changes. I've tried several configurations but I wasn't able to avoid the trigger for the on -> off transition.

Describe the solution you'd like
A good solution could be to add specific state transitions for each sensor in the sensor list section of the config file.
CURRENT CONFIGURATION (bwalarm.yaml):
[...]
armed_home:
immediate:
- binary_sensor.sensor_1
- binary_sensor.sensor_2
[...]

PROPOSED CONFIGURATION (bwalarm.yaml):
[...]
armed_home:
immediate:
- entity_id: binary_sensor.sensor_1
from: off
to: on
- entity_id: binary_sensor.sensor_2
from: close
to: open
[...]

This solution will also make the custom_supported_statuses_on/off parameters unnecessary, and will provide a more granular control over specific state changes.

Describe alternatives you've considered
It seems not possible to implement this behavior in bwalarm at the moment (or maybe I'm wrong). The only solution is to implement an AppDaemon automation on top of the manual alarm component of HA.

Error setting up platform after upgrade to 0.103.5

I received the following error in my log after upgrading to 0.103.5

Error while setting up platform bwalarm Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 150, in _async_setup_platform await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT) File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for return fut.result() File "/config/custom_components/bwalarm/alarm_control_panel.py", line 425, in async_setup_platform alarm = BWAlarm(hass, config, mqtt) TypeError: Can't instantiate abstract class BWAlarm with abstract methods supported_features

BWalarm Broken in HA 0.103

Your components (from Alarm/Settings/About):
This integration: v1.11.0

Platform & Browser:

  • Docker Hass 0.103.0b0
  • Edge Dev 80.0.345.0

Describe the bug
BWALARM is broken with lastest beta. Release notes indicate changes to alarm_alarm_panel
https://rc.home-assistant.io/blog/2019/12/04/release-103/

To Reproduce
Upgrade to latest beta

Expected behavior
Alarm system should function on latest beta

Additional context
2019-12-05 12:33:01 ERROR (MainThread) [homeassistant.components.alarm_control_panel] Error while setting up platform bwalarm
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 150, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
return fut.result()
File "/config/custom_components/bwalarm/alarm_control_panel.py", line 425, in async_setup_platform
alarm = BWAlarm(hass, config, mqtt)
TypeError: Can't instantiate abstract class BWAlarm with abstract methods supported_features

The integration doesn't start with default config

hello
i get this error on the log

  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 126, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
    return fut.result()
  File "/config/custom_components/bwalarm/alarm_control_panel.py", line 410, in async_setup_platform
    alarm = BWAlarm(hass, config, mqtt)
  File "/config/custom_components/bwalarm/alarm_control_panel.py", line 431, in __init__
    self.init_variables()
  File "/config/custom_components/bwalarm/alarm_control_panel.py", line 570, in init_variables
    arm_states_dict = self._config[CONF_STATES]
KeyError: 'states'

what can i do?
thanks

Sending "Disarmed" state when toggling settings

Your components (from Alarm/Settings/About):

  • component version 1.7.1b (also happened with 1.6.0b)

Platform & Browser:

  • Hassio 0.95.4
  • Chrome

Describe the bug
I have an automation to send a notification to my phone and google TTS announces when the alarm is "disarmed".
Every time I toggle any setting in the alarm panel UI, it is sending a "disarmed" state. I then receive a notification and google announces it every time.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Alarm Panel
  2. Click on Settings
  3. Toggle any setting
  4. Check alarm state behavious

Expected behavior
There shouldn't be any state changes when toggling settings

Cannot load 1.7.0b

Alarm Version 1.7.0b

Platform & Browser:
CentOS 7 and Home Assistant 0.95.1

Browser
Chrome 75.0.3770.100

  • Browser name & version

Describe the bug
HA cannot run Alarm 1.7.0b after installation. No error messages in HA log, other than the standard warning about custom components. When checking the config with the config check button in configuration menu it shows this:

Configuration invalid
Platform not found: alarm_control_panel.bwalarm

To Reproduce
I removed all of the 1.6.0b directories from custom_components and alarm.yaml from the config directory. I installed 1.7.0b into custom_components/bwalarm (including all sub-folders), resources into config directory. Configuration.yaml was changed to
alarm_control_panel: !include resources/bwalarm/bwalarm.yaml, restart HA. Use the check config from the configuration menu.

Expected behavior
To see alarm on ingress menu.

Show open sensor list on arming page

In the previous version of this alarm panel, the arming page showed a list of sensors below the "home" and "away" buttons.
This was very helpful, to immediately see what windows/doors are open, when trying to alarm the panel, without having to change to a different page.
In the current implementation, there is plenty of space on the main screen, with just two buttons "home" and "away". And when you press one of those buttons, then it shows a second page with "open sensors found".
So maybe this can made optional in the theme?

Disarm with any password

Your components (from Alarm/Settings/About):

  • component version 1.11.0

Platform & Browser:

  • Platform name & Home assistant version: Ubuntu and 0.91.4
  • Browser name & version: Firefox 68.0.2

Describe the bug
I can disarm with any password that is not configured

Expected behavior
Only be able to disarm with configured passwords

Issue - home-assistant error on startup

receive this error: setup failed for alarm_control_panel: no setup function defined
when I restart home assistant.

I copied all the files as stated in the instructions, and modified the configuration.yaml file.
I am running Home Assistant in a docker image.

Have a delay for motion sensors when arming away

As described on the Home Assistant forums, link here

It would be nice to have the alarm armed_away, and have an extra option to keep the motion sensors offline for a period of time. I cant think of any other examples, but in my case I have a roomba having its cycle for about 2 hours when we leave the house. If I arm the alarm, then the motion sensors are picking up the roomba. So keeping the sensors offline using conditions or triggers would be useful.

async_alarm_arm_away() missing 1 required positional argument: 'ignore_open_sensors'

I cant call Arm_away with the service call.

I try to use the "ignore_open_sensors" parameter, but it does not work:

{
"entity_id": "alarm_control_panel.house",
"code":"0000",
"ignore_open_sensors": true
}

I get:
extra keys not allowed @ data['ignore_open_sensors']

If i don't use it, I instead get:

async_alarm_arm_away() missing 1 required positional argument: 'ignore_open_sensors'

Am I doing something wrong here?

Lack a 'resources' directory - installed via HACS

Installed via HACS and I lack the directory /config/resources/, leading to errors such as

[log_save] Error occured saving file "/config/resources/bwalarm/bwalarm_log.json": [Errno 2] No such file or directory: '/config/resources/bwalarm/bwalarm_log.json'
Not really sure how to correct this. The Hass instance had previously had BWAlarm installed manually as custom component, I then removed the custom component and reinstalled using HACS.

Home Assistant: v0.104.1
This Panel: v1.3.6_ak74
Component (Bwalarm): v
Python: v(3,7,6,final,0)

"Hide HA Sidebar When Armed" does not hide

Your components (from Alarm/Settings/About):

  • v1.10.2

Platform & Browser:

  • Hass.io running in Docker on Ubuntu v0.96.2
  • Firefox 68.0.2 (64-bit)
    Chrome 76.0.3809.100 (64-bit)

Describe the bug
Enabling "Hide HA Sidebar When Armed" has no effect on the sidebar. Attempted with all arming states with and without collapsing the sidebar

Expected behavior
"Hide HA Sidebar When Armed" should hide the sidebar element when enabled.

Additional context
Nothing showing in error logs in Home Assistant or Firefox or Chrome

Broken Page

Your components (from Alarm/Settings/About):

  • v1.10.1

Platform & Browser:

  • Platform name & Home assistant version [e.g. Hass.io 0.96.4]
  • Browser name & version

Describe the bug
The Alarm page isnt displayed right

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'the Alarm Panel Page'
  2. See error

Expected behavior

Screenshots
http://n8970q34vnvidunh897qfc5wenh87v.tk/s/rtR6R4krGFSRe6C/preview

Additional context
....

Not showing up in HACS

Your components (from Alarm/Settings/About):

  • component version v1.8.0b

Platform & Browser:

  • Platform name & Home assistant version Hass.io 0.95.4
  • Chrome 75.0.3770.100

Describe the bug
The alarm doesn't show in the HACS Store

To Reproduce
Steps to reproduce the behavior:

  1. Go to Community on side menu
  2. Click on store
  3. Scroll down to find Fork of Yet another take on alarm
  4. It's not there.

Expected behavior
Expect to find Fork of Yet another take on alarm on HACS store

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

MQTT set default for "ignore_open_sensors"

Is your feature request related to a problem? Please describe.
I use Thanks, Mister!'s MQTT Alarm Panel app on a phone mounted on the exit of my house. If I have the door open, then it won't arm... and there is no indication that it's not going to arm.

Describe the solution you'd like
I understand the desire to make 'ignore_open_sensors' set to False as default as it could be a security issue, but it would be convenient to be able to override the default in the UI.

Describe alternatives you've considered
In the UI add an option to set 'ignore_open_sensors':True

Additional context
I was able to change the default value by doing a code edit for others that may come across this issue. Line 342 in alarm_control_panel.py from CONST_DEF_IGNORE_OPEN_SENSORS = False to CONST_DEF_IGNORE_OPEN_SENSORS = True

MQTT response for Valid or Invalid alarm codes

Is your feature request related to a problem? Please describe.
I think it would be useful for people using mqtt commands to arm and disarm if it be possible to add a command to be sent via MQTT on successful code for arming and disarming

Describe the solution you'd like
In the MQTT section of the backend add a couple of textboxes similar to the commands text boxes for a mqtt command to be sent on valid code and invalid code e.g.

Vaild code received MQTT command to send:


hasp/alarm01/command/beepvalid


Invaild code received MQTT command to send:


hasp/alarm01/command/beepinvalid


This would allow some feedback on devices if the code is correct. In the example above my HA switchplate has a piezo buzzer installed. If the command above is received it beeps. (I have submitted a pull request to HA switchplate github with the required code for the beeps.)

Describe alternatives you've considered
None

Getting errors on the logs when clicking on the Alarm panel

Your components (from Alarm/Settings/About):
This Panel: v1.3.6_ak74
Component (Bwalarm): v1.1.4_ak74

Platform & Browser:
Home assistant 0.92.2 running on Centos7
Chrome Version 74.0.3729.131 (Official Build) (64-bit)

Describe the bug
Going on the alarm panel (left side of the HA dashboard), I get the following on the logs:

2019-05-04 13:15:20 ERROR (MainThread) [frontend.js.latest.201904270] https://www.montes.co:43142/frontend_latest/app.7bd99ba1.js?__WB_REVISION__=7bd99ba128ed85e3303e:2:60391 Uncaught TypeError: Cannot convert undefined or null to object
2019-05-04 13:15:21 ERROR (MainThread) [frontend.js.latest.201904270] https://www.montes.co:43142/frontend_latest/app.7bd99ba1.js?__WB_REVISION__=7bd99ba128ed85e3303e:2:60391 Uncaught TypeError: Cannot convert undefined or null to object

To Reproduce
Steps to reproduce the behavior:

  1. Load the HA dashboard
  2. Click the alarm panel (left side)

Screenshot 2019-05-04 at 13 18 41

Expected behavior
Expectation is to load without errors.

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

Additional context
Add any other context about the problem here.

Overwriting alarm

Your components (from Alarm/Settings/About):

Home Assistant: v0.96.4
This Panel: v1.3.6
Component (Bwalarm): vk74 edition v 1.10.1
Python: v(3,7,4,final,0)

Platform & Browser:

hassio
HassOS 2.12
production
Firefox 68.0.1 64bit

Describe the bug
When hass boots, I get an error "Overwriting integration alarm" in the log

To Reproduce
Steps to reproduce the behavior:

  • Restart hass
  • check the log

Expected behavior

  • no warning or better explanation

overwriting

Getting error message when check_before_arm: [] is in alarm.yaml

Your components (from Alarm/Settings/About):

  • alarm component version v1.5
  • web panel v1.3.8_ak74
    (I installed the latest code as of 6/20/19)

Platform & Browser:

  • Centos 7 Linux & Home assistant 0.94.4 (using Hassio and docker containers)
  • Browser Chrome 75.0.3770.100

Describe the bug
Error message in log when starting HomeAssistant

To Reproduce
Steps to reproduce the behavior:

  1. Restart HomeAssistant
  2. Click on info
  3. See Error Invalid config for [alarm_control_panel.bwalarm]:
  4. Goto Alarm from side menu
  5. See error:
    Home Alarm
    This component is not working!
    Invalid config for [alarm_control_panel.bwalarm]: [check_before_arm] is an invalid option for [alarm_control_panel.bwalarm]. Check: alarm_control_panel.bwalarm->states->armed_night->check_before_arm. (See /config/configuration.yaml, line 431). Please check the docs at https://home-assistant.io/components/alarm_control_panel.bwalarm/
    (config.py)
    Check the Home Assistant log for more details.
    Home Assistant: v0.94.4
    This Panel: v1.3.8_ak74

Expected behavior
Should not see this error

Screenshots
Invalid config for [alarm_control_panel.bwalarm]: [check_before_arm] is an invalid option for [alarm_control_panel.bwalarm]. Check: alarm_control_panel.bwalarm->states->armed_night->check_before_arm. (See /config/configuration.yaml, line 431). Please check the docs at https://home-assistant.io/components/alarm_control_panel.bwalarm/

Additional context
for the time being, I've had to comment out the check_before_arm: entry in alarm.yaml

Alarm Settings

When I restart HA, the bwalarm.yaml file is set to default. I have cleared my browser cache and tried different browsers. Please help.

Keypad not shown in Lovelace (Wanting to Arm the Alarm with Pin)

Your components (from Alarm/Settings/About):
This integration: v1.10.1
Home Assistant: v0.96.4
Python: v(3,7,4,final,0)

Platform & Browser:

  • Hassio & Home assistant version [ Hass.io 0.96.4 ]
  • Google Chrome Version 75.0.3770.142 (Officiel version) (64-bit)

Describe the bug
When setting the option in Alarm --> Settings --> Alarm: Require a passcode to set the alarm, I'm not being presented to a keypad on my Lovelace Alarm Card, when I want to Arm my Alarm.
The only way I can get a keypad shown, is if I arm the alarm through the Alarm Menu and when armed, a keypad is then shown to disarm my alarm.

To Reproduce
Steps to reproduce the behavior:

  1. Add Alarm-Card to Lovelace
  2. Then it doesn't get shown

Expected behavior
I expected the Alarm Card to show a Keypad, due to the setting set in the settings of the Alarm:
Alarm --> Settings --> Alarm: Require a passcode to set the alarm

Screenshots
Lovelace Alarm Card:
image

Alarm Settings:
image

Additional context
This was working with the old Gazoscalvertos version on the same version with Hassio 0.96.4.
I upgraded to this Custom Component following the guide today (once again), and then upgraded it using HACS.
Everything else is working with the Alarm.

Incorrect event message "Alarm has been tripped by undefined"

When I am using an API call to change the state of a sensor and if the new state of this sensor triggers the alarm, the event shown on the log page is:
Alarm has been tripped by undefined
So the entity_id of the sensor responsible is not listed.
Thanks!

Unable to select sensors

Describe the bug
I have a problem where on the sensors page when I select a sensor it ticks it then unticks it. All other setting seem to save ok.

To Reproduce
Steps to reproduce the behaviour:

  1. Go to 'Alarm' then login in to admin
  2. Click on 'sensors'
  3. then tick a sensor
  4. See the sensor you have ticked untick.

Expected behaviour
Sensor should be selected and saved.

Browser (please complete the following information):

  • Browser Chrome Version 73.0.3683.103 (Official Build) (64-bit)
  • Mac OS High Sierra

Can disarm with any code

Your Versions:
This integration: v1.11.2pre1
Home Assistant: v0.103.6
Python: v(3,7,6,final,0)

Action:
Armed into any mode, tested: Night, Home and Away
Entered code 8888 (lots of others tested) 8888 is not a set code

Expected outcome:
Alarm does not disarm

Actual Outcome:
Alarm disarms

Make fingerprint icon optional in theme

The fingerprint icon in the portrait view (as seen on an iPhone) is not very attractive, and potentially confusing (implies you can use the fingerprint sensor on the iPhone).
I'd prefer this just say "disarm".
Can we make it optional in the theme?

’<’ not supported between instances of ‘str’ and 'int’ when editing settings

Your components (from Alarm/Settings/About):

  • component version v1.10.1

Platform & Browser:

  • Platform name & Home assistant version [e.g. Hass.io 0.96.3]
  • Browser name Chrome / Firefox

Describe the bug
When going to settings of the panel I get the following errors

Failed to call service alarm_control_panel/alarm_yaml_user. list indices must be integers or slices, not str
when saving any setting in the settings I get this
’<’ not supported between instances of ‘str’ and 'int’

To Reproduce
Steps to reproduce the behavior:

  1. Go to settings pannel

Expected behavior
Saving settings

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

Additional context
Installed using HACS
copied resources folder to /config
inside: /config/resources/bwalarm/bwalarm.yaml

  • platform: bwalarm

in the main confing
alarm_control_panel: !include resources/bwalarm/bwalarm.yaml

MQTT integration failure

Describe the bug
Enabling MQTT causes the alarm not to load and a log entry of "Signature of MQTT msg_callback 'custom_components.bwalarm.alarm_control_panel.message_received' is deprecated"

To Reproduce
Steps to reproduce the behavior:

  1. Start with working custom alarm with MQTT off
  2. Enable MQTT
  3. Restart HA
  4. See error

Expected behavior
MQTT integration should work. Alarm module should work

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

Browser (please complete the following information):

  • Firefox and Chrome

Additional context
Home Assistant 0.92.1

Lost configuration switches

Your components (from Alarm/Settings/About):
v1.10.2

Platform & Browser:
Hass.Io Docker v0.100.1
Safari 13.0.2, Chrome 77.0.3865.120 and Firefox 63.0.3

Describe the bug
In configurator all switches are missing.

To Reproduce
Steps to reproduce the behavior:
Open configuration panel and chose any settings with a toggle switch, the switch won't be visible.

Expected behavior
Switch there

Screenshot :

screenshot

Look as all polymer paper-toggle-button are not showing ...

Trigger seems to fail with virtual sensor (platform template)

Your components (from Alarm/Settings/About):

  • v1.11.1

Platform & Browser:

  • Hassio (latest available stable channel) on ubuntu 19.10 (Virtual machine)
  • latest chrome

Describe the bug
virtual sensor seems do not trigger the alarm.
For testing pourposes (not physical devices yet) I created 2 virtual switches (input boolean), "virtual door" and "virtual siren", and a virtual door sensor.
Virtual door sensor added to the alarm.
With off virtual door switch the door sensor is closed, with on virtual switch the door sensor is opened.

Expected behavior
I expect an alarm trigger when manually turning the virtual door switch on.
This not happen.

input_boolean:
  virtual_door:
    name: switch Porta
    initial: off
    icon: mdi:door
  virtual_siren:
    name: Sirena Virtuale
    initial: off
    icon: mdi:eye

sensor:    
- platform: template
  sensors:
    virtual_door_sensor:
      value_template: >
        {{ 'opened' if is_state('input_boolean.virtual_door', 'on')
           else 'closed' }}
      friendly_name: 'Porta virtuale'

I'm wrong in something or it's really a bug?
Has to set on and off for teh sensor value? true/false?

Mqtt do not working after upgrading to 0.103.2

Your components (from Alarm/Settings/About):
Alarm Panel: v1.11.1

Platform & Browser:
Raspbian GNU/Linux 10 (buster)
Python virtualenv
HA version | 0.103.2
This integration: v1.11.1
Tryed with Python: 3.7.1, 3.7.6 and 3.8.1. Currently with 3.7.6

Describe the bug
No issues without using MQTT integration of the Hass-Custom-Alarm

2019-12-19 19:21:43 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 406, in _async_add_entity
    await entity.async_added_to_hass()
  File "/usr/local/lib/python3.7/asyncio/coroutines.py", line 132, in coro
    res = yield from await_meth()
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/mqtt/__init__.py", line 433, in async_subscribe
    async_remove = await hass.data[DATA_MQTT].async_subscribe(
KeyError: 'mqtt'

To Reproduce
Steps to reproduce the behavior:
Upgrade to HA version 0.103.2

Expected behavior
Continue working as always with mqtt support.

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

Additional context
Tryed with Python: 3.7.1, 3.7.6 and 3.8.1. Currently with 3.7.6
Mqtt broker is working ok and also tryed in HA. Working as expected.
If I disable mqtt at resources/bwalarm/bwalarm.yaml it load and work successful.

Hass not loading alarm when state is triggered/pending

Your components (from Alarm/Settings/About):
This Panel: v1.3.6_ak74
Component (Bwalarm): v1.1.4_ak74

Platform & Browser:
Home assistant 0.92.2 running on Centos7
Chrome Version 74.0.3729.131 (Official Build) (64-bit)

Describe the bug
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'

To Reproduce
Steps to reproduce the behavior:

  1. Change the alarm.json (which I attached, dropped as txt due to github constraints) to the main hass configuration directory

alarm.json.txt

  1. Try to restart Hass

Expected behavior
I expected it to recognise the alarm was triggered and start Hass with the alarm loaded instead of not loading it.

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

Additional context
Add any other context about the problem here.

Ability to Hide & Rename Home Arming Button

Is your feature request related to a problem? Please describe.
As I use this alarm for my business I would like to the ability to hide the "Home" arming button. I can also see it would be useful to be able to rename the text on the "Home" button to something else such as "Garage" or "Shed"

Describe the solution you'd like
A toggle in the setting to hide the "Home"button. A text box to be able to change the name of the button in the setting page.

Describe alternatives you've considered
Modify the code manually.

"This component is not working"

Your components (from Alarm/Settings/About):

  • component version v1.8.0b

Platform & Browser:

  • hassio v0.95.4
  • crome

Describe the bug
i upgrade the component to improve hacs, restart the bwalarm with basinc config and reconfig again, it work but whene i add the name of my alarm component the web page say "This component is not working".
the alarm component is working but the page configuration is bloked...

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

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

Additional context
Add any other context about the problem here.

Overwriting Integration warning

Your components (from Alarm/Settings/About):

  • component version [e.g v1.5.0]

Platform & Browser:

  • Platform name & Home assistant version [e.g. Hass.io 0.91.0]
  • Browser name & version

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

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

Additional context
Add any other context about the problem here.

Warning then immediate should trigger the alarm

There is a behaviour I find a bit strange.
Say, I have two sensors:

Sensor1 with Immediate - so as soon as Sensor1 is triggered the alarm goes on
Sensor2 with delayed - so it waits warning time to trigger the alarm
In the following scenario:

Alarm is in Away mode
Sensor2 is on - the alarm goes in warning
Before the end of the warning time Sensor1 is on
In my opinion, in this case, the alarm should goes on immediately as Sensor1 is “immediate”. However, at the moment the alarm stays in warning state and is only triggered (if not disarmed) at the end of the warning time, despite Sensor1 being on.

Is there something that I missed? Is this the expected behaviour?

error: Platform not found: alarm_control_panel.bwalarm

Your components (from Alarm/Settings/About):

  • component version v1.10.1 from HACS

Platform & Browser:

  • Platform name hass.io 0.95.4.
    All browsers

Describe the bug
error: Platform not found: alarm_control_panel.bwalarm
when I update to 0.97.1, Hassio

Expected behavior
Tips and solutions

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

Additional context
Add any other context about the problem here.

Alarm Panel not setting ZWave Devices

This integration: v1.11.0
Home Assistant: v0.102.3
Chrome - Version 78.0.3904.108 (Official Build) (64-bit)

When setting Arm from the Alarm Panel via Away none of the Motion Sensors or Door Sensors are set to Armed.

I have checked that the sensors are selected both in the UI and also within the alarm.yaml.

Only clear message is from the logs:
https://[myURL]/frontend_latest/chunk.d5961ced1d8380ae21ba.js:2417:193320 Uncaught YAMLException: unacceptable kind of an object to dump [object Undefined]
Connection lost. Reconnecting…

Any pointers please?

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

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

Additional context
Add any other context about the problem here.

Error page when trying to enter Settings

Your components (from Alarm/Settings/About):

  • component version 1.11.0

Platform & Browser:

  • Platform name & Home assistant version HassIO 0.102.2
  • Browser name & version Edge Latest

Describe the bug
When entering password for the Settings page you are presented with a white error page stating the page is having a problem

To Reproduce
Steps to reproduce the behavior:

  1. Go to into alarm page
  2. Click on Settings
  3. Login
  4. See error

Expected behavior
Show the expected settings page

code_format: null

Hi,

I'm not sure where this attribute is used throughout HA but I use the TileBoard dashboard and the Alarm tile does not work because this attribute is null. Looking at the manual alarm control panel I see that this attribute is "number". As soon as I set this manually to "number" it works as expected. Actually setting it to anything else then "null" works so I think this integration should set the attribute accordingly.
I think this is a standard attribute in the Alarm control panel component in HA and should be set.

Thanks!

Error arming via manual button after first arm

Your components (from Alarm/Settings/About):

This integration: v1.10.2
Home Assistant: v0.98.1
Python: v(3,7,4,final,0)
Running on HassIO and HACS

Platform & Browser:
Happens in the iOS App Beta and web clients (chrome and safari) most recent versions

Describe the bug
The first arm after restart seems to work ok. But after that neither the core arm button or the panel one work.

2019-08-31 14:21:55 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140361486312528] Cannot be called from within the event loop
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 130, in handle_call_service
connection.context(msg),
File "/usr/src/homeassistant/homeassistant/core.py", line 1235, in async_call
await asyncio.shield(self._execute_service(handler, service_call))
File "/usr/src/homeassistant/homeassistant/core.py", line 1258, in _execute_service
handler.func(service_call)
File "/config/custom_components/bwalarm/alarm_control_panel.py", line 423, in alarm_arm_away_from_panel
alarm.alarm_arm_away_from_panel(service.data.get(ATTR_CODE))
File "/config/custom_components/bwalarm/alarm_control_panel.py", line 1186, in alarm_arm_away_from_panel
return self.alarm_arm(Events.ArmAway, code, True)
File "/config/custom_components/bwalarm/alarm_control_panel.py", line 1161, in alarm_arm
self.process_event(event, arm_immediately)
File "/config/custom_components/bwalarm/alarm_control_panel.py", line 1331, in process_event
self._hass.services.call(self._config.get(CONF_WARNING).split('.')[0], 'turn_on', {'entity_id':self._config.get(CONF_WARNING)})
File "/usr/src/homeassistant/homeassistant/core.py", line 1173, in call
self.hass.loop,
File "/usr/src/homeassistant/homeassistant/util/async
.py", line 151, in run_coroutine_threadsafe
raise RuntimeError("Cannot be called from within the event loop")
RuntimeError: Cannot be called from within the event loop

Seem to be able to arm via MQTT though

To Reproduce
Steps to reproduce the behavior:

  1. Go to alarm sidebar
  2. Tap Arm Away

Expected behavior
Alarm to arm

Screenshots
N/A

Additional context
Comes good again when I restart but then stops working again.

Integration with custom_updater

Integration with custom_updater.
I've written an updater.json for bwalarm.py and another for alarm.css. I've never written code for the updater but according to the custom_updater docs these should work.
I had to add the files as .txt files, just rename as .json.
bwalarm_updater.txt
css_updater.txt

No keypad on lovelace

This was working before I changed over to this branch.

Your components (from Alarm/Settings/About):

  • Home Assistant: v0.96.4
  • This Panel: v1.3.6
  • Component (Bwalarm): v
  • Python: v(3,7,4,final,0)

Platform & Browser:

  • hassio
  • HassOS 2.12
  • production
  • Firefox 68.0.1 64bit

Describe the bug
When armed, the Alarm link on the sidebar takes to a page which displays the keypad to disarm. However, if I use the Lovelace card, I just see a disarm button with no keypad.

To Reproduce
Steps to reproduce the behavior:

  1. Add a lovelace card of type "alarm-panel"
  2. Arm the alarm
  3. View the panel - no keypad.
  4. Click on the Alarm link on the sidebar, you'll see a keypad

Expected behavior
Keypad displayed in lovelace when system is armed.

Lovelace card is configured as follows:

code: 1234
entity: alarm_control_panel.house
show_keypad: true
states:
  - arm_home
  - arm_away
type: alarm-panel

alarm

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.