bryan-bartow / homebridge-alarm.com

Alarm.com plugin for Homebridge
ISC License
43 stars 11 forks source link

Authentication failing from homebridge but appears to log on alarm.com #67

Open djstarr opened 6 years ago

djstarr commented 6 years ago

This morning I noticed that Home.app is showing "no response" errors for the Alarm.com integration that was working fine just a day or two ago. homebridge is reporting:

[2/26/2018, 9:52:04 AM] [Security Panel] Request djstarr/alarmdotcom/login/0.1.3 was unsuccessful:

Yet on alarm.com it shows a successful login.

It appears that the wrapapi endpoints were modified a day or two ago. Is it possible that something regressed?

djstarr commented 6 years ago

Also, am not sure where to pull the rawData for more troubleshooting...

davidvanvo commented 6 years ago

Confirming that this was working last night, but getting the same errors this morning.

DMBlakeley commented 6 years ago

I observed the same issue this morning. Login via the webpage or iOS app works just fine. I know that homebridge implementation worked fine yesterday.

nelhenry commented 6 years ago

So, I've found that if you go to alarm.com/pda/ and check the box "Keep me logged in" you get bumped to a new login page "https://www.alarm.com/login?m=no_session" but you can log in if you do not check the box. I am wondering if this is part of the issue at the moment?

jdshkolnik commented 6 years ago

I'm also seeing no response. The APIs show last modified 2 days ago but, as far as I know, nothing was actually changed. Not to mention it was working fine last night. The change must've been on alarm.com's side.

jdshkolnik commented 6 years ago

@bryanbartow

avavricek commented 6 years ago

I noticed the change, researched it briefly and it looks like to me that the wrapapi endpoints are looking for different URLs from alarm.com. The may have updated the site?

DMBlakeley commented 6 years ago

When logging into the Alarm.com website this morning I found that a new dashboard has been implemented. Did a bit of investigation to find out the differences but WrapAPI is new to me and learning while doing.

kcharwood commented 6 years ago

Yep seeing the same thing here.

riteshp83 commented 6 years ago

Having the same issue. Armed fine last night but as of this morning it’s not working.

fenway062213 commented 6 years ago

Same issue for me too. The alarm.com app and web interface are working fine, it’s just Homebridge/the Home app that aren’t working as of this morning.

Paulg5678 commented 6 years ago

Seeing the same issue since early yesterday

bryantcoles commented 6 years ago

Still seeing the same thing. Tried the Keep Me logged in toggle, but still get the same error.

joewilliamsca commented 6 years ago

So I did try to go over to alarm.com/pda, when I used to log in with my web browser, I would get the text only version of the alarm.com website. Now if i log in, its giving me the rich web app.. :(

djstarr commented 6 years ago

Perhaps something that can be fixed with user agent trickery?

D★

On Feb 27, 2018, at 2:19 PM, Joe Williams notifications@github.com wrote:

So I did try to go over to alarm.com/pda, and if I logged in with my web browser, I would get the text only version of the alarm.com website. Now if i log in, its giving me the rich web app.. :(

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

jdshkolnik commented 6 years ago

I'm laid up sick in bed and will be traveling soon. I can't troubleshoot this but I can probably merge in a pull request and publish a new version if someone can narrow this down.

jdshkolnik commented 6 years ago

I made some changes and published version 0.7.4 which points to the latest API version rather than an explicit number. That should make it easier to troubleshoot by changing just the WrapAPI definition.

I fiddled with it a bit and it might have to do with how the WrapAPI login entry defines the success scenario. It looks for armingPanel and alarmState but they aren't being returned anymore, hence the "None of the output scenarios matched. See the raw data received in rawData"

jdshkolnik commented 6 years ago

I just confirmed my theory by making the success criteria optional and it started working. Now I just need to figure out what can be used as success criteria.

jdshkolnik commented 6 years ago

While I'm figuring that out, you can all just upgrade the plugin to 0.7.4 and switch your login alias to point to https://wrapapi.com/api/jdshkolnik/alarmdotcom/login/latest

jdshkolnik commented 6 years ago

I bumped the plugin to v1.0.0 since it's a bit old to be considered a pre-release.

nelhenry commented 6 years ago

@jdshkolnik Thanks for the quick work. Mine is working again. I updated the plugin, deleted the old "login" API, replaced it with your new link above and restarted homebridge.

avavricek commented 6 years ago

Thanks for the quick work!

djstarr commented 6 years ago

Much appreciated!

D★

On Feb 27, 2018, at 9:59 PM, Andrew Vavricek notifications@github.com wrote:

Thanks for the quick work!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

fenway062213 commented 6 years ago

Working for me now! Thank you so much for fixing this so quickly!

riteshp83 commented 6 years ago

Working perfectly now. Thank you so much for resolving this as quickly as you did. Hope you feel better soon.

DMBlakeley commented 6 years ago

Back in operation, thanks for your quick diagnosis and update!

Noted that the plugin is v0.0.1 rather than v1.0.0 as you noted in your previous post.

joewilliamsca commented 6 years ago

Thanks @jdshkolnik for jumping in on this. Hope you feel better real soon.

bryantcoles commented 6 years ago

Thanks for the quick fix! Much Appreciated.

kpdillon commented 6 years ago

Sorry for the silly question - where do you update your login alias to point to https://wrapapi.com/api/jdshkolnik/alarmdotcom/login/latest? I've updated the code successfully, just not sure where I do this second step.

jdshkolnik commented 6 years ago

@DMBlakeley The plugin 1.0.0, the login API is 0.01.

@kpdillon Delete the login alias from here then go to the above URL and bookmark it.

kcharwood commented 6 years ago

@jdshkolnik what are the steps to update the login URL? Haven't quite figured out WrapAPI yet...

EDIT never mind just saw your above comment! Thanks!

kpdillon commented 6 years ago

Thank you @jdshkolnik I am working again!

riteshp83 commented 6 years ago

Has anyone noticed since doing the update and work around that the status doesn’t update in the home app when using the alarmdotcom app to make changes?

nelhenry commented 6 years ago

Hi @riteshp83 I didn't notice this previously, but I am experiencing the same. Changes to the alarmdotcom app do not update the home app. I believe updates to the control panel and alarm.com website are not triggering a status change in the home app either.

jdshkolnik commented 6 years ago

I think that might be better addressed by #32.

DMBlakeley commented 6 years ago

One thing that I have noticed after this latest update is that the default state of the security system after starting Homebride is "Home" rather than "Off". Once you change to "Off" all is fine.

fenway062213 commented 6 years ago

Hi all...I’ve noticed too that when I change the alarm’s status, either via the alarm’s own app or via the physical panel itself, the status doesn’t update on my Home app. Then today, I tried setting the alarm via the Home app and the status didn’t update in the alarm’s own app...any ideas? It’s strange, I’m not getting a “no response” type error, the status just isn’t changing...

jdshkolnik commented 6 years ago

I wish GitHub had built-in polls. I'd love to know what percentage of the alarmdotcom plugin users are FrontPoint customers.

riteshp83 commented 6 years ago

I tried the frontpoint plugin and it didn’t work.

jdshkolnik commented 6 years ago

@riteshp83 It's working for me.

nelhenry commented 6 years ago

Any idea how to translate the frontpoint plugin for alarm.com? I believe they share the same API but I’m not sure how to go about reworking it outside of frontpoint.

riteshp83 commented 6 years ago

Ill have to try it again tonight. I got an error installing the package but maybe that was due to the ddos attack on github because the timing matched up.

jdshkolnik commented 6 years ago

@nelhenry According to jhurliman they don't share same API; he's using a Frontpoint-specific one. From my point of view, it makes more sense for Frontpoint users to contribute into his repo which already has polling, exposes all sensors, and bypasses WrapAPI.

efloyd commented 6 years ago

I took the following steps to resolve this issue for me, and it's not working. Can someone confirm that I'm following this correctly?

  1. I deleted the "alarmdotcom/login (alias)" bookmark entry from my WrapAPI account
  2. I searched WrapAPI for "bryanbartow / alarmdotcom / login", and bookmarked the "alarmdotcom/login (alias)" entry
  3. I ran "npm install -g homebridge-alarmdotcom" to update the homebridge alarmdotcom plugin.

Within Apple Home, it still says "No Response" for my security panel.

DMBlakeley commented 6 years ago

Did you restart Homebridge? Need to do this to pick up the alarmdotcom plugin changes.

davidvanvo commented 6 years ago

@efloyd the login WrapAPI is not from bryanbartow.

https://wrapapi.com/api/jdshkolnik/alarmdotcom/login/latest

efloyd commented 6 years ago

@davidvanvo Thanks! I thought that would surely solve the issue, but it didn't. I've started my Pi, rebooted Homebridge, and still doesn't work for me.

Do I need to generate a new API key and replace the API key in my Config file?

jdshkolnik commented 6 years ago

No.

efloyd commented 6 years ago

So, i thought I'd go back and re-install the homebridge-alarmdotcom plugin again. Rebooted, and it worked. Something must have happened with the previous update. thanks!

nelhenry commented 6 years ago

Saw this post this morning from @ jpreiditsch [github.com/home-assistant/home-assistant/issues/12694]

Could this be used to bring back the former functionality and accurate status reporting?

"I may have a bit of a solution that could help. When you go to Alarm.com/pda/ it redirects to https://www.alarm.com/pda/[SESSION_ID]/default.aspx Once you log in it takes you to the https://www.alarm.com/web/system/home If you replace the url with the following https://www.alarm.com/pda/[SESSION_ID]/main.aspx Where the Sesion id is the one that was in the query on the original redirect. You are taken to the old PDA screen where there is a state displayed and buttons to disarm and arm the alarm, without needing to scrape the new rich page... The session was validated and authenticated when taken to web/system/home"