YET another take on an alarm system

Further with the frontend:

I have change to make it latest.

#  javascript_version: es5
  javascript_version: latest
  
  extra_html_url:
    - /local/custom_ui/state-card-custom-ui-dbg.html
#    - /local/custom_ui/state-card-value_only.html

  extra_html_url_es5:
    - /local/custom_ui/state-card-custom-ui-dbg-es5.html
#    - /local/custom_ui/state-card-value_only.html

  themes: !include_dir_merge_named themes/

MQTT Integration available in the repo.

Just update your bwalarm.py and check out the alarm.yaml for the options.

As always with new code please test extensively.

This will allow you to use this custom alarm code with custom alarm panels utilizing MQTT. This one is often used on android: https://play.google.com/store/apps/details?id=com.thanksmister.iot.mqtt.alarmpanel&hl=en

From all my sensors the motion sensor is mqtt and working fine in your alarm system

Hi @gazoscalvertos,

Thanks for the hard work.

Iā€™m struggling to disable the alarm. Iā€™ve got my code setup in my secrets.yaml file but when I try to disarm and input the code nothing happens. It stays in the mode which I armed it in.

Any assistance appreciated.

Hi,
Iā€™ve noticed a bug during tests. I have not updated to the latest code, but in the previous version had the following behavior:

When I enable home mode with one sensor in the ā€œopen sensorsā€ list the UI shakes and shows the ā€œoverride sensors and armā€ button.

This is the right behavior if the sensor in question is actually relevant for home mode.

However, in my case I had triggered a motion sensor inside the house just before activating the home mode. This sensor is configured so that it is only relevant for the away / perimiter modes. Therefore the UI is handling this too strict in this case.

Looking forward for the new version!

Jochen

Thanks for taking the time to look that up. Unforutnitly I have tested iframes and they dont bring up pages from HA. I get a blank widget. I am using iframes for live radar that work fine, but not HA :confused:

Iā€™ve tested this out (with the built in broker and android client) and it seems to work well, you may just have convinced me to install a tablet by the door :smile:

Iā€™m a little concerned about the security of such a setup though;

I can set a different password on the android client than I have set in the alarm config and it will still disarm so Iā€™m assuming it doesnā€™t pass the code through MQTT to be verified by the component therefore anybody could easily disarm the alarm through MQTT without knowing the code if they were connected to the broker.
I guess in the real world this isnā€™t likely to be a problem (especially if security measures are in place with the broker connection) but I would have assumed there would have been some server side verification that the code was correct.

Probably not a mojor concern though.

Are you using https? apparently this is a known issue with HADash

No Im not. Im using https with HA but I dont have hadash exposed at allā€¦no needā€¦

Hi @Cain I thought the same on the security side.

Personally I wonā€™t be using MQTT but implemented this as a few had requested it. Unfortunately thereā€™s no server side check and relies entirely on the correct configuration of MQTT User/Password + Certificate.

The reason it canā€™t verify the code is these android clients donā€™t give the option to pass the code through MQTT which is a shame. Maybe someone should write to the dev and ask him to implement it?

Yeah its the https with HA that is the issue.

PS I have added a bug fix as I noticed it doesnā€™t play nicely when MQTT is not in use.

I have tried the bug fix. Deactivated the alarm, only door and windows sensors show in All Sensors page.

When you activated the alarm. All Sensors page show only door and window sensors. Although there is motion detected, the motion sensors donā€™t show in All Sensors page. Motion Sensors will show in Home, Away, Perimeter Mode page.

Have you cleared the browser cache?

Iā€™ll check the code this evening, the front end code hasnā€™t changed so in theory there shouldnā€™t be any changes to the way the panel displays items.

Here is the picture of the Alarm System in each mode and All Sensors Page. This Page show on door and window sensors. Donā€™t know why it wonā€™t show the Motion Sensors. Notify from Automation works really well. Anyway, thank you so much. I really love this. To keep you inform. This alarm system also works well in Homekit ^^

Pemimeter Mode

Home Mode

Away Mode

This is likely due to the states no_motion and standby not being recognised, I had a similar issue with true/false sensors until @gazoscalvertos kindly updated the code to include them.

Did you mean. Try download the bwalarm.py again or ? I just download and made it 8-1-18 ^^

Thank you very much. I will try again. Just see his updated only 14 hrs ago.