kk7ds / pynx584

Python library and server for talking to NX584/NX8E interfaces
GNU General Public License v3.0
29 stars 26 forks source link

logging of zone events is incorrect #56

Closed gdlesage closed 2 years ago

gdlesage commented 3 years ago

Logging of the zone triggered by an alarm is numerically one less than zone which is triggered. In the log file shown below, I triggered the alarm by living room motion, which is zone 2, but the alarm event log shows zone 1 was triggered. Repeating this with other triggered zones gives same result, reported triggered zone is one less than the actual zone triggered. I use the email option which reports that event log, so my emailed reports show wrong zone triggered.

2021-05-02 10:27:45,635 controller INFO Partition 1 armed 2021-05-02 10:28:47,468 controller INFO Log event: User 97 Closing at 2021-05-02 10:28:00 2021-05-02 10:29:18,820 controller INFO Zone 2 (LIVING ROOM MOTION) state is FAULT 2021-05-02 10:29:19,401 controller INFO System asserts Global Siren on 2021-05-02 10:29:19,855 controller INFO Log event: Zone 1 Alarm at 2021-05-02 10:29:00 2021-05-02 10:29:24,090 controller INFO Log event: User 97 Recent closing at 2021-05-02 10:29:00 2021-05-02 10:29:24,117 controller INFO Log event: User 97 Recent closing at 2021-05-02 10:29:00 2021-05-02 10:29:24,446 controller INFO Zone 2 (LIVING ROOM MOTION) state is NORMAL 2021-05-02 10:29:39,492 controller INFO Partition 1 not armed 2021-05-02 10:29:39,788 controller INFO System de-asserts Global Siren on 2021-05-02 10:29:40,243 controller INFO Log event: User 0 Opening at 2021-05-02 10:29:00 2021-05-02 10:29:41,041 controller INFO Log event: Zone 1 Alarm restore at 2021-05-02 10:29:00

kk7ds commented 2 years ago

I think I'm missing something here. Are you referring to the "Zone 1 alarm" message there, not matching the "Zone 2...FAULT" message? I think the former is actually mis-labled and should be "Partition 1 alarm" right? AFAIK, the partition is what goes into alarm state, not a zone. If the message changed to "Partition 1 alarm" I think that would be right, and match your "Partition 1 armed" at the beginning of the log.

Does that make sense?

kk7ds commented 2 years ago

Okay, I think this is a dupe of #26 and reading that helped me understand. Since this is more recent, I'll close this and we can continue there.