Don’t get me wrong, I’m semi new to HA and have very VERY basic programming skills… This is why I asked. The whole automation was generated using the GUI so I’m not sure how/why it uses the device id. My lock is a Z-wave lock but my door sensor is ZigBee.
Sorry, but it sounded like you were miffed I didn’t use it. Most of the code we get asked to implement haven’t cut the mustard for various reasons. I ignored yours because it requires a door sensor to be installed. There were other issues, but that was a non-starter
I have two different types of automatic locks.
- Deadbolt style in which case this is 100% what I want
- Handle lock style in which case it doesn’t matter if the door is open or closed when it gets locked it won’t ding the doorframe.
In the case of the second, is there a way to not have it pay attention to the door sensor (yes I do have one). Just curious, it’s not an issue to me if there isn’t a way, but it’s a use case I personally have where I want the door to lock no matter what after a given amount of time, but sometimes not basically, I need to software control the auto-lock because there are regular blocks of time where I don’t want it to auto-lock, but outside of the those blocks I do.
Just set it to the “fake” sensor. It will behave as if the door is always closed.
I just received my Home Assistant Blue in the mail. I decided to setup a new instance of Home Assistant rather than migrate. I’ve got everything setup just the way I had it on my old HA Docker container that was running on a Synology NAS… except for keymaster. I’m getting “entity not available” errors and “custom element doesn’t exist” Lovelace errors.
Also, the following error popped up in the logs:
Logger: homeassistant.helpers.service
Source: helpers/service.py:128
First occurred: 12:17:56 PM (2 occurrences)
Last logged: 12:31:25 PM
Unable to find referenced entities timer.keymaster_game_room_door_autolock
keymaster was running fine on my old HA instance, and I believe I followed the same installation procedure with the new HA instance. I’m using the same Aeotec Gen 5+ Z-Wave Stick and the same locks. The Z-Wave locks are responding normally from Home Assistant. I really have no idea what I’m doing wrong. The only real difference that I can think of is that I was running HA core before and I’m running HA OS with Supervisor now. Any help is greatly appreciated.
Make sure you have the latest keymaster downloaded. There was a version out there that might have a bug
Make sure you completed the pre-install step:
I moved the following to the very top of my configuration.yaml file and that fixed the entity errors:
homeassistant:
packages: !include_dir_named packages
However, the “custom element doesn’t exist” Lovelace errors persist.
Also addressed in the wiki:
I feel like such a dope. I didn’t read down far enough after I got the entity errors. Thank you so much. I’m all good now.
You’re not the first nor the last person to miss bits of a wiki.
Enjoy!
I think I’ve got it working now, even notifications. Except that one of my locks, the Schlage, does not send a push notifications when the lock state changes via the app (RF lock operation). It only sends a push notification for manual and keypad lock operations. My two Kwikset locks are pushing all notifications normally, RF, manual, and keypad.
Don’t sweat it. Happens to all of us. I wish we could make that part easier, but alas…
Exclude the lock. Delete the integration. Then factory reset the lock, and include it again. That works for me every time on my Schlage.
I did as you suggested. I excluded the Schlage lock and then deleted its keymaster integration. I then factory reset the lock. This is when the fun started.
You wouldn’t believe the time I had re-including the Schlage lock back on the network. It took about two hours of fiddling. I finally got it back by pulling the lock off the door, setting it right next to the controller, and using the Z-Wave JS integration from within Home Assistant to add the node. Apparently, the current version of ZWaveJS2MQTT (5.5.1) add-on’s control panel CANNOT include these locks. It failed every time. But I digress. It is now back on the network and operating normally.
I then re-installed the keymaster integration, and everything is back to normal, but… I’m still not getting RF notifications from the lock. Keypad and manual notifications are still working as before. Do you have any other thoughts?
Can someone help me understand keymaster notifications? Or point me to a post/wiki on the subject?
Some of the automations and scripts seem to work. I get HA phone app notifications; but definitely no notifications on user codes. Slots 2, 3, and 4 notifications are selected on. I get notifications when the locks are unlocked or locked; I believe I also get notifications when a lock is already locked and I send a lock command (in a “going to sleep” automation, for example, when the doors are already locked).
I last locked up last night between 9-10:30pm:
It’s likely easier to listen for the keymaster_lock_state_changed
events that are emitted via your own automation/script.
Thanks, I’ll watch for the events and go from there. I didn’t write any of these automations or scripts… they’re all defaults loaded with the integration.
Correct, so are part of the user code expiration part of the scripts.
I’m not sure HA events are going to get me what I want. There doesn’t appear to be any differentiation between manual lock events and pushbutton lock events.
ZwaveJS to MQTT, however, gives me a sufficient detail… along with the user code used for an unlock. I just don’t know how to use eventLabel
from that add-on to trigger a script in HA:
MANUALLY LOCKED:
2021-09-22 10:56:05.010 INFO ZWAVE: Node 95 CC Notification {
type: 6,
event: 1,
label: 'Access Control',
eventLabel: 'Manual lock operation',
parameters: undefined
}
2021-09-22 10:56:11.773 INFO ZWAVE: Node 95: value updated: 98-0-currentMode 255 => 0
UNLOCKED WITH CODE:
2021-09-22 10:56:11.775 INFO ZWAVE: Node 95 CC Notification {
type: 6,
event: 6,
label: 'Access Control',
eventLabel: 'Keypad unlock operation',
parameters: { userId: 1 }
}
LOCKED WITH BUTTON:
021-09-22 11:03:49.569 INFO ZWAVE: Node 95 CC Notification {
type: 6,
event: 5,
label: 'Access Control',
eventLabel: 'Keypad lock operation',
parameters: undefined
}