Alarm control panel not working with Google Home

Hi,

I setup an alarm control panel, just as a test:

alarm_control_panel:
  - platform: manual
    name: Allarme
    code: !secret alarm_code
    code_arm_required: true
    arming_time: 30
    delay_time: 20
    trigger_time: 4
    disarmed:
      trigger_time: 0
    armed_home:
      arming_time: 0
      delay_time: 0

Works pretty well, but i wanted to integrate it in my Google Assistant:

google_assistant:
    project_id: home-assista
    service_account: !include ghkey.json
    secure_devices_pin: !secret alarm_code
    report_state: true
    expose_by_default: false 
    entity_config:
        alarm_control_panel.allarme:
            expose: true
            room: Ingresso

The problem is that the created alarm in Google Home looks like this, and it will not let me do anything a part from showing its informations when i click on it:


My attemps:

  • If i ask google ā€œactivate allarmeā€, it says that there is no such mode for ā€œallarmeā€.
  • Tried to change ā€œallarmeā€ to something else, as the name may be referred to other Google stuffs. Nothing
  • Tried to manually write the secure_devices_pin (which, as per documentation, must be the same of the device) in different ways and instead of the !secret, like: ā€œ1234ā€, ā€˜1234ā€™.

I think that iā€™m missing something in the configuration, as it appears that usually users are at least asked a pin when clicking on the icon or asking Google to activate/deactivate the alarm, as reported here: This action requires a security code, but it hasn't been set up in your device's app

Any help?

Valid modes are as listed in the documentation - armed_home/armed_away etc.
Have you tried ā€œHey Google, set alarm to armed_homeā€ or a similar command specifying a similar recognised state?

My working manual alarm integration (that ties together a Konnected.io board, some motion sensors etc.) integrated via Nabu Casa has no clickable actions in the Google Home interface but can be used to set to armed_home and prompts for pin when requested.
NB: although currently Google seem to confuse my ā€œHome Alarmā€ with alarm clock settings - either due to Android 11 update or recent Google changes.

Nope, still giving me ā€œno such mode availableā€ or, if I say ā€œset allarme activeā€, is saying that ā€œallarme is not availableā€.
As well as yours, mine is confusing the word ā€œalarmā€ or ā€œantitheftā€ (!) with the alarm clock (even if the italian world still has nothing to do with it). Had to name it ā€œpanelā€ in order to avoid questions about the alarm clock.

Why are you saying that there are no clickable actions on Google Home? Is it normal or is it just your (and mine) case?
I will give it a try with Apple Homekit as i go back home

I believe itā€™s normal although Iā€™ve nothing to compare against.

I also have no clickable actions on my:

  • Garage door
  • Unifi Cameras (integrated in HA via Unifi Protect component)
    but they can be controlled via voice commands.

Of course I havenā€™t done a deep dive into Googleā€™s documentation as to what one should expect from an alarm panel in Google Home.

This is getting strangeā€¦ If i create a routine in Google Home, iā€™m allowed to choose the ā€œarm the security systemā€ and in actually find the Home Assistant alarm panel modes

But, if i trigger the routine, it says that ā€œantifurto does not support this functionality yetā€

Out of interest Iā€™ve just tried the same and can confirm your experience except for the results - I get a Google search for the routine command :man_shrugging:
Iā€™ve definitely been able to arm and disarm the alarm by voice in the past (it was one of the first things I tested after configuring my alarm setup in HA).

Iā€™d chalk it up to Google weirdness given the time of year - Android version launches are notorious for rapid, random and messed up feature changes by Google.

Did some playing quick playing around.

Bear in mind that my alarm panel is listed in Google Home as ā€œHome Alarmā€ (not terribly original I know):

Also spotted an issue that may be relevant on Github: https://github.com/home-assistant/core/issues/37345

EDIT: hopefully the alarmā€™s status will eventually be reflected in Google Home, similar to how light icons are (now) shown as lit / unlit depending on their actual state.

1 Like

Interesting issue, thanks!

I tried the same on Homekit:

homekit:
    auto_start: true
    filter:
        include_entities:
        - alarm_control_panel.antifurto
    entity_config:
        alarm_control_panel.antifurto:
            code: !secret alarm_code

And it works perfectly, i can see the modes (correctly synched to Home Assistant):

I can deactivate or activate the modes through Siri, even if it does not ask me the pin:

(for the moment, just ā€œarmed - homeā€, the others do not have any effect neither by voice nor by pushing the buttons, even if i do have the ā€œarmed - awayā€ mode in the alarm panel.)

So, given that these are the italian names for the alarm mode, i asked Google Assistant to activate the alarm with the same sentence, with no luck.
BUT.
The disarming sentence works, and in fact it asks me for the pin and then correctly deactivate the alarm:

I guess that for Google Assistant there still is just a translation problem.
So this makes me think that all the configurations are correct for the alarm to work with Google Assistant, but given the fact that there are no ā€œpushableā€ buttons and that the phrasing still has some issues, it leds to think that it doesnā€™t work.

Guess i just have to wait :see_no_evil:

Hi TazUK I know itā€™s been a while since you replied to a thread in HA forum regarding Alarm Control Panel and Google home, thread here : Alarm control panel not working with Google Home

You indicated that you have your Alarm control panel connected with HA - Can you share your code ? Iā€™ve been trying to do this for months and have not yet figured out how to get the Home_Away and Stay connected to the entities created by Konnected configuration in HA.

Thank you in advance.

The entities arenā€™t really directly connected to HA, but are wrapped within another file.
I created a manual alarm control panel:

alarm_control_panel:
  - platform: manual
    name: Home Alarm
    code_arm_required: false
    arming_time: 30
    delay_time: 60
    disarmed:
       trigger_time: 0

and then a series of automations triggered by HA and / or the konnected entities to determine the alarm state, e.g.

# disarming from within from within homeassistant or from the panel
- id: homealarm_disarm
  alias: "Home Alarm - Disarm"
  mode: single 
  trigger:
    # from homeassistant 
    - platform: state
      entity_id: alarm_control_panel.home_alarm
      to: "disarmed"
    # from the panel - konnected sensor indicating alarm state, off = disarmed
    - platform: state
      entity_id: binary_sensor.alarm_armed
      from: "on"
      to: "off"
  condition:
    - condition: or
      conditions:
        - condition: template
          value_template: "{{ (trigger.entity_id == 'alarm_control_panel.home_alarm') and is_state('binary_sensor.alarm_armed', 'on') }}"
        - condition: template
          value_template: "{{ (trigger.entity_id == 'binary_sensor.alarm_armed') and not is_state('alarm_control_panel.home_alarm', 'disarmed') }}"
  action:
    - choose: 
        # triggered from homeassistant - disarm panel if armed
        - conditions: 
          - condition: template
            value_template: "{{ (trigger.entity_id == 'alarm_control_panel.home_alarm') and is_state('binary_sensor.alarm_armed', 'on') }}"
          sequence:
            - service: switch.turn_on
              data:
                entity_id: switch.change_alarm_state
            - wait_template: "{{ is_state('binary_sensor.alarm_armed', 'off') }}"
              timeout: 5
              continue_on_timeout: true     
        # triggered from panel - disarm homeassistant if not already disarmed 
        - conditions: 
            - condition: template
              value_template: "{{ (trigger.entity_id == 'binary_sensor.alarm_armed') and not is_state('alarm_control_panel.home_alarm', 'disarmed') }}"
          sequence:
            - service: alarm_control_panel.alarm_disarm
              data:
                entity_id: alarm_control_panel.home_alarm
            - wait_template: "{{ is_state('alarm_control_panel.home_alarm', 'disarmed') }}"
              timeout: 5
              continue_on_timeout: true             
    - service: *stuff to do when disarmed*           

My state automations cover arming / disarming / triggering the panel (from HA or from the panel itself) and also let me trigger the (HA) alarm with zwave motion sensors etc. that are not part of the alarm system itself. This lets us use the alarm system fobs and panel or HomeAssistant / Google Assistant etc. to arm and disarm the alarm and have the same results without things getting out of sync.

I then have a separate file of automations that covers notifications.

Wow, I have not tried this and I really appreciate you taking the time to provide this input. This is fully integrated with Home Assistant, Konnected and your original traditional alarm panel (I have a honeywell 15P/20P) and keypads.

I also am usng my interior cameraā€™s as motion sensorā€™s but plan on installing newer independent sensors for the performance of it.

I canā€™t thank you enough and will try your code to see if it works in my situation.

AWESOMENESS!!!

1 Like

Hi all,
I have the same problem:
If I say google ā€œactivate allarmeā€, it says that there is no such mode for ā€œallarmeā€.

Not understood if is possible to solve this.

You have to use the mode you want in the phrase, so in English it is ā€œOK Google, set the alarm to armed homeā€ if you want to set the alarm control panel to armed_home

With my Google home I speak in italianā€¦
If I set english as secondary language and I Say: hi Google set antintrusione (my alarm control panel name) to armed home, Google performs an internet searchā€¦

But if i Say in italian: hi Google deactivate antintrusione It works

If I create a routine I see:

But I canā€™t set the alarmā€¦

And if you create a routine with (for example) ā€œarmed homeā€ selected, then run the routine - does it set the alarm?

Google replies: done. But the alarm isnā€™t set

So you can disarm but not arm via Google?

Presumably you can arm directly via HA?

Worth noting that Iā€™m not familiar with HomeKit as weā€™re an Android household.

Yes, I can disarm but not armā€¦
In HA everything worksā€¦
Iā€™m not using homekit, I have androidā€¦

My mistake, I was looking at code youā€™d quoted in an earlier post in this thread.

Sounds like it might be a localisation / translation issue then - perhaps Translate or allow translation of Google Assistant commands to languages other than English Ā· Issue #376 Ā· home-assistant/architecture Ā· GitHub

You may be able to workaround it by creating scripts to arm the alarm and exposing them to GA.

Maybe could be this the problem?
image

The alarm systems is imported to HA by MQTTā€¦

When I arm the alarm by the alarm system keyboard the code is required but HA arms the alarm without the codeā€¦

Maybe Google canā€™t arm the alarm because the code is needed?

PS: in configuration.yaml I donā€™t have any alarm_control_panel configurationā€¦