Custom Component: Crow Runner / Arrowhead AAP 8/16 Alarm IP Module

@Crumpy10 i use yaml editor (Studio code server addon or file editor) for all my automations.

For power cut notification automation:
configuration.yaml:

  - platform: template
    sensors:
      home_power:
        friendly_name: "Home Power"
        device_class: power
        value_template: "{{ is_state_attr('sensor.crow_alarm_system', 'mains', True) }}"

automation.yaml:

- alias: Home Power On/Off
  trigger:
  - platform: state
    entity_id: sensor.home_power
  condition:
    condition: template
    value_template: >
      {{ trigger.from_state.state != 'unknown' }}
  action:
  - service: notify.pushover
    data_template:
      message: >
        {% if is_state('sensor.home_power','True') %}
        Power on...
        {% else %}
        Power off!!!
        {% endif %}
      data:
          sound: powercut

But in order for this to work you should have UPS connected to your HA server and internet modem. Also, sometimes when the power cut occurs, my internet connection goes also esp. where i live. Then this doesnā€™t workā€¦

Also, this is an alarm trigger notification automation:

- alias: Alarm Trigger Message
  trigger:
  - platform: template
    value_template: "{{is_state_attr('alarm_control_panel.area_a','alarm', True) }}"
  action:
  - service: notify.pushover
    data_template:
      message: >
        {% set zone_names = ['Giriş PIR','Ƈatı MK','Zemin MK','Sinema MK','Mutfak PIR','Sinema PIR','Ɯst Kat MK','Mutfak Pencere Kablosuz','Salon PIR','Ƈalışma Oda PIR','Ƈocuk Oda PIR','Misafir Oda PIR','Ebeveyn PIR','Ebeveyn MK','Ƈocuk Oda MK','Sinema Oda Kablosuz'] %}
        ALARM: {{ zone_names[state_attr('alarm_control_panel.area_a','alarm_zone') | int -1 ] }}
  

Hi Erkan,
Thanks for the fast reply. Thats exactly as I have them apart from names of the zonesā€¦

The Power on and off automation works but I cant get the trigger message to work.
What I have been doing is setting the state of ā€˜alarmā€™ to true in developers tools but it does not trigger a message but if I trigger the automation from ā€˜Automationsā€™ in settings it triggers a message (to test I replaced the zone message with just a test message).

Do you have anything in config.yaml for the trigger message?

All the best

Simon i am not so sure if the trigger is set by changing the ā€œalarmā€ attribute will be enough. The trigger notification automation in my previous message works just fine with my setup.

First, test it with making the ā€˜alarmā€™ attribute True and ā€˜Alarm zoneā€™ attribute to ā€œ3ā€ for example, then press ā€˜Set Stateā€™. But the component will check and correct these attributes anyway, so i am not so hopeful that it will trigger.

The only way to test it would be the real life test, in which you set your alarm to arm home and trigger the alarm by opening a door or from a PIR. I know it will be siren loud but thatā€™s the way i tested my automation anyway. If you have any delayed PIR or magnetic contact zone, you can test that without the siren going off.

Did anyone tried using ā€œalarm_control_panel.alarm_triggerā€ service to trigger PANIC alarm? Does it work? Should work on paper toughā€¦

Hi Erkan, OK I best leave it until the weekend and daylight hours, or I could just disconnect the sirens.
Thanks.

PS Setting the attributes doesnt work.

I just tried calling the service ā€œalarm_control_panel.alarm_triggerā€ for the entity alarm_control_panel.home, which is the entity of my Area A alarm panel. It wonā€™t let me call the service without a target entity. I get the following error message:

Hello,
Firstly, thanks so much for your work on the integration. Iā€™ve been using it for about 6 months and it mostly works as expected. However, Iā€™ve been having some trouble with intermittent delays or no response to arming/disarming the alarm. E.g I will arm the alarm from HA - but the state of the actual alarm does not change. Often it works perfectly, but the issue occurs regularly enough that I donā€™t quite trust it.
I have updated to version 0.28.
I am getting the below error in the HA log and wonder if this is related.

WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for crowipmodule doing blocking calls at custom_components/crowipmodule/alarm_control_panel.py, line 149: self.hass.data[DATA_CRW].disarm(str(self._code))

Thanks.

Hey @RowanB, which HA version you are using?

Iā€™m on 2022.11.1 now, but this has been consistent through at least the last 3 months of HA versions.

Iā€™ve the same problem that @RowanB saysā€¦
Iā€™ve been having some trouble with intermittlent delaysā€¦

Now after update HA 2022.11 It works worse. Is there an update planned?

Thanks!

Hey @RowanB and @aivdev ,

The same error occurs also on opentherm gateway, and they say it is a problem with the pyserial-asyncio v.0.6 handling the way of closing or lost connections.

But the thing is i have no problems with my own installation so far, so i was wondering about the ā€œlosing connectionā€ part mainly. For both of you:

  • Are you using the manual disarm code from the alarm card or it is hard coded to configuration.yaml?
  • Are you using static IP for IP Module?
  • Could there be a network issue (losing connection to IP Module)?

In the meantime i will try to find a workaround.

UPDATE: I think i found the culprit. There is a blocking call remained in ā€œdisarmā€ in the pycrowipmodule. Will change it when i get back home.

Hey again @aivdev and @RowanB ,

Can you please change the following requirement to ā€œ0.31ā€ in manifest.json file:

    "requirements": [
        "pycrowipmodule==0.31"
      ],    

The error was only on Disarming, so could you please check if this works? Thanks for your patience.

The reason why i did not have this problem is i always disarm with the remote, not HA :sweat_smile:

@febalci whats steps Iā€™ve follow to update the requeriment?

Iā€™ve change de manifest.json but the alarm_conntrol_panel.py not channgeā€¦ ĀæWhat Iā€™ve to do after modify manifest?

Thanks

@febalci I press ā€œArm in homeā€ the alarm panel (real) change and light is red, but in home assistant, over keyboard continues show status ā€œDisarmā€ in greenā€¦ Āæwhy?Captura de Pantalla 2022-12-06 a las 21.26.34

But Real alarm, show the keypanel with light ā€œredā€ that seems is arm . ĀæWhy not update HA status of panel?

Yes unfortunately v.0.31 doesnā€™t work. Gotta look a bit moreā€¦

Seems OK now, you can use:

    "requirements": [
        "pycrowipmodule==0.31b0"
      ],    

This solves the ā€œDetecting blocking callā€ problem of @RowanB . @aivdev i am not so sure if your problem is the same with @RowanB but can you still try this?

Hello,

To answer these questions:
-Alarm code is hard coded into configuration.yaml. Typically, I arm/disarm via the HA homekit integration (i.e. using the Apple Home app on an iPhone). I initially thought the problem might have been related to homekit but actually the results were the same when using the alarm card directly in HA.
-Static IP for IP module is in place.
-No network issues apparent.

I have now updated to 0.31b0. While I havenā€™t tested exhaustively, Iā€™m unable to replicate the previous issues and there are no errors in the log file, so looking positive. I will use as normal and post again if I have any issues.

Thank you again for your work on the integration - itā€™s really appreciated.

Regards,

Rowan

Hi, Iā€™ve a IP module for my crow runner 8/16.
Since a couple of week the app ā€œArrowhead - ELITE Controlā€ seems not work, searching on the internet I found this interesting project, so I decided to integrate allarm system with my Home Assistant.
I sent a emal to arrowhead two days ago for request the firmware with telnet integration, but they they havenā€™t replied to me yet.
If possible, could someone send me that firmware?
Thanks

Sent the link from private message.

I installed the firmware and integrate the allarm system with HA, it work very well.
I have to understand how disarm with or without digit a code, but my probrem is that on the panel of allarm system compare message ā€œPhone line failureā€. How can I resolve this issue?
Thanks