-
-
Notifications
You must be signed in to change notification settings - Fork 101
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
alarm_control_panel STATE_ALARM_* states and their intended uses? #54
Comments
|
@balloob Is there anyone else we should include in this discussion? |
I agree with the states being named poorly. The simplest in my mind would be DISARMED, EXIT DELAY, ARMED, ENTRY DELAY, TRIGGERED. Every alarm system has this same basic functionality but it seems to be implemented differently in each platform. For example, envisalink currently uses armed / disarmed / triggered, and then has separate attributes to signal the entry / exit delay. For the second point, arm_night is already in the entity. This would be arm home + no exit delay. Vacation mode (or arm max as some panels call it), which is arm away + no exit delay, has an open architecture issue and PR referenced here: Let me know if you agree based on what you see on Elk M1 |
Having had a month or so to ponder this, another idea came to mind. Yes, tweak the alarm states. In addition I was wondering is substates make sense? For example, the state is "armed" and the substate is "away", or "vacation", or... I understand that there are reasons for standardizing state. I'm hoping we can achieve that goal and achieve the other goals. Substate might accomplish that. Perhaps there's a better idea. |
Substates could indeed also work. However we have a finite number of alarm states and they are mutually exclusive ... so ideally we can avoid the extra complexity. If it's helpful, I can lay out a proposal for the alarm states and then we ask maintainers of the different alarm_control_panel components to weigh in. Similar to the climate architectural review recently conducted. |
Regardless of states vs states w/ substates ... I will admit perhaps we can simply map all the Instant variants to the non-Instant types, if we have to, functionally Instant just means no exit delay. Though it's possible someone would want different things to trigger depending on instant or not. @abarbaccia It seems not all alarms use terms similarly, based on your descriptions. For the Elk M1: Vacation mode is just another flavor of Away intended to trigger automation rules or allow those rules to operate differently if in Vacation mode (i.e., you can have them not do things because you're not home, or you can have them do things because you're not home) Night is different from Stay Instant (which would be Stay without an exit delay), it allows arming of interior zones even in Stay mode, some zones can be indicated to be specifically night zones, so you can have some zones trigger in Stay Night and others not trigger in Stay Night. You might for example not have the upstairs or most interior zones active during Night, but the interior zones by all the doors and main floor windows would be. (from Installation & Programming Manual)
|
Good points both.
I think to move this forward we should lay out the different states and
align on those first. This would help tease out things like MAX vs.
Vacation mode. Next we can align on how to implement (seems primarily to be
around what goes in the state vs. attributes).
What do you all think? I'm happy to take a first pass at the states based
on what i've posted before.
Andrew
…On Thu, Sep 6, 2018 at 4:15 PM BioSehnsucht ***@***.***> wrote:
Regardless of states vs states w/ substates ...
I will admit perhaps we can simply map all the Instant variants to the
non-Instant types, if we have to, functionally Instant just means no exit
delay. Though it's possible someone would want different things to trigger
depending on instant or not.
@abarbaccia <https://github.com/abarbaccia> It seems not all alarms use
terms similarly, based on your descriptions.
Vacation mode is just another flavor of Away intended to trigger
automation rules or allow those rules to operate differently if in Vacation
mode (i.e., you can have them not do things because you're not home, or you
can have them do things because you're not home)
Night is different from Stay Instant (which would be Stay without an exit
delay), it allows arming of interior zones even in Stay mode, some zones
can be indicated to be specifically night zones, so you can have some zones
trigger in Stay Night and others not trigger in Stay Night. You might for
example not have the upstairs or most interior zones active during Night,
but the interior zones by all the doors and main floor windows would be.
(from Installation & Programming Manual)
Vacation mode is primarily for use with the Whenever/And/Then Rules
programming of Elk-RP for long term energy savings.
Since interior zones are automatically excluded once the Stay mode is
activated, the M1 allows this key to Stay arm even while one or more
interior zones are violated, provided they are programmed for “force
arming”. The Stay Night mode re-activates any interior night zones. To
prevent a false alarm the control will not allow change to the Stay Night
mode when a interior night zone is violated unless it is programmed for
“Force arm”.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#54 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAd9ak2V4X2t6Zn6wpd9Os36tzcYGynwks5uYYJRgaJpZM4Vzbwl>
.
--
*Andrew Barbaccia*
|
I'd happy to review, comment, edit, ... Thanks Andrew! |
I believe, for Elk M1 system: Disarm : Disarmed. I think we can represent them as follows:
N1 : Exists only to enable integration and rule changes due to Vacation mode. Perhaps we just set a vacation flag on the sensor entity for the panel and use STATE_ALARM_AWAY ? Functionally we (Elk M1) don't really need a vacation mode though someone might want the alarm state reflected in the logs accordingly, as we can just set an attribute to reflect it. Seems like a minor effort to add a corresponding constant, but we need to be sure it's not confused for "Arm Max" since it appears that not all Vacation modes are created equal. Further, when armed, any of the following can be true (calling them "sub-states" for lack of a better term):
N4 : Optionally, alarm reporting can be delayed to allow more time to disarm before a false alarm is sent to the central station. We can probably treat this the same as Alarming / STATE_ALARM_TRIGGERED, I'm not sure if there's value in adding a state for this. Further states that don't seem to have a useful correlation for Elk at the moment :
To further explain how the Elk exposes it's arming state, there is 'arming status', 'arm up state', and 'current alarm state'. So you can have various combinations, such as armed to night instant, force armed with a zone violated, and an entrance delay active. Arming status: Disarmed, Away, Stay, Stay Instant, Night, Night Instant, Vacation A lot of the resulting matrix of those substate combinations are not necessary to convey in the dis/arming UI, and can simply be attributes, but a few of them can be relevant. To wrap up : Maybe we should add _MAX (and also _INSTANT) variations for AWAY, HOME, and NIGHT states. I'm not sure if we should add vacation (vs attribute), and if so we need to make an effort to not having implementations confuse the meaning with 'arm max' flavor that has no entry delay. Though I suppose _INSTANT meaning instantly armed might be confused with 'arm max' type of arming for other implementations that arm with zero entry delay (arming instantly vs instant alarming). Perhaps a standardized attribute to indicate whether entry delay is enabled (separate from whether it is currently, at the moment, actively occurring) would cover these 'Arm Max' situations. We could add _MAX flavors as well instead, though if you can INSTANT and MAX then we're getting to a large number of possible states (though I'm not sure it matters - each implementation can expose/address only the relevant ones, and adding them to the UI side of things only has to be done once). (edit: fixed up according to further discussion below) |
Looks like home-assistant/frontend#1549 got merged so STATE_ALARM_ARMING can now be disarmed in. So perhaps we can use it for exit delay? |
Thank you for writing this up. Most of it is in line with my experience on Honeywell / Ademco and probably most DSC panels. A few questions / thoughts to refine this further:
|
1-3) Which means currently we're using the wrong states for the Elk integration (and/or, everyone else is - as with many things in HASS, implementations are left to figure out meaning of states / constants on their own for the most part by guessing at context clues from other implementations). As for Custom Bypass ... I don't really know how any other panels operate. I know you can force arm which will bypass any zones marked as bypassable (which is separate from defining them as being perimiter, night, etc), and perhaps custom bypass means something else. If it is a custom mode where you can set which zones can be bypassed, then that probably matches Night better - since in the Elk, you can arm just exterior (stay), exterior + night (stay night), or exterior + night + interior (away). But for all those arming modes, you can force arm too or temporarily bypass manually before arming. Force arming, which is available when specially marked zones are violated will temporarily bypass them until they become secure then they are included in the armed zones:
Separately, you can bypass the zones temporarily from the keypad before arming, and it will stay bypassed for the entire time the system is armed until it is disarmed/re-armed:
I had thought this last was what was referred to as a "custom bypass" but perhaps "custom bypass" is a preset, versus this temporary manual bypass. So it sounds like we need _INSTANT and _MAX (or renamed equivalents, depending on the prevailing nomenclature, and appropriate patches to all the things). 4-6) From the (previously) lack of being able to disarm during ARMING, I suspect the ARMING and DISARMING were meant for temporary states while waiting on API calls to complete (i.e., user clicks arm in HASS, component sends command to arm, sets ARMING status, waits for API call to complete, then sets corresponding ARMED or DISARMED state depending on result). For the Elk's case, we just fire off arming requests and if it succeeds we'll get a separate message telling us. Nothing about the API is really stateful, you just fire commands or requests for information and either get a result (nearly instantly but not guaranteed at all) or don't, so we don't have any "in progress" states. As far as I can tell, the only system currently using these ARMING and DISARMING states is the Total Connect system.
TL;DR : |
Thanks! a) I think we're still a bit mixed up. INSTANT = no entry delay. This is for both Honeywell and Elk, and the other panels i was able to find online. MAX is the same thing and can be consolidated so we just use INSTANT going forward. From what I could find online it seems exit delay is set for each zone during initial configuration, and if you arm those zones then a exit delay is provided for you. If we agree on the armed states, what is the process to get this aligned with other platforms and moved forward? |
a) So there aren't any panels that have a no exit delay mode that would need some other setting then? In that case we just use INSTANT for MAX I guess since it already exists. f) So perhaps there should be an attribute that can indicate arming readiness - I don't think we have this standardized currently? As for moving forward.. I guess we need to formalize the proposed changes and then get the attention of one of the "adults" to sign off on it, at which point we can submit a PR to implement it ... ? |
a) I do not think so at this point. I think we should ping the owners of other alarm_panel components, and see if they are aligned. f) I think we may want them to be different states vs. attributes. I confirmed in a disarmed - failed mode you cannot arm the honeywell system, so it is indeed acts as a different state. Formalized changes: (please add / let me know if you agree)
|
f) Also add ARMED_NIGHT_INSTANT. |
Around the "armed" states. I don't see the need for instant. Instant, as is vacation, is a type of arming action, i.e.: a service. The panel is armed home (or day), night, and away. Instant is just how quickly it gets there. Related, how would entry_delay_enabled be used? Does that make sense? |
@gwww Actually it seems instant means no entry delay (instant alarm), not no exit delay (instantly armed). Unless you have experienced differently? Regardless, other Alarm systems have instant (no entry delay) modes. |
Ahh, right you are! I just reread the Elk manual. |
This architecture issue is old, stale, and possibly obsolete. Things changed a lot over the years. Additionally, we have been moving to discussions for these architectural discussions. For that reason, I'm going to close this issue. ../Frenck |
Continuing from home-assistant/frontend/pull/1549
Currently, the UI only allows disarming when state is one of the armed states or
STATE_ALARM_PENDING
orSTATE_ALARM_TRIGGERED
. There also existSTATE_ALARM_ARMING
andSTATE_ALARM_DISARMING
.What are these states intended for, and why can't you disarm during them? Which states should represent entry and exit timers ?
The text was updated successfully, but these errors were encountered: