-
Notifications
You must be signed in to change notification settings - Fork 43
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
Lock automation design question #340
Comments
You don't need those sensors, keymaster also emits events ( |
@firstof9, thanks, I’ll check out those keymaster events you suggest. Do you think using those events would simplify the configuration so that I wouldn’t have to keep three different locations in the conf in sync? |
@firstof9 based on the code, it looks you enrich the event w/ the name values from the configuration. That suggests that I could use a naming convention for slots across both locks (e.g. If so, a possible improvement over a naming pattern would be to permit some sort of structured metadata for matching in the triggers. E.g. |
It would be easier to ask for automation assistance on the forum thread. There's tons of skilled automation crafters on the forum 🙂 |
Thanks @firstof9 I'll bring up in the thread if there are any opportunities for improvement, but I've got a baseline working here. I name code slots with trigger:
- platform: event
event_type: keymaster_lock_state_changed
event_data:
lockname: gate
action_text: Keypad unlock operation
condition:
- condition: template
value_template: "{{ \"BOTH-DOORS\" in trigger.event.data.code_slot_name }}"
action:
- service: lock.unlock
data: {}
target:
device_id: d6dc8d424851db218bfe4fe64f910165 |
I wouldn't use the |
@firstof9 ya thanks, good tip. For posterity: https://community.home-assistant.io/t/keymaster-z-wave-lock-manager-and-scheduler/166419/2875?u=jwilner |
Hi -- This is not so much a feature request for keymaster (great product!) but an automation design question for a new house. Happy to contribute code if that were the cleanest solution though. Also please let me know if I should direct these questions elsewhere.
Anyway, to enter the house there's an outer gate followed by an inner door. Both will have keyless Yale Assure Lock 2s with zwave modules installed; I'm using zwave_js since that seems to be the blessed path nowadays.
I would like to achieve the following UX:
a) When certain users enter a code for the outer gate, the inner door also opens
b) if the automation doesn't work for whatever reason, the same code should work for the inner door.
c) When other users (e.g. delivery people) enter a code for the outer gate, the inner door remains locked (so that packages can be left in the interstitial area).
d) Generally, it should be possible to issue temporary keys of both sorts.
Keymaster goes a long way in terms of the key management for b, c, and d.
To fulfill (a) it looks to me like I can't use keymaster's user code detection because of https://github.com/FutureTense/keymaster/wiki/Troubleshooting#missing-sensors, but I can rely on the
parameters.userId
field of thezwave_js_notification
event (whereuserId
corresponds toslot
or some other notion of insertion order). I can vaguely see how I can write automations likeif device_id == GATE_ID and event_label == "keypad unlock operation" and parameters.userId == 2: unlock(DOOR_ID)
.I can live with this if need be, but it feels a bit brittle -- to add a single user for whom the inner door automatically unlocks, I'd need to touch three separate pieces of configuration (1. add a gate lock code, 2. add a door lock code, and 3. define a new automation). Ideally this would just be an extra checkbox in the UI or something to propagate the code a slot for the inner door and create the automation. Keymaster's parent-child notion is close to getting me the propagation, but isn't granular enough to address both A + C.
My questions are:
Perhaps I could simplify things by just handling codes for use case C out of band -- i.e. via the Yale Access app -- and then using Keymaster's parent-child notion w/in HA and write some sort of automation that would detect if the user id is one managed by Keymaster and then open both doors. Of course, having the key management divided across platforms is not as nice.
Thanks again for a great tool.
The text was updated successfully, but these errors were encountered: