Alarm.com List Index Out of Range

Now that this is rock solid, at least in my opinion. Is there room for a couple tweaks? Like, can it say Armed Home instead of armed_home? Same with away, and disarmed. I am able to fix it with a template sensor but then you can’t arm/disarm from the UI. Open to other suggestions if there are any.

Also, I imagine it is a lot of work but, fully integrated into HAss instead of a custom component?

Thank you for this awesome custom component though. Every night I smile at how much more responsive it is than the previous integration.

I use a template sensor, as you suggested, to change status (as well as custom icons / colors), and then use a script via the UI to set the alarm to home/away based on my/my wife’s location:

Template Sensor:

alarm_dot_com_sensor_home:
      friendly_name: "Alarm.com Home Sensor"
      value_template: >-
        {% if is_state('alarm_control_panel.home', 'armed_away') %}
          away
        {% elif is_state('alarm_control_panel.home', 'armed_home') %}
          stay
        {% else %}
          disarmed
        {% endif %}
      entity_picture_template: >-
        {% if is_state('alarm_control_panel.home', 'armed_away') %}
          /local/custom_icons/shield-home-away.png
        {% elif is_state('alarm_control_panel.home', 'armed_home') %}
          /local/custom_icons/shield-home-yellow-FDD835.png
        {% else %}
          /local/custom_icons/shield-home-blue-44739E.png
        {% endif %}

Icons:
image
Lovelace:

          - entity: sensor.alarm_dot_com_sensor_home
            tap_action:
              action: call-service
              service: script.turn_on
              service_data:
                entity_id: script.set_home_alarm_click_ui

Script:

set_home_alarm_click_ui:
  sequence:
  - condition: state
    entity_id: alarm_control_panel.home
    state: 'disarmed'
  - service: script.turn_on
    data_template:
      entity_id: >-
        {% if is_state('sensor.google_maps_amber_or_mark_ishome', 'home') %}
          script.set_home_alarm_stay
        {% else %}
          script.set_home_alarm_away
        {% endif %}
  - delay: 00:00:05
  - service: homeassistant.update_entity
    entity_id: alarm_control_panel.home

set_home_alarm_stay:
  sequence:
  - service: alarm_control_panel.alarm_arm_home
    entity_id: alarm_control_panel.home

set_home_alarm_away:
  sequence:
  - service: alarm_control_panel.alarm_arm_away
    entity_id: alarm_control_panel.home

Realize some of this could be ‘built in’, but it’s pretty easy to customize. Would make a nice ‘official’ integration - but overall very happy with it currently!

Thats pretty cool but it doesnt fit my use case. I do have home and away automations setup, just looking for an easy way to arm/disarm from UI. I also really like the icons :wink: Unfortunately, they would be the only color in my setup :frowning:

Was hoping my solution / method of calling a script via tap_action in lovelace would work for you. For me, using this data_template logic results in a one-click set of my alarm - either to stay or away based on if either myself/wife are home - or if we’re both away.

Personally, I don’t allow HA to disarm the alarm for me, so I didn’t code in that option, but should be pretty easy to update the set_home_alarm_click_ui data_template to call a to-be-created disarm_home_alarm script.

Hey @Markus99 - did you ever resolve this issue? I get this same log message when running hass --script check_config from a GitHub action as part of an auto-upgrade process, but don’t seem to get this when running it on my server - and I can’t work out why.

I upgraded a few weeks back (currently running .108.6) and this integration is working just fine for me - no log errors or hiccups that I’ve noticed.

I haven’t upgraded to .109.x (seen some issues around Chromecast discovery, so wtg a bit on that).

Ah okay - thanks for the response!

Hello All,

My door lock codes are the same as my alarm/disarm codes. Through my Alarm provider, I used to be able to disarm the alarm with the same door lock code used to unlock the door. So basically, the alarm panel at alarm.com saw an actual user code disarm the alarm instead of a generic code. Would it be possible to integrate something like this?

Does anyone have a proper Repo to reference in HACS? All the links I see above seem to have the 404 error.
Today I just got a system for Insurance reasons and would like to link it in.

Just search for Alarmdotcomajax in Integrations.

Thanks Navet it works. Now on to Passing through my needed zones

Any idea why using this integration, that I can’t arm/disarm? I can see all the sensors.

Bob

Unsure, I only use for arm / displaying status / zone status. Disarms requires sending your code, which I prefer not to do.

So, I am on the current beta (0.118.0B1) but even in 0.117 I noticed more error messages. Anyone else starting to get

  1. Unable to extract state data from Alarm.com
  2. Updating alarmdotcomajax alarm_control_panel took longer than the scheduled update interval 0:00:15
  3. Can not load state data from Alarm.com

Complete newb here with very little programing experience. I like to tinker…(Did I just reveal my age…LOL)

I installed the Alarm,com code to my installation and after trial and error I finally managed to get the panel on my Home Assistant, However, I am not able to get the status update, nor am I able to send commands to arm or disarm my system. I see on the alarm,com website that Home Assistant is successfully login in. But I am not able to do anything.![Screenshot (2)|690x460]
(upload://tBN67RfNIvR6B1PIbxC5lD2DLSy.png)

I looked through the code…funny right, because I have almost no idea what any of it does. I am just really good are reading instructions from the community and copying code. However, I did see a line of code in the pyalarmdotcomajax.yaml file that references this - LOGIN_POST_URL = “https ://www.alarm.com/web/Default.aspx”. When I login to alarm,com my first screen is https://www.alarm.com/web/system/home and if I try to access https://www.alarm.com/web/Default.aspx i get directed back to the login screen with a message saying that have been logged out for trying to access a page without logging in.

. Any idea what I can try to get this working?

I’m having issues today as well with a previously working configuration. I suspect it may have to do with the splash screen that’s always popping up on login now asking whether you’d like to setup 2FA. Are there any known workarounds? Error below.

Thanks
Dave

2021-03-16 11:07:49 ERROR (MainThread) [pyalarmdotcomajax.pyalarmdotcomajax] Unable to extract system id from Alarm.com
2021-03-16 11:07:49 ERROR (MainThread) [homeassistant.components.alarm_control_panel] Error while setting up alarmdotcomajax platform for alarm_control_panel
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 198, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/alarmdotcomajax/alarm_control_panel.py", line 78, in async_setup_platform
    await alarmdotcom.async_login()
  File "/config/custom_components/alarmdotcomajax/alarm_control_panel.py", line 124, in async_login
    await self._alarm.async_login()
  File "/usr/local/lib/python3.8/site-packages/pyalarmdotcomajax/pyalarmdotcomajax.py", line 130, in async_login
    self._systemid = json["data"][0]["id"]
KeyError: 'data'

I resolved my issue. In case anyone runs into the same thing, it’s possible to enable a 2FA cookie in the configuration. I enabled 2FA on my account, logged in and grabbed the cookie from my browser. I’m back in business. There’s nice instructions on the components GitHub page.

Davenaum - can you share where you found the components GitHub page? I think that I’m running into the same problem (none of my alarm.com integrations work recently - and I just setup the 2fA knowing it would lead to problems…)?

Edit: Found the page: https://github.com/uvjustin/alarmdotcom

Next question - where did you find the twofactorcookie in the alarm.com home screen?

2nd Edit: I found the twofactorauthenticationID by using the Chrome “Developer Tools” and the “Cookie Manager”.

My alarm.com integration is now working properly!!

Thanks!

I was having the same problem with my alarm not working correctly. The alarm.com web I use does not have the 2FA enabled so I didn’t think I needed to add the line but sure enough as soon as I did, everything worked.

My point is because 2FA is used for alam.com, it doesn’t matter if you have it enabled or not. You still have to apply it to the configuration.yaml.

I know this is an old conversation, but…
I just installed the alarmdotcom integration, but I can’t seem to get it to arm/disarm from Hass.
What I’m hoping to accomplish is to have Hass disarm the alarm when we get home, along with opening the electronic lock when we approach the front door.
I’m working on facial recognition for the security camera that I’m in the process of installing.
But I’m new to Hass, and just figuring things out. Does anyone know how I can create an automation to disarm the alarm when we arrive home?
(When I get the facial rec working, i’ll use that as the trigger. I’m also planning to have a security “backup” with an RFID card/chip that we swipe at the bottom of our porch steps. At least until the facial rec is verified to be secure.)
Any help with coding would be appreciated!