Interpreting Alarm.com Sensor State

This might be my problem as well. Can you explain how to do it.
Thanks
carltonb

First thing would be to replace “alarm_control_panel.alarm_com” in the value template with whatever your alarm_control_panel entity is. You can go to Developer Tools > States, and find the entity name there. For example, the name of my alarm panel entity is “alarm_control_panel.cpi_security”.

Once you’ve got the value template the
Way you think it should be, go to Developer Tools > Template and paste it in there. It should reconcile to either True or False.

All of these templates are awesome, I got all my sensors monitored from alarm.com

Unfortunately the “True Silent” mode still does not work. There are 3 ways you an arm alarm.com - but it seems that, at least for me, I can only call 2 of them.

They are at a high level:

  • Arm Away (Start constant beeping at panel for 2 min)
  • Arm Home (Start constant beeping at panel for 2 min)

There is a third option, through the alarm.com website, and the app itself that home assistant seems unable to call:

  • Arm Home Silent (Beep Once at invocation, beep a second time after 2 min)

Using Home Assistant to call the alarm at bedtime is a no-go for me, as my wife goes to bed earlier than I do, and the arming process causes the alarm panel to beep constantly for 2 min before it arms. It seems impossible to call the system without the beeping.

I tried some of the calls here in this thread, but alarm_arm_home and armed_home both put the panel into constant-beep-mode.

There must be a secret sauce way of making this work, or finding out what the app is calling.

This has been a very useful thread, thanks! I am still new to Home Assistant and feel like I’m missing something. The main thing is how do I know what to regex_search for each sensor type? Some of my sensors are working and some are not and I don’t understand enough to trouble shoot. For example the driveway sensor is set to type “motion” and looking for “Driveway is Active” but never triggers - how can I tell if this is the correct search string? Thanks in advance.

Try using the States tool (under Developer Tools) and then open a door. Wait for HA to get the update from Alarm.com’s website and note what it says in the States tool. That’s your search string to use in the Regular Expression (RegEx).

For anyone still watching this thread, you’ll probably note that the Alarm.com integration has been removed from HA 109. You can get “Alarmdotcomajax” from the Home Assistant Community Store (HACS). There’s plenty of documentation out there on getting HACS working – and it’s not very hard – and the Alarmdotcomajax module comes with really good documentation. Once you get it up and running, it’s a stand-in replacement for the old integration and has been working flawlessly for me for a while now.

Hello, I tried to add a repository that is floating around to add the alarmdotcomjax, and I installed it from the HACS. However it didn’t work. Do Alarmdotcomjax comes by default with HACS or did you added through a specific repository. I would appreciate any help :slight_smile:

Seems I had to add a custom repository to HACS.

Try https://github.com/uvjustin/alarmdotcomajax

It was pretty straightforward after that.

Hope that helps

Thank you so much

I’ve installed @uvjustin’s Alarmdotcom integration and set up the sensors.

However, the motion sensors report as Clear regardless of being Activated or Idle.

Am I doing something wrong?

@mgb66 Not sure how far down the road you are, so I’ll start from the assumption that you have the alarm panel successful integrated and that you can see it in Developer Tools.

Once you get this far, you’ll need to make some binary “template” sensors as shown on my May 2019 post further up on this thread. You need the text in the “value template” to match the “sensor_status” text in your installation – don’t use mine. That is, replace the Z6 SLIDERS is open in my example with whatever your zones are for each sensor. Sensor_status is one continuous, comma-separated line that shows the status for each of your sensors all in one line.

The other piece is to use the correct device class when setting up the binary sensor. motion for motion sensors, window for windows and door for doors.

Pulling it all together, for me Zone 1 is my motion sensor. Whatever sensor_status reads in the state tool is what I use in the regular expression. For instance, from the above screen shot, my ‘Z1 MOTION is activated’ meaning it detected motion.

Here’s my sensor config for that item:

binary_sensor:
  - platform: template
    sensors:
      alarm_lr_motion:
        friendly_name: "Living Room Motion"
        device_class: motion
        value_template: "{{ state_attr('alarm_control_panel.alarm_com', 'sensor_status')|regex_search('Z1 MOTION is Activated', ignorecase=TRUE) }}"

When the sensor_status includes the text in the regex, it turns to “on”, which for motion sensors is shown like this in the UI:
image

clear would mean it’s probably not matching on the regular expression, so I’d check what state tool has to say and compare that against the binary sensor config. You can also use the “Template Tool” (also under Developer Tools) to play around with the template until you get it right. Saves time on editing and restarting Home Assistant.

Hope that helps…

This is really odd and bugging me.

I’ve checked using the Template Tool and my regex is correct, reporting True or False depending on the status of the sensor. However I’m still seeing clear. The armed/disarmed is reporting correctly.

I’m stumped!

Post your config… maybe one of us will see something

OK, thanks @FlyGuy62N…

An extract from my configuration.yaml:

alarm_control_panel:
  - platform: alarmdotcom
    username: 1############
    password: !secret alarm_password

binary_sensor:
  - platform: template
    sensors:
      # Dining Room
      alarm_dining_room:
        friendly_name: "Dining Room"
        device_class: door
        value_template: "{{ state_attr('alarm_control_panel.alarm_com' , 'sensor_status')|regex_search('Dining room is Open', ignorecase=TRUE) }}"
      # Front Door
      alarm_front_door:
        friendly_name: "Front Door"
        device_class: door
        value_template: "{{ state_attr('alarm_control_panel.alarm.com' , 'sensor_status')|regex_search('Front door is Open', ignorecase=TRUE) }}"
      # Hall
      alarm_hall_motion_detector:
        friendly_name: "Hall Motion"
        device_class: motion
        value_template: "{{ state_attr('alarm_control_panel.alarm.com' , 'sensor_status')|regex_search('Hall is Activated', ignorecase=TRUE) }}"
      # Kitchen
      alarm_kitchen_motion_detector:
        friendly_name: "Kitchen Motion"
        device_class: motion
        value_template: "{{ state_attr('alarm_control_panel.alarm.com' , 'sensor_status')|regex_search('Kitchen is Activated', ignorecase=TRUE) }}"
      # Study
      alarm_study_motion_detector:
        friendly_name: "Study Motion"
        device_class: motion
        value_template: "{{ state_attr('alarm_control_panel.alarm.com' , 'sensor_status')|regex_search('Study is Activated', ignorecase=TRUE) }}"
      # Upstairs
      alarm_upstairs_motion_detector:
        friendly_name: "Upstairs Motion"
        device_class: motion
        value_template: "{{ state_attr('alarm_control_panel.alarm.com' , 'sensor_status')|regex_search('Upstairs is Activated', ignorecase=TRUE) }}"
      # Garage
      alarm_garage_motion_detector:
        friendly_name: "Garage Motion"
        device_class: motion
        value_template: "{{ state_attr('alarm_control_panel.alarm.com' , 'sensor_status')|regex_search('Garage is Activated', ignorecase=TRUE) }}"

This is the current state:

And the Template tool is showing TRUE for the Study (as it has been Activated).

Any thoughts anyone?

One thing I have noticed, is that in the state reporting the entity last changed and last updated entries are from much earlier in the day; 15:02 when it’s 21:20 when I’m writing this - so it would appear that the state is not being updated for some reason.

That said the sensor should still be reporting the current state which it doesn’t seem to be doing.

Found it (I think)…

Your first binary sensor uses the correct name for the alarm panel:
state_attr('alarm_control_panel.alarm_com...

The others all use a period instead of an underscore:
state_attr('alarm_control_panel.alarm.com...

That would certainly render the template to always be “false” since alarmDOTcom doesn’t exists where alarmUNDERSCOREcom does.

That’s it. Amazing what a second pair of eyes can do!

Thanks. Sensors working now, although doors don’t seem to have registered, may be a timing issue?

Happy holidays to all.

A further question for the experts on here.

I’ve a smoke detector in my alarm which the Alarm.com website shows as OK. It doesn’t appear in the Alarm.com app on my phone at all. On Home Assistant it is reporting as “Fire is Not Reset”.

Presumably it should be the same on the website and on Home Assistant, but this doesn’t seem to be the case, any ideas?

Carl

“Fire is not reset” is the “raw” state (my term, not sure if there’s a technically correct noun to use here).reported by the Alarm.com API. It wouldn’t be out of the question for Alarm.com to clean that up in their UI.

I tried searching for that status on the interwebs, but no results. I could only guess at what it’s supposed to be reporting. Does “reset” mean “the house is gonna burn down” or does it mean “the smoke detector is going to start beeping at 2:38am?”

The real test will be to see how it changes based.on sensor status. Burnt toast anyone? I mean – seriously burnt… and then wait for the next polling interval so it shows up in HA.

FlyGuy62N,

Thanks for posting all of this helpful information. I’m just starting to experiment with HA and incorporating my alarm.com sensors was the integral step.

Like others, I am noticing quite a delay between my actions (opening a door or window) and what is reported from alarm.com to HA. In fact, the delay is so long that my HA state usually misses the action altogether. If I open a door and let it close within a few seconds, my automations never work. It’s like the HA state being monitored didn’t refresh fast enough to trigger an “open” event before it was closed.

Any suggestions on improving the performance? Everything else in my system (light switches, thermostat, etc) are really fast internally in HA.

I’m debating just buying some Zigbee door sensors to circumvent the issue, but I hate knowing that I can technically get the information directly from alarm.com.