Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Alphanumeric Zone Fault Can Temporarily Cause Other Faulted Zones to Incorrectly Report as Ready #50

Closed
krkeegan opened this issue Jun 25, 2020 · 1 comment

Comments

@krkeegan
Copy link
Contributor

On my alarm panel (Vista 20SE) the status of hardwired(non-expander) zones can only be determined by parsing the alphanumeric messages that cycle through the list of faulted zones.

  1. Normally, faulted zones cycle through from lowest to highest and then loop back again.
  2. When a new fault is detected, that zone is immediately reported and then the loop starts back with the lowest zone again.

This can incorrectly cause faulted zones to be reported as ready. This error happens inside the ZoneTracker class in the _clear_zones() function.

The logic of clear zones is the following:

  1. If the last_faulted_zone is less than the current zone: set to clear any zones between this zone and the last_faulted_zone.
  2. If the last_faulted_zone is greater than the current zone: set to clear any zones that do not fall between this zone and the last_faulted_zone.

The logic is based on the assumption that the zone fault messages always loop in an incrementing order. Which isn't the case when a new zone faults.

When a new zone faults, a whole bunch of faulted zones can become "ready" that shouldn't.

Imagine the following scenario:

  1. zones 1,3,7 are faulted
  2. The keypad reports zone 1 faulted
  3. Then zone 6 is newly faulted, the keypad reports this zone as faulted.
  4. _clear_zones() then changes zone 3 to ready, which is wrong.

Is this only an issue for my or my panel?

I am happy to create a PR that fixes this if this isn't unique to me.

@melyux
Copy link

melyux commented Nov 23, 2020

This happens to me occasionally as well. Also related to this is probably the #46 bug I had reported months ago when you press the function keys. The parsing is pretty brittle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants