bryan-bartow / homebridge-alarm.com

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

Plugin crashes when user doesn't have locks #16

Closed bryanbartow closed 8 years ago

bryanbartow commented 8 years ago

The plugin gives the following error on Homebridge startup if the user does not have locks associated with him/her account:

Error while registering accessories: TypeError: Cannot read property 'map' of undefined

This causes the plugin to crash and, therefore, the security panel does not get registered nor does it show up in HomeKit control app(s).

yungsters commented 8 years ago

@bryanbartow When you go to https://www.alarm.com/pda/{{sessionUrl}}/Locks.aspx, what do you see?

bryanbartow commented 8 years ago

@yungsters Get an error message at the top of the page which reads: "You don't have permission to access the requested page." Screen shot at http://cl.ly/fm44

yungsters commented 8 years ago

Thanks for debugging and the feedback. Sorry for breaking!

yungsters commented 8 years ago

This should be all fixed now.