Expected Reading Time: 17 minutes

Are you looking for an effective yet user-friendly solution to make your apartment or house more secure? Then Alarmo, the smart alarm system integration for Home Assistant, could be just the thing for you. In this article, I'll guide you through the exciting world of Alarmo and show you how to set up and use your own virtual alarm system.

For detailed instructions and an explanation of all configuration options, I recommend the YouTube video linked below. In this video, every single setting is explained in detail so that you receive comprehensive instructions for the exact setup. You can find any code from the video in this article so that you can use it directly without having to type it in.

What is Home Assistant?

Home Assistant is an open source platform for home automation that aims to connect and centrally control all devices in the home. It is designed to provide a unified user interface and simple, flexible control for a variety of smart home devices from different ecosystems. Here are some points in favor of Home Assistant:

  1. CompatibilityHome Assistant supports thousands of devices and services from various manufacturers, including lighting, air conditioning, heating, cameras, weather sensors, voice assistants and more.
  2. Local controlUnlike many commercial smart home platforms that rely on cloud services, Home Assistant runs locally on your network. This means increased privacy and reliability, as your smart home devices work even without an active internet connection.
  3. Automation and scenesOne of the main features of Home Assistant is the ability to create complex automations and scenarios. For example, you can have lights switch on automatically when it gets dark or turn on the heating when the temperature falls below a certain level.
  4. Simple user interfaceHome Assistant offers a user-friendly interface that makes it easy to monitor and control devices. This interface is fully customizable.
  5. Integration with voice assistantsHome Assistant can be integrated with voice assistants such as Amazon Alexa or Google Assistant to enable voice-controlled control of your smart home devices.
  6. Open source and community-drivenSince Home Assistant is open source, it is supported by an active community that is constantly developing new integrations and improving existing ones.
  7. Data protection and securityAs a locally running platform, Home Assistant has the advantage that the data remains within its own network. This protects privacy and increases security compared to cloud-based solutions.

In summary, Home Assistant is a powerful and flexible solution for those who want to design their own smart home and control their devices centrally, regardless of the manufacturer or ecosystem.

Alarmo: An overview

Alarmo is an integration developed specifically for Home Assistant that allows you to set up a customized alarm system in your home. It combines ease of use with deep integration into the Home Assistant ecosystem, allowing you to create a customized security solution for your home.

The integration is comparable to the manual alarm in Home Assistant, but offers additional functions and simpler operation. Alarmo consists of three parts:

  • Alarmo component
  • GUI for configuring the alarm settings (sensors, delays, actions, etc.)
  • User-defined card for activating/deactivating the alarm.

It enables various alarm modes such as "Away", "Home", "Night" or "Vacation", each with customizable delays and security perimeters. Sensors for doors, windows or movements can be individually configured and combined into sensor groups to reduce false alarms. In addition, Alarmo supports MQTT for external control and offers integrated automation actions. Multiple users can also be set up with individual codes and authorizations. Alarmo can be divided into several independently controllable areas, each with its own sensors and settings. Further detailed information and possibilities of Alarmo can be found on the GitHub page.

Alarmo supports various third-party platforms for extended functionalities. This includes integration with Android MQTT Alarm Panels and Apple HomeKit, allowing the alarm system to be controlled and monitored via these platforms. A connection to Google Home is also possible, which enables the alarm system to be operated via Google Assistant devices. These integrations significantly expand the functionality and accessibility of Alarmo in a smart home network.

Define zones and sensors

Now define different zones in your home, such as the living room, kitchen or bedroom. Then assign suitable sensors to each area. These sensors can be door and window sensors, motion detectors or even smoke detectors. You have full control over which sensors are active in which zone.

Setting alarm modes and delays

Alarmo offers you the flexibility to define different alarm modes, such as "Home", "Away" or "Night". You can set individual delays for each mode so that you have enough time to activate or deactivate the system before the alarm is triggered.

Create automations and actions

One of Alarmo's strengths is the ability to create automations and actions based on the status of your alarm system. For example, you can automatically turn on lights when the alarm is triggered or send notifications to your cell phone to inform you of suspicious activity.

Manage multiple users and access codes

With Alarmo, you can create multiple users for your alarm system and assign each user their own code. This means you always have an overview of who has activated or deactivated the system and when.

Integration with other smart home devices

As Alarmo is part of the Home Assistant ecosystem, you can integrate it seamlessly with other smart home devices. Combine it with surveillance cameras, smart door locks or lighting systems to make your security system even more comprehensive.

Installation of HACS and integration of Alarmo in Home Assistant

Step 1: Installing HACS in Home Assistant

Home Assistant Community Store (HACS) is a custom add-on for Home Assistant that provides access to a variety of custom integrations and plugins developed by the community. How to install HACS:

  1. Check requirements: Make sure that your Home Assistant is ideally up to date.
  2. Download Execute script: Open a terminal for the Docker container version or the core version.
    • Docker: Dial into the container with: docker exec -it homeassistant bash or (similar)
    • Core: Switch to the user who is running Home Assistant
    • Execute the following command for both variants:
      wget -O - https://get.hacs.xyz | bash -
  3. Restarting the Home Assistant: After the files have been copied, restart Home Assistant.
  4. Integrate HACS into Home Assistant: In the Home Assistant interface, go to "Configuration" > "Integrations" > "Add" and search for HACS. Add it and enter your GitHub token if prompted.

For the supervised version, please refer to the Documentation of HACS itself to read about the installation.

Step 2: Add Alarmo integration via HACS

Once HACS is installed, you can simply add Alarmo:

  1. Open HACS: Go to HACS in the Home Assistant interface.
  2. Search for integrationClick on "Integrations" and use the search function to search for "Alarmo".
  3. Install AlarmoFind Alarmo in the list and click on "Install". This will add the integration to your Home Assistant.
  4. Restarting the Home Assistant: Start Home Assistant again to apply the changes.
  5. Alarmo ConfigureAfter the restart, you can set up and customize Alarmo via "Configuration" > "Integrations" in Home Assistant.

Conclusion

With these steps, you have successfully installed HACS in your Home Assistant and added the Alarmo integration. This powerful combination opens up a world of additional features and customizations that have been and are being developed by the Home Assistant community. More blog posts and videos on useful integrations to follow. If you don't want to miss it, subscribe to my YouTube channel!

Configuration of Alarmo

You can create a map for the Home Assistant Dashboard using Markdown. You can use the following template for this:

Notifications

In Alarmo, you can set up notifications for various alarm system events that are sent to your smartphone. These notifications can inform you about important events related to your alarm system, such as when the alarm is activated or deactivated, when an alarm is triggered or when a specific sensor is triggered. Here are some ways you can use notifications in Alarmo:

  1. Alarm activation/deactivationReceive a notification when your alarm system is activated or deactivated. This is useful to check if the system has been activated as planned when you leave the house or to be informed if someone else deactivates the system.
  2. Alarm triggeringReceive immediate notifications when the alarm is triggered. This can be in real time as soon as a sensor is triggered or after a delay if you have set up an input or output delay.
  3. Sensor triggeringConfigure notifications for specific sensors. For example, you could be notified when a door or window sensor is triggered, even if the alarm is not armed.
  4. System status changesNotifications about changes in the status of the alarm system, such as when the system switches to a different mode (for example, from "Home" to "Away") or when an error occurs.
  5. User-defined messages and automationsYou can set up custom messages for different scenarios and link them to Home Assistant automations. For example, a notification could contain a specific message indicating the triggered event.
  6. Integration with other servicesYou can integrate Alarmo with services such as Pushover, Telegram, SMS or email to receive notifications via these channels.

It is important to configure the notification settings carefully to avoid being flooded with messages, especially if you have many sensors or if your system is sensitive. The exact steps to set up notifications depend on your specific Home Assistant configuration and the services you use.

Message to smartphones in the event of an alarm

service: notify.smartphones
data:
  message: "The alarm has been triggered! Cause: {{open_sensors|lang=en}}."
  title: ⚠️ INTRUSION ALARM! Someone is in the apartment! ⚠️
  data:
    notification_icon: mdi:alert
    channel: Emergency
    priority: high
    ttl: 0
    color: red
    push:
      sound:
        name: default
        critical: 1
        volume: 1

Actions

With actions in Alarmo, you can set up various automated reactions to events in your alarm system in Home Assistant. These actions can be configured to be executed on specific alarm conditions or sensor triggers. One popular action is the use of text-to-speech (TTS) messages via audio devices such as Alexa or Amazon Echo Dot. Here are some examples of how you can use actions in Alarmo:

  1. TTS notifications via Alexa/Amazon EchoWhen the alarm is triggered, you can have a TTS message sent via your connected Alexa or Echo devices. This message could, for example, be a warning such as "Attention, burglar alarm triggered!".
  2. Switch on the lightsYou can set your smart lights to turn on automatically when the alarm is triggered to deter potential intruders or to alert your neighbors to a potentially dangerous situation.
  3. Sending notificationsIn addition to TTS messages, you can also send notifications to your smartphone or other devices when certain events occur.
  4. Activating a sirenWhen the alarm is triggered, a connected siren can be activated automatically to attract attention and deter intruders.
  5. Playing recordingsYou could also play a pre-recorded message or an alarm sound via your smart speakers.
  6. Automatic armingAlarmo can be set up so that the system is automatically armed at a certain time or under certain conditions.

To implement these actions, you must create corresponding automations in Home Assistant. To use TTS via Alexa or Amazon Echo Dot, it is necessary that these devices are correctly integrated into your Home Assistant system and that you have configured the corresponding services (such as TTS).

Note that some of these actions may require additional integrations or skills, especially if you use third-party services such as Alexa. The exact procedure may vary depending on your devices and your individual configuration.

Announcement via Alexa

- service: notify.alexa_media_saschas_echo_dot_living_room
  data:
    message: The police have already been alerted.
    data:
      method: speak

Automations

Automations in Home Assistant offer the possibility to create intelligent and reactive scenarios around the Alarmo alarm system. These can be used in a variety of ways to make your home security system more effective and user-friendly. Here are some examples of automations that you can implement with Alarmo in Home Assistant:

  1. Automatic arming of the alarmYou could set up an automation that automatically sets the alarm, for example at a certain time when no one is at home or based on your location (geofencing).
  2. Notifications when an alarm is triggeredConfigure an automation that immediately sends a notification to your smartphone when the alarm is triggered, possibly even with additional information about which sensor triggered the alarm.
  3. Light control on alarmAutomate your smart lights to turn on or flash when the alarm is triggered, which can serve as both a deterrent and for better visibility.
  4. Camera recordings in the event of an alarmIf your system has surveillance cameras, you can create an automation that automatically starts recording when the alarm is triggered or sends live feeds to your device.
  5. Control of other smart home devicesIntegrate other smart home devices into your automation, for example automatically switching off heating or air conditioning when the alarm is set.
  6. Voice output via smart speakersUse the text-to-speech (TTS) functions of your smart speakers to make announcements when certain alarm events occur.
  7. Automatic deactivation of the alarmCreate an automation that deactivates the alarm as soon as a trusted device (such as your smartphone) is connected to the home network.
  8. Creation of scenesCombine several actions in scenes that are triggered by certain alarm events. For example, when you return home, the light could be switched on, the heating turned up and the alarm deactivated.

To set up these automations, you need to set up the appropriate triggers, conditions and actions in the Home Assistant user interface or in your configuration.yaml-file. Home Assistant's powerful automation system allows you to control almost any conceivable action in relation to your alarm system and other connected devices.

Automated activation of the alarm system through geofencing

alias: Alarm on - when no one is at home
description: ""
trigger:
  - platform: state
    entity_id:
      - zone.home
    to: "0"
condition:
  - condition: state
    entity_id: alarm_control_panel.apartment
    state: disarmed
action:
  - service: alarm_control_panel.alarm_arm_away
    data: {}
    target:
      entity_id: alarm_control_panel.apartment
mode: single

This Home Assistant automation is designed to control the alarm system (specifically the alarm control panel with the entity ID alarm_control_panel.apartment) automatically to "Away" mode (arm_away) when no one is at home. Here is a step-by-step explanation of the individual parts of the automation:

  1. AliasThe alias "Alarm on - when no one is at home" is the name of the automation that allows you to easily identify it.
  2. Trigger:
    • Platform: state means that the automation is triggered when the status of a specific entity changes.
    • Entity ID: zone.home refers to the Home-Assistant-Zone, which normally represents your home.
    • To: "0" indicates that the trigger is triggered when the number of people in the zone.home falls to 0, i.e. when nobody is at home.
  3. Condition:
    • Condition: The condition type state checks the status of a specific entity.
    • Entity ID: alarm_control_panel.apartment is the specific alarm system that is controlled.
    • State: disarmed means that the action is only executed if the alarm system is currently deactivated.
  4. Action:
    • Service: alarm_control_panel.alarm_arm_away is the service that is called to set the alarm system to away mode.
    • Data: Empty data {} indicate that no additional information is required.
    • Target: Indicates the specific alarm system to which the action relates (alarm_control_panel.apartment).
  5. Fashion:
    • The single-mode means that the automation is not triggered again as long as the previous execution is still running.

In summary, this automation ensures that your alarm system is automatically armed when everyone has left the house and the system was not activated (disarmed) at that time.

Automated deactivation of the alarm system through geofencing

alias: Alarm off - when someone comes home
description: ""
trigger:
  - platform: state
    entity_id:
      - zone.home
    from: "0"
condition: []
action:
  - service: alarm_control_panel.alarm_disarm
    data: {}
    target:
      entity_id: alarm_control_panel.apartment
mode: single

This Home Assistant automation automatically deactivates your home's alarm system when someone comes home. Here is a detailed explanation of the individual components of the automation:

  1. AliasThe alias "Alarm off - when someone comes home" is the name of the automation that allows you to easily identify it.
  2. Trigger:
    • Platform: state means that the automation reacts to a change of state of a specific entity.
    • Entity ID: zone.home refers to the defined "Home" zone in Home Assistant. This zone usually represents your place of residence.
    • From: "0" indicates that the trigger is triggered when the number of people in the zone.home rises from 0, i.e. when someone comes home.
  3. Condition: In this case there are no conditions (condition: []), which means that the action is always executed when the trigger is triggered, regardless of the current state of other systems or variables.
  4. Action:
    • Service: alarm_control_panel.alarm_disarm is the service that is called to deactivate the alarm system.
    • Data: Empty data {} means that no additional parameters are required for the service call.
    • Target: Specifies the affected alarm system (alarm_control_panel.apartment).
  5. Fashion:
    • The single-mode means that the automation is not triggered again while it is already running.

In summary, this automation ensures that your alarm system (alarm_control_panel.apartment) is automatically deactivated as soon as someone comes home. This is particularly useful to avoid unintentional alarm triggers when household members return.

Automated (red) flashing of all lights

alias: Alarm - Lights
description: ""
trigger:
  - platform: state
    entity_id:
      - alarm_control_panel.apartment
    to: triggered
condition: []
action:
  - service: scene.create
    data:
      scene_id: before_alarm
      snapshot_entities: >-
        {{ expand(state_attr('light.all_lights', 'entity_id')) |
        map(attribute='entity_id') | list }}
    alias: snapshot state of all lights
  - service: light.turn_on
    data: {}
    target:
      entity_id:
        - light.bathroom_ceiling_lights
        - light.dreamview_t1
        - light.cone_lamp
        - light.living_wall
        - light.kitchen_led
    alias: Switch on the colored lights to save their status
  - service: scene.create
    data:
      scene_id: before_alarm_lights_on
      snapshot_entities: >-
        {{ expand(state_attr('light.all_lights', 'entity_id')) |
        map(attribute='entity_id') | list }}
  - repeat:
      sequence:
        - parallel:
            - service: light.toggle
              data:
                brightness: 255
              target:
                entity_id:
                  - light.corridor_ceiling_lights
                  - light.kitchen_ceiling_lights
                  - light.desk
                  - light.nightlight
            - service: light.toggle
              data:
                color_name: red
                brightness: 255
              target:
                entity_id:
                  - light.dreamview_t1
                  - light.bathroom_ceiling_lights
                  - light.living_wall
                  - light.cone_lamp
        - delay:
            hours: 0
            minutes: 0
            seconds: 1
            milliseconds: 0
      while:
        - condition: state
          entity_id: alarm_control_panel.apartment
          state: triggered
        - condition: template
          value_template: "{{ repeat.index <= 500 }}"
  - delay:
      hours: 0
      minutes: 0
      seconds: 3
      milliseconds: 0
  - service: scene.turn_on
    data: {}
    target:
      entity_id: scene.before_alarm_lights_on
    alias: Restore the state of the colored lights (because of the colors)
  - service: scene.turn_on
    data: {}
    target:
      entity_id: scene.before_alarm
    alias: Restore the status of all lights
mode: single

This Home Assistant automation "Alarm - Lights" reacts when the alarm system (alarm_control_panel.apartment) is triggered and controls various lighting scenarios in your home. Automation is somewhat more complex and involves several steps:

  1. Trigger:
    • The automation is triggered when the status of the alarm_control_panel.apartment to triggered (triggered) changes.
  2. No conditions:
    • There are no conditions that must be met for the actions to be executed.
  3. Actions:
    • Snapshot of the current light status: First a scene called before_alarm which stores the current state of all lights. This is done with a Jinja2 template that stores all entities under light.all_lights and records their status.
    • Switching on certain lightsVarious lights in the house (such as bathroom lights, decorative lights, etc.) are switched on to create a visual alarm effect.
    • Snapshot of the status with lights switched on: Another scene before_alarm_lights_on is created to save the status of the lights after switching on.
    • Repeated flashing of the lights: A loop (repeat) is started, in which various lights are switched (on/off). This is done in a parallel structure to control several lights at the same time. The loop continues as long as the alarm system remains triggered and for a maximum of 500 runs.
    • Short delayA short delay of 3 seconds before the original light scenes are restored.
    • Restoring the light scenes: First, the state of the colored lights with the scene before_alarm_lights_on restored, then the original state of all lights with the scene before_alarm.
  4. Mode:
    • The mode single ensures that the automation is not triggered again as long as it is already running.

This automation aims to use visual effects (such as flashing lights) to attract attention and deter potential intruders in the event of an alarm, while at the same time saving and then restoring the previous state of the lights.

YouTube video implementation

Conclusion

Alarmo in Home Assistant offers you a powerful, customizable and user-friendly solution to make your home safer. By cleverly using sensors and automations, you can create an alarm system that is perfectly tailored to your needs. Try it out and experience how simple and effective home security can be!


0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

en_US