roopesh / ad-qolsys

AppDaemon app for Qolsys IQ Panel 2
MIT License
22 stars 10 forks source link

Secure arming & codes with leading zeros #27

Open dmexs opened 2 years ago

dmexs commented 2 years ago

My Qolsys panel has secure arming enabled which requires the input of the user code to arm the panel. This can be enabled through Dealer Settings > Security & Arming. With this change it might make sense to change the YAML variable "qolsys_disarm_code" to "qolsys_usercode" but I leave that up to the community.

I also tested my alarm after disabling Secure Arming and it doesn't seem to mind receiving the usercode if it's isn't required so this shouldn't effect people who don't have it enabled.

I've also adjusted the usercode to be stored as a string instead of integer so codes that start with leading zeros don't get shortened. For example:

str(int(0050)) == '50'