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

@acdcnow, First, make sure you have the plugin version 0.20…

There is no keypad for now whether you remove the code in the config or not. It will be, for the next version, hopefully next week.

The way it works is like this:
When on disarmed mode, you should see “Arm Away” and “Arm Home” only, no keypad, no disarm… Did you added the “Arm Away” and “Arm Home” options when creating the alarm card?

When you press “Arm Home” or “Arm Away” either from web page or smarttphone, there will be some “Pending” for some seconds (That is the Stay Exit Mode of the Crow alarm), and then “Armed” should be there.

The way i understand from your situation; for whatever reason; Ip module do not accept the “ARM” or “STAY” commands. When you send a disarm, you are basically sending “KEYS xxxxE” to the IP Module, and since your alarm is already in disarmed mode this command acts as an ARM command.

I had the same problem back in version 0.16. The problem with the IP Module was, although the module document says the arm command is “ARM” and \n; i found out that between the command and \n there should be a space: "ARM ". So i changed the code according to this. You can try if that is the situation in your IP Module:

  1. Shut down homeassistant (or crow component only; since you can only have 1 connection to the module)
  2. telnet to your ip module
  3. write STATUS and then press enter to see if the connection is succesful
  4. If succesful, then write "ARM " (Please note that you have to press space bar once after the ARM letters. and press enter button. Check that if the alarm is armed.
  5. If not, this time write “ARM” without a space and press enter. Check that if the alarm is armed now.
    If item 4 is valid, there is no reason why the component is not working. If instead, item 5 is valid for you, i have to send you a corrected component.

HI,

I used all the time .20 as I found your coding with that verison and that was the reason why I bought quickly the IP module. The firmware on the IP module is 1:1 the same that you have.
I guess only the firmware on the runner 8/16 could be different and that may count in this case.
Just to be 100 sure I downloaded it from git again and did an upload, here I could see that the file are the same. Anyway I clean the pycache and started HA again.
Sure the alarm panel is all fine I do have to same with ARM Home and ARM Away, but nothing happens if I click on it. If I ARM the system via keypad1 xxxx+ARM+ENTER button I get the pending status.
If I ARM the system via HomeHabit App I get the ARM away ARM home button and I can hit there the DISARM button as well hence after I hit any ARM button and then I get the arm status for area A.

So if I connect only via telnet (switch of HA) then I get

STATUS
DA -->Area A disarmed
DB -->Area B disarmed
LF -->Line Fail --> because GSM module is not connected any more and CID is connected to IP module
RO -->Read On (all zones are sealed)

"ARM " or only “ARM” does not make a difference…
OKARM --> but nothing else

A --> that should be quick arms area A
OKA --> I get but nothing happens
ARM --> arms the area assigned to keypad 8 arm button (ip module is set to keypad 8 in standard
OKARM --> I get but nothing happens
STAY --> should be stay arms the area assigned to keypad 8 stay button
OKSTAY --> I get but nothing happens
STATUS -->like before
DA
DB
LF
RO

ARM XXXX --> ARM with key
OKARM --> nothing change

So then to use the keypad 1

EAA --> armed the via keypad 1(physical one) so XXXX + ARM + ENTER --> area A IN EXIT DELAY
AA
STATUS
AA --> area A armed
DB -->Area B disarmed
LF -->Line Fail --> because GSM module is not connected any more adm CID is connected to IP module
RO -->Read On (all zones are sealed)

so then I played a little bit around and did the same steps as in HomeHabit in order to check if I can ARM the system via telnet

I can arm the system with the below one
ARM
get back
OKARM
KEYS xxxxE

if I use "ARM " or “ARM” does not make a difference I need to send the “KEYS xxxxE” after in order to ARM the system and get
AA back as Area A armed!

So my Crow runner 8/16 requires a key after the ARM commant in order to arm the system.
same on STAY
STAY
I got
OKSTAY
KEYS xxxxE
OKKEYS
ESA
SA

looks like that the runner 8/16 is setup different to your once.
How the runner 8/16 is setup, that can only be checked I guess by the installer software or?

BTW:
Some questions the alarm system dialler: Can it only be connect once so to IP module or can it still be connected to the GSM module and the IP module?
Is anyone of your using that IP LOOM cable or just the ARR-14 KBUS cable and IN + LIN.

@acdcnow How do you normally arm your alarm using the physical keypad? Do you type in the same code that you use to disarm to also arm? or do you just press the quick arm button and it begins the arm the system without any code? It does sound like you have configured your alarm to require a code to arm the system by what you describe. If that’s the case maybe you need to disable that setting if you wanna quick arm in HA. If you can access installer mode you should be able to change settings.

EDIT: I’m not sure what you mean by “IP LOOM” cable. I only have the KBUS and IN and LIN phone line connections between the IP module and Runner panel. You can kinda see it in the photo of my IP module I posted earlier. No other cables are necessary between the boards.

I’m also wondering if you need to do the steps described in this document, page 5, https://www.aap.co.nz/site/aap/files/Panel%20Accessory%20Manuals/IP-MODULEv3.pdf for setting the alarm panel up for reporting via the dialler. Have you done that? I can’t remember if I did that but I have a feeling I did.

@acdcnow, as Jock suggested, your Quick Arm setting on the panel is not set. You do not need any installer software or anything, you can handle that on the panel itself, using the installer code and required Quick Arm settings. Check out the Runner Manual.

Btw i have a sense that in order to use Area A and B settings, i need to use “KEYS XXXXE” to set arm away instead of “ARM”. If we use this, then you won’t need to set quick arm on the crow panel. But i do not know how to handle stay mode-arm home with code? On the code i handled the numeric keypad, and also carried all system stat binary sensors like battery, ready on, pendant battery, mains etc. to attributes of alarm panel card. So next version you will have these settings as device attributes instead of unnecessary numbers of binary sensors. Corrected some faults on the code also. The only thing missing now is the Area A and area B codes. Hopefully next week…

@jokkydee, Jock that reporting is for CID reporting only, that is numeric code reporting for PC connections, not voice connection. We do not need that, we already have the IP module TCP/IP connection.

@acdcnow, i don’t have GSM module but i do have the Voice Board installed. So when the alarm triggers, i can see that on the HA but also the system is calling me from my cellphone and with the bad voice and a funny accent of my alarm installer guy, it says which contact triggered the alarm. The system makes the call from my landline. As far as i know, if you connect the phone landline, and make the necessary settings on the panel, the system can call you without a need of any extra card. But if you do not have a voice board, it calls you, when you pick up you hear a fax machine or modem sound and you can interrupt (set alarm on or off) with pressing keys on the phone, but you do not understand any confirmation. Yet again, i really do not need this anymore since i have the IP Module now.

https://www.aap.co.nz/shop/Tools/IP-LOOM.html
The IP-Loom enables the Elite-S Upload/Download Software package, to program an Elite-S control system over the Internet, through an IP-Module.

Guess that will not work at all with the firmware that we use…

@febalci Hmm yeah I’m not sure about Arm-Stay using a code. At the moment, I don’t use any stay modes, only Arm-Away so it wouldn’t bother me now. Not sure what others can do about this though. On my physical alarm panel, I have configured button A to quick arm-away area A, and button B to quick arm-away area B.

@acdcnow Oh I see about the loom. Well that sounds pretty unnecessary anyway - it sounds like it’s so that a security company could change settings on your alarm panel via the internet. I don’t see any reason why I would need to do this though, when I can easily change settings myself through the panel. Also if we got the serial interface working with the Upload/Download software there wouldn’t be a need to do it via the IP-Module.

Guys, v0.22 is out on github.
Changes:

  • System binary sensors are converted into alarm control panel device attributes
  • If ‘code’ configuration is missing in configuration.yaml, then keypad is on in Alarm Panel.
  • ‘code’ configuration is moved to ‘areas’ section for area specific code.
  • Corrected some errors

Please update your configuration.yaml according to the sample_configuration.yaml on github page. So basically, remove all items related to ‘system:’ schema, and move ‘code:’ to ‘areas:’ schema under ‘name:’. You can enter different codes to different areas. If you don’t enter ‘code:’ to any area, a keypad will be shown instead.

‘Arm Away’ Process is using ‘KEYS XXXXE’ instead of ‘ARM’ now; that means @acdcnow you don’t have to change your quick arm settings on the crow panel. However, ‘Arm Home’ still uses ‘STAY’, so in order to use that you have to open quick stay anyway.

@jokkydee, you have to change your ‘Mains’ power automation rules to alarm_control_panel device attribute check instead of binary_sensor check.

This version is tested with one area only and it seems like it is working. However, i do not have the setup (two areas), so i couldn’t test it. @jokkydee if you can send your feedback i can work on any bugs…

IMPORTANT: Please backup your previous custom_components/crowipmodule folder if anything goes wrong or contains bugs. I changed many things on the code for v0.22, so anything can go wrong :laughing:

New Power Cut/On automations:

- alias: Power Back On
  trigger:
  - platform: template
    value_template: '{{is_state_attr(''alarm_control_panel.area_a'',''mains'', True)}}'
  action:
  - service: notify.pushover
    data_template:
      message: >
        Elektrikler Geldi... 

- alias: Power Cut
  trigger:
  - platform: template
    value_template: '{{is_state_attr(''alarm_control_panel.area_a'',''mains'', False)}}'
  action:
  - service: notify.pushover
    data_template:
      message: >
        Elektrikler Kesildi!!!

EDIT: Now realized when HA is restarted, this automation sends message ‘Power Is Back On’… Guess can live with this…

@febalci

First of all a big thanks again for the work and all the possible things. Keypad is working great.
I do still have the issue to ARM the system with the ARM_AWAY button.

I can Arm the system right now in the following way.
With or without code does not make a difference

with fixed code in config:
Fist click on ARM_AWAY nothing happens… even if I wait a min or so
then click on ARM_HOME still nothing happens…
then click again on ARM_AWAY a 2nd time and then the system gets ARMED with the 20 sec. pending timeout…
DISARM works with a single click.

What is now strange as well id that the system gets ARMED as ARMED_HOME so STAY

Or if I start first with code + ARM_HOME button and then code + ARM_AWAY I get the same result “stay armed”

could it be that in your alarm_control_panel.py the comment out line should set to active?

    async def async_alarm_arm_home(self, code=None):
        """Send arm home command."""
        self.hass.data[DATA_CRW].arm_stay()

    async def async_alarm_arm_away(self, code=None):
        """Send arm away command."""

        if code:
            self.hass.data[DATA_CRW].send_keypress(str(code))
        else:
            self.hass.data[DATA_CRW].send_keypress(str(self._code))
#            self.hass.data[DATA_CRW].arm_away()  --->!!!!!!!!!!!!!!

@jokkydee you may be right with the LOOM usage. The problem that I have with the system now is that I do not have the installer code as the standard “000000” is not working and the company where I bought the system does not exist any more… So I stuck on that setup or is there a way the reset the whole system without the installer code so to start from scratch?

@acdcnow, it is still funny that the disarm is working but not the arm_away. Because they are basically sending the same message right now. The commented out line in alarm_control_panel.py refers to Quick arm in your case simply does not work. At the moment, whether you enter the code with keypad or from configuration.yaml, the component sends ‘KEYS XXXXE’ to the crow ip module. so that means t should have worked any way. If you like, you enter this in your configuration.yaml:

logger:
  default: debug
  logs:
    custom_components.crowipmodule: debug

and after restarting homeassistant and trying to arm_away the alarm, you can send me the log so i can point what goes wrong. Please do not post your log file here, you can send it to me with private message…

IMPORTANT: For being a dumb of me, i made some errors in the code which causes alarm trigger not to be processed in v0.22. That’s why, you can find v0.23 now on github. Sorry again…

Ok, For future reference, i put here the outcome of discussion between me and @acdcnow, for anyone later who will have the same problem.

In @acdcnow case, because of the settings in crow alarm panel, you have to press arm first, write code and press enter. Likewise, for stay_arm you have to press stay first, write coede and press enter on the crow panel. So, anyone having this and quick arm disabled, you have to make the following change on alarm_control_panel.py:

    async def async_alarm_arm_home(self, code=None):
        """Send arm home command."""
        self.hass.data[DATA_CRW].arm_stay()
        if code:
            self.hass.data[DATA_CRW].send_keypress(str(code))
        else:
            self.hass.data[DATA_CRW].send_keypress(str(self._code))

    async def async_alarm_arm_away(self, code=None):
        """Send arm away command."""
        self.hass.data[DATA_CRW].arm_away()
        if code:
            self.hass.data[DATA_CRW].send_keypress(str(code))
        else:
            self.hass.data[DATA_CRW].send_keypress(str(self._code))

Find the async_alarm_arm_home and async_alarm_arm_away parts in the code and change its content as written above. Please note that you have to correct this issue everytime you update the crowipmodule component since the original code is referring that your quick arm is enabled in the crow panel.

@acdcnow I believe there is a way to factory reset your alarm panel which will also wipe the installer code back to default. I remember reading something about it in a forum. There is a 2 pin header on the PCB which I think needs a jumper put on or removed (whatever it isn’t right now), and then I think you power it up like that if I remember correctly. You might be able to dig up the thread if you google enough. But yeah, it will wipe everything back to default, just keep that in mind.

v.0.24 NOTE:Breaking Change

  • Removed sensor.area_a_keypad and added sensor.crow_alarm_system; this new sensor has all system related attributes only.
  • Handle trigger based disconnection issue
  • Corrected some issues.

Guys, You do not need to update to this version if you are happy with the version you have. Otherwise, if you are going to update to 0.24, you have to check and change some of your automations accordingly…

Also, as a bonus automation; here is a trick to get Zone names on your alarm trigger notifications. If a zone alarm is triggered, this will be send to your notification with the name of the zone; sorry you have to enter all your zone names again in this config because i couldn’t find a way to get configuration.yaml values directly.

- 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 = ['Entrance PIR','Roof MC','Ground MC','Cinema MC','Kitchen PIR','Cinema PIR','Upper Floor MC','Kitchen Windows Wireless','Saloon PIR','Den PIR','Kids PIR','Guest PIR','Bedroom PIR','Bedroom MC','Kids MKC,'Cinema Wireless'] %}
        ALARM: {{ zone_names[state_attr('alarm_control_panel.area_a','alarm_zone') | int -1 ] }}

Hi,

V24 seems ok on HA 0.101.3
On HA 0.103.4 I get some errors in setting up alarm keypad during initialisation.

2019-12-12 15:26:08 INFO (MainThread) [custom_components.crowipmodule] Start CrowIpModule.
2019-12-12 15:26:15 INFO (MainThread) [custom_components.crowipmodule] Established a connection with the Crow Ip Module
2019-12-12 15:26:23 ERROR (MainThread) [homeassistant.components.alarm_control_panel] Error while setting up platform crowipmodule
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/crowipmodule/alarm_control_panel.py”, line 55, in async_setup_platform
hass.data[DATA_CRW],
TypeError: Can’t instantiate abstract class CrowIPModuleAlarm with abstract methods supported_features.

Are you using 103.4 as well

Using 102.3 now; i didn’t go into 103 yet since people are complaining about some component problems. Looks like some issues with python async. I wonder if it is related to " Python 3.6 support is deprecated". Which version of Python do you have on HA?

UPDATE: Found out that HA 103 made a breaking change regarding alarm_control_panel component, so i will update the component in the new version…

Python 3.7.4 so that shoud be ok. Anyway I roll back to 101.3.

UPDATE v.0.25:

  • Corrected HA 103 breaking changes made on alarm_control_panel
  • Outputs controlling and status corrected.

@jokkydee thanks for your help on smoke detector power connection via outputs issue; i made it and it works pretty good. That’s why i also added/corrected outputs management in the component. Once you define your outputs (Outputs 1 and 2 are reserved for siren, don’t forget it), you can see the status and also change the status via newly created switch.crow_output_XXXXX switches. Sample configuration is shown on sample.configuration.yaml on github.

@acdcnow i tested this component with HA 103.4 and using it now.

IMPORTANT: In order to use v.0.25, you have to upgrade your HA to 103 first, because of the breaking changes…

@febalci thanks a lot. I have to update to 103.5 as my ring doorbell has a new oauth process.
I would ask you if you can check that and what do I see, already done.
Thanks a ton!

All is working as it should we, even the output relays.

had to upgrade again because of oauth2 cert issues on ring devices and V.0.25 is running well in 104.0.