Checks the access code used to arm or disarm #276
Replies: 5 comments 2 replies
-
I confirm the problem |
Beta Was this translation helpful? Give feedback.
-
Hi @SebastianJoan @UltimatPronin - the library keeps track of access codes for each partition both for arming and disarming, at any time you can get the access code used on the partition from However, If you would like to get the access code used to disarm a partition even if it's the same code used to arm the partition, you can check Example for the
This should be repeated for each section of the sketch that shows when the partition is disarmed. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the info! I was premature in converting this issue to a discussion topic, there was a bug where the code that handles the disarm access code was being ignored - fixed in For arming, there is a small delay (~130ms) from when the panel reports being armed and the panel actually reports the access code used to arm - for example on a PC1864:
In this log, the first panel command sent after arming is 0x27, and the panel status will get set to armed in After ~130ms, the panel sends the 0xA5 command with the access code used to arm - at that point, Let me know if this time lag would cause an issue in your applications. One way to handle this is to use Note that this is not an issue when disarming, the panel sends the disarm access code first and then sends the disarmed status, so |
Beta Was this translation helpful? Give feedback.
-
The time lag where the arming access code is updated ~130ms after This means that The changes are in the library code, there shouldn't be any code changes necessary in your sketches - let me know if this now works as expected. |
Beta Was this translation helpful? Give feedback.
-
@taligentx , thank you! Now access code detection used for arm/disarm work perfectly without any changes in my code. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
when i try to Checks the access code used to arm or disarm it only show access code used to arm the alarm but it didn´t show the user code used to disarm the alarm
if (dsc.accessCodeChanged[partition]) {
dsc.accessCodeChanged[partition] = false; // Resets the access code status flag
Serial.print(F("Partition "));
Serial.print(partition + 1);
switch (dsc.accessCode[partition]) {
case 40: Serial.print(F(": Master")); break;
default: Serial.print(F(": Access")); break;
}
Serial.print(F(" code "));
Serial.println(dsc.accessCode[partition]);
}
Beta Was this translation helpful? Give feedback.
All reactions