Alarmo Documentation

repository·main·Indexed 24 days ago

https://github.com/nielsfaber/alarmo

An alarm system integration for Home Assistant (version 1.10.12) that provides a UI-driven management tool to turn existing sensors into a security system. It includes a custom component for managing alarm panel entities, a GUI for configuration, and a custom UI card for arming and disarming. Key features include support for multiple arm modes (away, home, night, vacation, and custom bypass), individual user pincodes, independent area management, and an Alarm Master for synchronizing multiple areas.

Tokens
12.3K
Snippets
21
Records
54
Agent score
81%

What's inside Alarmo

  1. Overview of Alarmo

    main

    Alarmo is an alarm system integration for Home Assistant that operates within the alarm_control_panel domain. It allows you to combine existing Home Assistant sensors into a cohesive security system managed via a browser-based UI.

    Alarmo consists of three main parts:

    1. Alarmo component: A custom component for Home Assistant that manages the states of alarm panel entities.
    2. Alarmo panel: A GUI for configuring settings such as sensors, delays, and actions without requiring YAML.
    3. Alarmo card: A custom UI card used for arming and disarming the alarm.

    Key features include support for up to 4 arm modes (armed_away, armed_home, armed_night, armed_custom_bypass), multiple users with individual pincodes, and built-in actions like push notifications or siren activation.

  2. Check arming readiness with `alarmo_ready_to_arm_modes_updated`

    main

    Alarmo monitors sensors to predict if the conditions for specific arm modes are met. The alarmo_ready_to_arm_modes_updated event provides these predictions before you attempt to arm.

    Important Note on Motion Sensors: While the alarm is disarmed, Alarmo does not watch motion sensors to prevent excessive recalculation. It is recommended to set an exit delay large enough so that motion sensors do not cause arming to fail.

    Event Data Properties:

    • entity_id: The alarm's Entity-ID.
    • area_id: The internal Alarmo ID for the area.
    • armed_away: true/false if conditions for away mode are met.
    • armed_home: true/false if conditions for home mode are met.
    • armed_night: true/false if conditions for night mode are met.
    • armed_custom_bypass: true/false if conditions for custom_bypass mode are met.
    • armed_vacation: true/false if conditions for vacation mode are met.
  3. How the Master Alarm state is determined

    main

    The Master Alarm state is a high-level abstraction that reflects the collective state of all configured areas. The state is determined based on the following priority logic:

    ConditionMaster Alarm state
    One or more areas have state triggeredtriggered
    One or more areas have state pendingpending
    One or more areas have state arming, others have state armed_away, armed_home, armed_night, armed_vacation or armed_custom_bypassarming
    All areas have state armed_awayarmed_away
    All areas have state armed_homearmed_home
    All areas have state armed_nightarmed_night
    All areas have state armed_vacationarmed_vacation
    All areas have state armed_custom_bypassarmed_custom_bypass
    All areas have state disarmeddisarmed
    Otherwise(previous state is kept)

    Important Considerations:

    • Synchronization: If the Master Alarm is used for arming/disarming, you should avoid scenarios where some areas are disarmed while others are armed, as the Master cannot determine its state in this condition.
    • Independent Operation: If areas are operated independently, the user is responsible for maintaining synchronism. Using a Master Alarm is not recommended for independent area operation.
    • Command Propagation: Arming or disarming the master propagates the action to all areas. If arming an area fails (e.g., due to blocking sensors), the entire arming procedure is aborted and all areas are disarmed.
    • Available Modes: The available arm modes for the Master Alarm are the intersection of modes available in all areas (only modes common to all areas are available).
  4. Use the Alarmo Alarm Master

    main

    If you have multiple areas defined, you can enable the Alarm Master in the general tab under general settings.

    The Alarm Master creates an additional alarm_control_panel entity that acts as a master controller, watching the states of all individual area entities and mirroring its own state to synchronize them.

  5. Use Sensor Groups to reduce false triggers

    main

    Sensor groups help prevent false alarms (common with PIR motion sensors) by requiring consecutive events from different sensors to trigger the alarm.

    How it works:

    • In a group, the triggering of a single sensor is ignored.
    • The alarm is only triggered if 2 different sensors in the group trigger consecutively.
    • A time-out time must be configured; if the interval between events exceeds this, they are no longer considered related.

    Constraints:

    • A sensor can only belong to one group.
    • A group must contain at least 2 sensors to function.
    • There is no limit to the number of groups, but it is recommended to minimize them (e.g., one group per room).

    Setup: Click the 'setup groups' button while editing a sensor to view existing groups or create new ones.

  6. Control specific Alarmo areas via MQTT

    main

    When using multiple areas, Alarmo publishes state updates to dedicated topics for each area using the pattern alarmo/<area_name>/state.

    To target a command to a specific area, include the area property in your JSON command payload. The <area_name> must be the slug of the area name (lowercase, with non-alphanumerical characters replaced by underscores).

    If no area is provided, the command is addressed to the Master Alarm.

    {
      "command": "<my command>",
      "code": "<my pin or password>",
      "area": "<area_name>"
    }
  7. Understand Alarmo arm modes

    main

    Alarmo uses different arm modes to define security zones or perimeters. Each mode represents a specific set of sensors. You can enable or disable these modes in the general tab of the Alarmo configuration UI using flip switches.

    The supported modes are:

    • armed_away (Away)
    • armed_night (Night)
    • armed_home (Home)
    • armed_vacation (Vacation)
    • armed_custom_bypass (Custom)
  8. Configure and manage Alarmo Areas

    main

    An Area is a physical compartment (e.g., garage, garden) that can be armed and disarmed independently. Alarmo creates a unique alarm_control_panel entity for each area.

    Key Features

    • Independent Configuration: Each area has its own sensors, arm modes, exit/entry times, and automations.
    • Entity IDs: The entity ID is derived from the area name.
    WARNING

    Renaming an area changes its entity ID. This will break any existing Lovelace cards or Home Assistant automations that reference the old ID.

    Management

    In the general tab of the Alarmo configuration UI, you can:

    • Add new areas.
    • Rename existing areas.
    • Remove areas.

    Alarmo requires at least one area to be configured to function.

  9. Configure actionable push notifications

    main

    Alarmo supports actionable notifications, allowing you to interact with the alarm directly from a mobile push message. This is particularly useful for the 'failed to arm' event.

    Available Actions

    actionDescriptionSuitable events
    ALARMO_RETRY_ARMRepeats the failed command (succeeds only if the blocking issue is resolved).Failed to arm
    ALARMO_FORCE_ARMRepeats the failed command but bypasses the problematic sensor(s).Failed to arm
    ALARMO_DISARMDisarms the alarm.Armed, Leave, Entry, Triggered
    ALARMO_ARM_AWAY<br>ALARMO_ARM_HOME<br>ALARMO_ARM_NIGHT<br>ALARMO_ARM_VACATION<br>ALARMO_ARM_CUSTOM_BYPASSArms the alarm in the specified mode.None (intended for external automations)

    Setup Instructions

    1. In the Alarmo notifications editor, create a notification and select an event.
    2. Choose your iOS/Android device as the target.
    3. Switch to YAML mode.
    4. Extend the data section to include the actions list.

    Note: If you have multiple areas configured, actionable notifications only work for the alarm master because area information cannot be sent with the action data.

    data:
      ... # your message and title should be here already
      data:
        actions:
          - action: ALARMO_RETRY_ARM
            title: Retry Arm # feel free to change this text
          - action: ALARMO_FORCE_ARM
            title: Force Arm # feel free to change this text
  10. Uninstall Alarmo

    main

    To completely remove Alarmo, follow these steps:

    1. Remove from Home Assistant: Go to Configuration -> Integrations, click the three dots on the Alarmo card, and select Delete.
    2. Remove Files:
      • If using HACS: In the HACS panel, go to Integrations, find Alarmo, click the three dots, and select Uninstall.
      • If installed manually: Delete the alarmo folder from your custom_components directory.
    3. Restart Home Assistant to complete the removal.
  11. Switch devices using Alarmo Actions

    main

    Alarmo includes a built-in panel to automatically switch actuators (like sirens or lights) based on alarm states.

    Setup Procedure

    1. Open the Alarmo configuration panel and click Actions in the top menu.
    2. In the Actions panel, click New Action.
    3. Select the event to trigger the device.
    4. Pick the HA entity from the list.
    5. Choose the desired state (on or off).
    6. Save the automation.

    Supported entity types: switch, input_boolean, light, script. Limitation: Actions are currently limited to turning on or turning off an entity.

  12. Create readiness indicator entities using events

    main

    You can convert the alarmo_ready_to_arm_modes_updated event into a Home Assistant entity to show readiness information (e.g., green/red indicators) on a dashboard. This is useful for indicating whether specific arming modes are currently available based on sensor states.

    To create a binary sensor that indicates if the alarm can be set to armed_away, use a template trigger listening for the alarmo_ready_to_arm_modes_updated event for your specific Alarmo entity.

    template:
      - triggers:
          - trigger: event
            event_type: alarmo_ready_to_arm_modes_updated
            event_data: 
              entity_id: alarm_control_panel.alarmo
        binary_sensor:
          - name: "Alarmo Ready To Arm Away"
            state: '{{ trigger.event.data.armed_away }}'