Bwalarm (akasma74 edition)

just to clarify, currently all user codes should be unique.

eh?

There is no such functionality and the alarm only changes its state and (if enabled) sends a MQTT message to its status topic.

However, I think it’s not that difficult to fire an event with username upon disarming if that would help.

I see.
What do you mean with fire an event with username upon disarming?

I mean exactly that - fire an event.

If you open up the Alarm Panel and open Settings, then Click “Alarm” and then:

I think that might be what you are looking for`? Mine seems to keep the armed_away if I restart my device.

I also have problem with false alarms (damn cats…) and was hoping to combine the sensors - ie trigger the alarm if two sensors indicate motion in a certain amount of time.

Unfortunately I don’t understand how to proceed with the binary sensors for this, right now I have binary sensors like this - can you point me on how to proceed?

binary_sensor:
- platform: template
  sensors:
    rorelsesensor_sovrum:
      friendly_name: "Rörelsesensor sovrum"
      device_class: motion
      value_template: "{{ is_state('sensor.sensora_burglar', '8') }}"
    rorelsesensor_hall:
      friendly_name: "Rörelsesensor hall"
      device_class: motion
      value_template: "{{ is_state('sensor.sensorb_burglar', '8') }}"
    rorelsesensor_vardagsrum:
      friendly_name: "Rörelsesensor vardagsrum"
      device_class: motion
      value_template: "{{ is_state('sensor.sensorc_burglar', '8') }}"

ok, your request is not very detailed but let’s try.
This is one of the approaches - I’m creating one binary sensors that will turn on if there is signal from more than one of your original sensors in 30 seconds.
I assume that your sensor.sensora_burglar etc change their state to on and then back off almost instantly - if not, you’ll need to adjust delay_off below.

First of all we need to make wrappers - binary sensors that retain their on state for 30 seconds.

binary_sensor:
  - platform: template
    sensors:
      rorelsesensor_sovrum:
        value_template: "{{ is_state('sensor.sensora_burglar', '8') }}"
        <<: &delay_off
          delay_off: 30
      rorelsesensor_hall:
        value_template: "{{ is_state('sensor.sensorb_burglar', '8') }}"
        <<: *delay_off
      rorelsesensor_vardagsrum:
        value_template: "{{ is_state('sensor.sensorc_burglar', '8') }}"
        <<: *delay_off

Then we create a combined binary sensor out of these

grosssensor:
  friendly_name: "combined sensor"
  delay_off: 5 # will turn off after 5 seconds
  value_template: >
    {# add states of all sensors in the list #}
    {% set observed_states = [
          states('binary_sensor.rorelsesensor_sovrum'),
          states('binary_sensor.rorelsesensor_hall'),
          states('binary_sensor.rorelsesensor_vardagsrum')
        ]
    %}
    {# trigger if there is more than one `on` status #}
    {{ observed_states.count('on') > 1 }}

Now you can use binary_sensor.grosssensor in your bwalarm.yaml instead of your original sensors (don’t forget to remove them!).

Haven’t tested it “live” as I’m pretty happy with my PIRs so please let me know if it works for you.

Problems with integration on 0.107.0. I made an issue.

Thanks for the warning.

I made a pr, very simple fix. You can do it yourself in the meantime.

2 Likes

I’ll take care of it, thanks!

A hotfix is available for HA 0.107 users of the alarm.

This service release allows the integration to work with HA 0.107 and higher, no other functionality was added.
Please read the release notes.

Is this ok to install pre 0.107 ??
Just wanted to get everything else fixed prior to updating

Should be fine. It’s just adding a hyphen to the panel url.

1 Like

It works with my 0.106.6 so I’d say it’s ok.

NOTE: because of the changes in HA your alarm panel has now a new address:
instead of http://hassio.local:8123/alarm it’s http://hassio.local:8123/custom-alarm
Don’t forget to update your wallpanel configs etc

1 Like

just for you to know i have updated to 107.0 and the panel works fine even without updating to v1.12.2.

i am able to access my external and my internal url using /alarm
caches have been cleared and the panel working fine.

that’s interesting.
anyway, keep in mind that from v1.12.2 the panel’s url is different.

I have updated to 1.12.2 and now have two Alarm side menu items… one is the original URL (/alarm) and the other is the new /custom-alarm. Any ideas why / how to get rid of the old one?

Ctrl + F5 ?

That was the first thing I tried. It even shows up on a different PC

Ive made some automation that calls the service to arm_away and disarm.
But how do you solve the posibility to add the pending too.
Seems like too me that when you call the service “arm_away” it arms straight away.
Do you add a delay in the automation instead or is it possible to put it in pending?