node-alarm-dot-com / homebridge-node-alarm-dot-com

Alarm.com plugin for Homebridge using Node.js
MIT License
61 stars 24 forks source link

Telus Security (alarm.com) error - failed: No afg cookie: AND Error: GET https://www.alarm.com/web/api/identities failed: GET https://www.alarm.com/web/api/identities failed: [object Object] #125

Closed dwdblogger closed 2 months ago

dwdblogger commented 11 months ago

Hi all, I recently resubscribed to Telus Security who took over ADT security here in Canada. As a previous ADT security customer it used to be alarm.com and the plugin here worked seamlessly. However now on Telus Security's service I'm getting errors you see below. 2FA is enabled, configured the 2FA cookie and session time outs are at default settings It seems to be that the plugin doesn't know about the telus authentication point and since it points to the alarm.com page which doesn't have my account info. Am I out of luck or could I somehow change the default auth page to point the plugin to?

What I also noticed is when it is enabled and it's retrying the auth, I get a spam of email notifications - see screenshots

Here's the errors in logs I noticed (note sensitive fields are intentionally replaced with XXXX):

[1/5/2024, 11:35:40 AM] [Telus Security] loginSession Error: POST https://www.alarm.com/web/Default.aspx failed: No afg cookie: ASP.NET_SessionId=XXXX; twoFactorAuthenticationId=XXXX; cookieTest=1; IsFromNewSite=1; fromASP=; IsFromSeamlessLogin=; login=; ST=
[1/5/2024, 11:35:40 AM] [Telus Security] Refreshing session authentication.
[1/5/2024, 11:35:40 AM] Error: GET https://www.alarm.com/web/api/identities failed: GET https://www.alarm.com/web/api/identities failed: [object Object]
    at /usr/lib/node_modules/homebridge-node-alarm-dot-com/node_modules/node-alarm-dot-com/dist/index.js:150:15
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at getIdentitiesState (/usr/lib/node_modules/homebridge-node-alarm-dot-com/node_modules/node-alarm-dot-com/dist/index.js:134:12)
    at ADCPlatform.getAccountSettings (/usr/lib/node_modules/homebridge-node-alarm-dot-com/src/index.ts:380:24)
    at ADCPlatform.registerAlarmSystem (/usr/lib/node_modules/homebridge-node-alarm-dot-com/src/index.ts:213:5)

To Reproduce Configure plugin as per usual for a telus security account, enable 2FA and add 2FA cookie

Expected behavior sensors identified, ability to change security modes in homebridge

Screenshots image

ADC-SystemStates.json

^^^ sorry it doesn't look like ADC-SystemStates.json is created after i run the plugin on verbose level 4. I looked in /var/lib/homebridge/ which is where I saw config.json. Did I miss something?

Homebridge System (please complete the following information):

Appreciate the insights and thoughts!

chase9 commented 11 months ago

So to clarify, do you log in to the portal on alarm.com or on another website? We only support the alarm.com APIs.

omarthen3rd commented 9 months ago

I can add some context here as well, same thing happened with me too. Got switched from alarm.com to telus. Even on the web I cannot access my system through the alarm.com domain, it's all done through telus.com

omarthen3rd commented 9 months ago

Quick update for any Canadians running into the same issue. Here's a workaround:

  1. Login through the Telus SmartSecurity portal on the website (app doesn't work for this workaround)
  2. Go into Users > Manage Logins
  3. Create an alternate login with another email (give it Master Control)
  4. Follow the instructions on the email sent
  5. This new login is through the alarm.com servers and should work for the plugin
dwdblogger commented 9 months ago

oh nice @omarthen3rd that's useful to know thx for the helpful response! I ended up using homeassistant plugin that interacts with qolsys console directly.