homebridge-envisalink icon indicating copy to clipboard operation
homebridge-envisalink copied to clipboard

Arm for away or home with existing zones open

Open readylmay opened this issue 3 years ago • 5 comments

Does anyone else think a feature where by a switch exposed in HomeKit would arm the alarm and override any zones that are open would be valuable?

For example, if you are away from your home and want to set your alarm, but a window is open in zone 5. This switch would arm to away by overriding zone 5 (and any other open zones).

I find myself in this situation now where someone left my house and didn't set the alarm, but left a window open. Now, I can't remote set....

readylmay avatar Nov 22 '21 16:11 readylmay

Not a bad idea. I was considering addressing this enhancement for the same reason: https://github.com/dustindclark/homebridge-envisalink/issues/57

I like your idea slightly better because it enables better geofencing automation.

dustindclark avatar Nov 22 '21 16:11 dustindclark

Yeah, I think have switches for each zone bypass would get messy. I would prefer an omni-switch, that sets the alarm with any open zones bypassed and then switches back to the off position once the command is set. One for "Bypass-Home" and one for "Bypass-Away"

readylmay avatar Nov 28 '21 20:11 readylmay

I don't think it would be messy. If a contact sensor is open, you'd long press it, then toggle the switch to bypass. It wouldn't create a separate appliance/switch.

I do agree that a bypass all would be more convenient though.

dustindclark avatar Nov 28 '21 20:11 dustindclark

Ah got it, wasn't aware that you could long press a contact accessory type. Likely both features would be good with a custom string switch as well.

readylmay avatar Nov 28 '21 20:11 readylmay

this will not not work with a plugin, it's the alarm panel that must be changed. There is a way to program the panel to arm an opened zone. Once the panel is armed Stay/Away this zone remains open. This zone must remain open during the arming process. However once this zone is close it becomes part of the protected area and will trigger if opened.

I don't remember, but try Zone Definitions, I have this setup for my garage door.

Arm the system and take your time loading the car.

lfiocco avatar Apr 23 '22 16:04 lfiocco

This is available for testing in v1.1.27-beta.0 (tap the wrench on the plugin > Install Alternate Version). Would love some help testing and feedback. Here's how it works.

There's a new bypass switch for each Alarm partition (or just your alarm in general if you only have one partition). If this switch is on, any open windows/doors will be bypassed when the alarm is armed. Note that this will delay arming by about 1.5s for each open zone because it takes a while for the panel to process each bypass request. Additionally, if you have a Chime switch, you can't tell which switch is for enabling Chime and which is for enabling Bypass. I think this is a limitation with the Home app, but I've opened a Homebridge Bug for clarification.

I think this approach is better than alternatives because it enables automation. For example, if you want to arm the alarm every night at 11PM, you can leave this switch on and the automation will work...even if there are open doors/windows.

dustindclark avatar Oct 20 '22 23:10 dustindclark

is it easy to rollback? happy to test and thank you!

readylmay avatar Oct 20 '22 23:10 readylmay

Getting a keybus Busy error.

[20/10/2022, 17:07:07] [Envisalink] Bypassing open zones in partition: 1. Checking 20 accessories.
[20/10/2022, 17:07:07] [Envisalink] Bypassing open zone: Master Bedroom Windows
[20/10/2022, 17:07:08] [Envisalink] 1 open zones were bypassed.
[20/10/2022, 17:07:08] [Envisalink] Failed setting panel state to 1 Error: Command 0301 resulted in 018 error from alarm: Keybus Busy – General Busy (The requested partition is busy)
    at /usr/local/lib/node_modules/homebridge-envisalink/src/platform.ts:426:28
    at Socket.<anonymous> (/usr/local/lib/node_modules/homebridge-envisalink/node_modules/nodealarmproxy/nodealarmproxy.js:316:9)
    at Socket.emit (node:events:390:28)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:289:9)
    at Socket.Readable.push (node:internal/streams/readable:228:10)
    at TCP.onStreamRead (node:internal/stream_base_commons:199:23)
[20/10/2022, 17:07:09] [Envisalink] Partition 1: notready, mode: undefined.

readylmay avatar Oct 21 '22 00:10 readylmay

Thanks for testing. I've increased the delay between bypass commands. Try once more in v1.1.28-beta.0.

Also, I created #146 such that we have a better mechanism for "waiting" between commands to the panel.

dustindclark avatar Oct 21 '22 00:10 dustindclark

And yes, it's easy to rollback. Just install the non-beta version in the same way.

dustindclark avatar Oct 21 '22 00:10 dustindclark

1.1.38-beta.0 worked as expected.

readylmay avatar Oct 21 '22 18:10 readylmay

yeah, I think I got the kinks worked out to wait for the panel to be ready between bypasses. Thanks for testing. Now if I can just get that switch naming issue resolved...

dustindclark avatar Oct 21 '22 18:10 dustindclark

Fixed and published in v1.2.0

dustindclark avatar Oct 24 '22 16:10 dustindclark