nutechsoftware/alarmdecoder

Error in on_arm documentation

TD22057 opened this issue · 3 comments

In decoder.py:32:
on_arm = event.Event("This event is called when the panel is armed.\n\nCallback definition: def callback(device)")

But on line 621:
self.on_arm(stay=message.armed_home)

So I think the docs need to say that the API is "callback(device,stay)".

Also a question: I armed the system in away mode and on_arm(device,False) was called while the exit delay was active. When the exit delay ended, it called on_arm(device,True). I'm not sure how to interpret that. The code in decoder makes it seem like the parameter is away vs stay but that doesn't seem to be what's happening. Any thoughts?

Good catch on the docs. That one definitely needs to be updated.

As for the Stay/Away interaction: I'm going to assume you have a DSC panel since that's the only place I've seen that behavior. I think there are two things here that may be confusing.

You say that you armed in 'away' mode and the panel switched to 'stay' after the exit delay expired. That's normal. If you'd opened a door after arming away, it would have stayed in 'away' mode. Since a door didn't open it assumed you stayed put and meant to arm stay.

Now the behavior you're seeing because you didn't leave is definitely a quirk of the DSC panels. When you arm the panel, regardless of mode, it arms itself 'away' by default. When the exit delay finishes it switches itself into stay mode, and this change triggers another event from our library. We have discussed it a bit in the office, but I don't believe we've come to a conclusion on what to do about it. I think it'll likely come down to adding a new 'arming' bit to the protocol and using that to properly deliver events.

Thanks - that makes sense - I seem to recall something like that being in the manual. Since I was testing, I didn't actually open a door. It's actually a Vista 20P panel w/ the latest firmware.