[RELEASE] Alarm.com App

Yea i'm seeing this as well. but everything is working fine for me.. I can even see where HE logs into the site in the alarm.com logs.. something is hinky lol

It appears as of this morning the disarming function no longer works. good lord ADC changed something

@fdelima... so I feel a bit of a bone head.. I was seeing the same issues you are, however, I didn't think until right now to check the github repository.. And come to find out I'm running ADC version 1.1.1 and apparently that was updated to 1.1.2.. I applied the updated app code, then went to oAuth and updated it, then applied the updated code to the driver. Then finally I opened the app and re-entered my user/pass, and low and behold, no more errors!!! HEHE.. I feel a bit dumb for not checking my code level against github.. Anways, i haven't done full testing yet but the errors that I was seeing (like you are), no longer show up at this point. I just wanted to drop a note and let you know what I found and I'll report back tomorrow after I do a bit of testing.. Hope my dumb bone headedness helps you and and others.. Cheers!!

Steelz1 - Thank you for all your help..... I've recently installed the ADC app and driver so I do have the latest versions..

What I didnt mess with, was OAuth.. so maybe i need to "set it " ??

curious to see how your side is running under the new app/driver..

Thanks again for all your help !!

I just set Oauth on the ADC app.. after confirming that I am using v1.1.2 of the app and v1.1.1 of the driver - which are the latest in Github..

Will tell you if I see these errors as I monitor throughout the day..

Currently these errors DONT occur when you use the HE-buttons (i.e. through the driver).. they seem to ONLY appear at the 30 min polling interval when the App polls the Alarm.com server for the status.

I think...

yea all my issues were what i think were like yours all in the polling times.. but i also had issues with my rules when it comes to disarming my alarm however arm and arm stay were fine.. so when i did the steps i mentioned in an earlier post everything has been great. no errors in my logs from polling and my disarming has been working like a charm!!

hopefully you will find some relief in the steps i shared as well!! lol

hello

I have been useing this for while and just now getting around to this, I have a "everoneone leaves" and that autmation arms the alarm with ADC ARM

but when i come back home the DisARM is not working correctly any way around this? everything else in the automation works fine jsut not the disarm of alarm.com (im using front point but same system)

Enable debugging for the app and check your logs when triggering the event.

@FriedCheese2006 I will switch on debugging as well. At first glance i'm seeing that either after a time period (aka timeout) or if I have to reboot my hub then it gives me a error about password is incorrect. In my head it kinda makes me think it's not retaining the password (or all credentials) after a certain period of time, OR maybe the ADM and APP key auth is expiring after a certain period of time?? maybe?? lol.. I only considered this as i'm seeing it loose the credentials and after i re-enter and re-save my password it works fine for a period of time. But with that said i just turned on the debug and as soon as i have the failure again i'll send ya the logs..

Thanks!!

bob here is the log it looks like the sys is not even sending it?
2021-05-20 10:03:40.752 infoAction: On: Kitchen light

app:1302021-05-20 10:03:40.699 infoAction: On: Wash room light

app:1302021-05-20 10:03:40.622 infoAction: Garage open: Garage door

app:1302021-05-20 10:03:40.611 infoAction: IF (Mode in Day, Evening, Night(T) [TRUE]) THEN

app:372021-05-20 10:03:40.601 infoDisarmed

app:1302021-05-20 10:03:40.387 info1-1 Back With people home Triggered <<<<<

app:1302021-05-20 10:03:40.326 info1-1 Back With people home: l360 presence present

ah crap it shoudl be "first persoon back triggering" cause nodby is home

Unfortunately, I won't be able to help too much. I'm in the same boat with getting a litany of errors from the app. I don't know how to write Groovy, but have been trying to reverse engineer Jeff's code. Looks like line 430 has the username/password error hard coded as a return any time the "getsystemauthid" routine fails. That one is called in the poll routine and the system update routine.

I've also done the 2fa cookie update posted from the HomeBridge app without much luck. Poking through the GitHub for the home bridge app, those folks are seeing similar errors. The developer is actively working on it but also stumped. I know Jeff mentioned being pretty busy, so we might have to wait until they get it figured out.

Some have commented in there that it may be some DDoS protection on ADCs side that's causing the errors (the apps send HTTPset and HTTPget to quickly after login).

I've been digging around on this for a solution. Still have gotten no where with the ADC aspect, but!, I learned the Qolsys 2 panel has a web socket that you can use to send commands to the panel and retrieve device level information on top of setting/disarming the alarm. The only problem, it requires establishing a TLS session, which, from what I've found, isn't do-able in Hubitat. Even if it was, we'd need someone like @jmpierce to lend their services, as I have no idea how to write Groovy.

You're awesome.. I did find that if i dropped my polling time back to 15 mins I don't have "as many" errors.. actually i don't get the "... Forbiddon" error anymore.. i only get "ADC ERROR (getSystemStatus): org.apache.http.conn.ConnectTimeoutException: Connect to www.alarm.com:443 [www.alarm.com/192.155.71.71] failed: Read timed out" every 40-ish minutes now.. I am considering pushing the polling time back further to see if it has any effect on this error.. Don't know if this helps with your digging but I thought I would share..

Has anyone noticed this getting better? I haven't had a noticeable issue in several days.

Hey @bob692006.. I made some minor changes to my polling and since i did that i haven't had any errors creeping into my logs. With that said i've considered dialing back the polling little by little to something like 5 mins to see if any issues start to creep back up. But to answer you question, nope everything has been working good for me lol..

Polling post

Well first, thank you for building this, just want to ask if someone else is been able to connect lately, I haven't enabled MFA.

I haven't been able to connect, getting the forbidden error:
[error]ADC ERROR (Authentication failed -- Unable to finish update!): updated()

[error]ADC ERROR (getPanelID:GettingAccountID): groovyx.net.http.HttpResponseException: Forbidden

[debug]ADC-App.getSystemAuthID(): Received sessionID (cymphpznmxmwe5sjkotsw31u) and afg (null)

[debug]ADC-App.getSystemAuthID(): Getting refreshed authentication credentials

[debug]ADC-App.updated(): Updated with settings: [password:xxxxxx, disarmOff:Do Nothing, encryptPassword:false, debugMode:true, pollEvery:1 Minute, username:xxxxx, encryptedPassword:]

@jmpierce Is there any chance we could request that the ADC App gets added to the Hubitat Package Manager? A lot of people are using it and it would make future updates and validating current versions much easier. Thanks.

3 Likes

It took me a long time to figure this out and when I did it all made sense. Lumping information into one post for those that come behind me. I'm aggregating work from others- not claiming it as my own.

First you need to find the cookie on your machine for 2FA. This next part is taken as a quote from the link in post #69 from @jb6784:

  1. Head to the Alarm.com website. Login if you're not already. You should be at your homes main page.
  • Heads up, the device name you enter here will be what the plugin is identified by. You can set this name to something like "Homebridge" if you want to keep track of the plugin better.
  1. Open the developer tools for your browser. In most browsers you just need to right-click the page and select "Inspect element" or "Open developer tools". Here's more information by browser:
  1. Open the Application (Chrome)/Storage (Firefox) tab of the developer tools.
  2. Find "cookies" in the sidebar and expand the cookies for the Alarm.com website.
  3. Find "twoFactorAuthenticationId" and take note of its value. The value should be a 64 character long string composed of numbers and letters.

This next part is taken from post #76 from @jfunston.
Go to your app editor and open up the code for the alarm.com manager. Go to line 401. It should read "Connection" : "close". After the quotation mark at the end of "close" add a comma. It should now read: "Connection" : "close",

Edit line 402 to read: "Cookie" : "twoFactorAuthenticationId=#########; domain=.alarm.com; path=/; secure; HttpOnly; SameSite=None"

Replace the hashes with the 64 character token you picked up from the first step. Save and that should do it.

3 Likes

I am running into the issue as well where I cannot get this working. I added in both the driver and app and when i go to the app to login it doesn't work. I edited the app driver with the below code and replaced the 64 character code from the cookie but get the following errors when i try to connect.

Go to line 401. It should read "Connection" : "close". After the quotation mark at the end of "close" add a comma. It should now read: "Connection" : "close",

Edit line 402 to read: "Cookie" : "twoFactorAuthenticationId=#########; domain=.alarm.com; path=/; secure; HttpOnly; SameSite=None"

Replace the hashes with the 64 character token you picked up from the first step. Save and that should do it.

Hi folks,

Stopped communicating with Alarm.com and logs show this:

app:10712021-11-22 08:17:30.331 am errorADC ERROR (getSystemStatus): groovyx.net.http.HttpResponseException: status code: 409, reason phrase: Conflict

I've already tried removing app and reinstalling.

It seems to have made it worse as now I have two errors:

app:10712021-11-22 08:17:30.331 am errorADC ERROR (getSystemStatus): groovyx.net.http.HttpResponseException: status code: 409, reason phrase: Conflict

app:10712021-11-22 08:17:30.020 am errorADC ERROR (getPanelID:GettingPanelID): groovyx.net.http.HttpResponseException: status code: 409, reason phrase: Conflict

Any other ideas?