Skip to content

Latest commit

 

History

History
221 lines (152 loc) · 11.2 KB

info.md

File metadata and controls

221 lines (152 loc) · 11.2 KB

Crow/AAP Alarm IP Module for Home Assistant

This is a custom component for Home Assistant to integrate Crow Runner and AAP (Arrowhead Alarm Products) alarm systems equipped with the IP Module (IA-IP-MODULE) running Firmware Ver 2.10.3628 2017 Oct 20 09:48:43.

It communicates directly with the IP module over the local network to provide real-time status updates and control.

✨ Features

  • Config Flow: Fully configurable via the Home Assistant UI (no YAML required). All zones are configured in a single step - one name/type pair per zone.
  • Alarm Control Panel: Arm (Away/Stay), Disarm, and Trigger panic alarms for up to 2 Areas (Partitions).
  • Zones: Binary sensors for up to 16 zones. The type you pick (Motion, Door, Window, Smoke, ...) sets the icon and device class of the sensor and is selected from a translated dropdown.
  • Outputs: Control up to 2 switchable outputs (e.g., Garage Door, Gates).
  • System Status: Diagnostic sensors for Mains Power, Battery, Tamper, Phone Line, and Dialler status.
  • Device Registry: every zone entity lives on the single Crow Alarm Sensors device; the panel itself and the system status sensors live on Crow Alarm System. The per-type devices of older releases (Windows, Doors, Motion, ...) are removed automatically once nothing is registered on them.
  • Diagnostics: Download diagnostics includes a per-zone report of the configured type and the device the entity is really registered on.
  • Connection handling: a dropped link is retried once before anything is reported, so a short network blip does not make every entity flap to Unavailable. A status dump that reports no change writes no entity state at all.
  • Dashboard: a ready-to-use Lovelace dashboard with a standard and an expert view ships in dashboards/.

📋 Requirements

  • Home Assistant: Version 2026.10.1 or newer.
  • Hardware: Crow Runner or AAP control panel with an installed IP Module.
  • Network: The IP Module must be connected to the same network as Home Assistant.

🚀 Installation

Option 1: HACS (Recommended)

  1. Open HACS in Home Assistant.
  2. Go to "Integrations" > Top right menu > "Custom repositories".
  3. Add the URL of this repository.
  4. Category: Integration.
  5. Click Install.
  6. Restart Home Assistant.

Option 2: Manual Installation

  1. Download this repository.
  2. Copy the custom_components/crowipmodule folder into your Home Assistant's config/custom_components/ directory.
  3. Restart Home Assistant.

⚙️ Configuration

This integration uses a 4-step configuration wizard.

  1. Go to Settings > Devices & Services.
  2. Click + Add Integration.
  3. Search for Crow/AAP Alarm IP Module.

The Setup Wizard

  • Step 1: Connection

  • IP Address: The local IP of your alarm module.

  • Port: Usually 5002.

  • Pick the firmware build, how the panel is armed, and how many areas / outputs / zones you have.

  • Step 2: Areas

  • Name your partitions (e.g., "House", "Garage").

  • (Optional) Enter a default code if you want to arm/disarm without typing it every time.

  • Step 3: Switches (Outputs)

  • Name your controllable outputs (Output 3 & 4), e.g., "Garage Door".

  • Step 4: Zones

  • All zones are on one page: name each zone and pick its type (Motion, Door, Window, Smoke, ...).

  • The type sets the sensor icon; it does not decide which device the sensor lives on.

  • Tip: Leave unused zones empty.

Migration from YAML

If you previously used the YAML configuration, the integration will automatically import your settings (Zones, Areas, IP) upon the first restart. Once the device appears in the "Integrations" dashboard, you can safely remove the crowipmodule: section from your configuration.yaml.

🛡️ Usage

Alarm Panel

  • Arming: Click "Arm Away" or "Arm Home". If a code is required and not saved in the config, the keypad will appear.
  • Disarming: Enter your code on the keypad and click "Disarm".
  • Keypad: The keypad is always available to send manual commands or codes.

Diagnostic Sensors

System health information is located on the Device page under the Diagnostic category. These sensors indicate problems (e.g., "Low Battery" or "Power Failure").

  • Mains Power (On = Power OK)
  • System Battery (On = Battery Low)
  • System Tamper (On = Tamper Detected)

Outputs

Outputs 1 & 2 are usually hardware relays on the board. Outputs 3 & 4 are the controllable switches configured during setup. They appear as standard Switch entities in Home Assistant.

Here is a detailed CHANGELOG summarizing the refactoring from the original YAML-based code to the new Home Assistant 2026-compliant integration.

Changelog

[2.2.0] - Connection handling, Home Assistant 2026.10.1

Fixes the flapping between Unavailable and connected, and the flood of state writes it caused.

  • A short network blip is no longer reported. A link that had been up is retried once before the disconnect is announced, so a drop that heals within a second causes no unavailable / available pair and no entity rewrite.
  • A status dump that reports no change writes no state. The module repeats its whole status after every STATUS probe; a line whose value the panel already has is dropped instead of being forwarded to every entity.
  • The keep-alive default is 30 s (the panel driver's own interval) instead of 300 s, which was long enough for the module to close the idle socket by itself. Entries created earlier are migrated automatically; a value you chose yourself is kept and only clamped into a usable range.
  • No redundant post-connect refresh - the STATUS dump on connect already carries the full state.
  • Minimum Home Assistant is now 2026.10.1, and the integration adopts the entity lifecycle hook introduced in 2026.10 (in-place entity_id changes).
  • No configuration change is needed.

[2.2.0] - Zone devices reworked

All zone entities now live on one device, Crow Alarm Sensors. Home Assistant links an entity to a device only when it is registered for the very first time, so the previous per-type devices (Windows, Doors, Motion, ...) could leave a zone on the device of a type it no longer had - and re-configuring the zone never moved it.

  • Every existing zone entity is moved onto Crow Alarm Sensors on the next restart.
  • Entity ids are left exactly as they are, so dashboards and automations keep working. Entities created from scratch get binary_sensor.crow_alarm_sensors_<name>.
  • The retired per-type devices are removed automatically once nothing is registered on them.
  • The zone type still sets the sensor icon and device class (Fenster, Tür, Bewegung, Rauch, ...).
  • Download diagnostics now reports, per zone, the configured type and the device the entity is really registered on.
  • No configuration change is needed.

[2.0.0] - Refactoring for Home Assistant 2026.09+

This release marks a complete rewrite of the integration to support modern Home Assistant standards, introducing UI configuration (Config Flow) and removing the dependency on YAML configuration files.

💥 Breaking Changes

  • YAML Configuration Removed: The integration no longer relies on configuration.yaml. Existing YAML configurations are automatically imported once, but future changes must be made via the UI.

  • Entity ID Changes: Entity IDs may have changed due to the new naming standards.

  • Old: binary_sensor.crow_zone_1_kitchen (Manual naming)

  • New: binary_sensor.crow_alarm_system_zone_1_name (Automatic device naming)

  • Attributes to Entities: System attributes (Mains Power, Battery, Tamper, Phone Line) are no longer attributes of a single sensor. They are now individual Binary Sensors categorized as "Diagnostic". Template sensors used to extract these values are no longer needed.

✨ Added

  • Config Flow (UI Setup): Complete 4-step setup wizard:
  1. Areas: Configure Partition names and codes.
  2. Outputs: Configure names for switchable outputs (3 & 4).
  3. Zones: Configure names and types for 16 zones (with Dropdown selection).
  4. Connection: Set IP, Port, and Timeout.
  • Options Flow: Ability to re-configure names, codes, and zone types via the "Configure" button on the integration page without restarting HA.
  • Device Registry: All entities (Alarm Panel, Sensors, Switches) are now correctly grouped under a single device: "Crow Alarm System".
  • Translations: Added full English (en.json) and German (de.json) translations for all configuration steps and entity names.
  • Icons: Added specific icons for the Alarm Panel entity (mdi:shield-home) and Relays.
  • Import Flow: Logic to automatically import existing settings from configuration.yaml to the new internal storage.

🛠 Changed

  • Entity Naming Standard: Implemented _attr_has_entity_name = True. Entities now inherit the device name, preventing double naming (e.g., "Crow Alarm System Area A" instead of "Crow Alarm System Crow Area A").

  • Alarm Panel Logic:

  • Forced Keypad visibility (CodeFormat.NUMBER) to allow manual code entry even if a default code is configured.

  • Refined Arming logic: Sends the arm command first, followed immediately by the code (required for Crow systems).

  • Made manual code entry optional if a default code is set in the config.

  • Zone Types: Zone types are now selected via a standardized Dropdown menu instead of free text, preventing invalid device class errors.

🐛 Fixed

  • Blocking I/O Error: Fixed Bootstrap stage 2 timeout by moving the initial connection process (controller.start()) to a background executor job. Home Assistant startup is no longer blocked if the alarm panel is offline.
  • Thread Safety Crash: Fixed Fatal error: protocol.data_received(). The library callbacks now use hass.loop.call_soon_threadsafe() to dispatch updates to the main event loop safely.
  • Attribute Error: Fixed AttributeError: 'CrowIPAlarmPanel' object has no attribute 'ip'. The Host IP is now stored locally in the entity wrapper instead of relying on the library object.
  • Config Flow 500 Error: Added robust None-checks and default values in the Options Flow to prevent crashes when reading empty or legacy configuration data.

🗑 Removed

  • Manual Template Sensors: The need for manual template sensors in configuration.yaml to read battery/power status is removed. These are now native entities.
  • Deprecated Code: Removed usage of hass.loop passed to the external library (deprecated in HA).

🔧 Troubleshooting

Enable Debug Logging: If you encounter issues, enable debug logging to see the raw communication with the module.

Add this to your configuration.yaml:

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

Common Errors:

  • Bootstrap stage 2 timeout: The integration couldn't connect to the IP during startup. It will keep trying in the background. Check your IP address.
  • 500 Internal Server Error: Ensure you cleared your browser cache (CTRL+F5) after updating the integration.

Credits

Based on the pycrowipmodule library. Original custom component author: @febalci. Refactored for Home Assistant 2025+ with Config Flow support.