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

Add support for arming events #219

Open
garnser opened this issue Nov 7, 2024 · 2 comments
Open

Add support for arming events #219

garnser opened this issue Nov 7, 2024 · 2 comments
Labels
new-feature New features or options. no-stale This issue or PR is exempted from the stable bot.

Comments

@garnser
Copy link
Collaborator

garnser commented Nov 7, 2024

Describe the feature request

Events has been introduced as a concept but is currently only associating with Locks. It would be benifical to extract arming events as well and have these associated with the Alarm Panel.

Expected behavior

Extrapolate arming events and associate the device with the Alarm Panel Device
The question boils down to how it should be associated. Locks are populated with "LockName" which makes it easy to correlate. There's two options as I see it:

  1. Associate any event where LockName is "" to Alarm Panel, this may cause non arming events to be associated should Sector add support for other event types.
  2. Associate event based on EventType. The drawback here is that new types of events could be missed, alternatively a misc event entity could be created to catch any unknown EventTypes.

Additional context

The lock payload looks as follows:

    {
        "User": "Barn Larm",
        "Channel": "Code",
        "UserTranslationKey": "",
        "Time": "2024-11-05T20:53:20",
        "EventType": "unlock",
        "LockName": "Groventré"
    },
    {
        "User": "",
        "Channel": "",
        "UserTranslationKey": "",
        "Time": "2024-11-05T20:47:46",
        "EventType": "lock",
        "LockName": "Groventré"
    },
    {
        "User": "",
        "Channel": "",
        "UserTranslationKey": "",
        "Time": "2024-11-06T08:16:06",
        "EventType": "lock_failed",
        "LockName": "Groventré"
    }

Whereas arming looks like this:

{
"User": "",
"Channel": "quick_arming_channel",
"UserTranslationKey": "",
"Time": "2024-11-06T00:48:59",
"EventType": "partialarmed",
"LockName": ""
}
{
"User": "Jonathan Petersson",
"Channel": "App",
"UserTranslationKey": "",
"Time": "2024-11-06T00:47:37",
"EventType": "disarmed",
"LockName": ""
}
{
"User": "",
"Channel": "quick_arming_channel",
"UserTranslationKey": "",
"Time": "2024-11-06T00:47:12",
"EventType": "armed",
"LockName": ""

@garnser garnser added the new-feature New features or options. label Nov 7, 2024
@garnser
Copy link
Collaborator Author

garnser commented Nov 7, 2024

@gjohansson-ST I'm happy to take feedback on what approach you think is most reasonable.

This comment was marked as outdated.

@github-actions github-actions bot added the stale There has not been activity on this issue or PR for quite some time. label Dec 8, 2024
@gjohansson-ST gjohansson-ST added no-stale This issue or PR is exempted from the stable bot. and removed stale There has not been activity on this issue or PR for quite some time. labels Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature New features or options. no-stale This issue or PR is exempted from the stable bot.
Projects
None yet
Development

No branches or pull requests

2 participants