KeyMaster Z-Wave lock manager and scheduler

Thanks, but I’m still having trouble because it doesn’t return Cuppojoe, just the number 1. Let me back up a bit…

I have an entity called “sensor.kwikset_spectrum_brands_touchpad_electronic_deadbolt_alarm_level” that returns a number corresponding to the code slot of the last pin used to unlock the door (1, 2, 3, etc.). I also have entities from Keymaster called "input_text.frontdoor_name_1, input_text.frontdoor_name_2, input_text.frontdoor_name_3, etc. What I would like to do is be able to set the value of ANOTHER entity (“input_text.last_unlocked_by”) accordingly.

eg. If “sensor.kwikset_spectrum_brands_touchpad_electronic_deadbolt_alarm_level” returns “2”, then set the value of “input_text.last_unlocked_by” to the same as “input_text.frontdoor_name_2”.

Does this make sense? And is there an elegant way to achieve it?

those entities are used to trigger notifications when the lock is locked or unlocked. If you strictly want to use keymaster to manage PINs, then it is ok that you enter the fake ones. If you are interested in notifications, you may need to go into your lock device and enable the corresponding entities which are typically disabled by default. This only applies to zwave and ozw btw, zwave_js uses events

the automations used to use that status control input text to handle automations, but now we fire an event called keymaster_lock_state_changed. If you are running keymaster, go to Developer Tools > Events and at the bottom in the Subscribe section, enter keymaster_lock_state_changed and click “Start Listening”. Then try to lock or unlock your door and you should see a corresponding event show up on that page along with all of the data that I think you are looking for (you have to stay on the page while you do all of this). You can use those events as a trigger to set the value of an input_text

Thanks. I didn’t need to Listen for the unlock event because there is already an entity that shows me this:

sensor.kwikset_spectrum_brands_touchpad_electronic_deadbolt_alarm_level

This will have a value of 1, 2, 3, etc., depending on which code slot unlocked the door. No problem. But this value changes if the lock is re-locked. I want to capture the value when the lock is unlocked, and keep it as “Last Unlocked By”, whether the lock gets relocked or not.

Since Keymaster uses entities like “input_text.frontdoor_name_*”, I was hoping there would be a way to correlate the two. See my “eg” example above.

I’m sorry, but I’m new enough to HA and YAML that it’s hard to know WHAT to ask, let alone WHERE to find the answer! :slight_smile:

Sure, so what you want to do is create an automation with a state trigger that fires when the state of your lock goes from locked to unlocked. In your action, you’d want to call the input_text.set_value service on the entity you are storing the value in, and for the value use templates to retrieve the state of the code slot that you get from that sensor.

This goes outside the scope of Keymaster itself, so I would recommend if you have additional questions that you join the Home Assistant Discord server and ask in the #automations channel

Interesting, I’m on ozw and likely switching to zwave_js, but may wait until it gets updated a time or two more. I’ll look into enabling those entities in the meantime, thanks! Will there likely be a solution to zwave_js. Are the developers here switching to zwave_js?

Can’t speak to everyone else but I am already running zwave_js. There’s a PR to add support to keymaster so it shouldn’t be an issue soon

Yeah I’m in the same boat patiently waiting for the PR to be merged :slight_smile: but I don’t mind

Raman325,

Pre-Installation Step 2 has yaml’s listed for OZW and Zwave, but not for Zwave_js. What did you do different for using keymaster with Zwave_js?

As he is one of the devs of this and he’s stated that there is an open PR for this right now he’s probably testing it out and so its not available for all of us…yet :slight_smile: Its coming

I just updated the wiki after the PR got merged. Check again :slight_smile:

it has arrived!

Congrats and thanks to the devs!!

Oh snap update in progress. Now since my alarm type/alarm level is not working right yet (Its on the import list for zwavejs) I’m assuming that it won’t work 100% yet.

Nevermind I see those are no longer in there :slight_smile:

OMGosh my lock codes add/remove like they’re supposed to. THANK YOU

1 Like

We’ll update the docs, but as you figured out, zwave_js uses events to expose lock/unlock notifications instead of entity states

If you need help with docs let me know I’ll gladly fork it and update the docs its the least I can do for all you have just done for me.

EDIT: On a side note anyone know which new sensors are triggered based on the lock settings? I’m assuming I might have to watch the zwave events to catch this but I’d like to be able to track who unlocks the door.

EDIT2: Nope doesn’t show up in the zwave events who unlocked the door just that it was an RF lock operation. I know that my lock is on the list of things to be updated within zwavejs so I wonder if once that goes into the DB if the alarm_type/alarm_level will be enabled as sensors for the device and then I can track which slot unlocked the door.

with zwave_js, lock and unlock actions get exposed as events so you won’t get the alarm_type and alarm_level entities. Keymaster attempts to listen to those events and then send a new event with the name of the code slot. Go to Developer Tools > Events and at the bottom listen to the zwave_js_event event. Then try locking or unlocking your lock, and you should see the raw data that we can see on that page. If you see a code slot # in the event data, send me an example so that I can look at adding support. I currently expect it to be part of the parameters dictionary (userId to be precise)

Ok so yeah I was monitoring those events trying to see if it showed anything. I wonder if since the Yale locks are on the to be imported list if there are things that just aren’t 100% yet. I say this because when I monitored those events and did a unlock of the door nothing is sent back to HA. I can see manual lock/unlock events as well as when I close the door and my automation tells it to lock. But nothing is reported back as to who did the lock. So for now I’ll just have to wait for this to be reported and then I’ll get the fun of figuring out how to have appdaemon monitor zwave events (I know it can, just haven’t had a need to do it yet) so that way I can fix my notification automations to capture these events.